2018/05/09 10:49 zhoulinhua@2018-05-10
一、源码下载
要获得源代码,您必须克隆构建droot-at91和buildroot-外部微芯片存储库。buildroot-at91是一个带有最小数量补丁的Buildroot的分支,只有那些还没有触及主线的补丁。外部树提供了不会碰到主线的东西:用于我们的演示的额外的defconfig和包。
$ git clone https://github.com/linux4sam/buildroot-at91.git Cloning into 'buildroot-at91'... remote: Counting objects: 271126, done. remote: Compressing objects: 100% (2/2), done. remote: Total 271126 (delta 0), reused 2 (delta 0), pack-reused 271124 Receiving objects: 100% (271126/271126), 61.00 MiB | 2.36 MiB/s, done. Resolving deltas: 100% (186357/186357), done. $ ls buildroot-at91/ arch board boot CHANGES Config.in Config.in.legacy configs COPYING DEVELOPERS docs fs linux Makefile Makefile.legacy package README support system toolchain utils $ git clone https://github.com/linux4sam/buildroot-external-microchip.git Cloning into 'buildroot-external-microchip'... remote: Counting objects: 571, done. remote: Compressing objects: 100% (159/159), done. remote: Total 571 (delta 217), reused 288 (delta 170), pack-reused 225 Receiving objects: 100% (571/571), 94.41 KiB | 76.00 KiB/s, done. Resolving deltas: 100% (332/332), done. $ ls buildroot-external-microchip/ board Config.in configs COPYING docs external.desc external.mk package patches README.md system
二、编译
make at91sam9x5ek_defconfig
make
三、制作uImage
制作uboot支持的kernel镜像,需要使用mkimage工具,mkimage工具在./output/build/uboot-custom/tools目录下。
使用如下命令:
./output/build/uboot-custom/tools/mkimage -A arm -O linux -C none -T kernel -a $LDADDR -e $LDADDR -n "at91" -d ./output/ images/zImage ./output/images/uImage