All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7] cmd: bootimg: Add bootimg command
Date: Wed, 23 Oct 2019 17:14:29 +0300	[thread overview]
Message-ID: <CAKaJLVuirhXUYtr=-q5uWP9DTdn9_VjRfeG3oU6BRqOLq6XJ3g@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ35AqzR1kEU6=Mq5TfB_NkpcPWh+hHAow9iGR84XbwPFg@mail.gmail.com>

Hi Simon,

On Wed, Sep 25, 2019 at 10:15 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Sam,
>
> On Tue, 24 Sep 2019 at 11:41, Sam Protsenko <semen.protsenko@linaro.org> wrote:
> >
> > Hi Igor,
> >
> > On Mon, Sep 23, 2019 at 11:36 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Fri, Sep 20, 2019 at 8:45 PM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Thu, 19 Sep 2019 at 12:28, Sam Protsenko <semen.protsenko@linaro.org> wrote:
> > > > >
> > > > > This command can be used to extract fields and image payloads from
> > > > > Android Boot Image. It can be used for example to implement boot flow
> > > > > where dtb is taken from boot.img (as v2 incorporated dtb inside of
> > > > > boot.img). Using this command, one can obtain needed dtb file from
> > > > > boot.img in scripting manner, and then apply needed dtbo's (from "dtbo"
> > > > > partition) on top of that, providing then the resulting image to bootm
> > > > > command in order to boot the Android.
> > > > >
> > > > > Also right now this command has the sub-command to get an address and
> > > > > size of recovery dtbo from recovery image. It can be further parsed using
> > > > > 'dtimg' command and merged into dtb file (for non-A/B devices only, see
> > > > > [1,2] for details).
> > > > >
> > > > > [1] https://source.android.com/devices/bootloader/boot-image-header
> > > > > [2] https://source.android.com/devices/architecture/dto/partitions
> > > > >
> > > > > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > > > > ---
> > > > >  cmd/Kconfig   |   8 +++
> > > > >  cmd/Makefile  |   1 +
> > > > >  cmd/bootimg.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++
> > > > >  3 files changed, 186 insertions(+)
> > > > >  create mode 100644 cmd/bootimg.c
> > > >
> > > >
> > > > Shouldn't this be a subcommand of avb?
> > >
> > > I think there is some misunderstanding here, as avb
> > > is used only for signature verification/roll-back protection, other
> > > aspects of booting Android (parsing android boot image) are
> > > handled by other commands (for instance, bootm).
> > >
> > > Howewer, I think (IMHO) that `bootimg` isn't a good choice for the
> > > command name , which major functionality is manipulating
> > > dtb/dtbos.
> > >
> >
> > Actually, 'bootimg' manipulates only Android boot image, but new
> > Android Boot Image v2 happen to have DTB field. For DTBO files in
> > Android we already have 'dtimg' command.
> >
> > Simon,
> >
> > This command is not connected with AVB. It's only needed to obtain
> > Android Boot Image payloads. We can't integrate its functionality in
> > 'bootm' command, because we would need to merge some DTBO files (from
> > 'dtbo' partition) into DTB file obtained from boot image. And bootm
> > command can't possibly know which DTBO files vendor would like to use
> > (e.g. different DTBOs for different boards). That's why I came up with
> > 'bootimg' command.
>
> OK, so can we say this is specific to Android. So perhaps 'boota' ?
>

I'd like to keep 'bootimg' name, to not confuse this command with
actual boot commands. The 'bootimg' doesn't boot anything, it just
provides the means to work with the image which is called "boot
image".

> Minor point - boom allows passing an image address rather than
> requiring loadaddr to be set.
>

Good point. I have added 'set_addr' sub-command in v2, will send it soon.

> >
> > Actually I think that we should think about implementing
> > 'boot_android' next. Because the boot script is becoming quite
> > cluttered. But we should have those tiny commands anyway, as it's
> > convenient for development and provides a more flexible way to boot
> > Android.
>
> Agreed on both counts.
>
> >
> > I'm having presentation today at Linaro Connect, highlighting new
> > Android boot scheme. Slides will be available at [1]. The Android boot
> > flow becomes more and more extensive, so I think it's time to start
> > discussion between community, Google and vendors w.r.t. this topic.
> > One point we should bring up is the possibility to use FIT image
> > instead of bunch of Android images. I hope this is discussable.
>
> That sounds like a good idea.
>

Just in case, slides and video are available here:

    https://connect.linaro.org/resources/san19/san19-217/

> >
> > But for now I think we should stick to established Android boot
> > architecture, as it was published at [2] and mandatory for new devices
> > launching with Android 10.
>
> OK. Let's make sure to add sandbox tests for new functionality too.
>

Done, will send v2 soon. Thanks!

>
> - SImon
>
> >
> > Thanks!
> >
> > [1] https://connect.linaro.org/resources/san19/san19-217/
> > [2] https://source.android.com/devices/bootloader
> >
> > > >
> > > > Regards,
> > > > Simon
> > >
> > >
> > >
> > > --
> > > Best regards - Freundliche Grüsse - Meilleures salutations
> > >
> > > Igor Opaniuk
> > >
> > > mailto: igor.opaniuk at gmail.com
> > > skype: igor.opanyuk
> > > +380 (93) 836 40 67
> > > http://ua.linkedin.com/in/iopaniuk

  reply	other threads:[~2019-10-23 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 17:28 [U-Boot] [PATCH 0/7] am57xx: Implement Android 10 boot flow Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 1/7] image: android: Add functions for handling dtb field Sam Protsenko
2019-09-20 17:45   ` Simon Glass
2019-10-23  9:54     ` Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 2/7] image: android: Add routine to get dtbo params Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 3/7] cmd: bootimg: Add bootimg command Sam Protsenko
2019-09-20 17:45   ` Simon Glass
2019-09-24  6:36     ` Igor Opaniuk
2019-09-24 18:41       ` Sam Protsenko
2019-09-25 19:14         ` Simon Glass
2019-10-23 14:14           ` Sam Protsenko [this message]
2019-09-19 17:28 ` [U-Boot] [PATCH 4/7] configs: am57xx_evm: Enable Android commands Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 5/7] env: ti: boot: Respect slot_suffix in AVB commands Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 6/7] env: ti: boot: Boot Android with dynamic partitions Sam Protsenko
2019-09-19 17:28 ` [U-Boot] [PATCH 7/7] arm: ti: boot: Use correct dtb and dtbo on Android boot Sam Protsenko
2019-09-19 18:22 ` [U-Boot] [PATCH 0/7] am57xx: Implement Android 10 boot flow Eugeniu Rosca
2019-10-23 19:37   ` Sam Protsenko
2019-10-24  9:36     ` Eugeniu Rosca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKaJLVuirhXUYtr=-q5uWP9DTdn9_VjRfeG3oU6BRqOLq6XJ3g@mail.gmail.com' \
    --to=semen.protsenko@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.