The "run netargs" command should come later in the "netboot" command
order when using dhcp since it sets the server and client ip addresses.
The previous order led to misconfigured kernel boot params and thus
kernel panic when serverip was not manually set.
Further, following Linux FHS 3.0, change the nfsroot default directory
to /srv/nfs.
Fixes: 60f64bec414e ("board: phytec: phycore_imx8mp: Add fec support")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=
echo Booting from net ...;
- run netargs;
if test ${ip_dyn} = yes; then
setenv get_cmd dhcp;
else
setenv get_cmd tftp;
fi;
${get_cmd} ${loadaddr} ${image};
+ run netargs;
if ${get_cmd} ${fdt_addr} ${fdt_file}; then
booti ${loadaddr} - ${fdt_addr};
else
echo WARN: Cannot load the DT;
fi;
-nfsroot=/nfs
+nfsroot=/srv/nfs
sd_dev=1