Skip to contentSkip to conversation

board: phytec: phycore_imx8mp.env fix netboot issues

PATCH In review Yannic Moog 2 participants 2 messages Mar 22, 2024 – Mar 24, 2024 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: phytec: phycore_imx8mp.env fix netboot issues

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")

---
Depends on [1] which is on next already.
[1] https://lore.kernel.org/u-boot/[email protected]/

---
 board/phytec/phycore_imx8mp/phycore_imx8mp.env | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/phytec/phycore_imx8mp/phycore_imx8mp.env +2 -2
index fae3e992654..7f6c5fd2c76 100644
@@ -46,17 +46,17 @@ netargs=
 	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

---
base-commit: 86b79cf131b64eadae023a127921893d30503093
change-id: 20240322-phycore_mx8mp_netboot_fixes-337ceb4ba0cc

Best regards,

Signature · 1 line
Yannic Moog <[email protected]>
reviewer
#1 lore raw
Quoted 10 lines · Yannic Moog

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")

Applied to u-boot-imx/next, thanks.