All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC PATCH] stm32mp1: modify gpt partitions to fix BSP update
Date: Sat, 6 Feb 2021 23:16:04 +0300	[thread overview]
Message-ID: <YB75BHzVtUdwxWLv@curiosity> (raw)
In-Reply-To: <87eeht5bnx.fsf@dell.be.48ers.dk>

Hello,

>  > NOTICE:  CPU: STM32MP157CAC Rev.B
>  > NOTICE:  Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
>  > NOTICE:  Board: MB1272 Var2.0 Rev.C-01
>  > NOTICE:  BL2: v2.4(release):2020.11-1087-g8fac193e6d-dirty
>  > NOTICE:  BL2: Built : 20:58:09, Jan 27 2021
>  > ERROR:   Checksum: 0x5023a37 (awaited: 0x5046ea4)
>  > ERROR:   Header check failed
>  > ERROR:   BL2: Failed to load image id 5 (-12)
> 
>  > The root cause is in changes for stm32mp1 trusted defconfig in updated
>  > U-Boot: see U-Boot commit 76db1681da52 ("stm32mp1: use a specific SD/eMMC
>  > partition for U-Boot enviromnent"). Starting from that commit, U-Boot
>  > environment is stored at the end of the U-Boot partition. As a result,
>  > saving environment changes GPT partition checksum verified by ATF.
> 
>  > IIUC at least the following two approaches can be implemented to make
>  > updated BSP work smoothly.
> 
>  > The first approach is to modify U-Boot config fragment for stm32mp1 boards
>  > and to re-enable saving U-Boot environment on ext4. However this choice
>  > implies certain restriction on rootfs ext4 features since it should be
>  > writable by U-Boot. See the mentioned U-Boot commit message for details.
> 
>  > Another approach is implemented by the attached patch: keep U-Boot
>  > environment on a dedicated GPT partition.
> 
>  > Thoughts ? Comments ?
> 
> If upstream wants to use a separate partition for the environment, then
> that is fine by me - But I would prefer to not patch u-boot and just
> name the environment partition ssbl.

Sure, I would also prerfer not to patch u-boot. However on stm32mp1
platform, ATF attempts to load BL33 bootloader from 'ssbl' partition.
So using this name for environment partition does not work.

Regards,
Sergey

  reply	other threads:[~2021-02-06 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 20:44 [Buildroot] [RFC PATCH] stm32mp1: modify gpt partitions to fix BSP update Sergey Matyukevich
2021-02-06 17:49 ` Peter Korsgaard
2021-02-06 20:16   ` Sergey Matyukevich [this message]
2021-02-06 20:35     ` Peter Korsgaard
2021-02-07 15:36       ` Sergey Matyukevich
2021-02-06 19:40 ` Bartosz Bilas

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=YB75BHzVtUdwxWLv@curiosity \
    --to=geomatsi@gmail.com \
    --cc=buildroot@busybox.net \
    /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.