Ok so, here it is the procedure step by step.
Open a terminal, create a new folder, enter in it.
Then:
Paste the following code:
Code:
# 原始出处#p_url='https://raw.githubusercontent.com/yangxiaohua1977/sound/master'
# 将要合并到kernel中的代码,使用这个仓库中的代码
p_url="https://raw.githubusercontent.com/dsd/linux/es8316"
files="
sound/soc/codecs/es8316.c
sound/soc/codecs/es8316.h
sound/soc/codecs/Makefile
sound/soc/codecs/Kconfig
sound/soc/intel/Kconfig
sound/soc/intel/boards/Makefile
sound/soc/intel/boards/cht_bsw_es8316.c
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/sst/atom/sst_acpi.c
sound/soc/intel/atom/sst/sst_acpi.c
sound/soc/intel/atom/sst-atom-controls.h
sound/soc/intel/common/sst-acpi.h
sound/soc/intel/common/sst-dsp.h
sound/soc/intel/atom/sst-mfld-platform.h
sound/soc/intel/atom/sst/sst.h
sound/soc/intel/atom/sst-mfld-dsp.h
"
for f in $files
do
echo $f
mkdir -p `dirname $f`
wget $p_url/$f
mv `basename $f` $f
done
then:
Code:
chmod +x download.sh
./download.sh
and wait until the scripts download the needed files.
Then:
Code:
rm sound/soc/codecs/Makefile
rm sound/soc/intel/boards/Makefile
rm sound/soc/intel/atom/sst/Makefile
Then:
Code:
nano sound/soc/codecs/Makefile
and paste:
Code:
snd-soc-es8316-objs := es8316.o
obj-m += snd-soc-es8316.o
Then:
Code:
nano sound/soc/intel/boards/Makefile
and paste:
Code:
snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
obj-m += snd-soc-sst-byt-cht-es8316.o
Then:
Code:
nano sound/soc/intel/atom/sst/Makefile
and paste:
Code:
snd-intel-sst-acpi-objs += sst_acpi.o
obj-m += snd-intel-sst-acpi.o
Then:
Paste:
Code:
# ubuntuC_FLAGS="-C /usr/src/linux-headers-`uname -r`"
# opensuse
# C_FLAGS="-C /usr/src/linux-`uname -r`"
c_dir=`pwd`
for mf in `find $c_dir -type f -name "Makefile"`
do
echo $mf
cd `dirname $mf`
make $C_FLAGS M=`pwd` modules
mv *.ko $c_dir
cd $c_dir
done
Then:
Code:
chmod +x compile.sh
./compile.sh
Bookmarks