Skip to contentSkip to conversation

distro_bootcmd: set devtype for dhcp boot

PATCH New Igor Opaniuk 3 participants 4 messages Oct 29, 2020 – Dec 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distro_bootcmd: set devtype for dhcp boot

From: Igor Opaniuk <[email protected]>

Set $devtype for DHCP boot, which can be handy for the boot.scr for detection of devtype used (for example, when the same boot.scr is used for both mmc/dhcp boot):

if test ${devtype} = "dhcp"; then

	...

fi

---

 include/config_distro_bootcmd.h | 1 +
 1 file changed, 1 insertion(+)
include/config_distro_bootcmd.h +1 -0
index ff29ef5a90..f5d113513a 100644
@@ -367,6 +367,7 @@
 #endif
 #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
 	"bootcmd_dhcp=" \
+		"setenv devtype " #devtypel "; " \
 		BOOTENV_RUN_NET_USB_START \
 		BOOTENV_RUN_PCI_ENUM \
 		"if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 distro_bootcmd: set devtype for dhcp boot

Quoted 7 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Set $devtype for DHCP boot, which can be handy for the boot.scr for detection of devtype used (for example, when the same boot.scr is used for both mmc/dhcp boot):

Quoted 5 lines

if test ${devtype} = "dhcp"; then

        ...

fi

Quoted 20 lines

---

 include/config_distro_bootcmd.h | 1 +
 1 file changed, 1 insertion(+)
include/config_distro_bootcmd.h +1 -1
index ff29ef5a90..f5d113513a 100644
@@ -367,6 +367,7 @@
 #endif
 #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
        "bootcmd_dhcp=" \
+               "setenv devtype " #devtypel "; " \
                BOOTENV_RUN_NET_USB_START \
                BOOTENV_RUN_PCI_ENUM \
                "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
--

2.17.1

Signature · 5 lines
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00
#2 lore raw

PATCH 1/1 distro_bootcmd: set devtype for dhcp boot

In reply to Igor Opaniuk

Hi Tom,

Quoted 30 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Set $devtype for DHCP boot, which can be handy for the boot.scr for detection of devtype used (for example, when the same boot.scr is used for both mmc/dhcp boot):

if test ${devtype} = "dhcp"; then

        ...

fi

---

 include/config_distro_bootcmd.h | 1 +
 1 file changed, 1 insertion(+)
include/config_distro_bootcmd.h +1 -1
index ff29ef5a90..f5d113513a 100644
@@ -367,6 +367,7 @@
 #endif
 #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
        "bootcmd_dhcp=" \
+               "setenv devtype " #devtypel "; " \
                BOOTENV_RUN_NET_USB_START \
                BOOTENV_RUN_PCI_ENUM \
                "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
--
Quoted 2 lines

2.17.1

Any chance this can be pulled in for v2021.01 ?
Thanks

Signature · 8 lines
Best regards - Freundliche Gr?sse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
#3 lore raw

PATCH 1/1 distro_bootcmd: set devtype for dhcp boot

In reply to Igor Opaniuk
Quoted 6 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Set $devtype for DHCP boot, which can be handy for the boot.scr for detection of devtype used (for example, when the same boot.scr is used for both mmc/dhcp boot):

Quoted 6 lines

if test ${devtype} = "dhcp"; then

	...

fi

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/20201216/feb3aeb4/attachment.sig>