diff mbox series

[meta-ti,master/wrynose,v3] initramfs: Add initramfs-module-netsetup recipe for NFS boot

Message ID 20260605121720.1850683-1-m-shah@ti.com
State Under Review
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/wrynose,v3] initramfs: Add initramfs-module-netsetup recipe for NFS boot | expand

Commit Message

Moteen Shah June 5, 2026, 12:17 p.m. UTC
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>
---
Hi everyone, 
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 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

 .../initramfs-module-netsetup/83-netsetup     | 54 +++++++++++++++++++
 .../initramfs-module-netsetup_1.0.bb          | 31 +++++++++++
 .../packagegroup-ti-core-initramfs.bb         |  2 +
 3 files changed, 87 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

Comments

PRC Automation June 5, 2026, 12:38 p.m. UTC | #1
meta-ti / na / 20260605121720.1850683-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 v3] initramfs: Add initramfs-module-netsetup recipe for NFS boot
- Submitter: From: Moteen Shah <m-shah@ti.com>
- Date: Date: Fri, 5 Jun 2026 17:47:20 +0530
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 23874c54376b899b3847f24dfd658aa92d05d6ac

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-wip
- Commit Author: Thorsten Lannynd <t-lannynd@ti.com>
- Commit Subject: weston: fix assert firing when subsurfaces have no views
- Commit SHA: 1fb5f1718d4673b2a9c794f83e9e5e4769c39d23

Patches
----------------------------------------
All patches applied

wrynose
=====================
Summary:
- Patch Series: [meta-ti][master/wrynose][PATCH v3] initramfs: Add initramfs-module-netsetup recipe for NFS boot
- Submitter: From: Moteen Shah <m-shah@ti.com>
- Date: Date: Fri, 5 Jun 2026 17:47:20 +0530
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 23874c54376b899b3847f24dfd658aa92d05d6ac

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: wrynose-wip
- Commit Author: Thorsten Lannynd <t-lannynd@ti.com>
- Commit Subject: weston: fix assert firing when subsurfaces have no views
- Commit SHA: ae9f90cf0baf823a20d10b5e4e3c6af465dabe98

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
Jon Cormier June 5, 2026, 6:28 p.m. UTC | #2
On Fri, Jun 5, 2026 at 8:17 AM Moteen Shah via lists.yoctoproject.org
<m-shah=ti.com@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>
> ---
> Hi everyone,
> 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 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
>
>  .../initramfs-module-netsetup/83-netsetup     | 54 +++++++++++++++++++
>  .../initramfs-module-netsetup_1.0.bb          | 31 +++++++++++
>  .../packagegroup-ti-core-initramfs.bb         |  2 +
>  3 files changed, 87 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..b71bc3b3
> --- /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"
> +
> +    dhcpcd --waitip "${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..cdb6116a
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> @@ -0,0 +1,31 @@
> +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 \
> +    dhcpcd \
Sorry, I didn't notice this earlier. Is there a reason not to use
busybox-udhcpc which is already included?

This adds two packages:
+dhcpcd aarch64 10.3.0-r0.0
+libudev1 aarch64 1:259.5-r0.arago7.0

And increased the size by 1.6MB on arago-wrynose
 +1,685,504  ti-core-initramfs.cpio
 +327,560  ti-core-initramfs.cpio.xz

> +"
> +
> +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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#19979): https://lists.yoctoproject.org/g/meta-ti/message/19979
> Mute This Topic: https://lists.yoctoproject.org/mt/119661032/7902621
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [jcormier@criticallink.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Jon Cormier June 5, 2026, 7:03 p.m. UTC | #3
On Fri, Jun 5, 2026 at 2:28 PM Jon Cormier via lists.yoctoproject.org
<jcormier=criticallink.com@lists.yoctoproject.org> wrote:

> On Fri, Jun 5, 2026 at 8:17 AM Moteen Shah via lists.yoctoproject.org
> <m-shah=ti.com@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>
> > ---
> > Hi everyone,
> > 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 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
> >
> >  .../initramfs-module-netsetup/83-netsetup     | 54 +++++++++++++++++++
> >  .../initramfs-module-netsetup_1.0.bb          | 31 +++++++++++
> >  .../packagegroup-ti-core-initramfs.bb         |  2 +
> >  3 files changed, 87 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..b71bc3b3
> > --- /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"
> > +
> > +    dhcpcd --waitip "${iface}"
>
Additionally I believe this should have been executed as a oneshot, I.E. no
background service which won't survive the switch-root.
For dhcpcd --oneshot --waitip "${iface}"
For 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..cdb6116a
> > --- /dev/null
> > +++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
> > @@ -0,0 +1,31 @@
> > +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 \
> > +    dhcpcd \
> Sorry, I didn't notice this earlier. Is there a reason not to use
> busybox-udhcpc which is already included?
>
> This adds two packages:
> +dhcpcd aarch64 10.3.0-r0.0
> +libudev1 aarch64 1:259.5-r0.arago7.0
>
> And increased the size by 1.6MB on arago-wrynose
>  +1,685,504  ti-core-initramfs.cpio
>  +327,560  ti-core-initramfs.cpio.xz
>
> > +"
> > +
> > +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
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#19981):
> https://lists.yoctoproject.org/g/meta-ti/message/19981
> Mute This Topic: https://lists.yoctoproject.org/mt/119661032/7902621
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [
> jcormier@criticallink.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

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..b71bc3b3
--- /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"
+
+    dhcpcd --waitip "${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..cdb6116a
--- /dev/null
+++ b/meta-ti-bsp/recipes-ti/initramfs/initramfs-module-netsetup_1.0.bb
@@ -0,0 +1,31 @@ 
+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 \
+    dhcpcd \
+"
+
+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"