mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
Merge pull request #728 from kernelkit/uboot-http-netboot-fixes
U-Boot HTTP Netboot Fixes Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user