从0开玩lichee zero-2-kernel编译

系统

为了支持 rtl8723 我们需要新较新的分支:
git clone https://github.com/Lichee-Pi/linux.git
git checkout -b nano-5.2-flash origin/nano-5.2-flash

cd linux
make ARCH=arm licheepi_zero_defconfig
make ARCH=arm menuconfig   #add bluethooth, etc.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j16 INSTALL_MOD_PATH=out modules_install

支持 rtl8723BS

make menuconfig => Device Drivers => Staging drivers
选择rtl8723BS 为 M

troubleshoot

  • multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
    解决:vi ./scripts/dtc/dtc-parser.tab.c ,将YYLTYPE yylloc这一行注释掉

  • scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
    解决:sudo apt install openssl libssl-dev

  • libz.so.1
    解决:apt-get install lib32z1

  • 其他指令问题 ,比如 "cpsid i","isb" 等
    解决:更换编译器,比如:
    https://releases.linaro.org/components/toolchain/binaries/
    https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-i686_arm-linux-gnueabihf.tar.xz

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注