Skip to contentSkip to conversation

km: replace hardcoded address for imported environment

PATCH New Holger Brunck 2 participants 2 messages Oct 29, 2020 – Nov 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 km: replace hardcoded address for imported environment

From: Matteo Ghidoni <[email protected]>

Instead of using an hard coded address, make use of an already defined address for importing the environment for ramfs and nfs boot. This allows boards having different mapping to use the same code.

---
 board/keymile/scripts/develop-arm.txt      | 2 +-
 board/keymile/scripts/develop-common.txt   | 2 +-
 board/keymile/scripts/develop-ppc_82xx.txt | 2 +-
 board/keymile/scripts/develop-ppc_8xx.txt  | 2 +-
 board/keymile/scripts/ramfs-arm.txt        | 2 +-
 board/keymile/scripts/ramfs-common.txt     | 2 +-
 board/keymile/scripts/ramfs-ppc_82xx.txt   | 2 +-
 board/keymile/scripts/ramfs-ppc_8xx.txt    | 2 +-
 include/configs/km/keymile-common.h        | 8 ++++----
 9 files changed, 12 insertions(+), 12 deletions(-)
board/keymile/scripts/develop-arm.txt +1 -1
index d3c974f1f9..4c12d3e1c4 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/develop-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
board/keymile/scripts/develop-common.txt +1 -1
index f77a26abe8..4384c0da30 100644
@@ -9,4 +9,4 @@ toolchain=/opt/eldk
 rootfssize=0
 set_uimage=printenv uimage || setenv uimage uImage
 set_tftppath=if test ${hostname} = kmcoge5un; then setenv tftppath CI5UN; else if test ${hostname} = kmcoge5ne; then setenv tftppath CI5NE; else setenv tftppath ${IVM_Symbol}; fi; fi
-try_import_nfs_path=if tftpboot 0x200000 ${tftppath}/nfs-path.txt; then env import -t 0x200000 ${filesize}; else echo no auto nfs path imported; echo you can set nfsargs in /tftpboot/${tftppath}/nfs-path.txt and rerun develop; fi
+try_import_nfs_path=if tftpboot ${load_addr_r} ${tftppath}/nfs-path.txt; then env import -t ${load_addr_r} ${filesize}; else echo no auto nfs path imported; echo you can set nfsargs in /tftpboot/${tftppath}/nfs-path.txt and rerun develop; fi
board/keymile/scripts/develop-ppc_82xx.txt +1 -1
index d3c974f1f9..4c12d3e1c4 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/develop-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
board/keymile/scripts/develop-ppc_8xx.txt +1 -1
index d3c974f1f9..4c12d3e1c4 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/develop-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/develop-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
board/keymile/scripts/ramfs-arm.txt +1 -1
index 87e984e179..93f87fabab 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/ramfs-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
board/keymile/scripts/ramfs-common.txt +1 -1
index 290c602aab..e590a2bee6 100644
@@ -12,4 +12,4 @@ tftpkernel=tftpboot ${load_addr_r} ${tftppath}/${uimage}
 tftpramfs=tftpboot ${rootfsaddr} ${tftppath}/rootfsImage
 set_uimage=printenv uimage || setenv uimage uImage
 set_tftppath=if test ${hostname} = kmcoge5un; then setenv tftppath CI5UN; else if test ${hostname} = kmcoge5ne; then setenv tftppath CI5NE; else setenv tftppath ${IVM_Symbol}; fi; fi
-try_import_rootfssize=if tftpboot 0x200000 ${tftppath}/rootfssize.txt; then env import -t 0x200000 ${filesize}; else echo no auto rootfs size; echo you can set rootfssize in /tftpboot/${tftppath}/rootfssize.txt and rerun ramfs; fi
+try_import_rootfssize=if tftpboot ${load_addr_r} ${tftppath}/rootfssize.txt; then env import -t ${load_addr_r} ${filesize}; else echo no auto rootfs size; echo you can set rootfssize in /tftpboot/${tftppath}/rootfssize.txt and rerun ramfs; fi
board/keymile/scripts/ramfs-ppc_82xx.txt +1 -1
index 87e984e179..93f87fabab 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/ramfs-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
board/keymile/scripts/ramfs-ppc_8xx.txt +1 -1
index 87e984e179..93f87fabab 100644
@@ -1 +1 @@
-setup_debug_env=tftpboot 0x200000 scripts/ramfs-common.txt && env import -t 0x200000 ${filesize} && run configure
+setup_debug_env=tftpboot ${load_addr_r} scripts/ramfs-common.txt && env import -t ${load_addr_r} ${filesize} && run configure
include/configs/km/keymile-common.h +4 -4
index c1968048a7..851b13e063 100644
@@ -90,12 +90,12 @@
 		"set_fdthigh cramfsloadkernel flashargs add_default "	\
 		"addpanic boot\0"					\
 	"develop="							\
-		"tftp 200000 scripts/develop-${arch}.txt && "		\
-		"env import -t 200000 ${filesize} && "			\
+		"tftp ${load_addr_r} scripts/develop-${arch}.txt && "	\
+		"env import -t ${load_addr_r} ${filesize} && "		\
 		"run setup_debug_env\0"					\
 	"ramfs="							\
-		"tftp 200000 scripts/ramfs-${arch}.txt && "		\
-		"env import -t 200000 ${filesize} && "			\
+		"tftp ${load_addr_r} scripts/ramfs-${arch}.txt && "	\
+		"env import -t ${load_addr_r} ${filesize} && "		\
 		"run setup_debug_env\0"					\
 	""
 
Signature · 1 line
2.26.0
#1 lore raw

PATCH 1/1 km: replace hardcoded address for imported environment

Quoted 11 lines · Holger Brunck

From: Matteo Ghidoni <[email protected]>

Instead of using an hard coded address, make use of an already defined address for importing the environment for ramfs and nfs boot. This allows boards having different mapping to use the same code.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201119/451f469d/attachment.sig>