[U-Boot-Users] FIT-image with fdt doesn't work

845 views
Skip to first unread message

Simon Pasch

unread,
Sep 30, 2008, 8:06:34 AM9/30/08
to u-boot...@lists.sourceforge.net
Hello list,

I have trouble getting a FIT-image to work on my lite5200-evalboard.
Everything seems to be fine until I want to boot:

"ERROR: Not a FDT image - must RESET the board to recover."


Here's what I'm doing:
1.) compile u-boot 1.3.4 for lite5200 with fit support:

--- 1/include/configs/IceCube.h 2008-08-12 16:08:38.000000000 +0200
+++ 2/include/configs/IceCube.h 2008-09-29 11:26:26.000000000 +0200
@@ -32,6 +32,10 @@
#define CONFIG_MPC5xxx 1 /* This is an MPC5xxx CPU */
#define CONFIG_ICECUBE 1 /* ... on IceCube board */

+#define CONFIG_FIT 1
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_FIT_VERBOSE 1
+
#define CFG_MPC5XXX_CLKIN 33000000 /* ... running at 33.000000MHz */

#define BOOTFLAG_COLD 0x01 /* Normal Power-On: Boot from FLASH */


2.) create a kernel image (2.6.25) vmlinux.bin.gz (4MB with
root-filesystem in initramfs)

3.) create a flat device tree blob (using dtc 1.2.0):
dtc -b 0 -V 17 -R 4 -S 0x3000 -I dts -O dtb -f devicetree.dts > target.dtb

4.) create an FIT-image from fdt-blob and kernel with default example
its-file from doc-directory:
mkimage -f kernel_fdt.its kernel_fdt.itb

5.) check, if image-file is valid:
./tools/mkimage -l kernel_fdt.itb

FIT description: Simple image with single Linux kernel and FDT blob
Created: Tue Sep 30 13:02:50 2008
Image 0 (kernel@1)
Description: Vanilla Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Size: 4052683 Bytes = 3957.70 kB = 3.86 MB
Architecture: PowerPC
OS: Linux
Load Address: 0x00000000
Entry Point: 0x00000000
Hash node: 'hash@1'
Hash algo: crc32
Hash value: d4c2683b
Hash len: 4
Hash node: 'hash@2'
Hash algo: sha1
Hash value: 0f3c591c4f201d8cc1020725da0639d0b04d065a
Hash len: 20
Image 1 (fdt@1)
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Size: 12288 Bytes = 12.00 kB = 0.01 MB
Architecture: PowerPC
Hash node: 'hash@1'
Hash algo: crc32
Hash value: e07e11d2
Hash len: 4
Hash node: 'hash@2'
Hash algo: sha1
Hash value: 8ee8e8ce07508c534666f6d79fe89e46b8a7ae7a
Hash len: 20
Default Configuration: 'conf@1'
Configuration 0 (conf@1)
Description: Boot Linux kernel with FDT blob
Kernel: kernel@1
FDT: fdt@1

6.) upload kernel_fdt.itb to evalboard
tftpboot 700000 MPC5200/kernel_fdt.itb

=> iminfo

## Checking Image at 00700000 ...
FIT image found
FIT description: Simple image with single Linux kernel and FDT blob
Created: 2008-09-30 11:02:50 UTC
Image 0 (kernel@1)
Description: Vanilla Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x007000ec
Data Size: 4052683 Bytes = 3.9 MB
Architecture: PowerPC
OS: Linux
Load Address: 0x00000000
Entry Point: 0x00000000
Hash algo: crc32
Hash value: d4c2683b
Hash algo: sha1
Hash value: 0f3c591c4f201d8cc1020725da0639d0b04d065a
Image 1 (fdt@1)
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x00add8e4
Data Size: 12288 Bytes = 12 kB
Architecture: PowerPC
Hash algo: crc32
Hash value: e07e11d2
Hash algo: sha1
Hash value: 8ee8e8ce07508c534666f6d79fe89e46b8a7ae7a
Default Configuration: 'conf@1'
Configuration 0 (conf@1)
Description: Boot Linux kernel with FDT blob
Kernel: kernel@1
FDT: fdt@1

7.) try to boot it:
=> bootm
## Booting kernel from FIT Image at 00700000 ...
Using 'conf@1' configuration
Trying 'kernel@1' kernel subimage
Description: Vanilla Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x007000ec
Data Size: 4052683 Bytes = 3.9 MB
Architecture: PowerPC
OS: Linux
Load Address: 0x00000000
Entry Point: 0x00000000
Hash algo: crc32
Hash value: d4c2683b
Hash algo: sha1
Hash value: 0f3c591c4f201d8cc1020725da0639d0b04d065a
Verifying Hash Integrity ... crc32+ sha1+ OK
Uncompressing Kernel Image ... OK
## Flattened Device Tree from FIT Image at 00700000
Using 'conf@1' configuration
Trying 'fdt@1' FDT blob subimage
Description: Flattened Device Tree blob
Type: Unknown Image
Compression: Unknown Compression
Data Start: 0x00add8e4
Data Size: 12288 Bytes = 12 kB
Hash algo: crc32
Hash value: e07e11d2
Hash algo: sha1
Hash value: 8ee8e8ce07508c534666f6d79fe89e46b8a7ae7a
Verifying Hash Integrity ... crc32+ sha1+ OK
ERROR: Not a FDT image - must RESET the board to recover.


As you can see the image-type of the fdt changed from "Flat Device
Tree" to "Unknown Image" after decompressing the kernel, but the hash
integrity seems to be fine (?!)

What am I doing wrong? What's missing?

greets

Simon

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Jon Loeliger

unread,
Sep 30, 2008, 11:37:50 AM9/30/08
to Simon Pasch, u-boot-users
On Tue, 2008-09-30 at 14:06 +0200, Simon Pasch wrote:

> 3.) create a flat device tree blob (using dtc 1.2.0):
> dtc -b 0 -V 17 -R 4 -S 0x3000 -I dts -O dtb -f devicetree.dts > target.dtb

The -V 17 is the current default, so the option isn't needed.
The -S 0x3000 may not be enough, and is really obsoleted
but the -p <pad-value> option too. Try, oh, -p 0x1000 instead.

If you have a large DTS or resulting DTB file, it might
lead to problems like this:


Do some length analysis and make sure you are not stomping
on any images in memory too, especially after uncompressing.

jdl

Simon Pasch

unread,
Oct 1, 2008, 10:58:24 AM10/1/08
to Jon Loeliger, u-boot...@lists.sourceforge.net
2008/9/30 Jon Loeliger <j...@freescale.com>:

> Do some length analysis and make sure you are not stomping
> on any images in memory too, especially after uncompressing.

Uhm...okay...the error message set me on the completely wrong track.

Everything is working now. The problem was, that u-boot itself was overwritten.
As I didn't want the original bootloader to be overwritten, I loaded
u-boot to RAM...
While uncompressing it was overwritten, because I loaded it to 0x20000.

U-boot at 0x700000 and FIT-image at 0x900000 now works like a charm.

Thanks for your helping tip.

Simon

Reply all
Reply to author
Forward
0 new messages