* [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
@ 2026-06-08 8:09 Moteen Shah
2026-06-08 8:28 ` PRC Automation
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Moteen Shah @ 2026-06-08 8:09 UTC (permalink / raw)
To: meta-ti
Cc: reatmon, nm, u-kumar1, s-vadapalli, a-limaye, m-shah,
gehariprasath, denys, jcormier
Add a standalone initramfs-module-netsetup recipe that installs
83-netsetup, an initramfs-framework module that configures the network
interface via DHCP before the NFS root mount. The recipe's RDEPENDS
pulls in CPSW and its dependencies, so the kernel modules and DHCP
client are only included when NFS boot support is needed.
Include initramfs-module-netsetup in packagegroup-ti-core-initramfs
gated on :bsp-next, where AM65_CPSW_NUSS became a loadable module.
TI staging kernels (6.6/6.12/6.18) still have CPSW built-in (=y).
Signed-off-by: Moteen Shah <m-shah@ti.com>
---
Hello all,
AM65_CPSW_NUSS and its dependencies changed from built-in (=y) to
loadable modules (=m) in linux-next. This breaks NFS boot because the
Ethernet driver is no longer available before the NFS root mount.
Add a standalone initramfs-module-netsetup recipe that waits for the
Ethernet interface to appear after udev loads the modules and then
configures it via DHCP before the nfsrootfs module runs. The CPSW
kernel modules are declared as RDEPENDS:append:bsp-next of the recipe
so they are only pulled in for bsp-next kernels and only when NFS boot
support is needed.
Changes in v4:
- Switch from dhcpcd to udhcpc -q (busybox, already in initramfs);
-q exits after obtaining lease so no background service survives
switch-root (Jonathan)
- Drop dhcpcd from RDEPENDS (Jonathan)
Changes in v3:
- Remove FILESEXTRAPATHS:prepend - redundant in a standalone recipe (Denys)
- Remove PACKAGE_ARCH = "${MACHINE_ARCH}" - script is not machine-specific (Denys)
- Drop k3.inc patch; move CPSW modules into RDEPENDS:append:bsp-next of
the recipe, linking module inclusion to NFS boot recipe inclusion
- Gate initramfs-module-netsetup on :bsp-next in packagegroup so staging
kernels (where CPSW is built-in =y) are unaffected
Bootlogs: https://gist.github.com/Jamm02/2d078c20f0062394b0b7d09da7ee0a57
.../initramfs-module-netsetup/83-netsetup | 54 +++++++++++++++++++
.../initramfs-module-netsetup_1.0.bb | 30 +++++++++++
.../packagegroup-ti-core-initramfs.bb | 2 +
3 files changed, 86 insertions(+)
create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
new file mode 100644
index 00000000..8e76bac4
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Configure network via DHCP before NFS root mount. Polls for an Ethernet
+# interface with sleep 1 per iteration to allow the Ethernet driver deferred
+# probe chain to settle after udev loads the modules.
+
+netsetup_enabled() {
+ [ "${bootparam_root}" = "/dev/nfs" ] || return 1
+ return 0
+}
+
+netsetup_run() {
+ local iface timeout devtype
+
+ # Extract interface from ip= kernel param (format: client:server:gw:mask:host:device:autoconf)
+ iface=""
+ case "${bootparam_ip}" in
+ dhcp|on|any|"")
+ ;;
+ *)
+ iface=$(echo "${bootparam_ip}" | cut -d: -f6)
+ ;;
+ esac
+
+ udevadm trigger --action=add --subsystem-match=net
+ udevadm settle --timeout=10
+
+ # Poll up to 60 seconds for an Ethernet interface (ARPHRD_ETHER = type 1).
+ msg "netsetup: waiting for ethernet interface..."
+ timeout=60
+ while [ "${timeout}" -gt 0 ]; do
+ if [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ]; then
+ break
+ fi
+ for dev in /sys/class/net/*; do
+ [ -f "${dev}/type" ] || continue
+ devtype=$(cat "${dev}/type")
+ [ "${devtype}" = "1" ] || continue
+ iface=$(basename "${dev}")
+ break
+ done
+ [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ] && break
+ sleep 1
+ timeout=$((timeout - 1))
+ done
+
+ if [ -z "${iface}" ] || [ ! -d "/sys/class/net/${iface}" ]; then
+ msg "netsetup: no ethernet interface found after 60s, skipping DHCP"
+ return
+ fi
+
+ msg "netsetup: configuring ${iface} via DHCP"
+
+ udhcpc -q -i "${iface}"
+}
diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
new file mode 100644
index 00000000..ec04ea9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
@@ -0,0 +1,30 @@
+SUMMARY = "initramfs support for DHCP network configuration before NFS root mount"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://83-netsetup"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+ install -d ${D}/init.d
+ install -m 0755 ${UNPACKDIR}/83-netsetup ${D}/init.d/83-netsetup
+}
+
+FILES:${PN} = "/init.d/83-netsetup"
+
+RDEPENDS:${PN} = "\
+ initramfs-framework-base \
+"
+
+RDEPENDS:${PN}:append:bsp-next = " \
+ kernel-module-ti-am65-cpsw-nuss \
+ kernel-module-k3-cppi-desc-pool \
+ kernel-module-davinci-mdio \
+ kernel-module-ti-cpsw-ale \
+ kernel-module-ti-cpsw-sl \
+ kernel-module-phylink \
+ kernel-module-mdio-bitbang \
+ kernel-module-phy-gmii-sel \
+"
diff --git a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
index a9eff847..b4e6adff 100644
--- a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
+++ b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
@@ -23,3 +23,5 @@ RDEPENDS:${PN} += "\
initramfs-module-nfsrootfs \
nfs-utils-mount \
"
+
+RDEPENDS:${PN}:append:bsp-next = " initramfs-module-netsetup"
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
2026-06-08 8:09 [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot Moteen Shah
@ 2026-06-08 8:28 ` PRC Automation
2026-06-08 13:50 ` Jon Cormier
2026-06-11 14:45 ` Denys Dmytriyenko
2 siblings, 0 replies; 4+ messages in thread
From: PRC Automation @ 2026-06-08 8:28 UTC (permalink / raw)
To: Moteen Shah
Cc: meta-ti, reatmon, nm, u-kumar1, s-vadapalli, a-limaye,
gehariprasath, denys, jcormier
meta-ti / na / 20260608080906.2266315-1-m-shah
PRC Results: PASS
=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed
=========================================================
apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
- Submitter: From: Moteen Shah <m-shah@ti.com>
- Date: Date: Mon, 8 Jun 2026 13:39:06 +0530
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 48a605771b7888daea86d80930c934c7b633fb66
Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-next
- Commit Author: Denys Dmytriyenko (TI) <denys@konsulko.com>
- Commit Subject: meta-beagle: linux-bb.org: upgrade 6.12.43 -> 6.12.57
- Commit SHA: dd0f9863bd65467d689ec895d96b386a034df660
Patches
----------------------------------------
All patches applied
wrynose
=====================
Summary:
- Patch Series: [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
- Submitter: From: Moteen Shah <m-shah@ti.com>
- Date: Date: Mon, 8 Jun 2026 13:39:06 +0530
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 48a605771b7888daea86d80930c934c7b633fb66
Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: wrynose-next
- Commit Author: LCPD Automation Script <lcpdbld@list.ti.com>
- Commit Subject: CI/CD Auto-Merger: cicd.wrynose.202606071800
- Commit SHA: 80bb053a288775e710e3be959c47f0f9126d8d3e
Patches
----------------------------------------
All patches applied
=========================================================
check-yocto-repo: PASS
=========================================================
master
=====================
PASS
wrynose
=====================
PASS
=========================================================
yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed
wrynose - PASS
=====================
All checks passed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
2026-06-08 8:09 [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot Moteen Shah
2026-06-08 8:28 ` PRC Automation
@ 2026-06-08 13:50 ` Jon Cormier
2026-06-11 14:45 ` Denys Dmytriyenko
2 siblings, 0 replies; 4+ messages in thread
From: Jon Cormier @ 2026-06-08 13:50 UTC (permalink / raw)
To: Moteen Shah
Cc: meta-ti, reatmon, nm, u-kumar1, s-vadapalli, a-limaye,
gehariprasath, denys
Thanks, looks good
On Mon, Jun 8, 2026 at 4:09 AM Moteen Shah <m-shah@ti.com> wrote:
>
> Add a standalone initramfs-module-netsetup recipe that installs
> 83-netsetup, an initramfs-framework module that configures the network
> interface via DHCP before the NFS root mount. The recipe's RDEPENDS
> pulls in CPSW and its dependencies, so the kernel modules and DHCP
> client are only included when NFS boot support is needed.
>
> Include initramfs-module-netsetup in packagegroup-ti-core-initramfs
> gated on :bsp-next, where AM65_CPSW_NUSS became a loadable module.
> TI staging kernels (6.6/6.12/6.18) still have CPSW built-in (=y).
>
> Signed-off-by: Moteen Shah <m-shah@ti.com>
> ---
>
> Hello all,
> AM65_CPSW_NUSS and its dependencies changed from built-in (=y) to
> loadable modules (=m) in linux-next. This breaks NFS boot because the
> Ethernet driver is no longer available before the NFS root mount.
>
> Add a standalone initramfs-module-netsetup recipe that waits for the
> Ethernet interface to appear after udev loads the modules and then
> configures it via DHCP before the nfsrootfs module runs. The CPSW
> kernel modules are declared as RDEPENDS:append:bsp-next of the recipe
> so they are only pulled in for bsp-next kernels and only when NFS boot
> support is needed.
>
> Changes in v4:
> - Switch from dhcpcd to udhcpc -q (busybox, already in initramfs);
> -q exits after obtaining lease so no background service survives
> switch-root (Jonathan)
> - Drop dhcpcd from RDEPENDS (Jonathan)
>
> Changes in v3:
> - Remove FILESEXTRAPATHS:prepend - redundant in a standalone recipe (Denys)
> - Remove PACKAGE_ARCH = "${MACHINE_ARCH}" - script is not machine-specific (Denys)
> - Drop k3.inc patch; move CPSW modules into RDEPENDS:append:bsp-next of
> the recipe, linking module inclusion to NFS boot recipe inclusion
> - Gate initramfs-module-netsetup on :bsp-next in packagegroup so staging
> kernels (where CPSW is built-in =y) are unaffected
>
> Bootlogs: https://gist.github.com/Jamm02/2d078c20f0062394b0b7d09da7ee0a57
>
> .../initramfs-module-netsetup/83-netsetup | 54 +++++++++++++++++++
> .../initramfs-module-netsetup_1.0.bb | 30 +++++++++++
> .../packagegroup-ti-core-initramfs.bb | 2 +
> 3 files changed, 86 insertions(+)
> create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
>
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> new file mode 100644
> index 00000000..8e76bac4
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> @@ -0,0 +1,54 @@
> +#!/bin/sh
> +# Configure network via DHCP before NFS root mount. Polls for an Ethernet
> +# interface with sleep 1 per iteration to allow the Ethernet driver deferred
> +# probe chain to settle after udev loads the modules.
> +
> +netsetup_enabled() {
> + [ "${bootparam_root}" = "/dev/nfs" ] || return 1
> + return 0
> +}
> +
> +netsetup_run() {
> + local iface timeout devtype
> +
> + # Extract interface from ip= kernel param (format: client:server:gw:mask:host:device:autoconf)
> + iface=""
> + case "${bootparam_ip}" in
> + dhcp|on|any|"")
> + ;;
> + *)
> + iface=$(echo "${bootparam_ip}" | cut -d: -f6)
> + ;;
> + esac
> +
> + udevadm trigger --action=add --subsystem-match=net
> + udevadm settle --timeout=10
> +
> + # Poll up to 60 seconds for an Ethernet interface (ARPHRD_ETHER = type 1).
> + msg "netsetup: waiting for ethernet interface..."
> + timeout=60
> + while [ "${timeout}" -gt 0 ]; do
> + if [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ]; then
> + break
> + fi
> + for dev in /sys/class/net/*; do
> + [ -f "${dev}/type" ] || continue
> + devtype=$(cat "${dev}/type")
> + [ "${devtype}" = "1" ] || continue
> + iface=$(basename "${dev}")
> + break
> + done
> + [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ] && break
> + sleep 1
> + timeout=$((timeout - 1))
> + done
> +
> + if [ -z "${iface}" ] || [ ! -d "/sys/class/net/${iface}" ]; then
> + msg "netsetup: no ethernet interface found after 60s, skipping DHCP"
> + return
> + fi
> +
> + msg "netsetup: configuring ${iface} via DHCP"
> +
> + udhcpc -q -i "${iface}"
> +}
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> new file mode 100644
> index 00000000..ec04ea9d
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> @@ -0,0 +1,30 @@
> +SUMMARY = "initramfs support for DHCP network configuration before NFS root mount"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +SRC_URI = "file://83-netsetup"
> +
> +S = "${UNPACKDIR}"
> +
> +do_install() {
> + install -d ${D}/init.d
> + install -m 0755 ${UNPACKDIR}/83-netsetup ${D}/init.d/83-netsetup
> +}
> +
> +FILES:${PN} = "/init.d/83-netsetup"
> +
> +RDEPENDS:${PN} = "\
> + initramfs-framework-base \
> +"
> +
> +RDEPENDS:${PN}:append:bsp-next = " \
> + kernel-module-ti-am65-cpsw-nuss \
> + kernel-module-k3-cppi-desc-pool \
> + kernel-module-davinci-mdio \
> + kernel-module-ti-cpsw-ale \
> + kernel-module-ti-cpsw-sl \
> + kernel-module-phylink \
> + kernel-module-mdio-bitbang \
> + kernel-module-phy-gmii-sel \
> +"
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> index a9eff847..b4e6adff 100644
> --- a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> +++ b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> @@ -23,3 +23,5 @@ RDEPENDS:${PN} += "\
> initramfs-module-nfsrootfs \
> nfs-utils-mount \
> "
> +
> +RDEPENDS:${PN}:append:bsp-next = " initramfs-module-netsetup"
> --
> 2.34.1
>
--
Jonathan Cormier
Senior Software Engineer
Office: 315.425.4045 x222
http://www.CriticalLink.com
6712 Brooklawn Parkway, Syracuse, NY 13211
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot
2026-06-08 8:09 [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot Moteen Shah
2026-06-08 8:28 ` PRC Automation
2026-06-08 13:50 ` Jon Cormier
@ 2026-06-11 14:45 ` Denys Dmytriyenko
2 siblings, 0 replies; 4+ messages in thread
From: Denys Dmytriyenko @ 2026-06-11 14:45 UTC (permalink / raw)
To: m-shah
Cc: meta-ti, reatmon, nm, u-kumar1, s-vadapalli, a-limaye,
gehariprasath, denys, jcormier
On Mon, Jun 08, 2026 at 01:39:06PM +0530, Moteen Shah via lists.yoctoproject.org wrote:
> Add a standalone initramfs-module-netsetup recipe that installs
> 83-netsetup, an initramfs-framework module that configures the network
> interface via DHCP before the NFS root mount. The recipe's RDEPENDS
> pulls in CPSW and its dependencies, so the kernel modules and DHCP
> client are only included when NFS boot support is needed.
>
> Include initramfs-module-netsetup in packagegroup-ti-core-initramfs
> gated on :bsp-next, where AM65_CPSW_NUSS became a loadable module.
> TI staging kernels (6.6/6.12/6.18) still have CPSW built-in (=y).
>
> Signed-off-by: Moteen Shah <m-shah@ti.com>
> ---
>
> Hello all,
> AM65_CPSW_NUSS and its dependencies changed from built-in (=y) to
> loadable modules (=m) in linux-next. This breaks NFS boot because the
> Ethernet driver is no longer available before the NFS root mount.
>
> Add a standalone initramfs-module-netsetup recipe that waits for the
> Ethernet interface to appear after udev loads the modules and then
> configures it via DHCP before the nfsrootfs module runs. The CPSW
> kernel modules are declared as RDEPENDS:append:bsp-next of the recipe
> so they are only pulled in for bsp-next kernels and only when NFS boot
> support is needed.
>
> Changes in v4:
> - Switch from dhcpcd to udhcpc -q (busybox, already in initramfs);
> -q exits after obtaining lease so no background service survives
> switch-root (Jonathan)
> - Drop dhcpcd from RDEPENDS (Jonathan)
>
> Changes in v3:
> - Remove FILESEXTRAPATHS:prepend - redundant in a standalone recipe (Denys)
> - Remove PACKAGE_ARCH = "${MACHINE_ARCH}" - script is not machine-specific (Denys)
> - Drop k3.inc patch; move CPSW modules into RDEPENDS:append:bsp-next of
> the recipe, linking module inclusion to NFS boot recipe inclusion
I have 2 more comments for v3 and v4 due to this ^^^ change:
1. At least some, if not all of those CPSW-related modules are K3-specific.
Since you moved them out of k3.inc into netsetup recipe, I suspect it will
break for any legacy non-K3 platforms building with bsp-next.
2. And that in turn now makes netsetup recipe machine-specific, unlike
previous revisions of your patch. Depending on how you intend to fix #1
comment, you may need to bring back PACKAGE_ARCH = "${MACHINE_ARCH}"
--
Denys
> - Gate initramfs-module-netsetup on :bsp-next in packagegroup so staging
> kernels (where CPSW is built-in =y) are unaffected
>
> Bootlogs: https://gist.github.com/Jamm02/2d078c20f0062394b0b7d09da7ee0a57
>
> .../initramfs-module-netsetup/83-netsetup | 54 +++++++++++++++++++
> .../initramfs-module-netsetup_1.0.bb | 30 +++++++++++
> .../packagegroup-ti-core-initramfs.bb | 2 +
> 3 files changed, 86 insertions(+)
> create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> create mode 100644 meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
>
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> new file mode 100644
> index 00000000..8e76bac4
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup/83-netsetup
> @@ -0,0 +1,54 @@
> +#!/bin/sh
> +# Configure network via DHCP before NFS root mount. Polls for an Ethernet
> +# interface with sleep 1 per iteration to allow the Ethernet driver deferred
> +# probe chain to settle after udev loads the modules.
> +
> +netsetup_enabled() {
> + [ "${bootparam_root}" = "/dev/nfs" ] || return 1
> + return 0
> +}
> +
> +netsetup_run() {
> + local iface timeout devtype
> +
> + # Extract interface from ip= kernel param (format: client:server:gw:mask:host:device:autoconf)
> + iface=""
> + case "${bootparam_ip}" in
> + dhcp|on|any|"")
> + ;;
> + *)
> + iface=$(echo "${bootparam_ip}" | cut -d: -f6)
> + ;;
> + esac
> +
> + udevadm trigger --action=add --subsystem-match=net
> + udevadm settle --timeout=10
> +
> + # Poll up to 60 seconds for an Ethernet interface (ARPHRD_ETHER = type 1).
> + msg "netsetup: waiting for ethernet interface..."
> + timeout=60
> + while [ "${timeout}" -gt 0 ]; do
> + if [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ]; then
> + break
> + fi
> + for dev in /sys/class/net/*; do
> + [ -f "${dev}/type" ] || continue
> + devtype=$(cat "${dev}/type")
> + [ "${devtype}" = "1" ] || continue
> + iface=$(basename "${dev}")
> + break
> + done
> + [ -n "${iface}" ] && [ -d "/sys/class/net/${iface}" ] && break
> + sleep 1
> + timeout=$((timeout - 1))
> + done
> +
> + if [ -z "${iface}" ] || [ ! -d "/sys/class/net/${iface}" ]; then
> + msg "netsetup: no ethernet interface found after 60s, skipping DHCP"
> + return
> + fi
> +
> + msg "netsetup: configuring ${iface} via DHCP"
> +
> + udhcpc -q -i "${iface}"
> +}
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> new file mode 100644
> index 00000000..ec04ea9d
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> @@ -0,0 +1,30 @@
> +SUMMARY = "initramfs support for DHCP network configuration before NFS root mount"
> +
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +
> +SRC_URI = "file://83-netsetup"
> +
> +S = "${UNPACKDIR}"
> +
> +do_install() {
> + install -d ${D}/init.d
> + install -m 0755 ${UNPACKDIR}/83-netsetup ${D}/init.d/83-netsetup
> +}
> +
> +FILES:${PN} = "/init.d/83-netsetup"
> +
> +RDEPENDS:${PN} = "\
> + initramfs-framework-base \
> +"
> +
> +RDEPENDS:${PN}:append:bsp-next = " \
> + kernel-module-ti-am65-cpsw-nuss \
> + kernel-module-k3-cppi-desc-pool \
> + kernel-module-davinci-mdio \
> + kernel-module-ti-cpsw-ale \
> + kernel-module-ti-cpsw-sl \
> + kernel-module-phylink \
> + kernel-module-mdio-bitbang \
> + kernel-module-phy-gmii-sel \
> +"
> diff --git a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> index a9eff847..b4e6adff 100644
> --- a/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> +++ b/meta-ti-bsp/recipes-ti/initramfs/packagegroup-ti-core-initramfs.bb
> @@ -23,3 +23,5 @@ RDEPENDS:${PN} += "\
> initramfs-module-nfsrootfs \
> nfs-utils-mount \
> "
> +
> +RDEPENDS:${PN}:append:bsp-next = " initramfs-module-netsetup"
> --
> 2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-11 14:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 8:09 [meta-ti][master/wrynose][PATCH v4] initramfs: Add initramfs-module-netsetup recipe for NFS boot Moteen Shah
2026-06-08 8:28 ` PRC Automation
2026-06-08 13:50 ` Jon Cormier
2026-06-11 14:45 ` Denys Dmytriyenko
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.