[U-Boot] Appended DTB Android boot image support

Sam Protsenko semen.protsenko at linaro.org
Sat May 5 21:37:52 UTC 2018


On 1 May 2018 at 12:20, Alex Deymo <deymo+ at google.com> wrote:
> Hi Ramon,
>
> What "header_version" is the boot image you have? The
> include/android_image.h in U-Boot is a little bit old so it only defines
> the v0 format. The "unused" field in v0 was renamed to "header_version"
> where 0 means v0. The v1 adds a few more fields, including a DTB/DTBO for
> *recovery* mode.
> See
> https://android.googlesource.com/platform/system/core/+/master/mkbootimg/include/bootimg/bootimg.h
>
> Having multiple DTs and picking one or merge overlays at runtime is a
> reasonable thing and there's some documentation in AOSP on how to do it in
> Android: https://source.android.com/devices/architecture/dto/multiple (and
> other sections around it). There are some options on where to store these
> and even a supported format for placing multiple .dtbo in a single "dtbo"
> partition (but appending multiple DTBs at the end of the kernel is not one
> of these).
>

Hi Alex,

Can you please review these (related) patches [1,2] I sent recently? I
think it would be nice to have those in upstream U-Boot, as Android
documentation recommends its usage [3].

Also, do you know is it mandatory to use that format [3] for Android,
or it's just a recommendation? I haven't found any mentioning in
Android docs that it's strictly required. We'd like to just use FIT,
as it was already established before Android DT image format, and TI
was already using it for regular Linux boot. Do you know if Google has
any plans to make it mandatory to use [3] in the future, like for
project Treble, etc?

Thanks!

[1] https://lists.denx.de/pipermail/u-boot/2018-April/326050.html
[2] https://lists.denx.de/pipermail/u-boot/2018-April/326051.html
[3] https://source.android.com/devices/architecture/dto/partitions

> Which are the "seconday" fields you are referring to?
> I'm not familiar with the Dragonboard images, but it looks like they just
> extended this over the reserved space in a different way. Maybe you can
> convert the header to the newer format, but that still requires work in
> U-Boot to support the new format.
>
> Regards,
> Alex
>
>
> Le lun. 30 avr. 2018 à 16:17, Ramon Fried <ramon.fried at gmail.com> a écrit :
>
>> Hi all.
>> I'm currently adding support for Qualcomm Dragonboards  to U-boot as a
>> primary bootloader without chain-loading using LK which is currently
>> already supported in mainline U-boot.
>>
>> Qualcomm Android images are regular android images where the DTB's are
>> appended to the image. Qualcomm used the "unused" field in the image
>> header to populate the size of the DTB *.
>>
>> I'm looking for a more standard version for supporting these kind of
>> images.
>> Currently, to boot these images, you must provide DTB somewhere in mem
>> and provide it as argument to bootm for instance.
>>
>> My goal is to add support that U-boot will parse the image, see that
>> the DTB is included and use that as the FDT automatically.
>>
>> I'm looking at the "secondary" fields which are currently not used as
>> a valid option to point to the DTB and it's size.
>>
>> Do you know if someone is working on something similar, or do you have
>> any suggestions for the right approach to this issue ?
>>
>> Thanks,
>> Ramon
>>
>> * - Actually, Qualcomm appends a pack of DTBs with offset table and
>> chooses the right DTB in runtime.
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> https://lists.denx.de/listinfo/u-boot
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list