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 1/2] gen-dtb-s: reference OF IMD entries automatically
Date: Tue, 21 Feb 2023 10:36:28 +0100	[thread overview]
Message-ID: <20230221093628.GB10447@pengutronix.de> (raw)
In-Reply-To: <20230217203733.2926811-1-a.fatoum@pengutronix.de>

On Fri, Feb 17, 2023 at 09:37:32PM +0100, Ahmad Fatoum wrote:
> We currently require IMD_OF_USED to get the DT compatible into the
> barebox image data meta section. As the PBL is already referencing the
> DT to pass it along to barebox proper, let's add a reference from the DT
> to the image data section to make IMD_OF_USED unnecessary.
> 
> Suggested-by: Antony Pavlov <antonynpavlov@gmail.com>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  scripts/gen-dtb-s | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/scripts/gen-dtb-s b/scripts/gen-dtb-s
> index c5c46a4d8675..9cc2e7a72cc2 100755
> --- a/scripts/gen-dtb-s
> +++ b/scripts/gen-dtb-s
> @@ -49,6 +49,9 @@ echo "__dtb_${name}_start:"
>  echo ".incbin \"$dtb\""
>  echo "__dtb_${name}_end:"
>  echo ".global __dtb_${name}_end"
> +if [ "$imd" = "y" ]; then
> +	echo ".word __barebox_imd_OF_${name}"
> +fi
>  echo ".balign STRUCT_ALIGNMENT"
>  
>  compressed=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" $dtb.z)
> @@ -66,4 +69,7 @@ echo ".incbin \"$dtb.z\""
>  echo "__dtb_z_${name}_end:"
>  echo ".global __dtb_z_${name}_end"
>  echo ".balign STRUCT_ALIGNMENT"
> +if [ "$imd" = "y" ]; then
> +	echo ".word __barebox_imd_OF_${name}"
> +fi
>  echo "#endif"

This results in several linker errors here when compiling
imx_v8_defconfig:

/opt/OSELAS.Toolchain-2022.10.0/aarch64-v8a-linux-gnu/gcc-12.2.1-clang-15.0.2-glibc-2.36-binutils-2.39-kernel-6.0.5-sanitized/bin/aarch64-v8a-linux-gnu-ld: arch/arm/dts/imx8mm-innocomm-wb15-evk.dtb.pbl.o: relocation R_AARCH64_ABS32 against `__barebox_imd_OF_imx8mm_innocomm_wb15_evk' can not be used when making a shared object

Sascha

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



      parent reply	other threads:[~2023-02-21  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 20:37 Ahmad Fatoum
2023-02-17 20:37 ` [PATCH 2/2] treewide: remove no-longer needed IMD_USED_OF Ahmad Fatoum
2023-02-20 17:31   ` Marco Felsch
2023-02-21  9:36 ` 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=20230221093628.GB10447@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