[Linux 底层]bootstrap移植裁剪及编译

本文介绍如何在board/sama5d3_xplained目录下对默认的bootstrap配置进行编译和裁剪。首先执行make mrproper和make sama5d3_xplainednf_uboot_defconfig命令,然后通过图形化配置进行硬件裁剪,确保分区地址匹配。由于底层硬件通常遵循官网配置,因此bootstrap保持不变。在编译前需设置好交叉编译器,编译完成后将生成bin文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

bootstrap文件夹内容如下图:

在这里插入图片描述

在board/sama5d3_xplained目录下,有官方的默认配置文件

sama5d3_xplainednf_linux_uimage_dt_defconfig 从nandflash启动直接跳转到uimage类型内核阶段
sama5d3_xplainednf_linux_zimage_dt_defconfig 从nandflash启动直接跳转到zimage类型内核阶段
sama5d3_xplainednf_uboot_defconfig 从nandflash启动直接跳转到uboot阶段
sama5d3_xplainedsd_linux_uimage_dt_defconfig 从SD卡启动直接跳转到uimage类型内核阶段
sama5d3_xplainedsd_linux_zimage_dt_defconfig 从nandflash启动直接跳转到zimage类型内核阶段
sama5d3_xplainedsd_uboot_defconfig 从nandflash启动直接跳转到uboot阶段

先把默认配置进行编译一轮;从flash启动跳转到uboot阶段。

$ make mrproper
$ make sama5d3_xplainednf_uboot_defconfig
图形化配置,进行裁剪;CPU主频、总线频率,启动晶振选择;

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

uboot的分区地址要能匹配上;
bootstap使用官网配置的就行了,越底层的东西越不会随便改动,基本硬件都是照搬官网的,改了吃力不讨好,也没人动;
编译前需要把交叉编译器配置好,arm-linux-gnueabi-gcc -v查看

root@ubuntu:/home/atmel/Kernel2019-09-05/at91bootstrap-master# arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/7/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv5t --with-float=soft --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include
Thread model: posix
gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1) 

下一步,直接make编译ok后,会生成bin文件。

在这里插入图片描述
关注微信公众号,更多精彩内容及时推送。
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值