net-eth, mipsel-*: Add new target use/net-eth/dhcp/timeout/$TIMEOUT

Thanks for the idea Ivan A. Melnikov.
This commit is contained in:
Anton Midyukov 2021-02-05 22:48:52 +07:00
parent 06b67bd75a
commit 5e60c91a04
4 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,4 @@
use/mipsel-bfk3: use/kernel use/tty/S0 use/mipsel-bfk3: use/kernel use/tty/S0 use/net-eth/dhcp/timeout/20
@$(call add_feature) @$(call add_feature)
@$(call set,KFLAVOURS,bfk3-def) @$(call set,KFLAVOURS,bfk3-def)
@$(call set,VM_FSTYPE,ext2) @$(call set,VM_FSTYPE,ext2)

View File

@ -1,4 +1,4 @@
use/mipsel-mitx: use/kernel use/tty/S0 use/mipsel-mitx: use/kernel use/tty/S0 use/net-eth/dhcp/timeout/20
@$(call add_feature) @$(call add_feature)
@$(call set,KFLAVOURS,mitx-xpa) @$(call set,KFLAVOURS,mitx-xpa)
@$(call add,THE_PACKAGES,alt-config-be-t) @$(call add,THE_PACKAGES,alt-config-be-t)

View File

@ -16,6 +16,11 @@ use/net-eth/networkd: use/net/networkd
# typical boilerplate # typical boilerplate
use/net-eth/dhcp: use/net-eth use/net/dhcp use/net-eth/dhcp: use/net-eth use/net/dhcp
@$(call add,NET_ETH,eth0:dhcp) @$(call add,NET_ETH,eth0:dhcp)
@$(call try,NET_ETH_TIMEOUT,7)
@$(call xport,NET_ETH_TIMEOUT)
use/net-eth/dhcp/timeout/%: use/net-eth/dhcp
@$(call set,NET_ETH_TIMEOUT,$*)
use/net-eth/networkd-dhcp: use/net-eth/networkd use/net-eth/networkd-dhcp: use/net-eth/networkd
@$(call add,NET_ETH,eth0:dhcp) @$(call add,NET_ETH,eth0:dhcp)

View File

@ -42,11 +42,7 @@ write_etcnet_iface() {
append= append=
case "$proto" in case "$proto" in
dhcp) dhcp)
if [ $GLOBAL_ARCH = mipsel ]; then append="DHCP_TIMEOUT=$GLOBAL_NET_ETH_TIMEOUT"
append="DHCP_TIMEOUT=20"
else
append="DHCP_TIMEOUT=7"
fi
;; ;;
static) static)
echo "$ipv4addr" > "$dir/ipv4address" echo "$ipv4addr" > "$dir/ipv4address"