如何解决我们可以为 U-boot (Raspberry pi 4B) 从旧的“图像”生成 FIT 图像吗?
我正在尝试在 RaspBerry Pi 4B 上启动自定义内核和引导加载程序。
我已经使用 buildroot 使用 RPi4 Defconfig 生成了 linux 内核,并编译了 u-boot 来启动这个内核。这是我能够成功实现的。但是现在,我想从 buildroot 生成的“图像”生成一个适合的图像。 我相信我们可以在 u-boot 提供的 mkimage 实用程序的帮助下做到这一点,但我不确定如何做到这一点。另外,我不确定 boot.scr 应该是什么来自动启动要生成的 FIT 映像。 非常欢迎任何参考资料或可能的重复问题或任何建议。 暂时在这上面敲我的头,感谢您的帮助!!!
编辑 - 我现在已经生成了一个合适的图像, Running mkimage -l for the generated fit image gives this output
但是在使用 boot.scr as 启动时,
setenv bootargs console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
fatload mmc 0 0x3000000 ritman.fit
bootm 0x3000000
我在使用上述脚本和图像时遇到的错误是, u-boot output
/dts-v1/;
/ {
description = "RPi FIT Image";
#address-cells = <2>;
images {
kernel-1 {
description = "default kernel";
data = /incbin/("Image");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";
load = <0x00080000>;
entry = <0x00080000>;
hash@1 {
algo = "sha1";
};
};
haha {
description = "device tree";
data = /incbin/("bcm2711-rpi-4-b.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
hash@1 {
algo = "sha1";
};
};
};
configurations {
default = "config-1";
config-1 {
description = "default configuration";
kernel = "kernel-1";
fdt = "haha";
signature-1 {
algo = "sha1,rsa2048";
key-name-hint = "dev";
sign-images = "fdt","kernel";
};
};
};
};
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。