Linux Lab 进阶: Uboot 引导程序
从当前支持 U-boot 的板子: 和 中选择一款:
make BOARD=vexpress-a9
下载 Uboot:
make uboot-source
检出一个特定的版本(版本号在 中通过 UBOOT 指定):
make uboot-checkout
应用必要的补丁修改,可以指定 和 两个选项设置,如果不指定则缺省值使用 。
make uboot-patch
如果要明确指定值为 , 或 ,则必须在输入 之前运行 :
make uboot-patch BOOTDEV=tftp
make uboot-patch BOOTDEV=sdcard
make uboot-patch BOOTDEV=flash
用于设定 uboot 的存放设备以便从该设备引导, 用于告诉内核从哪里加载 rootfs。
配置 U-boot:
make uboot-defconfig
make uboot-menuconfig
编译 U-boot:
make uboot
使用 和 引导,缺省采用 方式:
make boot U=1
显式使用 , 或 方式:
make boot U=1 BOOTDEV=tftp
make boot U=1 BOOTDEV=sdcard
make boot U=1 BOOTDEV=flash
我们也可以在启动引导阶段改变 选项,例如:
make boot U=1 BOOTDEV=flash ROOTDEV=/dev/nfs
执行清理,更新 ramdisk, dtb 和 uImage:
make uboot-images-clean
make uboot-clean
保存 uboot 镜像和配置:
make uboot-save
make uboot-saveconfig