[U-Boot] [PATCH 0/5] Use Android DT image format for TI boards
Sam Protsenko
semen.protsenko at linaro.org
Thu Apr 19 20:22:59 UTC 2018
On 17 April 2018 at 23:57, Andrew F. Davis <afd at ti.com> wrote:
> On 04/16/2018 03:32 PM, Sam Protsenko wrote:
>> Android documentation recommends using new image format for storing dtb
>> and dtbo files: [1]. Using that format, we can pack several dtb files to
>> dtb.img, and also pack several dtbo files to dtbo.img. Then those images
>> should be flashed to eMMC partitions, called "dtb" and "dtbo"
>> respectively.
>>
>
>
> I'm not convinced adding yet another one-off Android specific partition
> format is what we need right now. With FIT images this is a solved
> problem, why does Android need to go down a different path here?
>
We are already in discussion with Google engineers regarding that
question. Both approaches (FIT and Android DT) work fine. This is just
a policy question: if Google doesn't mind us using FIT, we can go with
FIT. Otherwise we are forced to go with Android DT image format.
That's why we decided to implement DT image support: to have it
functional and upstreamed in a case if Google tells us it's mandatory.
>
>> This patch series introduces support for mentioned Android DT image
>> format, adds "dtimg" command to deal with that image format from U-Boot
>> shell, and provides new Android boot scheme to TI boards (AM57x and DRA7
>> boards). So with this patch series we will have next procedure for
>> Android boot:
>> 1. Read next images from eMMC partitions to RAM:
>> - boot.img
>> - dtb.img
>> - dtbo.img
>> 2. Take addresses of desired dtb/dtbo files from that images (for
>> current board)
>> 3. Apply dtbo overlays to main dtb, if needed
>> 4. Boot the kernel from Android boot image, using resulting dtb
>>
>
>
> All the above logic ends up adding more to our environment scripting at
> a time when we are working to reduce that..
>
Frankly, I don't see a better solution here. Adding another separate
command to do Android boot just for TI case won't be accepted in
upstream obviously, because we already have bootm command for this. If
you see a better way of doing that (in upstream, of course, without
any hacks) -- please advice. Otherwise we will go with this one, in
case Google responds it's mandatory.
> Andrew
>
>
>> It was tested on X15 and AM57x EVM boards.
>>
>> [1] https://source.android.com/devices/architecture/dto/partitions
>>
>> Sam Protsenko (5):
>> common: Add support for Android DT image
>> cmd: Add dtimg command
>> arm: ti: boot: Extract PARTS_DEFAULT to boot.h
>> arm: ti: boot: Add dtbo partition for Android boot
>> arm: ti: boot: Implement Android boot using DT image format
>>
>> board/ti/common/Kconfig | 1 +
>> cmd/Kconfig | 8 ++
>> cmd/Makefile | 1 +
>> cmd/dtimg.c | 142 ++++++++++++++++++++++++++++++
>> common/Makefile | 4 +
>> common/image-android-dt.c | 134 ++++++++++++++++++++++++++++
>> configs/am57xx_evm_defconfig | 1 +
>> configs/am57xx_hs_evm_defconfig | 1 +
>> configs/dra7xx_evm_defconfig | 1 +
>> configs/dra7xx_hs_evm_defconfig | 1 +
>> include/configs/am57xx_evm.h | 25 ------
>> include/configs/cl-som-am57x.h | 2 +
>> include/configs/cm_t54.h | 2 +
>> include/configs/dra7xx_evm.h | 25 ------
>> include/configs/ti_armv7_common.h | 1 +
>> include/dt_table.h | 46 ++++++++++
>> include/environment/ti/boot.h | 68 ++++++++++++--
>> include/image-android-dt.h | 18 ++++
>> 18 files changed, 422 insertions(+), 59 deletions(-)
>> create mode 100644 cmd/dtimg.c
>> create mode 100644 common/image-android-dt.c
>> create mode 100644 include/dt_table.h
>> create mode 100644 include/image-android-dt.h
>>
More information about the U-Boot
mailing list