知识储备@IT·互联网

openwrt u-boot编译过程

2017-05-24  本文已影响298人  kevin_007

用make V=s -n >m.log命令,查看make执行过程

开始编译uboot

make -w -r -C package/boot/uboot-ar71xx compile BUILD_VARIANT="nbg460n_550n_550nh"  
make[3]: Entering directory '/home/u/home/aquila/mini_CPE/openwrt/package/boot/uboot-ar71xx'
/home/u/Atheros/qsdk/build_dir/target-mips_r2_uClibc-0.9.33.2/

解压u-boot

. /home/u/home/aquila/mini_CPE/openwrt/include/shell.sh; bzcat /home/u/home/aquila/mini_CPE/openwrt/dl/u-boot-2010.03.tar.bz2 | tar -C /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03/.. -xf - 

打patch

if [ -d "./patches" ] && [ "$(ls ./patches | wc -l)" -gt 0 ]; then export PATCH="patch"; if [ -s "./patches/series" ]; then sed -e s,\\\#.*,, ./patches/series | grep -E \[a-zA-Z0-9\] | xargs -n1 /home/u/home/aquila/mini_CPE/openwrt/scripts/patch-kernel.sh "/home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03" "./patches"; else /home/u/home/aquila/mini_CPE/openwrt/scripts/patch-kernel.sh "/home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03" "./patches"; fi; fi

删除.svn文件

cp -fpR ./files/* /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03
find /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03 -name .svn | xargs -r rm -rf

执行make config

make -C /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03 nbg460n_550n_550nh_config

执行make

make -C /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03 CROSS_COMPILE=mips-openwrt-linux-uclibc-

将编译完的bin文件复制到bin目录

cp -fpR /home/u/home/aquila/mini_CPE/openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/u-boot-nbg460n_550n_550nh/u-boot-2010.03/u-boot.bin /home/u/home/aquila/mini_CPE/openwrt/bin/ar71xx/openwrt-ar71xx-generic-nbg460n_550n_550nh-u-boot.bin
上一篇下一篇

猜你喜欢

热点阅读