Skip to contentSkip to conversation

configs: ti: am65x/j721e: Use DEFAULT_LINUX_BOOT_ENV

PATCH New Nishanth Menon 2 participants 6 messages Oct 8, 2020 – Oct 12, 2020

lore
Share & tools
lore
#0 lore raw

v2 cover configs: ti: am65x/j721e: Use DEFAULT_LINUX_BOOT_ENV

Use the common defaults from ./include/configs/ti_armv7_common.h

This saves us from rediscovering the same painful lessons learnt from ARMv7 (kernel dtbs ramdisks overlays stomping on each other etc..)

Changes since v1:
- Squashed up am654 config patch to reduce the patch count down without loosing bisectability.
- Reordered to remove the j721e dependencies ahead of am654

V1: https://patchwork.ozlabs.org/project/uboot/list/?series=206321

Nishanth Menon (4):
configs: j721e_evm: Use DEFAULT_LINUX_BOOT_ENV
env: ti: ufs: Use dtboaddr instead of overlayaddr
configs: j721e_evm: Get rid of overlayaddr
configs: am65x_evm: Use DEFAULT_LINUX_BOOT_ENV and remove overlayaddr

 include/configs/am65x_evm.h  | 8 +++-----
 include/configs/j721e_evm.h  | 8 +++-----
 include/environment/ti/ufs.h | 4 ++--
 3 files changed, 8 insertions(+), 12 deletions(-)
Signature · 1 line
2.28.0
#1 lore raw

PATCH v2 1/4 configs: j721e_evm: Use DEFAULT_LINUX_BOOT_ENV

Use DEFAULT_LINUX_BOOT_ENV to define the standard addresses used in rest of TI platforms as defined in ti_armv7_common.h

This avoids the standard pitfalls we've had with kernel images and fdt addresses stomping on each other.

As part of this process, redefine overlayaddr to be dtboaddr (defined in ti_armv7_common.h for this very purpose).. we will get rid of overlayaddr later in the series.

---
Changes since V1:
- reordered to be patch #1, no functional changes
V1: https://patchwork.ozlabs.org/project/uboot/patch/20201006190507.13346-3-nm at ti.com/

 include/configs/j721e_evm.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
include/configs/j721e_evm.h +4 -5
index 1b47e18b2f95..820e51378260 100644
@@ -69,9 +69,7 @@
 	"findfdt="							\
 		"setenv name_fdt ${default_device_tree};"		\
 		"setenv fdtfile ${name_fdt}\0"				\
-	"loadaddr=0x80080000\0"						\
-	"fdtaddr=0x82000000\0"						\
-	"overlayaddr=0x83000000\0"					\
+	"overlayaddr=${dtboaddr}\0"					\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
 	"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 "	\
@@ -114,8 +112,8 @@
 		"fdt resize 0x100000;"					\
 		"for overlay in $name_overlays;"			\
 		"do;"							\
-		"load mmc ${bootpart} ${overlayaddr} ${bootdir}/${overlay} && "	\
-		"fdt apply ${overlayaddr};"				\
+		"load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && "	\
+		"fdt apply ${dtboaddr};"				\
 		"done;\0"						\
 	"partitions=" PARTS_DEFAULT					\
 	"get_kern_mmc=load mmc ${bootpart} ${loadaddr} "		\
@@ -165,6 +163,7 @@
 
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS					\
+	DEFAULT_LINUX_BOOT_ENV						\
 	DEFAULT_MMC_TI_ARGS						\
 	DEFAULT_FIT_TI_ARGS						\
 	EXTRA_ENV_J721E_BOARD_SETTINGS					\
Signature · 1 line
2.28.0
#2 lore raw

PATCH v2 2/4 env: ti: ufs: Use dtboaddr instead of overlayaddr

In reply to Nishanth Menon

Use dtboaddr to define the overlay address common to all TI platforms instead of creating a new overlayaddr for the purpose.

---
Changes since V1:
- reordered to be patch #2, no functional changes
V1: https://patchwork.ozlabs.org/project/uboot/patch/20201006190507.13346-4-nm at ti.com/

 include/environment/ti/ufs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/environment/ti/ufs.h +2 -2
index d457e2030814..6619ec9c88ed 100644
@@ -26,8 +26,8 @@
 		"fdt resize 0x100000;" \
 		"for overlay in $name_overlays;" \
 		"do;" \
