public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH 04/13] sunxi: change ATF position for H6
Date: Tue, 26 Jun 2018 11:56:18 +0100	[thread overview]
Message-ID: <6237b1ab-e294-0f15-3c95-9249be7e150e@arm.com> (raw)
In-Reply-To: <20180625103723.24760-5-icenowy@aosc.io>

Hi,

On 25/06/18 11:37, Icenowy Zheng wrote:
> H6 has different SRAM A2 address, so the ATF load address is also
> different.
> 
> Add judgment code to sunxi 64-bit FIT generation script. It will judge
> the SoC by the device tree's name.

Mmh, would it be better to check for some config symbol to derive the
ATF load address?
Like:
if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then
...

Relying on a certain wording of the *first* .dtb name sounds a bit more
fragile.

Or maybe we could even have an explicit config symbol, which is just
used by that script?

BL31_ADDR=$(grep "^CONFIG_ATF_LOAD_ADDR=" .config | cut -d= -f2)

Cheers,
Andre.

> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---
>  board/sunxi/mksunxi_fit_atf.sh | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/board/sunxi/mksunxi_fit_atf.sh b/board/sunxi/mksunxi_fit_atf.sh
> index 36abe9efed..8540c3d88e 100755
> --- a/board/sunxi/mksunxi_fit_atf.sh
> +++ b/board/sunxi/mksunxi_fit_atf.sh
> @@ -13,6 +13,12 @@ if [ ! -f $BL31 ]; then
>  	BL31=/dev/null
>  fi
>  
> +if [ "$(basename $1 .dtb | cut -d - -f 1-2)" = "sun50i-h6" ]; then
> +	BL31_ADDR=0x104000
> +else
> +	BL31_ADDR=0x44000
> +fi
> +
>  cat << __HEADER_EOF
>  /dts-v1/;
>  
> @@ -35,8 +41,8 @@ cat << __HEADER_EOF
>  			type = "firmware";
>  			arch = "arm64";
>  			compression = "none";
> -			load = <0x44000>;
> -			entry = <0x44000>;
> +			load = <$BL31_ADDR>;
> +			entry = <$BL31_ADDR>;
>  		};
>  __HEADER_EOF
>  
> 

  reply	other threads:[~2018-06-26 10:56 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 10:37 [U-Boot] [PATCH 00/13] Allwinner H6 support (w/ SPL) Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 01/13] sunxi: change SUNXI_HIGH_SRAM option to SUNXI_SRAM_ADDRESS Icenowy Zheng
2018-06-25 12:30   ` Maxime Ripard
2018-06-26 10:34   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 02/13] sunxi: add basical memory map definitions of H6 SoC Icenowy Zheng
2018-06-25 12:33   ` Maxime Ripard
2018-06-25 12:50     ` Icenowy Zheng
2018-06-25 17:07       ` Maxime Ripard
2018-06-26 10:35       ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27  8:51   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 03/13] sunxi: change RMR64's RVBAR address for H6 Icenowy Zheng
2018-06-26 10:37   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 04/13] sunxi: change ATF position " Icenowy Zheng
2018-06-26 10:56   ` Andre Przywara [this message]
2018-06-25 10:37 ` [U-Boot] [PATCH 05/13] sunxi: add config for SPL at 0x20000 on H6 Icenowy Zheng
2018-06-26 10:56   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 06/13] sunxi: change GIC address " Icenowy Zheng
2018-06-26 10:56   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 07/13] sunxi: add clock code for H6 Icenowy Zheng
2018-06-26 13:04   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 08/13] sunxi: use sun6i-style watchdog " Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 09/13] sunxi: add UART0 setup " Icenowy Zheng
2018-06-26 11:01   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 10/13] sunxi: add MMC support " Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 11/13] sunxi: add DRAM support to H6 Icenowy Zheng
2018-06-27  9:46   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27 10:49     ` Icenowy Zheng
2018-06-27 17:29       ` Andre Przywara
2018-06-25 10:37 ` [U-Boot] [PATCH 12/13] sunxi: add support for Allwinner H6 SoC Icenowy Zheng
2018-06-27 14:04   ` [U-Boot] [linux-sunxi] " Andre Przywara
2018-06-27 14:26     ` Icenowy Zheng
2018-06-25 10:37 ` [U-Boot] [PATCH 13/13] sunxi: add support for Pine H64 board Icenowy Zheng
2018-06-25 12:40 ` [U-Boot] [linux-sunxi] [PATCH 00/13] Allwinner H6 support (w/ SPL) Jagan Teki
2018-06-25 12:49   ` Icenowy Zheng
2018-06-25 13:02     ` Jagan Teki
2018-07-19 18:14       ` Jagan Teki

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=6237b1ab-e294-0f15-3c95-9249be7e150e@arm.com \
    --to=andre.przywara@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox