All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: <w.egorov@phytec.de>, <trini@konsulko.com>,
	<joe.hershberger@ni.com>, <u-boot@lists.denx.de>
Cc: <upstream@lists.phytec.de>, Daniel Schultz <d.schultz@phytec.de>
Subject: [PATCH 04/13] include: net: phytec: Add K3 network boot logic
Date: Fri, 30 Aug 2024 02:09:31 -0700	[thread overview]
Message-ID: <20240830090940.2592157-5-d.schultz@phytec.de> (raw)
In-Reply-To: <20240830090940.2592157-1-d.schultz@phytec.de>

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@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@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


  parent reply	other threads:[~2024-08-30  9:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30  9:09 [PATCH 00/13] phycore-am62/4: Add more boot sources Daniel Schultz
2024-08-30  9:09 ` [PATCH 01/13] configs: phycore_am64x_a53_defconfig: Enable CONFIG_OF_BOARD_SETUP Daniel Schultz
2024-08-30  9:09 ` [PATCH 02/13] include: env: phytec: k3_mmc: Rename variables Daniel Schultz
2024-08-30  9:09 ` [PATCH 03/13] include: env: phytec: Add raucinit to k3_mmc environment Daniel Schultz
2024-08-30  9:09 ` Daniel Schultz [this message]
2024-08-30  9:09 ` [PATCH 05/13] include: env: phytec: Add K3 boot logic for OSPI/QSPI flashes Daniel Schultz
2024-08-30  9:09 ` [PATCH 06/13] board: phytec: phycore_am62x: Add Network/SPI Boot Daniel Schultz
2024-08-30  9:09 ` [PATCH 07/13] board: phytec: phycore_am64x: " Daniel Schultz
2024-08-30  9:09 ` [PATCH 08/13] configs: phycore_am62x_a53_defconfig: Make BOOTCMD generic Daniel Schultz
2024-08-30  9:09 ` [PATCH 09/13] configs: phycore_am64x_a53_defconfig: " Daniel Schultz
2024-08-30  9:09 ` [PATCH 10/13] configs: phycore_am62x_a53_defconfig: Merge am62x_a53_usbdfu.config Daniel Schultz
2024-08-30  9:09 ` [PATCH 11/13] configs: Add phycore_am62x_r5_usbdfu_defconfig Daniel Schultz
2024-08-30  9:09 ` [PATCH 12/13] configs: phycore_am62x_a53_defconfig: Fix CONFIG_ENV_SIZE Daniel Schultz
2024-08-30  9:09 ` [PATCH 13/13] configs: phycore_am62x_*_defconfig: Set PHYTEC as Manufacturer Daniel Schultz
2024-09-10 22:38 ` [PATCH 00/13] phycore-am62/4: Add more boot sources Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240830090940.2592157-5-d.schultz@phytec.de \
    --to=d.schultz@phytec.de \
    --cc=joe.hershberger@ni.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=upstream@lists.phytec.de \
    --cc=w.egorov@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.