Skip to contentSkip to conversation

remove-net-rules: Add a class to remove net rules from images

PATCH Superseded Chase Maupin 2 participants 4 messages Oct 22, 2012 – Oct 24, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 remove-net-rules: Add a class to remove net rules from images

* Inherit the remove-net-rules class in the TISDK images to remove the utility that creates the persistent net rules file.
* This allows moving SD cards between EVMs.

---
 meta-arago-distro/classes/remove-net-rules.bbclass |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 meta-arago-distro/classes/remove-net-rules.bbclass
meta-arago-distro/classes/remove-net-rules.bbclass new file +15 -0
new file mode 100644
index 0000000..3227221
@@ -0,0 +1,15 @@
+# Add a ROOTFS_POSTPROCESS_COMMAND that will strip the write_net_rules
+# executable from the file system.  This will prevent the
+# 70-persistent-net.rules from being created.  Not having this file
+# will allow moving SD cards between EVMs and similar boards such as
+# beaglebone and the EVM.
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_remove_net_rules"
+
+rootfs_remove_net_rules () {
+    if [ -e ${IMAGE_ROOTFS}/lib/udev/write_net_rules ]
+    then
+        rm ${IMAGE_ROOTFS}/lib/udev/write_net_rules
+    fi
+}
+
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/2 arago-base-tisdk-image: inherit remove-net-rules

* Inherit the remove-net-rules class to allow moving this image from device to device.
* Use new name of remove-net-rules rather than tisdk-image

---
 .../recipes-core/images/arago-base-tisdk-image.bb  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta-arago-distro/recipes-core/images/arago-base-tisdk-image.bb +1 -1
index b4bf3c9..da66fc2 100644
@@ -2,7 +2,7 @@
 # gives you an image with Qt/E and other common packages shared by all TI SDKs.
 
 require arago-image.inc
-#inherit tisdk-image
+inherit remove-net-rules
 
 COMPATIBLE_MACHINE = "omap3|ti816x|dm365|omapl138|ti814x|omap4|ti33x"
 
Signature · 1 line
1.7.0.4
#2 lore raw
In reply to Chase Maupin
Quoted 16 lines · Chase Maupin

* Inherit the remove-net-rules class in the TISDK images to remove the utility that creates the persistent net rules file.
* This allows moving SD cards between EVMs.

---
 meta-arago-distro/classes/remove-net-rules.bbclass |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 meta-arago-distro/classes/remove-net-rules.bbclass
meta-arago-distro/classes/remove-net-rules.bbclass new file +0 -0
new file mode 100644
index 0000000..3227221

meta-arago-distro/classes/remove-net-rules.bbclass line 7

Quoted 7 lines
meta-arago-distro/classes/remove-net-rules.bbclass new file +7 -0
@@ -0,0 +1,15 @@
+# Add a ROOTFS_POSTPROCESS_COMMAND that will strip the write_net_rules
+# executable from the file system.  This will prevent the
+# 70-persistent-net.rules from being created.  Not having this file
+# will allow moving SD cards between EVMs and similar boards such as
+# beaglebone and the EVM.
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_remove_net_rules"

ROOTFS_POSTPROCESS_COMMAND is a list of shell commands/functions - you need to terminate it with a semicolon, i.e. R_P_C += "func;"

Quoted 16 lines
meta-arago-distro/classes/remove-net-rules.bbclass new file +8 -0
+
+rootfs_remove_net_rules () {
+    if [ -e ${IMAGE_ROOTFS}/lib/udev/write_net_rules ]
+    then
+        rm ${IMAGE_ROOTFS}/lib/udev/write_net_rules
+    fi
+}
+
Signature · 6 lines
1.7.0.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
#3 lore raw
Quoted 35 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Wednesday, October 24, 2012 3:00 PM
To: Maupin, Chase
Cc: [email protected]
Subject: Re: [meta-arago] [PATCH 1/2] remove-net-rules: Add a class to remove net rules from images

Quoted 1 line · Chase Maupin

* Inherit the remove-net-rules class in the TISDK images to

remove

Quoted 6 lines

the utility that creates the persistent net rules file.
* This allows moving SD cards between EVMs.

---
 meta-arago-distro/classes/remove-net-rules.bbclass |   15

+++++++++++++++

Quoted 2 lines
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 meta-arago-distro/classes/remove-net-

rules.bbclass

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta-arago-distro/classes/remove-net-rules.bbclass

meta-arago-distro/classes/remove-net-rules.bbclass line 1

Quoted 6 lines

new file mode 100644
index 0000000..3227221

meta-arago-distro/classes/remove-net-rules.bbclass new file +1 -0
@@ -0,0 +1,15 @@
+# Add a ROOTFS_POSTPROCESS_COMMAND that will strip the

write_net_rules

meta-arago-distro/classes/remove-net-rules.bbclass line 3

Quoted 2 lines
meta-arago-distro/classes/remove-net-rules.bbclass new file +2 -0
+# executable from the file system.  This will prevent the
+# 70-persistent-net.rules from being created.  Not having this

file

meta-arago-distro/classes/remove-net-rules.bbclass line 4

Quoted 1 line
meta-arago-distro/classes/remove-net-rules.bbclass new file +1 -0
+# will allow moving SD cards between EVMs and similar boards
Quoted 8 lines

such as

meta-arago-distro/classes/remove-net-rules.bbclass line 7

Quoted 3 lines
meta-arago-distro/classes/remove-net-rules.bbclass new file +3 -0
+# beaglebone and the EVM.
+
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_remove_net_rules"

ROOTFS_POSTPROCESS_COMMAND is a list of shell commands/functions
- you need to
terminate it with a semicolon, i.e. R_P_C += "func;"

I'll send an update. I guess I got away with this in the past because this was the last command to run.

Quoted 17 lines
Quoted 17 lines
meta-arago-distro/classes/remove-net-rules.bbclass new file +8 -1
+
+rootfs_remove_net_rules () {
+    if [ -e ${IMAGE_ROOTFS}/lib/udev/write_net_rules ]
+    then
+        rm ${IMAGE_ROOTFS}/lib/udev/write_net_rules
+    fi
+}
+
--

1.7.0.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago