]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
distro_bootcmd: set devtype for dhcp boot
authorIgor Opaniuk <igor.opaniuk@toradex.com>
Thu, 29 Oct 2020 10:59:19 +0000 (12:59 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 15 Dec 2020 18:56:50 +0000 (13:56 -0500)
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

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
include/config_distro_bootcmd.h

index 82a3a365c5b534f0ee0a3b355520f0a960c7a569..c9862260a38930c15b25162864ab1feb82123792 100644 (file)
 #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 " \