Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2019.04 does not produce u-boot proper FIT that boots #27

Open
shenki opened this issue Sep 30, 2021 · 2 comments
Open

v2019.04 does not produce u-boot proper FIT that boots #27

shenki opened this issue Sep 30, 2021 · 2 comments

Comments

@shenki
Copy link
Member

shenki commented Sep 30, 2021

When doing a build of this tree:

make -j8 O=aspeed  -s  ast2600_openbmc_spl_emmc_defconfig
CROSS_COMPILE="arm-linux-gnueabi-" make -j8 O=aspeed- -j8 DEVICE_TREE=ast2600-rainier -s
dd if=/dev/zero of=test.img count=1 bs=16M
dd if=aspeed/u-boot.bin of=test.img conv=notrunc seek=64 bs=1024

And then booting in qemu (from Cedric's aspeed-6.2 branch):

$ qemu-system-arm -nographic -M rainier-bmc -drive file=test.img,if=sd,index=2,format=raw 

U-Boot SPL 2019.04-00145-g86547fc6a1a1 (Sep 30 2021 - 12:57:07 +0930)
Trying to boot from MMC1
fit_find_config_node: Missing FDT description in DTB
No matching DT out of these options:
   Firmware image with one or more FDT blobs
fit_find_config_node: Missing FDT description in DTB
No matching DT out of these options:
   Firmware image with one or more FDT blobs
mmc_load_image_raw_sector: mmc block read error
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
@shenki
Copy link
Member Author

shenki commented Sep 30, 2021

Dumping the FIT:

$ fdtdump aspeed/u-boot.img 

**** fdtdump is a low-level debugging tool, not meant for general use.
**** If you want to decompile a dtb, you probably want
****     dtc -I dtb -O dts <filename>

/dts-v1/;
// magic:		0xd00dfeed
// totalsize:		0x2a5 (677)
// off_dt_struct:	0x38
// off_dt_strings:	0x228
// off_mem_rsvmap:	0x28
// version:		17
// last_comp_version:	2
// boot_cpuid_phys:	0x0
// size_dt_strings:	0x7d
// size_dt_struct:	0x1f0

/ {
    timestamp = <0x61552e8d>;
    description = "Firmware image with one or more FDT blobs";
    creator = "U-Boot mkimage 2019.04-00145-g86547fc6a1a1";
    #address-cells = <0x00000001>;
    images {
        firmware-1 {
            data-size = <0x0005e064>;
            data-offset = <0x00000000>;
            description = "U-Boot 2019.04-00145-g86547fc6a1a1 for evb_ast2600 board";
            type = "firmware";
            arch = "arm";
            os = "u-boot";
            compression = "none";
            load = <0x81000000>;
            entry = <0x00000000>;
        };
    };
    configurations {
        default = "conf-1";
        conf-1 {
            firmware = "firmware-1";
        };
    };
};

u-boot is erroring out because the configuration node lacks a description string.

@shenki
Copy link
Member Author

shenki commented Sep 30, 2021

--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -315,6 +315,8 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt)
                snprintf(str, sizeof(str), "%s-1", typename);
                fdt_property_string(fdt, typename, str);
 
+               fdt_property_string(fdt, FIT_DESC_PROP, "configuration");
+
                if (params->fit_ramdisk)
                        fdt_property_string(fdt, FIT_RAMDISK_PROP,
                                            FIT_RAMDISK_PROP "-1");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant