* [PATCH 0/6] Remove obsolete update-modules
@ 2013-01-17 14:58 Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 1/6] modutils-initscripts: improve modutils.sh Laurentiu Palcu
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
All,
Working on the postinstall improvements I stumbled over update-modules
script which postponed postinstalls for all the kernel or kernel module
packages for first boot. However, after some investigations I saw that this
script is pretty much obsolete. So, this patchset will remove it from all
recipes and bbclasses it was referenced.
Here's why it's useless now:
update-modules was used mainly to create the /etc/modules.conf file, out of files
in /etc/modutils, and /etc/modules file from /etc/modules-load.d/*.conf files.
Then it just ran depmod -A.
* depmod can be run in the postinst/postrm on its own, no need to run through update-modules;
* /etc/modules.conf is not used anymore by modprobe. modprobe now looks in
/etc/modprobe.d/ directory for *.conf files;
* /etc/modules was used by /etc/init.d/modutils.sh to automatically load
modules at boot. However, I improved the script in order to also look into
/etc/modules-load.d/ directory and load all the modules listed there that were not
already loaded (in case /etc/modules existed);
I know this is a major change and will affect a lot of people. But, in order
to support RO rootfs and run all the postinstalls on host, this change was
kind of necessary. Note, though, that the update-modules recipe was not removed
yet. It will be removed eventually but, for now, I decided to leave it in place
in case some people are nostalgic and want to still use it for a while.
Feel free to review and comment on the change.
Thanks,
Laurentiu
The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:
oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lpalcu/update-modules
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/update-modules
Laurentiu Palcu (6):
modutils-initscripts: improve modutils.sh
orinoco-conf: remove dependencies of update-modules
hostap-conf: remove dependencies of update-modules
module.bbclass: do not use update-modules anymore
kernel.bbclass: remove references to update-modules
bitbake.conf: remove update-modules from DISTRO_FEATURES
meta/classes/kernel.bbclass | 36 +++++++++-----------
meta/classes/module.bbclass | 13 ++++---
meta/conf/bitbake.conf | 2 +-
meta/recipes-bsp/hostap/files/hostap_cs.modalias | 34 +++++++++---------
meta/recipes-bsp/hostap/hostap-conf_1.0.bb | 17 ++-------
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb | 17 ++-------
.../modutils-initscripts/files/modutils.sh | 34 +++++++++++++-----
7 files changed, 75 insertions(+), 78 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] modutils-initscripts: improve modutils.sh
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 2/6] orinoco-conf: remove dependencies of update-modules Laurentiu Palcu
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
modutils.sh reads /etc/modules to load the listed modules at boot time.
/etc/modules is generated by update-modules which scans
/etc/modules-load.d directory. However, update-modules became obsolete
because the files it generates are not used by modprobe anymore.
Hence, change modutils.sh to scan also /etc/modules-load.d/*.conf and
load the modules listed there.
Basically, the behavior is this:
* if /etc/modules exists, load those modules;
* if the directory /etc/modules-load.d exists, load the modules listed
in the .conf files but ignore those already loaded (from
/etc/modules);
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
.../modutils-initscripts/files/modutils.sh | 34 ++++++++++++++------
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
index 9049bbb..a78adf5 100755
--- a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
+++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh
@@ -13,7 +13,7 @@
LOAD_MODULE=modprobe
[ -f /proc/modules ] || exit 0
-[ -f /etc/modules ] || exit 0
+[ -f /etc/modules ] || [ -d /etc/modules-load.d ] || exit 0
[ -e /sbin/modprobe ] || LOAD_MODULE=insmod
if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then
@@ -21,15 +21,31 @@ if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then
depmod -Ae
fi
+loaded_modules=" "
+
+process_file() {
+ file=$1
+
+ (cat $file; echo; ) |
+ while read module args
+ do
+ case "$module" in
+ \#*|"") continue ;;
+ esac
+ [ -n "$(echo $loaded_modules | grep " $module ")" ] && continue
+ [ "$VERBOSE" != no ] && echo -n "$module "
+ eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
+ loaded_modules="${loaded_modules}${module} "
+ done
+}
+
[ "$VERBOSE" != no ] && echo -n "Loading modules: "
-(cat /etc/modules; echo; ) |
-while read module args
-do
- case "$module" in
- \#*|"") continue ;;
- esac
- [ "$VERBOSE" != no ] && echo -n "$module "
- eval "$LOAD_MODULE $module $args >/dev/null 2>&1"
+[ -f /etc/modules ] && process_file /etc/modules
+
+[ -d /etc/modules-load.d ] || exit 0
+
+for f in /etc/modules-load.d/*.conf; do
+ process_file $f
done
[ "$VERBOSE" != no ] && echo
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/6] orinoco-conf: remove dependencies of update-modules
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 1/6] modutils-initscripts: improve modutils.sh Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 3/6] hostap-conf: " Laurentiu Palcu
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
Since update-modules became obsolete, no need for these dependencies.
Also:
* install the conf files in the modprobe.d directory. /etc/modutils is
also obsolete;
* remove postinst/postrm scriptlets since they ran update-modules and
this is just an alias file;
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb b/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
index 57e746b..4be9277 100644
--- a/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
+++ b/meta/recipes-bsp/orinoco/orinoco-conf_1.0.bb
@@ -2,8 +2,7 @@ DESCRIPTION = "PCMCIA-cs configuration files for Hermes (Orinoco) wireless LAN c
SECTION = "kernel/modules"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-RDEPENDS_${PN} = "update-modules"
-PR = "r7"
+PR = "r8"
SRC_URI = "file://orinoco_cs.conf \
file://COPYING.patch"
@@ -11,17 +10,7 @@ SRC_URI = "file://orinoco_cs.conf \
inherit allarch
do_install() {
- install -d ${D}${sysconfdir}/modutils
- install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
+ install -d ${D}${sysconfdir}/modprobe.d
+ install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modprobe.d/
}
-pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- exit 1
- fi
- update-modules || true
-}
-
-pkg_postrm_${PN} () {
- update-modules || true
-}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/6] hostap-conf: remove dependencies of update-modules
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 1/6] modutils-initscripts: improve modutils.sh Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 2/6] orinoco-conf: remove dependencies of update-modules Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 4/6] module.bbclass: do not use update-modules anymore Laurentiu Palcu
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
Also:
* install the alias file in the correct /etc/modprobe.d directory since
this is the directory used by modprobe now;
* rewrite the alias file to be up-to-date with modprobe's syntax;
* remove the postinst/postrm scriptlets because this is just an alias
file;
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/recipes-bsp/hostap/files/hostap_cs.modalias | 34 +++++++++++-----------
meta/recipes-bsp/hostap/hostap-conf_1.0.bb | 17 ++---------
2 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.modalias b/meta/recipes-bsp/hostap/files/hostap_cs.modalias
index cb9efab..2848351 100644
--- a/meta/recipes-bsp/hostap/files/hostap_cs.modalias
+++ b/meta/recipes-bsp/hostap/files/hostap_cs.modalias
@@ -1,28 +1,28 @@
# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
-pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
+alias pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
# manufacturer ID which exist in orinoco_cs AND in hostap_cs
-pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
-pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
+alias pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
# product info: "Linksys", "Wireless CompactFlash Card", "", ""
-pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
+alias pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
-pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
+alias pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
-pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
+alias pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
# "BUFFALO", "WLI-CF-S11G", "", ""
-pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
+alias pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
index f8b2102..466c073 100644
--- a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
+++ b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
@@ -2,8 +2,7 @@ DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Int
SECTION = "kernel/modules"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-RDEPENDS_${PN} = "update-modules"
-PR = "r14"
+PR = "r15"
SRC_URI = "file://hostap_cs.modalias \
file://COPYING.patch"
@@ -14,18 +13,8 @@ do_compile() {
}
do_install() {
- install -d ${D}${sysconfdir}/modutils
+ install -d ${D}${sysconfdir}/modprobe.d
- install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
+ install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modprobe.d/hostap_cs.conf
}
-pkg_postinst_${PN} () {
- if [ -n "$D" ]; then
- exit 1
- fi
- update-modules || true
-}
-
-pkg_postrm_${PN} () {
- update-modules || true
-}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/6] module.bbclass: do not use update-modules anymore
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
` (2 preceding siblings ...)
2013-01-17 14:58 ` [PATCH 3/6] hostap-conf: " Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 5/6] kernel.bbclass: remove references to update-modules Laurentiu Palcu
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
update-modules is obsolete. The bbclass was updated not to use it
anymore.
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/module.bbclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index ebb0880..d477caa 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,4 +1,4 @@
-RDEPENDS_${PN} += "kernel-image ${@oe.utils.contains('DISTRO_FEATURES', 'update-modules', 'update-modules', '', d)}"
+RDEPENDS_${PN} += "kernel-image"
DEPENDS += "virtual/kernel"
inherit module-base
@@ -27,13 +27,18 @@ module_do_install() {
pkg_postinst_append () {
if [ -z "$D" ]; then
- depmod -a
- update-modules || true
+ depmod -a ${KERNEL_VERSION}
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
fi
}
pkg_postrm_append () {
-update-modules || true
+if [ -z "$D" ]; then
+ depmod -a ${KERNEL_VERSION}
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
+fi
}
EXPORT_FUNCTIONS do_compile do_install
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/6] kernel.bbclass: remove references to update-modules
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
` (3 preceding siblings ...)
2013-01-17 14:58 ` [PATCH 4/6] module.bbclass: do not use update-modules anymore Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-17 15:26 ` Bruce Ashfield
2013-01-22 20:48 ` Darren Hart
2013-01-17 14:58 ` [PATCH 6/6] bitbake.conf: remove update-modules from DISTRO_FEATURES Laurentiu Palcu
2013-01-18 13:10 ` [PATCH 0/6] Remove obsolete update-modules Richard Purdie
6 siblings, 2 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
Since update-modules is now obsolete, remove it from the bbclass.
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/kernel.bbclass | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 46ba55f..4893cf2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@
inherit linux-kernel-base module_strip
PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
+DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
# we include gcc above, we dont need virtual/libc
INHIBIT_DEFAULT_DEPS = "1"
@@ -293,12 +293,17 @@ fi
pkg_postinst_modules () {
if [ -z "$D" ]; then
depmod -a ${KERNEL_VERSION}
- update-modules || true
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
fi
}
pkg_postrm_modules () {
-update-modules || true
+if [ -z "$D" ]; then
+ depmod -a ${KERNEL_VERSION}
+else
+ depmod -a -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
+fi
}
autoload_postinst_fragment() {
@@ -403,12 +408,10 @@ python populate_packages_prepend () {
dvar = d.getVar('PKGD', True)
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
-
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
# appropriate modprobe commands to the postinst
autoload = d.getVar('module_autoload_%s' % basename, True)
- if autoload and use_update_modules:
+ if autoload:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
for m in autoload.split():
@@ -422,16 +425,15 @@ python populate_packages_prepend () {
# Write out any modconf fragment
modconf = d.getVar('module_conf_%s' % basename, True)
- if modconf and use_update_modules:
+ if modconf:
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
f.write("%s\n" % modconf)
f.close()
- if use_update_modules:
- files = d.getVar('FILES_%s' % pkg, True)
- files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
- d.setVar('FILES_%s' % pkg, files)
+ files = d.getVar('FILES_%s' % pkg, True)
+ files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
+ d.setVar('FILES_%s' % pkg, files)
if vals.has_key("description"):
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
@@ -447,17 +449,13 @@ python populate_packages_prepend () {
module_regex = '^(.*)\.k?o$'
module_pattern = 'kernel-module-%s'
- use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
- if use_update_modules:
- postinst = d.getVar('pkg_postinst_modules', True)
- postrm = d.getVar('pkg_postrm_modules', True)
- else:
- postinst = None
- postrm = None
+ postinst = d.getVar('pkg_postinst_modules', True)
+ postrm = d.getVar('pkg_postrm_modules', True)
+
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='%skernel-%s' % (['', 'update-modules '][use_update_modules], d.getVar("KERNEL_VERSION", True)))
+ do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
# If modules-load.d and modprobe.d are empty at this point, remove them to
# avoid warnings. removedirs only raises an OSError if an empty
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/6] bitbake.conf: remove update-modules from DISTRO_FEATURES
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
` (4 preceding siblings ...)
2013-01-17 14:58 ` [PATCH 5/6] kernel.bbclass: remove references to update-modules Laurentiu Palcu
@ 2013-01-17 14:58 ` Laurentiu Palcu
2013-01-18 13:10 ` [PATCH 0/6] Remove obsolete update-modules Richard Purdie
6 siblings, 0 replies; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-17 14:58 UTC (permalink / raw)
To: openembedded-core
Since update-modules is obsolete, remove it from DISTRO_FEATURES.
[YOCTO #3598]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/conf/bitbake.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 9ae11ad..2dc50ca 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -738,7 +738,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
-DISTRO_FEATURES_BACKFILL = "pulseaudio update-modules"
+DISTRO_FEATURES_BACKFILL = "pulseaudio"
DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
MACHINE_FEATURES_BACKFILL = "rtc"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] kernel.bbclass: remove references to update-modules
2013-01-17 14:58 ` [PATCH 5/6] kernel.bbclass: remove references to update-modules Laurentiu Palcu
@ 2013-01-17 15:26 ` Bruce Ashfield
2013-01-22 20:48 ` Darren Hart
1 sibling, 0 replies; 12+ messages in thread
From: Bruce Ashfield @ 2013-01-17 15:26 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 5611 bytes --]
On Thu, Jan 17, 2013 at 9:58 AM, Laurentiu Palcu
<laurentiu.palcu@intel.com>wrote:
> Since update-modules is now obsolete, remove it from the bbclass.
>
>
This seems to capture all the concerns that I had about removing
update-modules.
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> [YOCTO #3598]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
> meta/classes/kernel.bbclass | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 46ba55f..4893cf2 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,7 +1,7 @@
> inherit linux-kernel-base module_strip
>
> PROVIDES += "virtual/kernel"
> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native
> virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
> +DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native
> virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
>
> # we include gcc above, we dont need virtual/libc
> INHIBIT_DEFAULT_DEPS = "1"
> @@ -293,12 +293,17 @@ fi
> pkg_postinst_modules () {
> if [ -z "$D" ]; then
> depmod -a ${KERNEL_VERSION}
> - update-modules || true
> +else
> + depmod -a -b $D -F
> ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
> fi
> }
>
> pkg_postrm_modules () {
> -update-modules || true
> +if [ -z "$D" ]; then
> + depmod -a ${KERNEL_VERSION}
> +else
> + depmod -a -b $D -F
> ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
> +fi
> }
>
> autoload_postinst_fragment() {
> @@ -403,12 +408,10 @@ python populate_packages_prepend () {
>
> dvar = d.getVar('PKGD', True)
>
> - use_update_modules = oe.utils.contains('DISTRO_FEATURES',
> 'update-modules', True, False, d)
> -
> # If autoloading is requested, output
> /etc/modules-load.d/<name>.conf and append
> # appropriate modprobe commands to the postinst
> autoload = d.getVar('module_autoload_%s' % basename, True)
> - if autoload and use_update_modules:
> + if autoload:
> name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> f = open(name, 'w')
> for m in autoload.split():
> @@ -422,16 +425,15 @@ python populate_packages_prepend () {
>
> # Write out any modconf fragment
> modconf = d.getVar('module_conf_%s' % basename, True)
> - if modconf and use_update_modules:
> + if modconf:
> name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
> f = open(name, 'w')
> f.write("%s\n" % modconf)
> f.close()
>
> - if use_update_modules:
> - files = d.getVar('FILES_%s' % pkg, True)
> - files = "%s /etc/modules-load.d/%s.conf
> /etc/modprobe.d/%s.conf" % (files, basename, basename)
> - d.setVar('FILES_%s' % pkg, files)
> + files = d.getVar('FILES_%s' % pkg, True)
> + files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf"
> % (files, basename, basename)
> + d.setVar('FILES_%s' % pkg, files)
>
> if vals.has_key("description"):
> old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
> @@ -447,17 +449,13 @@ python populate_packages_prepend () {
> module_regex = '^(.*)\.k?o$'
> module_pattern = 'kernel-module-%s'
>
> - use_update_modules = oe.utils.contains('DISTRO_FEATURES',
> 'update-modules', True, False, d)
> - if use_update_modules:
> - postinst = d.getVar('pkg_postinst_modules', True)
> - postrm = d.getVar('pkg_postrm_modules', True)
> - else:
> - postinst = None
> - postrm = None
> + postinst = d.getVar('pkg_postinst_modules', True)
> + postrm = d.getVar('pkg_postrm_modules', True)
> +
> do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$',
> output_pattern='kernel-firmware-%s', description='Firmware for %s',
> recursive=True, extra_depends='')
> do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$',
> output_pattern='kernel-firmware-%s', description='Firmware for %s',
> recursive=True, extra_depends='')
> do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$',
> output_pattern='kernel-firmware-%s', description='Firmware for %s',
> recursive=True, extra_depends='')
> - do_split_packages(d, root='/lib/modules', file_regex=module_regex,
> output_pattern=module_pattern, description='%s kernel module',
> postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata,
> extra_depends='%skernel-%s' % (['', 'update-modules '][use_update_modules],
> d.getVar("KERNEL_VERSION", True)))
> + do_split_packages(d, root='/lib/modules', file_regex=module_regex,
> output_pattern=module_pattern, description='%s kernel module',
> postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata,
> extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
>
> # If modules-load.d and modprobe.d are empty at this point, remove
> them to
> # avoid warnings. removedirs only raises an OSError if an empty
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
[-- Attachment #2: Type: text/html, Size: 7128 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] Remove obsolete update-modules
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
` (5 preceding siblings ...)
2013-01-17 14:58 ` [PATCH 6/6] bitbake.conf: remove update-modules from DISTRO_FEATURES Laurentiu Palcu
@ 2013-01-18 13:10 ` Richard Purdie
6 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2013-01-18 13:10 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
On Thu, 2013-01-17 at 16:58 +0200, Laurentiu Palcu wrote:
> All,
>
> Working on the postinstall improvements I stumbled over update-modules
> script which postponed postinstalls for all the kernel or kernel module
> packages for first boot. However, after some investigations I saw that this
> script is pretty much obsolete. So, this patchset will remove it from all
> recipes and bbclasses it was referenced.
>
> Here's why it's useless now:
>
> update-modules was used mainly to create the /etc/modules.conf file, out of files
> in /etc/modutils, and /etc/modules file from /etc/modules-load.d/*.conf files.
> Then it just ran depmod -A.
>
> * depmod can be run in the postinst/postrm on its own, no need to run through update-modules;
> * /etc/modules.conf is not used anymore by modprobe. modprobe now looks in
> /etc/modprobe.d/ directory for *.conf files;
> * /etc/modules was used by /etc/init.d/modutils.sh to automatically load
> modules at boot. However, I improved the script in order to also look into
> /etc/modules-load.d/ directory and load all the modules listed there that were not
> already loaded (in case /etc/modules existed);
>
> I know this is a major change and will affect a lot of people. But, in order
> to support RO rootfs and run all the postinstalls on host, this change was
> kind of necessary. Note, though, that the update-modules recipe was not removed
> yet. It will be removed eventually but, for now, I decided to leave it in place
> in case some people are nostalgic and want to still use it for a while.
I've merged these, I'll also take a patch to remove update-modules
itself.
Cheers,
Richard
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] kernel.bbclass: remove references to update-modules
2013-01-17 14:58 ` [PATCH 5/6] kernel.bbclass: remove references to update-modules Laurentiu Palcu
2013-01-17 15:26 ` Bruce Ashfield
@ 2013-01-22 20:48 ` Darren Hart
2013-01-23 8:22 ` Laurentiu Palcu
1 sibling, 1 reply; 12+ messages in thread
From: Darren Hart @ 2013-01-22 20:48 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
On 01/17/2013 06:58 AM, Laurentiu Palcu wrote:
> Since update-modules is now obsolete, remove it from the bbclass.
>
> [YOCTO #3598]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
> meta/classes/kernel.bbclass | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 46ba55f..4893cf2 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,7 +1,7 @@
> inherit linux-kernel-base module_strip
>
> PROVIDES += "virtual/kernel"
> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
> +DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX}"
>
...
> - use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
> - if use_update_modules:
> - postinst = d.getVar('pkg_postinst_modules', True)
> - postrm = d.getVar('pkg_postrm_modules', True)
> - else:
> - postinst = None
> - postrm = None
> + postinst = d.getVar('pkg_postinst_modules', True)
> + postrm = d.getVar('pkg_postrm_modules', True)
This seems to be inverted logic from the original. If update-modules is
removed, then use_update_modules should be false right? Which would have
previously set postinst and postrm to None.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] kernel.bbclass: remove references to update-modules
2013-01-22 20:48 ` Darren Hart
@ 2013-01-23 8:22 ` Laurentiu Palcu
2013-01-23 16:24 ` Darren Hart
0 siblings, 1 reply; 12+ messages in thread
From: Laurentiu Palcu @ 2013-01-23 8:22 UTC (permalink / raw)
To: Darren Hart; +Cc: openembedded-core
On 01/22/2013 10:48 PM, Darren Hart wrote:
>> - use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
>> > - if use_update_modules:
>> > - postinst = d.getVar('pkg_postinst_modules', True)
>> > - postrm = d.getVar('pkg_postrm_modules', True)
>> > - else:
>> > - postinst = None
>> > - postrm = None
>> > + postinst = d.getVar('pkg_postinst_modules', True)
>> > + postrm = d.getVar('pkg_postrm_modules', True)
> This seems to be inverted logic from the original. If update-modules is
> removed, then use_update_modules should be false right? Which would have
> previously set postinst and postrm to None.
I believe both the previous and current logic are right:
* Before, the update-modules script was called in the postinst/postrm.
So, when the update-modules package was not part of the build, the
postinst/postrm could not call update-modules anymore. As a consequence,
they were set to none.
* After update-modules has been removed, we are not constrained by
calling update-modules anymore in postinst/postrm but we can safely call
depmod to have the dependencies computed.
So, is there anything wrong with the current logic?
Thanks,
Laurentiu
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] kernel.bbclass: remove references to update-modules
2013-01-23 8:22 ` Laurentiu Palcu
@ 2013-01-23 16:24 ` Darren Hart
0 siblings, 0 replies; 12+ messages in thread
From: Darren Hart @ 2013-01-23 16:24 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
On 01/23/2013 12:22 AM, Laurentiu Palcu wrote:
>
>
> On 01/22/2013 10:48 PM, Darren Hart wrote:
>>> - use_update_modules = oe.utils.contains('DISTRO_FEATURES', 'update-modules', True, False, d)
>>>> - if use_update_modules:
>>>> - postinst = d.getVar('pkg_postinst_modules', True)
>>>> - postrm = d.getVar('pkg_postrm_modules', True)
>>>> - else:
>>>> - postinst = None
>>>> - postrm = None
>>>> + postinst = d.getVar('pkg_postinst_modules', True)
>>>> + postrm = d.getVar('pkg_postrm_modules', True)
>> This seems to be inverted logic from the original. If update-modules is
>> removed, then use_update_modules should be false right? Which would have
>> previously set postinst and postrm to None.
> I believe both the previous and current logic are right:
> * Before, the update-modules script was called in the postinst/postrm.
> So, when the update-modules package was not part of the build, the
> postinst/postrm could not call update-modules anymore. As a consequence,
> they were set to none.
> * After update-modules has been removed, we are not constrained by
> calling update-modules anymore in postinst/postrm but we can safely call
> depmod to have the dependencies computed.
>
> So, is there anything wrong with the current logic?
Ah, I see. That makes sense to me.
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-01-23 16:40 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 14:58 [PATCH 0/6] Remove obsolete update-modules Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 1/6] modutils-initscripts: improve modutils.sh Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 2/6] orinoco-conf: remove dependencies of update-modules Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 3/6] hostap-conf: " Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 4/6] module.bbclass: do not use update-modules anymore Laurentiu Palcu
2013-01-17 14:58 ` [PATCH 5/6] kernel.bbclass: remove references to update-modules Laurentiu Palcu
2013-01-17 15:26 ` Bruce Ashfield
2013-01-22 20:48 ` Darren Hart
2013-01-23 8:22 ` Laurentiu Palcu
2013-01-23 16:24 ` Darren Hart
2013-01-17 14:58 ` [PATCH 6/6] bitbake.conf: remove update-modules from DISTRO_FEATURES Laurentiu Palcu
2013-01-18 13:10 ` [PATCH 0/6] Remove obsolete update-modules Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox