remove-net-rules: Add a class to remove net rules from images
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
@@ -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
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
@@ -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
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.Signed-off-by Chase Maupin <[email protected]>--- 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.bbclassmeta-arago-distro/classes/remove-net-rules.bbclass new file +0
-0
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
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 imagesQuoted 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.Signed-off-by Chase Maupin <[email protected]>--- 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
-0b/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..3227221meta-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_rulesmeta-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 thisfile
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_COMMANDis 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