
Hi Peter,
I've included my kernel_fdt.its below as well as 2 boot attempts with some debug enabled - the 1st on without the patch, the 2nd with the patch. I'm using the mainline master (based on 1953d128fd07f07d1c3810a28c0863ea64dae1b6), not the 85xx repo, but I believe the problem exists in both repos.
OK. I will test it today and send you my result.
Conceptually, I believe the patch makes sense. I'm calling bootm with no arguments (as seen in the FIT howto.txt), so boot_get_ramdisk() is unconditionally called by do_bootm_linux(). With no command arguments and a FIT image this section of code in boot_get_ramdisk() gets called:
rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset); if (rd_noffset < 0) { debug ("* ramdisk: no ramdisk in config\n"); return 1; }
which returns 1 causing the calling code from do_bootm_linux() to error out:
/* find ramdisk */ ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_PPC, &rd_data_start, &rd_data_end); if (ret) goto error;
I'll look at it in detail. Please wait some hours.
Did you by chance try testing a PPC board? I noticed the boot_get_ramdisk() call is not used for microblaze.
Sorry but I don't have any ppc board. Yes, it is but this code is not in master or microblaze branch but I sent first patch to mailing list some week ago.
Regards, Michal
Thanks! Peter
Contents of kernel_fdt.its
/ { description = "Basic image with single Linux kernel and FDT blob"; #address-cells = <1>;
images { kernel@1 { description = "X-ES MPC8572 Kernel v2.6.23"; data = /incbin/("./vmlinux.bin.gz"); type = "kernel"; arch = "ppc"; os = "linux"; compression = "gzip"; load = <00000000>; entry = <00000000>; hash@1 { algo = "crc32"; }; }; fdt@1 { description = "Flattened Device Tree blob"; data = /incbin/("./xpedite5370.dtb"); type = "flat_dt"; arch = "ppc"; load = <00c00000>; compression = "none"; hash@1 { algo = "crc32"; }; }; };
configurations { default = "conf@1"; conf@1 { description = "Boot Linux kernel with FDT blob"; kernel = "kernel@1"; fdt = "fdt@1"; }; }; };
Without the patch applied
=> imi
## Checking Image at 01000000 ... FIT image found FIT description: Basic image with single Linux kernel and FDT blob Created: 2008-08-06 20:47:47 UTC Image 0 (kernel@1) Description: X-ES MPC8572 Kernel v2.6.23 Type: Kernel Image Compression: gzip compressed Data Start: 0x010000f0 Data Size: 3947406 Bytes = 3.8 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash node: 'hash@1' Hash algo: crc32 Hash value: 10a29645 Hash len: 4 Image 1 (fdt@1) Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x013c3d64 Data Size: 9628 Bytes = 9.4 kB Architecture: PowerPC Hash node: 'hash@1' Hash algo: crc32 Hash value: b351fc1d Hash len: 4 Default Configuration: 'conf@1' Configuration 0 (conf@1) Description: Boot Linux kernel with FDT blob Kernel: kernel@1 FDT: fdt@1 => bootm
- kernel: default image load address = 0x01000000
## Booting kernel from FIT Image at 01000000 ... No configuration specified, trying default... Found default configuration: 'conf@1' Using 'conf@1' configuration Trying 'kernel@1' kernel subimage Description: X-ES MPC8572 Kernel v2.6.23 Type: Kernel Image Compression: gzip compressed Data Start: 0x010000f0 Data Size: 3947406 Bytes = 3.8 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash node: 'hash@1' Hash algo: crc32 Hash value: 10a29645 Hash len: 4 Verifying Hash Integrity ... crc32+ OK kernel data at 0x010000f0, len = 0x003c3b8e (3947406) Uncompressing Kernel Image ... OK kernel loaded at 0x00000000, end = 0x0060d55c WARNING: bootm_low + bootm_size exceed eff. memory WARNING: adjusting available memory to 10000000 ## Current stack ends at 0x0fe97bf8
- fdt: using config 'conf@1' from image at 0x01000000
## Checking for 'FDT'/'FDT Image' at 01000000 ## Flattened Device Tree from FIT Image at 01000000 Using 'conf@1' configuration Trying 'fdt@1' FDT blob subimage Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x013c3d64 Data Size: 9628 Bytes = 9.4 kB Architecture: PowerPC Hash node: 'hash@1' Hash algo: crc32 Hash value: b351fc1d Hash len: 4 Verifying Hash Integrity ... crc32+ OK Loading FDT from 0x013c3d64 to 0x00c00000 Booting using the fdt blob at 0xc00000 of_flat_tree at 0x00c00000 size 0x0000259c
- ramdisk: using config 'conf@1' from image at 0x01000000
- ramdisk: no ramdisk in config
<<<< board resets here >>>>
U-Boot 1.3.4-xes_r1-dirty (Aug 6 2008 - 15:42:12)
After applying the patch
=> bootm
- kernel: default image load address = 0x01000000
## Booting kernel from FIT Image at 01000000 ... No configuration specified, trying default... Found default configuration: 'conf@1' Using 'conf@1' configuration Trying 'kernel@1' kernel subimage Description: X-ES MPC8572 Kernel v2.6.23 Type: Kernel Image Compression: gzip compressed Data Start: 0x010000f0 Data Size: 3947406 Bytes = 3.8 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash node: 'hash@1' Hash algo: crc32 Hash value: 10a29645 Hash len: 4 Verifying Hash Integrity ... crc32+ OK kernel data at 0x010000f0, len = 0x003c3b8e (3947406) Uncompressing Kernel Image ... OK kernel loaded at 0x00000000, end = 0x0060d55c WARNING: bootm_low + bootm_size exceed eff. memory WARNING: adjusting available memory to 10000000 ## Current stack ends at 0x0fe97bf8
- fdt: using config 'conf@1' from image at 0x01000000
## Checking for 'FDT'/'FDT Image' at 01000000 ## Flattened Device Tree from FIT Image at 01000000 Using 'conf@1' configuration Trying 'fdt@1' FDT blob subimage Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x013c3d64 Data Size: 9628 Bytes = 9.4 kB Architecture: PowerPC Hash node: 'hash@1' Hash algo: crc32 Hash value: b351fc1d Hash len: 4 Verifying Hash Integrity ... crc32+ OK Loading FDT from 0x013c3d64 to 0x00c00000 Booting using the fdt blob at 0xc00000 of_flat_tree at 0x00c00000 size 0x0000259c
- ramdisk: using config 'conf@1' from image at 0x01000000
- ramdisk: no ramdisk in config
calling ft_cpu_setup() ## initrd_high = 0xffffffff, copy_to_ram = 1 ramdisk load start = 0x00000000, ramdisk load end = 0x00000000 ## Transferring control to Linux (at address 00000000) ... Booting using OF flat tree... Using X-ES MPC85xx machine description
<<<< Linux boots normally >>>>
No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.12/1589 - Release Date: 3.8.2008 01:00