mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] common: limit CONFIG_TEXT_BASE to 32-bit
Date: Mon, 5 Jun 2023 15:41:48 +0200	[thread overview]
Message-ID: <20230605134148.GO18491@pengutronix.de> (raw)
In-Reply-To: <20230605062803.3994132-1-a.fatoum@pengutronix.de>

On Mon, Jun 05, 2023 at 08:28:03AM +0200, Ahmad Fatoum wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2023-06-05 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05  6:28 Ahmad Fatoum
2023-06-05 13:41 ` Sascha Hauer [this message]

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=20230605134148.GO18491@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=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