summaryrefslogtreecommitdiff
path: root/board/keymile/scripts/develop-common.txt
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@ch.abb.com>2020-01-10 14:55:42 +0300
committerTom Rini <trini@konsulko.com>2020-01-23 15:29:58 +0300
commitd4348a8db79de3985c3a6b738056e5b00d4ad020 (patch)
tree7e4b87f67c29cc8ee08e097f46590232177746da /board/keymile/scripts/develop-common.txt
parent27a5f833ff0cc84103e97df207f8bc3c0dd03e6f (diff)
downloadu-boot-d4348a8db79de3985c3a6b738056e5b00d4ad020.tar.xz
km/scripts: product env and auto-reset for ramfs
This patch adds the possibility in both debug and ramfs modes to optionally load an env file from /tftpboot/$tftppath (this is ignored if not present, so the change is backward compatible). This gives the debug and ramfs scripts the possibility to set uboot environment variables that were previously asked the users to manually set (nfs path in debug and rootfs size in ramfs). Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> CC: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/keymile/scripts/develop-common.txt')
-rw-r--r--board/keymile/scripts/develop-common.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index ba15323a5b..f77a26abe8 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -1,6 +1,6 @@
altbootcmd=run ${subbootcmds}
bootcmd=run ${subbootcmds}
-configure=run set_uimage; run set_tftppath; km_setboardid && saveenv && reset
+configure=run set_uimage; run set_tftppath; km_setboardid && run try_import_nfs_path && saveenv && reset
subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${tftppath}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${tftppath}/${hostname}.dtb; fi; else true; fi
@@ -9,3 +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