I am trying a boot a custom kernel and bootloader on Raspberry Pi 4B.
I have generated linux kernel using buildroot using RPi4 Defconfig and compiled u-boot to boot this kernel. This I was able to achieve successfully. But now, I want to generate a Fit Image from the 'Image' generated by buildroot. I believe we can do this with the help of mkimage utility provided by u-boot, but I am not sure exactly how to do it. Also, I am not sure what should be the boot.scr to autoboot the to be generated FIT image. Any references or possible duplicate questions or any recommendation is extremely welcome. Banging my head on this for a while now, thanks for the help!!!
Edit - I have generated a fit image now, Running mkimage -l for the generated fit image gives this output
But while booting this up using a boot.scr as ,
setenv bootargs console=tty0 console=ttyAMA0 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
fatload mmc 0 0x3000000 ritman.fit
bootm 0x3000000
The error that I am getting while using the above mentioned script and image is, u-boot output
Edit 2- Contents of the .its file
/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";
};
};
};
};