编译前准备
本人用的系统为ubuntu1804,编译前需要准下面几件事项:
- 源码下载
- 交叉编译器 arm-linux-gnueabihf-gcc-8.2.1
- 必要库的安装 apt-get install XXXX
- 注意!!! 切换系统sh->bash
sudo dpkg-reconfigure dash
test@ubuntu:~$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Apr 8 17:06 /bin/sh -> bash*
编译步骤
板卡为CPU:SSD202 SPI-Nand:FS35ND02G-S3Y2 256MB
编译Uboot
declare -x ARCH="arm"
declare -x CROSS_COMPILE="arm-linux-gnueabihf-"
#make clean
make infinity2m_spinand_defconfig
make -j8
获得 u-boot_spinand.xz.img.bin 为期望文件
编译Kernel
declare -x ARCH="arm"
declare -x CROSS_COMPILE="arm-linux-gnueabihf-"
#make clean
make infinity2m_spinand_ssc011a_s01a_minigui_defconfig
make -j8
获得 arch/arm/boot/uImage.xz 为期望文件
编译rootfs
declare -x ARCH="arm"
declare -x CROSS_COMPILE="arm-linux-gnueabihf-"
declare -x PROJECT="2D07"
./setup_config.sh ./configs/nvr/i2m/8.2.1/spinand.glibc.011a.128
cd kbuild/4.9.84
./release.sh -k ${RELEASEDIR}/kernel -b 011A -p nvr -f spinand -c i2m -l glibc -v 8.2.1
make clean
make image-nocheck
获取image/output/images文件夹为期望文件