From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] common: limit CONFIG_TEXT_BASE to 32-bit
Date: Mon, 5 Jun 2023 08:28:03 +0200 [thread overview]
Message-ID: <20230605062803.3994132-1-a.fatoum@pengutronix.de> (raw)
The linker scripts fail in an odd way if CONFIG_TEXT_BASE doesn't
fit in 32-bit, e.g. reporting that the PBL is greater than
0xffffffff, because CONFIG_TEXT_BASE is bigger than that.
As new platform should just select CONFIG_PBL_RELOCATABLE and
CONFIG_RELOCATABLE anyway, let's enforce the 32-bit maximum in
Kconfig to make errors easier to grok.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
common/Kconfig | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig
index 5346ba5a623c..11aabbb509df 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -198,9 +198,13 @@ config TEXT_BASE
depends on HAVE_CONFIGURABLE_TEXT_BASE
prompt "TEXT_BASE"
hex
+ range 0 0xffffffff
default ARCH_TEXT_BASE
help
- The Address barebox gets linked at.
+ The 32-bit address barebox gets linked at. This is forced
+ to zero for relocatable barebox and fixed up at runtime,
+ so barebox is executable on arbitrary addresses (given
+ sufficient alignment).
config BAREBOX_MAX_IMAGE_SIZE
prompt "Maximum size of barebox"
--
2.39.2
next reply other threads:[~2023-06-05 6:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 6:28 Ahmad Fatoum [this message]
2023-06-05 13:41 ` Sascha Hauer
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=20230605062803.3994132-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox