On 01/02/12 14:26, Darren Hart wrote:
These machines have no MAC in the hardware and require that it
be set manually. Specify RANDOM_MAC for the eth0 interface which
the genmac init script will replace with RANDOM_MAC on first boot.
My concern with this patch is that iirc netbase isn't MACHINE specific -
so if I have this layer enabled and build for another core2 machine I'll
get these changes there too.
I don't know what the "right" solution to that is, though I muse some
more below.
Signed-off-by: Darren Hart<dvh...@linux.intel.com>
---
meta-sys940x/recipes-core/netbase/files/interfaces | 10 ++++++++++
.../recipes-core/netbase/netbase_4.47.bbappend | 3 +++
2 files changed, 13 insertions(+), 0 deletions(-)
create mode 100644 meta-sys940x/recipes-core/netbase/files/interfaces
create mode 100644 meta-sys940x/recipes-core/netbase/netbase_4.47.bbappend
diff --git a/meta-sys940x/recipes-core/netbase/files/interfaces
b/meta-sys940x/recipes-core/netbase/files/interfaces
new file mode 100644
index 0000000..4218f5d
--- /dev/null
+++ b/meta-sys940x/recipes-core/netbase/files/interfaces
@@ -0,0 +1,10 @@
+# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
+
+# The loopback interface
+auto lo
+iface lo inet loopback
+
+# Wired or wireless interfaces
+auto eth0
+iface eth0 inet dhcp
+ hwaddress ether RANDOM_MAC
diff --git a/meta-sys940x/recipes-core/netbase/netbase_4.47.bbappend
b/meta-sys940x/recipes-core/netbase/netbase_4.47.bbappend
new file mode 100644
index 0000000..6d3f694
--- /dev/null
+++ b/meta-sys940x/recipes-core/netbase/netbase_4.47.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+RDEPENDS_${PN} += "genmac"
We can use a MACHINE specific override here, I think.
RDEPENDS_${PN}_sys940x += "genmac"
Ideally we don't want that interfaces file on non-sys940x machines,
perhaps we could name the interfaces file differently and add a
do_install_append_sys940x which installs the MACHINE specific interface
file?
Cheers,
Joshua
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto