Skip to contentSkip to conversation

u-boot spl with FIT images

U-Boot Simon Glass 2 participants 3 messages Feb 1, 2014 – Feb 16, 2014 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

+U-Boot (good to copy the list)

Hi Michal,

Quoted 9 lines · Michal Simek

Hi Simon,

hope that you are good.
IRC you mentioned at u-boot minisummit that you are enabling FIT support for u-boot SPL.
I have checked the code and there is support for legacy format not for FIT images.
IRC that you have done that.
Have you sent any patches regarding that?

Yes I have certainly had FIT support built into SPL. However my memory is a little unclear at this stage. I did submit quite a long list of image-related improvements:

689a197 sandbox: image: Create a test for loading FIT images af732a6 sandbox: image: Adjust FIT image printing to work with sandbox 4aec530 image: Use fit_image_load() to load kernel
63544a0 image: Use fit_image_load() to load FDT
48b7e7a image: Use fit_image_load() to load ramdisk
d48eed3 image: Introduce fit_image_load() to load images from FITs 2ce9f76 mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building 13d0698 image: Add device tree setup to image library
44d3a30 image: Split libfdt code into image-fdt.c
87ebee3 image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPL 1fe7d93 image: Remove remaining #ifdefs in image-fit.c
aa6d6db mkimage: Put FIT loading in function and tidy error handling 35e7b0f sandbox: image: Add support for booting images in sandbox d8b7536 image: Rename hash printing to fit_image_print_verification_data() bbb467d image: Rename fit_add_hashes() to fit_add_verification_data() 003efd7 image: Export fit_conf_get_prop_node()
e754da2 image: Move error! string to common place
ab9efc6 image: Move hash checking into its own function
b8da836 image: Rename fit_image_check_hashes() to fit_image_verify() b726091 image: Convert fit_image_hash_set_value() to static, and rename 94e5fa4 image: Split hash node processing into its own function 604f23d image: Move HOSTCC image code to tools/
53fbb7e image: Split FIT code into new image-fit.c
61a439a image: Export fit_check_ramdisk()
859e92b image: Move timestamp #ifdefs to header file
816cb03 mkimage: Move ARRAY_SIZE to header file
0ccff50 image: Use crc header file instead of C prototypes

However I am not sure exactly what I had to do to enable FIT in SPL. Have you tried it? What support do you think is missing? That might help jog my memory.

Regards,
Simon

Quoted 12 lines

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform

#2 lore raw

Hi Simon,

Quoted 1 line · Simon Glass

+U-Boot (good to copy the list)

yes, sure.

Quoted 14 lines

Hi Michal,

Quoted 9 lines · Michal Simek

Hi Simon,

hope that you are good.
IRC you mentioned at u-boot minisummit that you are enabling FIT support for u-boot SPL.
I have checked the code and there is support for legacy format not for FIT images.
IRC that you have done that.
Have you sent any patches regarding that?

Quoted 3 lines

Yes I have certainly had FIT support built into SPL. However my memory is a little unclear at this stage. I did submit quite a long list of image-related improvements:

ok.

Quoted 29 lines

689a197 sandbox: image: Create a test for loading FIT images af732a6 sandbox: image: Adjust FIT image printing to work with sandbox 4aec530 image: Use fit_image_load() to load kernel
63544a0 image: Use fit_image_load() to load FDT
48b7e7a image: Use fit_image_load() to load ramdisk
d48eed3 image: Introduce fit_image_load() to load images from FITs 2ce9f76 mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building 13d0698 image: Add device tree setup to image library
44d3a30 image: Split libfdt code into image-fdt.c
87ebee3 image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPL 1fe7d93 image: Remove remaining #ifdefs in image-fit.c
aa6d6db mkimage: Put FIT loading in function and tidy error handling 35e7b0f sandbox: image: Add support for booting images in sandbox d8b7536 image: Rename hash printing to fit_image_print_verification_data() bbb467d image: Rename fit_add_hashes() to fit_add_verification_data() 003efd7 image: Export fit_conf_get_prop_node()
e754da2 image: Move error! string to common place
ab9efc6 image: Move hash checking into its own function
b8da836 image: Rename fit_image_check_hashes() to fit_image_verify() b726091 image: Convert fit_image_hash_set_value() to static, and rename 94e5fa4 image: Split hash node processing into its own function 604f23d image: Move HOSTCC image code to tools/
53fbb7e image: Split FIT code into new image-fit.c
61a439a image: Export fit_check_ramdisk()
859e92b image: Move timestamp #ifdefs to header file
816cb03 mkimage: Move ARRAY_SIZE to header file
0ccff50 image: Use crc header file instead of C prototypes

Quoted 3 lines

However I am not sure exactly what I had to do to enable FIT in SPL. Have you tried it? What support do you think is missing? That might help jog my memory.

spl_parse_image_header() is that function I am talking about. There is this checking
image_get_magic(header) == IH_MAGIC
where IH_MAGIC is 0x27051956 which is old u-boot image format.

What I thought that you have is support for images in doc/uImage.FIT format in u-boot SPL.
Just to have kernel/dtb/ramdisk in one file.

Thanks,
Michal

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140203/7cc3be12/attachment.pgp>
#3 lore raw

Hi Michal,

Quoted 61 lines · Michal Simek

Hi Simon,

Quoted 1 line · Simon Glass

+U-Boot (good to copy the list)

yes, sure.

Quoted 14 lines

Hi Michal,

Quoted 9 lines · Michal Simek

Hi Simon,

hope that you are good.
IRC you mentioned at u-boot minisummit that you are enabling FIT support for u-boot SPL.
I have checked the code and there is support for legacy format not for FIT images.
IRC that you have done that.
Have you sent any patches regarding that?

Quoted 3 lines

Yes I have certainly had FIT support built into SPL. However my memory is a little unclear at this stage. I did submit quite a long list of image-related improvements:

ok.

Quoted 29 lines

689a197 sandbox: image: Create a test for loading FIT images af732a6 sandbox: image: Adjust FIT image printing to work with sandbox 4aec530 image: Use fit_image_load() to load kernel
63544a0 image: Use fit_image_load() to load FDT
48b7e7a image: Use fit_image_load() to load ramdisk
d48eed3 image: Introduce fit_image_load() to load images from FITs 2ce9f76 mkimage: Add map_sysmem() and IH_ARCH_DEFAULT to simplfy building 13d0698 image: Add device tree setup to image library
44d3a30 image: Split libfdt code into image-fdt.c
87ebee3 image: Add CONFIG_FIT_SPL_PRINT to control FIT image printing in SPL 1fe7d93 image: Remove remaining #ifdefs in image-fit.c
aa6d6db mkimage: Put FIT loading in function and tidy error handling 35e7b0f sandbox: image: Add support for booting images in sandbox d8b7536 image: Rename hash printing to fit_image_print_verification_data() bbb467d image: Rename fit_add_hashes() to fit_add_verification_data() 003efd7 image: Export fit_conf_get_prop_node()
e754da2 image: Move error! string to common place
ab9efc6 image: Move hash checking into its own function
b8da836 image: Rename fit_image_check_hashes() to fit_image_verify() b726091 image: Convert fit_image_hash_set_value() to static, and rename 94e5fa4 image: Split hash node processing into its own function 604f23d image: Move HOSTCC image code to tools/
53fbb7e image: Split FIT code into new image-fit.c
61a439a image: Export fit_check_ramdisk()
859e92b image: Move timestamp #ifdefs to header file
816cb03 mkimage: Move ARRAY_SIZE to header file
0ccff50 image: Use crc header file instead of C prototypes

Quoted 3 lines

However I am not sure exactly what I had to do to enable FIT in SPL. Have you tried it? What support do you think is missing? That might help jog my memory.

Quoted 8 lines

spl_parse_image_header() is that function I am talking about. There is this checking
image_get_magic(header) == IH_MAGIC
where IH_MAGIC is 0x27051956 which is old u-boot image format.

What I thought that you have is support for images in doc/uImage.FIT format in u-boot SPL.
Just to have kernel/dtb/ramdisk in one file.

I think what I did was call fit_image_load() from SPL, or similar. A lot of my effort was to get FIT into a single place so it was easy to load an image from a FIT without having to know the internals of how it worked. So if you make that call and tell it the image to load, it will return the address and size.

I'm pretty sure you can call that from SPL, although you may need to link with additional files.

Regards,
Simon