From cc68d3fcce423f023539ed2e478c71f9e6be68f8 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 4 Jul 2021 16:58:09 +0200 Subject: ARM: rmobile: Remove default bootargs The bootargs in all those boards are a copy of initial example bootargs, just remove those as they make little sense in most configurations. Signed-off-by: Marek Vasut --- configs/hihope_rzg2_defconfig | 1 - configs/r8a77970_eagle_defconfig | 1 - configs/r8a77980_condor_defconfig | 1 - configs/r8a77990_ebisu_defconfig | 1 - configs/r8a77995_draak_defconfig | 1 - configs/rcar3_salvator-x_defconfig | 1 - configs/rcar3_ulcb_defconfig | 1 - 7 files changed, 7 deletions(-) diff --git a/configs/hihope_rzg2_defconfig b/configs/hihope_rzg2_defconfig index 1e977444d41..d91604045ae 100644 --- a/configs/hihope_rzg2_defconfig +++ b/configs/hihope_rzg2_defconfig @@ -12,7 +12,6 @@ CONFIG_TARGET_HIHOPE_RZG2=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a774a1-hihope-rzg2m.dtb" # CONFIG_BOARD_EARLY_INIT_F is not set CONFIG_HUSH_PARSER=y diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig index 5455eb7f49c..eaa67e22873 100644 --- a/configs/r8a77970_eagle_defconfig +++ b/configs/r8a77970_eagle_defconfig @@ -14,7 +14,6 @@ CONFIG_TARGET_EAGLE=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77970-eagle.dtb" CONFIG_HUSH_PARSER=y CONFIG_CMD_BOOTZ=y diff --git a/configs/r8a77980_condor_defconfig b/configs/r8a77980_condor_defconfig index b1c422f20d0..355008c851e 100644 --- a/configs/r8a77980_condor_defconfig +++ b/configs/r8a77980_condor_defconfig @@ -14,7 +14,6 @@ CONFIG_TARGET_CONDOR=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77980-condor.dtb" # CONFIG_BOARD_EARLY_INIT_F is not set CONFIG_HUSH_PARSER=y diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig index 12d04dada9c..417074f65a9 100644 --- a/configs/r8a77990_ebisu_defconfig +++ b/configs/r8a77990_ebisu_defconfig @@ -13,7 +13,6 @@ CONFIG_TARGET_EBISU=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77990-ebisu.dtb" # CONFIG_BOARD_EARLY_INIT_F is not set CONFIG_UPDATE_TFTP=y diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig index 58d5299ab03..bd779d8135e 100644 --- a/configs/r8a77995_draak_defconfig +++ b/configs/r8a77995_draak_defconfig @@ -13,7 +13,6 @@ CONFIG_TARGET_DRAAK=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77995-draak.dtb" CONFIG_UPDATE_TFTP=y CONFIG_HUSH_PARSER=y diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index 61b984084ff..ab996dd844e 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -12,7 +12,6 @@ CONFIG_TARGET_SALVATOR_X=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77950-salvator-x.dtb" CONFIG_UPDATE_TFTP=y CONFIG_HUSH_PARSER=y diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig index 0528dc99d78..92209335182 100644 --- a/configs/rcar3_ulcb_defconfig +++ b/configs/rcar3_ulcb_defconfig @@ -13,7 +13,6 @@ CONFIG_TARGET_ULCB=y CONFIG_FIT=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=192.168.0.1:/export/rfs ip=192.168.0.20" CONFIG_DEFAULT_FDT_FILE="r8a77950-ulcb.dtb" CONFIG_UPDATE_TFTP=y CONFIG_HUSH_PARSER=y -- cgit v1.2.3 From 2525fa3cb881791da98407dff947d343a6646e4f Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 13 Jun 2021 22:40:45 +0200 Subject: ARM: renesas: Turn on PIE for Gen3 Turn on PIE, so that the U-Boot binary can be started from any arbitrary location in DRAM instead of a predefined fixed one. Note that this patch is not setting SYS_TEXT_BASE=0x0 yet, since that triggers relocation bugs in env code that are yet to be fixed. Signed-off-by: Marek Vasut Cc: Biju Das Cc: Lad Prabhakar --- arch/arm/mach-rmobile/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-rmobile/Kconfig b/arch/arm/mach-rmobile/Kconfig index 41322b2c4c5..69e40cf3827 100644 --- a/arch/arm/mach-rmobile/Kconfig +++ b/arch/arm/mach-rmobile/Kconfig @@ -17,6 +17,7 @@ config RCAR_GEN3 select PINCTRL select PINCONF select PINCTRL_PFC + select POSITION_INDEPENDENT select SUPPORT_SPL imply CMD_FS_UUID imply CMD_GPT -- cgit v1.2.3 From d2d9ecb88e0e06871cf0109e935e1b4cade780bf Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 13 Jun 2021 22:42:26 +0200 Subject: ARM: renesas: Mallocate bootparams on Gen3 The bootparams do not have to be at fixed location, they can be dynamically mallocated instead. Make it so to get rid of another fixed assignment. Signed-off-by: Marek Vasut Cc: Biju Das Cc: Lad Prabhakar --- board/renesas/condor/condor.c | 3 --- board/renesas/draak/draak.c | 3 --- board/renesas/eagle/eagle.c | 3 --- board/renesas/ebisu/ebisu.c | 3 --- board/renesas/salvator-x/salvator-x.c | 3 --- board/renesas/ulcb/ulcb.c | 3 --- include/configs/rcar-gen3-common.h | 2 ++ 7 files changed, 2 insertions(+), 18 deletions(-) diff --git a/board/renesas/condor/condor.c b/board/renesas/condor/condor.c index e930de31b2f..2dd2c1534c1 100644 --- a/board/renesas/condor/condor.c +++ b/board/renesas/condor/condor.c @@ -21,9 +21,6 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - return 0; } diff --git a/board/renesas/draak/draak.c b/board/renesas/draak/draak.c index 0aaae815c01..3d00652a8d1 100644 --- a/board/renesas/draak/draak.c +++ b/board/renesas/draak/draak.c @@ -54,9 +54,6 @@ int board_early_init_f(void) int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - /* USB1 pull-up */ setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN); diff --git a/board/renesas/eagle/eagle.c b/board/renesas/eagle/eagle.c index bb32e3d2c53..3417b50f3b0 100644 --- a/board/renesas/eagle/eagle.c +++ b/board/renesas/eagle/eagle.c @@ -65,9 +65,6 @@ int board_early_init_f(void) int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - return 0; } diff --git a/board/renesas/ebisu/ebisu.c b/board/renesas/ebisu/ebisu.c index 9d4af8d3a6d..9a701925961 100644 --- a/board/renesas/ebisu/ebisu.c +++ b/board/renesas/ebisu/ebisu.c @@ -32,9 +32,6 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - return 0; } diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index 1802547bbfb..d4752e57982 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -53,9 +53,6 @@ int board_early_init_f(void) int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - /* USB1 pull-up */ setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN); diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c index ffc4eb9ff32..4626d223b07 100644 --- a/board/renesas/ulcb/ulcb.c +++ b/board/renesas/ulcb/ulcb.c @@ -51,9 +51,6 @@ int board_early_init_f(void) int board_init(void) { - /* adress of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; - /* USB1 pull-up */ setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN); diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index b9762f5bebb..99ef27bccd5 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -17,6 +17,8 @@ #define CONFIG_SPL_TARGET "spl/u-boot-spl.scif" #endif +#define CONFIG_SYS_BOOTPARAMS_LEN SZ_128K + /* boot option */ #define CONFIG_CMDLINE_TAG -- cgit v1.2.3 From 0ae06f6b36bf3014531e04a10daa2ad71ad9a351 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 13 Jun 2021 22:41:09 +0200 Subject: ARM: renesas: Set CONFIG_SYS_TEXT_BASE=0x0 on R-Car Gen3 Since R-Car Gen3 already enables position independent build, also set CONFIG_SYS_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_SYS_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut --- configs/rcar3_salvator-x_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index ab996dd844e..7bebdf03f9c 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_CPU_INIT=y CONFIG_ARCH_RMOBILE=y -CONFIG_SYS_TEXT_BASE=0x50000000 +CONFIG_SYS_TEXT_BASE=0x0 CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0xFFFE0000 CONFIG_DM_GPIO=y -- cgit v1.2.3