[PATCH 04/13] include: net: phytec: Add K3 network boot logic

Daniel Schultz d.schultz at phytec.de
Fri Aug 30 11:09:31 CEST 2024


This boot logic allows to boot a Kernel image, Device-Tree blob
and overlays via tftp/dhcp (configurable with 'net_fetch_cmd').
Additionally, it loads a rootfs via NFS.

Signed-off-by: Daniel Schultz <d.schultz at phytec.de>
---
 include/env/phytec/k3_net.env | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 include/env/phytec/k3_net.env

diff --git a/include/env/phytec/k3_net.env b/include/env/phytec/k3_net.env
new file mode 100644
index 00000000000..377e406688d
--- /dev/null
+++ b/include/env/phytec/k3_net.env
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 PHYTEC Messtechnik GmbH
+ * Author: Daniel Schultz <d.schultz at phytec.de>
+ */
+
+/* Logic for TI K3 based SoCs to boot via network. */
+
+#include <env/phytec/overlays.env>
+
+netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp rw
+	nfsroot=${serverip}:${nfsroot},vers=4,tcp
+netloadimage=${net_fetch_cmd} ${kernel_addr_r} ${serverip}:/Image
+netloadfdt=${net_fetch_cmd} ${fdt_addr_r} ${serverip}:/${fdtfile}
+netboot=run netargs;
+	setenv autoload no;
+	dhcp;
+	run netloadimage;
+	run netloadfdt;
+	run net_apply_overlays;
+	run net_apply_extensions;
+	booti ${kernel_addr_r} - ${fdt_addr_r}
-- 
2.25.1



More information about the U-Boot mailing list