diff --git a/board/common/uboot/scripts/ixprepdhcp.sh b/board/common/uboot/scripts/ixprepdhcp.sh index 935a1a84..93e6c97a 100644 --- a/board/common/uboot/scripts/ixprepdhcp.sh +++ b/board/common/uboot/scripts/ixprepdhcp.sh @@ -1,19 +1,20 @@ setenv autoload no -if test -n "${ipaddr}" -a -n "${netmask}" -a -n "${serverip}" -a -n "${bootfile}" || dhcp; then +if test -n "${ipaddr}" || dhcp; then setenv proto tftp setenv dltool tftpboot + setenv dlfile "${bootfile}" if setexpr proto sub "^(http|tftp)://.*" "\\1" "${bootfile}"; then if test "${proto}" = "http"; then setenv dltool wget - setexpr bootfile sub "^http://([^/]+?)/(.*)" "\1:/\2" + setexpr dlfile sub "^http://([^/]+?)/(.*)" "\\1:/\\2" "${bootfile}" else - setexpr bootfile sub "^tftp://([^/]+?)/(.*)" "\1:\2" + setexpr dlfile sub "^tftp://([^/]+?)/(.*)" "\\1:\\2" "${bootfile}" fi fi - if ${dltool} ${ramdisk_addr_r} "${bootfile}"; then + if ${dltool} ${ramdisk_addr_r} "${dlfile}"; then setenv old_fdt_addr ${fdt_addr} if fdt addr ${ramdisk_addr_r}; then fdt get value sqoffs /images/rootfs data-position