Skip to contentSkip to conversation

distro_bootcmd: read DHCP boot script name from a variable

PATCH In review Stephen Warren 2 participants 2 messages Jan 19, 2015 – Feb 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distro_bootcmd: read DHCP boot script name from a variable

From: Stephen Warren <[email protected]>

Modify $bootcmd_dhcp to read the downloaded script filename from an environment variable rather than hard-coding it. This allows the user (or another script) to select a different script name if they want, without editing the whole value of $bootcmd_dhcp.

---
 include/config_distro_bootcmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/config_distro_bootcmd.h +2 -1
index be616e8bfd0e..4ed149a56088 100644
@@ -118,7 +118,7 @@
 #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
 	"bootcmd_dhcp=" \
 		BOOTENV_RUN_USB_INIT \
-		"if dhcp ${scriptaddr} boot.scr.uimg; then " \
+		"if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
 			"source ${scriptaddr}; " \
 		"fi\0"
 #define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \
@@ -162,6 +162,7 @@
 	BOOTENV_SHARED_IDE \
 	"boot_prefixes=/ /boot/\0" \
 	"boot_scripts=boot.scr.uimg boot.scr\0" \
+	"boot_script_dhcp=boot.scr.uimg\0" \
 	BOOTENV_BOOT_TARGETS \
 	"bootpart=1\0" \
 	\
Signature · 1 line
1.9.1
#1 lore raw
Quoted 8 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Modify $bootcmd_dhcp to read the downloaded script filename from an environment variable rather than hard-coding it. This allows the user (or another script) to select a different script name if they want, without editing the whole value of $bootcmd_dhcp.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150202/198473aa/attachment.sig>