-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Attempting to remove ipaddr_eth with fw_setenv on the e200 with firmware 0.39 does not enable DHCP.
It's entirely possible that I've missed something obvious, but I believe this is due to the following line in /board/e200/S40network from the buildroot patch setting the default with the following:
ETH_IPADDR=`fw_printenv -n ipaddr_eth 2> /dev/null || echo 192.168.1.10`
This prevents the script from selecting DHCP when it hits the following section:
if [ -n "$ETH_IPADDR" ]
then
echo -e "iface eth0 inet static" >> $IFAC
echo -e "\taddress $ETH_IPADDR\n""\tnetmask $ETH_NETMASK\n" >> $IFAC
else
echo -e "iface eth0 inet dhcp\n" >> $IFAC
fi
I have tested running a copy of the script on device with the ETH_IPADDR line changed to:
ETH_IPADDR=`fw_printenv -n ipaddr_eth 2> /dev/null`
This appears to function, but have not yet managed to build a version of the firmware with this change.
I suspect that the default address should be set in the uboot patch for include/configs/zynq-common.h rather than in the S40network script, but I'm not certain on this aspect of it. However there may be a simpler method to achieve this.