diff mbox series

[2/2] ARM: uniphier: use $loadaddr for source command

Message ID 20200130132038.9757-2-yamada.masahiro@socionext.com
State Accepted
Commit 76cd7d47fb8ac191553b741bb424e93c94ca759a
Delegated to: Masahiro Yamada
Headers show
Series [1/2] ARM: uniphier: set gd->ram_base correctly | expand

Commit Message

Masahiro Yamada Jan. 30, 2020, 1:20 p.m. UTC
If the "source" command is not given the address, it uses
CONFIG_SYS_LOAD_ADDR, which is compile-time determined.

Using the "loadaddr" environment variable is handier because it is
relocated according to the memory base when CONFIG_POSITION_INDEPENDENT
is enabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/configs/uniphier.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Masahiro Yamada Jan. 31, 2020, 4:57 p.m. UTC | #1
On Thu, Jan 30, 2020 at 10:21 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> If the "source" command is not given the address, it uses
> CONFIG_SYS_LOAD_ADDR, which is compile-time determined.
>
> Using the "loadaddr" environment variable is handier because it is
> relocated according to the memory base when CONFIG_POSITION_INDEPENDENT
> is enabled.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---


Applied to u-boot-uniphier.


>
>  include/configs/uniphier.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
> index 29866668c491..b95fb9c93fa9 100644
> --- a/include/configs/uniphier.h
> +++ b/include/configs/uniphier.h
> @@ -169,17 +169,17 @@
>                 "ubi part UBI && " \
>                 "ubifsmount ubi0:boot && " \
>                 "ubifsload ${loadaddr} ${script} && " \
> -               "source\0" \
> +               "source $loadaddr\0" \
>         "norscript=echo Running ${script} from tftp ... && " \
>                 "tftpboot ${script} &&" \
> -               "source\0" \
> +               "source $loadaddr\0" \
>         "usbscript=usb start && " \
>                 "setenv devtype usb && " \
>                 "setenv devnum 0 && " \
>                 "run loadscript_fat\0" \
>         "loadscript_fat=echo Running ${script} from ${devtype}${devnum} ... && " \
>                 "load ${devtype} ${devnum}:1 ${loadaddr} ${script} && " \
> -               "source\0" \
> +               "source $loadaddr\0" \
>         "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&"    \
>                 "tftpboot $tmp_addr $second_image && " \
>                 "setexpr tmp_addr $nor_base + 0x70000 && " \
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 29866668c491..b95fb9c93fa9 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -169,17 +169,17 @@ 
 		"ubi part UBI && " \
 		"ubifsmount ubi0:boot && " \
 		"ubifsload ${loadaddr} ${script} && " \
-		"source\0" \
+		"source $loadaddr\0" \
 	"norscript=echo Running ${script} from tftp ... && " \
 		"tftpboot ${script} &&" \
-		"source\0" \
+		"source $loadaddr\0" \
 	"usbscript=usb start && " \
 		"setenv devtype usb && " \
 		"setenv devnum 0 && " \
 		"run loadscript_fat\0" \
 	"loadscript_fat=echo Running ${script} from ${devtype}${devnum} ... && " \
 		"load ${devtype} ${devnum}:1 ${loadaddr} ${script} && " \
-		"source\0" \
+		"source $loadaddr\0" \
 	"sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&"	\
 		"tftpboot $tmp_addr $second_image && " \
 		"setexpr tmp_addr $nor_base + 0x70000 && " \