From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [PATCH] odroid-go2: remove setting SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
Date: Wed, 17 Feb 2021 02:42:21 +0100 [thread overview]
Message-ID: <5600009.N7aMVyhfb1@diego> (raw)
In-Reply-To: <20210216142652.GW10169@bill-the-cat>
Hi Tom,
Am Dienstag, 16. Februar 2021, 15:26:52 CET schrieb Tom Rini:
> On Sat, Feb 13, 2021 at 11:45:50PM +0100, Heiko Stuebner wrote:
> > Hi Roger,
> >
> > Am Samstag, 13. Februar 2021, 16:59:01 CET schrieb Roger Pau Monne:
> > > From: Roger Pau Monn? <royger@FreeBSD.org>
> > >
> > > Using a non-default SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR setting makes the
> > > resulting u-boot-rockchip.bin unbootable, as it gets stuck after SPL.
> > > Removing the setting from the defconfig allows U-Boot to load
> > > successfully.
> >
> > Hmm, I'd disagree slightly.
> >
> > In the rockchip-common.h the CONFIG_SPL_PAD_TO is defined as
> >
> > /* ((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512) */
> > #define CONFIG_SPL_PAD_TO 8355840
> >
> > so it's a static value but based on the MMCSD_RAW_MODE... config option.
> >
> > So instead of mandating one specific MMCSD_RAW_MODE... value
> > that CONFIG_SPL_PAD_TO should be defined based on the the
> > actual config value of CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
> > and not some static number that then gets enforced for all boards.
>
> So, what does CONFIG_SPL_PAD_TO actually mean, in this case? And
> SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR ? What I'm getting at is that we
> generally have some required to be fixed (by the SoC/ROM/etc) locations
> some parts of our SPL/TPL/U-Boot need to be at and then the rest of the
> values are (supposed to be) well and carefully chosen offsets and not
> changed around. So with the above comment in the code to explain where
> 8355840 came from, it also shouldn't and nor should
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR be changed without a compelling
> reason.
Normally Rockchip platforms have two loader binaries:
- idbLoader.img (tpl + spl, or only spl), loving at offset 64 of a sd-card
This is mandated by the bootrom
- u-boot.itb (u-boot, atf, etc) living at SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
As SPL will load from the location specified in the config, this location
can be set depending on emmc/sd-card/whatever needs.
It looks like recently a new binary creating method was added that creates
a u-boot-rockchip.bin combining these somewhat automatically:
idbLoader.img
+ SPL_PAD_TO
+ u-boot.itb
So that only that binary needs to be flashed to the boot medium
instead of two.
So the SPL_PAD_TO essentially would mandate one specific
SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR for every board.
For the odroid-go2 itself it doesn't really matter I guess, but there are
other boards with different requirements, so mandating one specific place
for the main uboot for all boards that will ever exist seems a bit counter-
intuitive to me.
Heiko
next prev parent reply other threads:[~2021-02-17 1:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-13 15:59 [PATCH] odroid-go2: remove setting SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR Roger Pau Monne
2021-02-13 22:45 ` Heiko Stuebner
2021-02-14 7:25 ` Roger Pau Monné
2021-02-14 15:07 ` Roger Pau Monné
2021-02-16 14:26 ` Tom Rini
2021-02-17 1:42 ` Heiko Stuebner [this message]
2021-02-17 2:21 ` Tom Rini
2021-02-17 13:08 ` Heiko Stuebner
2021-02-22 9:15 ` Roger Pau Monné
2021-03-06 15:37 ` Roger Pau Monné
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=5600009.N7aMVyhfb1@diego \
--to=heiko.stuebner@theobroma-systems.com \
--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.