-		"load scsi ${bootpart} ${overlayaddr} ${bootdir}/${overlay} && " \
-		"fdt apply ${overlayaddr};" \
+		"load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
+		"fdt apply ${dtboaddr};" \
 		"done;\0"
 
 #endif
Signature · 1 line
2.28.0
#3 lore raw

PATCH v2 3/4 configs: j721e_evm: Get rid of overlayaddr

In reply to Nishanth Menon

Now that we dont have any further users of overlayaddr, get rid of it.

---
Changes since V1:
- reordered to be patch #3, no functional changes
V1: https://patchwork.ozlabs.org/project/uboot/patch/20201006190507.13346-6-nm at ti.com/

 include/configs/j721e_evm.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/j721e_evm.h +0 -1
index 820e51378260..b707fc4e899f 100644
@@ -69,7 +69,6 @@
 	"findfdt="							\
 		"setenv name_fdt ${default_device_tree};"		\
 		"setenv fdtfile ${name_fdt}\0"				\
-	"overlayaddr=${dtboaddr}\0"					\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
 	"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 "	\
Signature · 1 line
2.28.0
#4 lore raw

PATCH v2 4/4 configs: am65x_evm: Use DEFAULT_LINUX_BOOT_ENV and remove overlayaddr

In reply to Nishanth Menon

Use DEFAULT_LINUX_BOOT_ENV to define the standard addresses used in rest of TI platforms as defined in ti_armv7_common.h

This avoids the standard pitfalls we've had with kernel images and fdt addresses stomping on each other.

As part of this process, redefine overlayaddr to be dtboaddr (defined in ti_armv7_common.h for this very purpose) and get rid of the definition of overlayaddr..

---
Changes since V1:
- Squashed patch of #1 and #4, no functional changes

V1:
https://patchwork.ozlabs.org/project/uboot/patch/20201006190507.13346-2-nm at ti.com/
https://patchwork.ozlabs.org/project/uboot/patch/20201006190507.13346-5-nm at ti.com/

 include/configs/am65x_evm.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
include/configs/am65x_evm.h +3 -5
index df0605657aef..9eed0ea203a9 100644
@@ -69,9 +69,6 @@
 	"findfdt="							\
 		"setenv name_fdt k3-am654-base-board.dtb;"		\
 		"setenv fdtfile ${name_fdt}\0"				\
-	"loadaddr=0x80080000\0"						\
-	"fdtaddr=0x82000000\0"						\
-	"overlayaddr=0x83000000\0"					\
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
 	"stdin=serial,usbkbd\0"						\
@@ -93,8 +90,8 @@
 		"fdt resize 0x100000;"					\
 		"for overlay in $name_overlays;"			\
 		"do;"							\
-		"load mmc ${bootpart} ${overlayaddr} ${bootdir}/${overlay};"	\
-		"fdt apply ${overlayaddr};"				\
+		"load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay};"	\
+		"fdt apply ${dtboaddr};"				\
 		"done;\0"						\
 	"get_kern_mmc=load mmc ${bootpart} ${loadaddr} "		\
 		"${bootdir}/${name_kern}\0"				\
@@ -133,6 +130,7 @@
 
 /* Incorporate settings into the U-Boot environment */
 #define CONFIG_EXTRA_ENV_SETTINGS					\
+	DEFAULT_LINUX_BOOT_ENV						\
 	DEFAULT_MMC_TI_ARGS						\
 	DEFAULT_FIT_TI_ARGS						\
 	EXTRA_ENV_AM65X_BOARD_SETTINGS					\
Signature · 1 line
2.28.0
#5 lore raw

v2 cover configs: ti: am65x/j721e: Use DEFAULT_LINUX_BOOT_ENV

In reply to Nishanth Menon
Quoted 11 lines · Nishanth Menon

Use the common defaults from ./include/configs/ti_armv7_common.h

This saves us from rediscovering the same painful lessons learnt from ARMv7 (kernel dtbs ramdisks overlays stomping on each other etc..)

Changes since v1:
- Squashed up am654 config patch to reduce the patch count down without loosing bisectability.
- Reordered to remove the j721e dependencies ahead of am654

V1: https://patchwork.ozlabs.org/project/uboot/list/?series=206321

Applied to u-boot-ti.

Thanks and regards,
Lokesh