All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] kernel.bbclass updates
@ 2012-03-23 12:56 Martin Jansa
  2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 5de06b564a949d0d9ec254817feacf9ad18d098c:

  Revert "bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues" (2012-03-23 12:29:21 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib jansa/kernel
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=jansa/kernel

Martin Jansa (6):
  kernel.bbclass: populate /etc/modules-load.d/ with module_autoload
    entries too
  kernel.bbclass: use symlinks for modutils files
  kernel.bbclass: use better number for KERNEL_PRIORITY
  kernel.bbclass: fix extra + in kernelrelease
  update-modules: update script to read /etc/modules-load.d/ directory
  kernel.bbclass: don't create /etc/modutils/*

 meta/classes/kernel.bbclass                        |   22 +++++++++++++------
 .../update-modules-1.0/update-modules              |   14 ++++++++++-
 .../update-modules/update-modules_1.0.bb           |    2 +-
 3 files changed, 28 insertions(+), 10 deletions(-)

-- 
1.7.8.5




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  2012-03-23 23:00   ` Andreas Oberritter
  2012-03-26 18:44   ` Darren Hart
  2012-03-23 12:56 ` [PATCH 2/6] kernel.bbclass: use symlinks for modutils files Martin Jansa
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

* /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 169df33..975ae13 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -122,6 +122,7 @@ kernel_do_install() {
 	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
 	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
 	install -d ${D}/etc/modutils
+	install -d ${D}/etc/modules-load.d
 	install -d ${D}/etc/modprobe.d
 
 	#
@@ -411,6 +412,11 @@ python populate_packages_prepend () {
 			for m in autoload.split():
 				f.write('%s\n' % m)
 			f.close()
+			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
+			f = open(name, 'w')
+			for m in autoload.split():
+				f.write('%s\n' % m)
+			f.close()
 			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 			if not postinst:
 				bb.fatal("pkg_postinst_%s not defined" % pkg)
@@ -426,7 +432,7 @@ python populate_packages_prepend () {
 			f.close()
 
 		files = d.getVar('FILES_%s' % pkg, True)
-		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
+		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
 		d.setVar('FILES_%s' % pkg, files)
 
 		if vals.has_key("description"):
@@ -456,7 +462,7 @@ python populate_packages_prepend () {
 	# avoid warnings. removedirs only raises an OSError if an empty
 	# directory cannot be removed.
 	dvar = d.getVar('PKGD', True)
-	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
+	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
 		if len(os.listdir(dir)) == 0:
 			os.rmdir(dir)
 
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/6] kernel.bbclass: use symlinks for modutils files
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
  2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  2012-03-26 18:46   ` Darren Hart
  2012-03-23 12:56 ` [PATCH 3/6] kernel.bbclass: use better number for KERNEL_PRIORITY Martin Jansa
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 975ae13..54ed7f7 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -407,16 +407,14 @@ python populate_packages_prepend () {
 		# appropriate modprobe commands to the postinst
 		autoload = d.getVar('module_autoload_%s' % basename, True)
 		if autoload:
-			name = '%s/etc/modutils/%s' % (dvar, basename)
-			f = open(name, 'w')
-			for m in autoload.split():
-				f.write('%s\n' % m)
-			f.close()
 			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
 			f = open(name, 'w')
 			for m in autoload.split():
 				f.write('%s\n' % m)
 			f.close()
+			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
+			modutils_target = '../modules-load.d/%s.conf' % (basename)
+			os.symlink(modutils_target, modutils_name)
 			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 			if not postinst:
 				bb.fatal("pkg_postinst_%s not defined" % pkg)
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/6] kernel.bbclass: use better number for KERNEL_PRIORITY
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
  2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
  2012-03-23 12:56 ` [PATCH 2/6] kernel.bbclass: use symlinks for modutils files Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  2012-03-23 12:56 ` [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease Martin Jansa
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

* there is no upgrade from 2.6.X to 3.X.Y
  last part of PV is used as kernel priority for u-a, but X is usually
  higher then Y in 3.x.x so use all 3 parts in one bigger number
* and make it weak assignment if this scheme doesn't work for some
  recipe
* if there are just 2 numbers in PV then last one is repeated twice
  (see linux-openmoko_3.2 example) but that should work fine too

  OE qemux86-64@ ~/oe-core $ grep ^KERNEL_PRIO linux-yocto_*
  linux-yocto_2.6.37.e:KERNEL_PRIORITY="20637"
  linux-yocto_3.0.e:KERNEL_PRIORITY="30024"
  linux-yocto_3.2.e:KERNEL_PRIORITY="30211"
  OE qemux86-64@ ~/oe-core $ grep ^PV linux-yocto_*
  linux-yocto_2.6.37.e:PV="2.6.37+git1+aeea99683c7283f1f3320bf2ee7085ee252d4e7e_1+af2bfbe5f757361b5b027a24d67a93bfdfaaf33c"
  linux-yocto_3.0.e:PV="3.0.24+git2+a4ac64fe873f08ef718e2849b88914725dc99c1c_2+aac580659dc0ce083f250fb05abf82e58d7f4531"
  linux-yocto_3.2.e:PV="3.2.11+git2+514847185c78c07f52e02750fbe0a03ca3a31d8f_2+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8"

  OE qemux86-64@ ~/shr-core $ grep ^KERNEL_PRIO linux-openmoko_*
  linux-openmoko_2.6.39.e:KERNEL_PRIORITY="20639"
  linux-openmoko_3.2.e:KERNEL_PRIORITY="30202"
  linux-openmoko_git.e:KERNEL_PRIORITY="30299"
  OE qemux86-64@ ~/shr-core $ grep ^PV linux-openmoko_*
  linux-openmoko_2.6.39.e:PV="2.6.39"
  linux-openmoko_3.2.e:PV="3.2"
  linux-openmoko_git.e:PV="3.2.99+3.3.0-rc0+gitr1+7089727d63b17615fb0a652374d79cb7df0835ad"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 54ed7f7..5e4cdd4 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -31,7 +31,9 @@ PACKAGES_DYNAMIC += "kernel-firmware-*"
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
 
-KERNEL_PRIORITY = "${@d.getVar('PV',1).split('-')[0].split('.')[-1]}"
+KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
+                       int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \
+                       int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}"
 
 KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
                   ` (2 preceding siblings ...)
  2012-03-23 12:56 ` [PATCH 3/6] kernel.bbclass: use better number for KERNEL_PRIORITY Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  2012-03-23 13:24   ` Bruce Ashfield
  2012-03-23 12:56 ` [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory Martin Jansa
  2012-03-23 12:56 ` [PATCH 6/6] kernel.bbclass: don't create /etc/modutils/* Martin Jansa
  5 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

* see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5e4cdd4..736768e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -204,6 +204,12 @@ sysroot_stage_all_append() {
 }
 
 kernel_do_configure() {
+	# fixes extra + in /lib/modules/2.6.37+
+	# $ scripts/setlocalversion . => +
+	# $ make kernelversion => 2.6.37
+	# $ make kernelrelease => 2.6.37+
+	touch ${B}/.scmversion
+
 	# Copy defconfig to .config if .config does not exist. This allows
 	# recipes to manage the .config themselves in do_configure_prepend().
 	if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
                   ` (3 preceding siblings ...)
  2012-03-23 12:56 ` [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  2012-03-23 14:37   ` [PATCHv2 " Martin Jansa
  2012-03-23 12:56 ` [PATCH 6/6] kernel.bbclass: don't create /etc/modutils/* Martin Jansa
  5 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

* show warning for old /etc/modutils/* files without .conf extension

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../update-modules-1.0/update-modules              |   14 ++++++++++++--
 .../update-modules/update-modules_1.0.bb           |    2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
index 7ee7df8..14746d0 100755
--- a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
+++ b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
@@ -103,8 +103,8 @@ createfile() {
 $HEADER"
 #
 # Please do not edit this file directly. If you want to change or add
-# anything please take a look at the files in /etc/modutils and read
-# the manpage for update-modules.
+# anything please take a look at the files in /etc/modutils, /etc/modules-load.d 
+# and read the manpage for update-modules.
 #
 EOF
 }
@@ -161,6 +161,7 @@ fi
 createfile "$MODCONFTMPFILE"
 createfile "$MODULESTMPFILE"
 
+# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway..
 for cfg in /etc/modutils/* $CONF ; do
 	if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
 		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
@@ -168,6 +169,15 @@ for cfg in /etc/modutils/* $CONF ; do
 		elif echo $cfg | grep -q '\.conf$' ; then
 			addfile "$cfg" "$MODCONFTMPFILE"
 		else
+			echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf"
+		fi
+	fi
+done
+for cfg in /etc/modules-load.d/*.conf; do
+	if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries
+		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
+		        true
+		else
 			addfile "$cfg" "$MODULESTMPFILE"
 		fi
 	fi
diff --git a/meta/recipes-kernel/update-modules/update-modules_1.0.bb b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
index d9697de..2af75e6 100644
--- a/meta/recipes-kernel/update-modules/update-modules_1.0.bb
+++ b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa
 
 RDEPENDS_${PN} = "module-init-tools-depmod"
 
-PR = "r12"
+PR = "r13"
 
 SRC_URI = "file://update-modules \
            file://COPYING.GPL"
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 6/6] kernel.bbclass: don't create /etc/modutils/*
  2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
                   ` (4 preceding siblings ...)
  2012-03-23 12:56 ` [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory Martin Jansa
@ 2012-03-23 12:56 ` Martin Jansa
  5 siblings, 0 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 12:56 UTC (permalink / raw)
  To: openembedded-core

* update-modules was updated to read /etc/modules-load.d/*.conf

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 736768e..6633b85 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -123,7 +123,6 @@ kernel_do_install() {
 	install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
 	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
 	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
-	install -d ${D}/etc/modutils
 	install -d ${D}/etc/modules-load.d
 	install -d ${D}/etc/modprobe.d
 
@@ -411,7 +410,7 @@ python populate_packages_prepend () {
 
 		dvar = d.getVar('PKGD', True)
 
-		# If autoloading is requested, output /etc/modutils/<name> and append
+		# 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:
@@ -420,9 +419,6 @@ python populate_packages_prepend () {
 			for m in autoload.split():
 				f.write('%s\n' % m)
 			f.close()
-			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
-			modutils_target = '../modules-load.d/%s.conf' % (basename)
-			os.symlink(modutils_target, modutils_name)
 			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 			if not postinst:
 				bb.fatal("pkg_postinst_%s not defined" % pkg)
@@ -438,7 +434,7 @@ python populate_packages_prepend () {
 			f.close()
 
 		files = d.getVar('FILES_%s' % pkg, True)
-		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
+		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"):
@@ -464,11 +460,11 @@ python populate_packages_prepend () {
 	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='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True))
 
-	# If modutils and modprobe.d are empty at this point, remove them to
+	# 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
 	# directory cannot be removed.
 	dvar = d.getVar('PKGD', True)
-	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
+	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
 		if len(os.listdir(dir)) == 0:
 			os.rmdir(dir)
 
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-23 12:56 ` [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease Martin Jansa
@ 2012-03-23 13:24   ` Bruce Ashfield
  2012-03-23 13:31     ` Martin Jansa
  0 siblings, 1 reply; 22+ messages in thread
From: Bruce Ashfield @ 2012-03-23 13:24 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa

On 12-03-23 08:56 AM, Martin Jansa wrote:
> * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html

I was just looking at this in the past day or so and was
wondering where it had gone. Saved me the effort!

Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>

>
> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> ---
>   meta/classes/kernel.bbclass |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 5e4cdd4..736768e 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
>   }
>
>   kernel_do_configure() {
> +	# fixes extra + in /lib/modules/2.6.37+
> +	# $ scripts/setlocalversion . =>  +
> +	# $ make kernelversion =>  2.6.37
> +	# $ make kernelrelease =>  2.6.37+
> +	touch ${B}/.scmversion
> +
>   	# Copy defconfig to .config if .config does not exist. This allows
>   	# recipes to manage the .config themselves in do_configure_prepend().
>   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-23 13:24   ` Bruce Ashfield
@ 2012-03-23 13:31     ` Martin Jansa
  2012-03-26 16:02       ` Martin Jansa
  0 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 13:31 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> On 12-03-23 08:56 AM, Martin Jansa wrote:
> > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> 
> I was just looking at this in the past day or so and was
> wondering where it had gone. Saved me the effort!
> 

Please bump PR in kernel recipes you care about (I did for mine.. )

> Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> 
> >
> > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > ---
> >   meta/classes/kernel.bbclass |    6 ++++++
> >   1 files changed, 6 insertions(+), 0 deletions(-)
> >
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 5e4cdd4..736768e 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> >   }
> >
> >   kernel_do_configure() {
> > +	# fixes extra + in /lib/modules/2.6.37+
> > +	# $ scripts/setlocalversion . =>  +
> > +	# $ make kernelversion =>  2.6.37
> > +	# $ make kernelrelease =>  2.6.37+
> > +	touch ${B}/.scmversion
> > +
> >   	# Copy defconfig to .config if .config does not exist. This allows
> >   	# recipes to manage the .config themselves in do_configure_prepend().
> >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv2 5/6] update-modules: update script to read /etc/modules-load.d/ directory
  2012-03-23 12:56 ` [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory Martin Jansa
@ 2012-03-23 14:37   ` Martin Jansa
  0 siblings, 0 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 14:37 UTC (permalink / raw)
  To: openembedded-core

* show warning for old /etc/modutils/* files without .conf extension
* v2: keep adding modules also from old /etc/modutils/* after showing
  warning, this way update-modules will be backward compatible also on
  images without kernel upgrade

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../update-modules-1.0/update-modules              |   15 +++++++++++++--
 .../update-modules/update-modules_1.0.bb           |    2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
index 7ee7df8..99040a1 100755
--- a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
+++ b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
@@ -103,8 +103,8 @@ createfile() {
 $HEADER"
 #
 # Please do not edit this file directly. If you want to change or add
-# anything please take a look at the files in /etc/modutils and read
-# the manpage for update-modules.
+# anything please take a look at the files in /etc/modutils, /etc/modules-load.d 
+# and read the manpage for update-modules.
 #
 EOF
 }
@@ -161,6 +161,7 @@ fi
 createfile "$MODCONFTMPFILE"
 createfile "$MODULESTMPFILE"
 
+# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway..
 for cfg in /etc/modutils/* $CONF ; do
 	if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
 		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
@@ -168,6 +169,16 @@ for cfg in /etc/modutils/* $CONF ; do
 		elif echo $cfg | grep -q '\.conf$' ; then
 			addfile "$cfg" "$MODCONFTMPFILE"
 		else
+			echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf"
+			addfile "$cfg" "$MODULESTMPFILE"
+		fi
+	fi
+done
+for cfg in /etc/modules-load.d/*.conf; do
+	if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries
+		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
+		        true
+		else
 			addfile "$cfg" "$MODULESTMPFILE"
 		fi
 	fi
diff --git a/meta/recipes-kernel/update-modules/update-modules_1.0.bb b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
index d9697de..2af75e6 100644
--- a/meta/recipes-kernel/update-modules/update-modules_1.0.bb
+++ b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa
 
 RDEPENDS_${PN} = "module-init-tools-depmod"
 
-PR = "r12"
+PR = "r13"
 
 SRC_URI = "file://update-modules \
            file://COPYING.GPL"
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
@ 2012-03-23 23:00   ` Andreas Oberritter
  2012-03-23 23:11     ` Martin Jansa
  2012-03-26 18:44   ` Darren Hart
  1 sibling, 1 reply; 22+ messages in thread
From: Andreas Oberritter @ 2012-03-23 23:00 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On 23.03.2012 13:56, Martin Jansa wrote:
> * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit

Martin,

the man-page[1] for modules-load.d says that packages should install
.conf files to /usr/lib/modules-load.d, because /etc/modules-load.d is
reserved for the system administrator. Did you take this into account
when you decided to support /etc/modules-load.d?

Regards,
Andreas

[1] http://0pointer.de/public/systemd-man/modules-load.d.html

> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel.bbclass |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 169df33..975ae13 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -122,6 +122,7 @@ kernel_do_install() {
>  	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
>  	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
>  	install -d ${D}/etc/modutils
> +	install -d ${D}/etc/modules-load.d
>  	install -d ${D}/etc/modprobe.d
>  
>  	#
> @@ -411,6 +412,11 @@ python populate_packages_prepend () {
>  			for m in autoload.split():
>  				f.write('%s\n' % m)
>  			f.close()
> +			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> +			f = open(name, 'w')
> +			for m in autoload.split():
> +				f.write('%s\n' % m)
> +			f.close()
>  			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
>  			if not postinst:
>  				bb.fatal("pkg_postinst_%s not defined" % pkg)
> @@ -426,7 +432,7 @@ python populate_packages_prepend () {
>  			f.close()
>  
>  		files = d.getVar('FILES_%s' % pkg, True)
> -		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
> +		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
>  		d.setVar('FILES_%s' % pkg, files)
>  
>  		if vals.has_key("description"):
> @@ -456,7 +462,7 @@ python populate_packages_prepend () {
>  	# avoid warnings. removedirs only raises an OSError if an empty
>  	# directory cannot be removed.
>  	dvar = d.getVar('PKGD', True)
> -	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
> +	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
>  		if len(os.listdir(dir)) == 0:
>  			os.rmdir(dir)
>  




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 23:00   ` Andreas Oberritter
@ 2012-03-23 23:11     ` Martin Jansa
  2012-03-26 11:25       ` Richard Purdie
  0 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-23 23:11 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]

On Sat, Mar 24, 2012 at 12:00:04AM +0100, Andreas Oberritter wrote:
> On 23.03.2012 13:56, Martin Jansa wrote:
> > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> 
> Martin,
> 
> the man-page[1] for modules-load.d says that packages should install
> .conf files to /usr/lib/modules-load.d, because /etc/modules-load.d is
> reserved for the system administrator. Did you take this into account
> when you decided to support /etc/modules-load.d?

You're right, /usr/lib/modules-load.d could be possibly better option.
I've used /etc mostly because I was using it since my first systemd
image (so I was sure it works) and I don't remember seeing /usr/lib in
man page when I was reading it back then (probably overlooked or
forgot).

Is it worth updating update-modules (maybe teaching update-modules to
look into all possible systemd directories too)?

Cheers,

> Regards,
> Andreas
> 
> [1] http://0pointer.de/public/systemd-man/modules-load.d.html
> 
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/classes/kernel.bbclass |   10 ++++++++--
> >  1 files changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 169df33..975ae13 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -122,6 +122,7 @@ kernel_do_install() {
> >  	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
> >  	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
> >  	install -d ${D}/etc/modutils
> > +	install -d ${D}/etc/modules-load.d
> >  	install -d ${D}/etc/modprobe.d
> >  
> >  	#
> > @@ -411,6 +412,11 @@ python populate_packages_prepend () {
> >  			for m in autoload.split():
> >  				f.write('%s\n' % m)
> >  			f.close()
> > +			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> > +			f = open(name, 'w')
> > +			for m in autoload.split():
> > +				f.write('%s\n' % m)
> > +			f.close()
> >  			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
> >  			if not postinst:
> >  				bb.fatal("pkg_postinst_%s not defined" % pkg)
> > @@ -426,7 +432,7 @@ python populate_packages_prepend () {
> >  			f.close()
> >  
> >  		files = d.getVar('FILES_%s' % pkg, True)
> > -		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
> > +		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
> >  		d.setVar('FILES_%s' % pkg, files)
> >  
> >  		if vals.has_key("description"):
> > @@ -456,7 +462,7 @@ python populate_packages_prepend () {
> >  	# avoid warnings. removedirs only raises an OSError if an empty
> >  	# directory cannot be removed.
> >  	dvar = d.getVar('PKGD', True)
> > -	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
> > +	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
> >  		if len(os.listdir(dir)) == 0:
> >  			os.rmdir(dir)
> >  
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 23:11     ` Martin Jansa
@ 2012-03-26 11:25       ` Richard Purdie
  0 siblings, 0 replies; 22+ messages in thread
From: Richard Purdie @ 2012-03-26 11:25 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, 2012-03-24 at 00:11 +0100, Martin Jansa wrote:
> On Sat, Mar 24, 2012 at 12:00:04AM +0100, Andreas Oberritter wrote:
> > On 23.03.2012 13:56, Martin Jansa wrote:
> > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > 
> > Martin,
> > 
> > the man-page[1] for modules-load.d says that packages should install
> > .conf files to /usr/lib/modules-load.d, because /etc/modules-load.d is
> > reserved for the system administrator. Did you take this into account
> > when you decided to support /etc/modules-load.d?
> 
> You're right, /usr/lib/modules-load.d could be possibly better option.
> I've used /etc mostly because I was using it since my first systemd
> image (so I was sure it works) and I don't remember seeing /usr/lib in
> man page when I was reading it back then (probably overlooked or
> forgot).
> 
> Is it worth updating update-modules (maybe teaching update-modules to
> look into all possible systemd directories too)?

I think in our case, we'd need to have /lib/modules-load.d
and /usr/lib/modules-load.d depending on whether the module was meant to
load without /usr being mounted. Using /etc for now seems to make most
sense although it probably wouldn't hurt for the script to look at the
other locations.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-23 13:31     ` Martin Jansa
@ 2012-03-26 16:02       ` Martin Jansa
  2012-03-26 16:05         ` Martin Jansa
  2012-03-26 16:25         ` Bruce Ashfield
  0 siblings, 2 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-26 16:02 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]

On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> > On 12-03-23 08:56 AM, Martin Jansa wrote:
> > > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> > 
> > I was just looking at this in the past day or so and was
> > wondering where it had gone. Saved me the effort!
> > 
> 
> Please bump PR in kernel recipes you care about (I did for mine.. )

I was testing your patch
"linux-yocto: common-pc: Add PCNET32 to the config"
to see if this patch fixes + also in linux-yocto recipes and somehow it
seems still keeping +

OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ ../linux/scripts/setlocalversion .
-yocto-standard

seems ok, but
root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
Package kernel-module-uvesafb
(3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
is installed on root and has the following files:
/lib/modules/
/lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
/lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko

and also:
OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ make kernelrelease
  GEN
/OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
3.2.11-yocto-standard+

Any idea why it doesn't work with linux-yocto layout and works with
other kernels from git (tested on kernels from meta-smartphone).

Cheers,

> 
> > Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > 
> > >
> > > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > > ---
> > >   meta/classes/kernel.bbclass |    6 ++++++
> > >   1 files changed, 6 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > > index 5e4cdd4..736768e 100644
> > > --- a/meta/classes/kernel.bbclass
> > > +++ b/meta/classes/kernel.bbclass
> > > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> > >   }
> > >
> > >   kernel_do_configure() {
> > > +	# fixes extra + in /lib/modules/2.6.37+
> > > +	# $ scripts/setlocalversion . =>  +
> > > +	# $ make kernelversion =>  2.6.37
> > > +	# $ make kernelrelease =>  2.6.37+
> > > +	touch ${B}/.scmversion
> > > +
> > >   	# Copy defconfig to .config if .config does not exist. This allows
> > >   	# recipes to manage the .config themselves in do_configure_prepend().
> > >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
> > 
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-26 16:02       ` Martin Jansa
@ 2012-03-26 16:05         ` Martin Jansa
  2012-03-26 16:25         ` Bruce Ashfield
  1 sibling, 0 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-26 16:05 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3903 bytes --]

On Mon, Mar 26, 2012 at 06:02:46PM +0200, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
> > On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
> > > On 12-03-23 08:56 AM, Martin Jansa wrote:
> > > > * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
> > > 
> > > I was just looking at this in the past day or so and was
> > > wondering where it had gone. Saved me the effort!
> > > 
> > 
> > Please bump PR in kernel recipes you care about (I did for mine.. )
> 
> I was testing your patch
> "linux-yocto: common-pc: Add PCNET32 to the config"
> to see if this patch fixes + also in linux-yocto recipes and somehow it
> seems still keeping +
> 
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ ../linux/scripts/setlocalversion .
> -yocto-standard
> 
> seems ok, but
> root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
> Package kernel-module-uvesafb
> (3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
> is installed on root and has the following files:
> /lib/modules/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko
> 
> and also:
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ make kernelrelease
>   GEN
> /OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> 3.2.11-yocto-standard+
> 
> Any idea why it doesn't work with linux-yocto layout and works with
> other kernels from git (tested on kernels from meta-smartphone).

Just one more note to this

OE @
~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
$ ../linux/scripts/setlocalversion ../linux
-yocto-standard+

so if it calls setlocalversion against in ../linux tree we can touch
.scmversion also in that directory instead of ${B}.

Cheers,

> 
> Cheers,
> 
> > 
> > > Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
> > > 
> > > >
> > > > Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> > > > ---
> > > >   meta/classes/kernel.bbclass |    6 ++++++
> > > >   1 files changed, 6 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > > > index 5e4cdd4..736768e 100644
> > > > --- a/meta/classes/kernel.bbclass
> > > > +++ b/meta/classes/kernel.bbclass
> > > > @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
> > > >   }
> > > >
> > > >   kernel_do_configure() {
> > > > +	# fixes extra + in /lib/modules/2.6.37+
> > > > +	# $ scripts/setlocalversion . =>  +
> > > > +	# $ make kernelversion =>  2.6.37
> > > > +	# $ make kernelrelease =>  2.6.37+
> > > > +	touch ${B}/.scmversion
> > > > +
> > > >   	# Copy defconfig to .config if .config does not exist. This allows
> > > >   	# recipes to manage the .config themselves in do_configure_prepend().
> > > >   	if [ -f "${WORKDIR}/defconfig" ]&&  [ ! -f "${B}/.config" ]; then
> > > 
> > 
> > -- 
> > Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> 
> 
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease
  2012-03-26 16:02       ` Martin Jansa
  2012-03-26 16:05         ` Martin Jansa
@ 2012-03-26 16:25         ` Bruce Ashfield
  2012-03-26 17:29           ` [PATCH] kernel.bbclass: touch .scmversion also in ${S} Martin Jansa
  1 sibling, 1 reply; 22+ messages in thread
From: Bruce Ashfield @ 2012-03-26 16:25 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On 12-03-26 12:02 PM, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 02:31:02PM +0100, Martin Jansa wrote:
>> On Fri, Mar 23, 2012 at 09:24:56AM -0400, Bruce Ashfield wrote:
>>> On 12-03-23 08:56 AM, Martin Jansa wrote:
>>>> * see http://lists.linuxtogo.org/pipermail/openembedded-core/2011-December/014308.html
>>>
>>> I was just looking at this in the past day or so and was
>>> wondering where it had gone. Saved me the effort!
>>>
>>
>> Please bump PR in kernel recipes you care about (I did for mine.. )
>
> I was testing your patch
> "linux-yocto: common-pc: Add PCNET32 to the config"
> to see if this patch fixes + also in linux-yocto recipes and somehow it
> seems still keeping +
>
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ ../linux/scripts/setlocalversion .
> -yocto-standard
>
> seems ok, but
> root@qemux86-64:/lib/modules# opkg files kernel-module-uvesafb
> Package kernel-module-uvesafb
> (3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1)
> is installed on root and has the following files:
> /lib/modules/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/
> /lib/modules/3.2.11-yocto-standard+/kernel/drivers/video/uvesafb.ko
>
> and also:
> OE @ ~/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build
> $ make kernelrelease
>    GEN
> /OE/shr-core/tmp-eglibc/work/qemux86_64-oe-linux/linux-yocto/linux-yocto-3.2.11+git6+867fc7a19f2ea74253d1f20c3d61b7829635175b_4+4ca7e2c5d42e755e1b4c3e1478128f047a8ed2a8-r1/linux-qemux86-64-standard-build/Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> 3.2.11-yocto-standard+
>
> Any idea why it doesn't work with linux-yocto layout and works with
> other kernels from git (tested on kernels from meta-smartphone).

I haven't had a chance to poke much at this yet, since I've been
tied up working with some repository tweaks.

But I can have a look shortly. There are some old(ish) patches that
deal with local version, both in the tree, and in some infrastructure
that could be interacting here. I'll spawn some builds (and actually
let the packaging run), and have a look.

Cheers,

Bruce

>
> Cheers,
>
>>
>>> Acked-by: Bruce Ashfield<bruce.ashfield@windriver.com>
>>>
>>>>
>>>> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
>>>> ---
>>>>    meta/classes/kernel.bbclass |    6 ++++++
>>>>    1 files changed, 6 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>>>> index 5e4cdd4..736768e 100644
>>>> --- a/meta/classes/kernel.bbclass
>>>> +++ b/meta/classes/kernel.bbclass
>>>> @@ -204,6 +204,12 @@ sysroot_stage_all_append() {
>>>>    }
>>>>
>>>>    kernel_do_configure() {
>>>> +	# fixes extra + in /lib/modules/2.6.37+
>>>> +	# $ scripts/setlocalversion . =>   +
>>>> +	# $ make kernelversion =>   2.6.37
>>>> +	# $ make kernelrelease =>   2.6.37+
>>>> +	touch ${B}/.scmversion
>>>> +
>>>>    	# Copy defconfig to .config if .config does not exist. This allows
>>>>    	# recipes to manage the .config themselves in do_configure_prepend().
>>>>    	if [ -f "${WORKDIR}/defconfig" ]&&   [ ! -f "${B}/.config" ]; then
>>>
>>
>> --
>> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
>
>




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] kernel.bbclass: touch .scmversion also in ${S}
  2012-03-26 16:25         ` Bruce Ashfield
@ 2012-03-26 17:29           ` Martin Jansa
  2012-03-26 18:32             ` Bruce Ashfield
  0 siblings, 1 reply; 22+ messages in thread
From: Martin Jansa @ 2012-03-26 17:29 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6633b85..3519e7c 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -207,7 +207,7 @@ kernel_do_configure() {
 	# $ scripts/setlocalversion . => +
 	# $ make kernelversion => 2.6.37
 	# $ make kernelrelease => 2.6.37+
-	touch ${B}/.scmversion
+	touch ${B}/.scmversion ${S}/.scmversion
 
 	# Copy defconfig to .config if .config does not exist. This allows
 	# recipes to manage the .config themselves in do_configure_prepend().
-- 
1.7.8.5




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH] kernel.bbclass: touch .scmversion also in ${S}
  2012-03-26 17:29           ` [PATCH] kernel.bbclass: touch .scmversion also in ${S} Martin Jansa
@ 2012-03-26 18:32             ` Bruce Ashfield
  0 siblings, 0 replies; 22+ messages in thread
From: Bruce Ashfield @ 2012-03-26 18:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa

On 12-03-26 01:29 PM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> ---
>   meta/classes/kernel.bbclass |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 6633b85..3519e7c 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -207,7 +207,7 @@ kernel_do_configure() {
>   	# $ scripts/setlocalversion . =>  +
>   	# $ make kernelversion =>  2.6.37
>   	# $ make kernelrelease =>  2.6.37+
> -	touch ${B}/.scmversion
> +	touch ${B}/.scmversion ${S}/.scmversion

Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>

I had the same patch here, and was about to send it. I blame my
slow builder :P

Cheers,

Bruce

>
>   	# Copy defconfig to .config if .config does not exist. This allows
>   	# recipes to manage the .config themselves in do_configure_prepend().




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
  2012-03-23 23:00   ` Andreas Oberritter
@ 2012-03-26 18:44   ` Darren Hart
  1 sibling, 0 replies; 22+ messages in thread
From: Darren Hart @ 2012-03-26 18:44 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa



On 03/23/2012 05:56 AM, Martin Jansa wrote:
> * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel.bbclass |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 169df33..975ae13 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -122,6 +122,7 @@ kernel_do_install() {
>  	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
>  	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
>  	install -d ${D}/etc/modutils
> +	install -d ${D}/etc/modules-load.d
>  	install -d ${D}/etc/modprobe.d
>  
>  	#
> @@ -411,6 +412,11 @@ python populate_packages_prepend () {
>  			for m in autoload.split():
>  				f.write('%s\n' % m)
>  			f.close()
> +			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> +			f = open(name, 'w')
> +			for m in autoload.split():
> +				f.write('%s\n' % m)
> +			f.close()

Seems to me we should do either or, depending on if systemd is supported
in the image. Is there a way to check here?

Also, we have variables for system paths like "etc", any reason we
aren't using those here?

>  			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
>  			if not postinst:
>  				bb.fatal("pkg_postinst_%s not defined" % pkg)
> @@ -426,7 +432,7 @@ python populate_packages_prepend () {
>  			f.close()
>  
>  		files = d.getVar('FILES_%s' % pkg, True)
> -		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
> +		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
>  		d.setVar('FILES_%s' % pkg, files)
>  
>  		if vals.has_key("description"):
> @@ -456,7 +462,7 @@ python populate_packages_prepend () {
>  	# avoid warnings. removedirs only raises an OSError if an empty
>  	# directory cannot be removed.
>  	dvar = d.getVar('PKGD', True)
> -	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
> +	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
>  		if len(os.listdir(dir)) == 0:
>  			os.rmdir(dir)
>  

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/6] kernel.bbclass: use symlinks for modutils files
  2012-03-23 12:56 ` [PATCH 2/6] kernel.bbclass: use symlinks for modutils files Martin Jansa
@ 2012-03-26 18:46   ` Darren Hart
  2012-03-26 18:58     ` Martin Jansa
  2012-03-26 22:05     ` Richard Purdie
  0 siblings, 2 replies; 22+ messages in thread
From: Darren Hart @ 2012-03-26 18:46 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa

What is the motivation?

On 03/23/2012 05:56 AM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel.bbclass |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 975ae13..54ed7f7 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -407,16 +407,14 @@ python populate_packages_prepend () {
>  		# appropriate modprobe commands to the postinst
>  		autoload = d.getVar('module_autoload_%s' % basename, True)
>  		if autoload:
> -			name = '%s/etc/modutils/%s' % (dvar, basename)
> -			f = open(name, 'w')
> -			for m in autoload.split():
> -				f.write('%s\n' % m)
> -			f.close()
>  			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
>  			f = open(name, 'w')
>  			for m in autoload.split():
>  				f.write('%s\n' % m)
>  			f.close()
> +			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
> +			modutils_target = '../modules-load.d/%s.conf' % (basename)
> +			os.symlink(modutils_target, modutils_name)

This basically undoes what was added in 1/2 and replaces it with
symblinks right?

If so, just do it as symlinks in the first place.

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/6] kernel.bbclass: use symlinks for modutils files
  2012-03-26 18:46   ` Darren Hart
@ 2012-03-26 18:58     ` Martin Jansa
  2012-03-26 22:05     ` Richard Purdie
  1 sibling, 0 replies; 22+ messages in thread
From: Martin Jansa @ 2012-03-26 18:58 UTC (permalink / raw)
  To: Darren Hart; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]

On Mon, Mar 26, 2012 at 11:46:48AM -0700, Darren Hart wrote:
> What is the motivation?

RP's review comment.
 
> On 03/23/2012 05:56 AM, Martin Jansa wrote:
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/classes/kernel.bbclass |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 975ae13..54ed7f7 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -407,16 +407,14 @@ python populate_packages_prepend () {
> >  		# appropriate modprobe commands to the postinst
> >  		autoload = d.getVar('module_autoload_%s' % basename, True)
> >  		if autoload:
> > -			name = '%s/etc/modutils/%s' % (dvar, basename)
> > -			f = open(name, 'w')
> > -			for m in autoload.split():
> > -				f.write('%s\n' % m)
> > -			f.close()
> >  			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> >  			f = open(name, 'w')
> >  			for m in autoload.split():
> >  				f.write('%s\n' % m)
> >  			f.close()
> > +			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
> > +			modutils_target = '../modules-load.d/%s.conf' % (basename)
> > +			os.symlink(modutils_target, modutils_name)
> 
> This basically undoes what was added in 1/2 and replaces it with
> symblinks right?
> 
> If so, just do it as symlinks in the first place.

I have't squashed them because 
[PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload
was already applied to meta-oe's kernel.bbclass copy, before I got RP's
review this patchset here, so I wanted to keep those patches 1to1.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/6] kernel.bbclass: use symlinks for modutils files
  2012-03-26 18:46   ` Darren Hart
  2012-03-26 18:58     ` Martin Jansa
@ 2012-03-26 22:05     ` Richard Purdie
  1 sibling, 0 replies; 22+ messages in thread
From: Richard Purdie @ 2012-03-26 22:05 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa

On Mon, 2012-03-26 at 11:46 -0700, Darren Hart wrote:
> What is the motivation?
> 
> On 03/23/2012 05:56 AM, Martin Jansa wrote:
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/classes/kernel.bbclass |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> > 
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 975ae13..54ed7f7 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -407,16 +407,14 @@ python populate_packages_prepend () {
> >  		# appropriate modprobe commands to the postinst
> >  		autoload = d.getVar('module_autoload_%s' % basename, True)
> >  		if autoload:
> > -			name = '%s/etc/modutils/%s' % (dvar, basename)
> > -			f = open(name, 'w')
> > -			for m in autoload.split():
> > -				f.write('%s\n' % m)
> > -			f.close()
> >  			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
> >  			f = open(name, 'w')
> >  			for m in autoload.split():
> >  				f.write('%s\n' % m)
> >  			f.close()
> > +			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
> > +			modutils_target = '../modules-load.d/%s.conf' % (basename)
> > +			os.symlink(modutils_target, modutils_name)
> 
> This basically undoes what was added in 1/2 and replaces it with
> symblinks right?
> 
> If so, just do it as symlinks in the first place.

This is one patch set its best to read in totality as the symlinks get
removed later. I thought about squashing the series but decided to leave
it for history.

Cheers,

Richard





^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-03-26 22:14 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
2012-03-23 23:00   ` Andreas Oberritter
2012-03-23 23:11     ` Martin Jansa
2012-03-26 11:25       ` Richard Purdie
2012-03-26 18:44   ` Darren Hart
2012-03-23 12:56 ` [PATCH 2/6] kernel.bbclass: use symlinks for modutils files Martin Jansa
2012-03-26 18:46   ` Darren Hart
2012-03-26 18:58     ` Martin Jansa
2012-03-26 22:05     ` Richard Purdie
2012-03-23 12:56 ` [PATCH 3/6] kernel.bbclass: use better number for KERNEL_PRIORITY Martin Jansa
2012-03-23 12:56 ` [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease Martin Jansa
2012-03-23 13:24   ` Bruce Ashfield
2012-03-23 13:31     ` Martin Jansa
2012-03-26 16:02       ` Martin Jansa
2012-03-26 16:05         ` Martin Jansa
2012-03-26 16:25         ` Bruce Ashfield
2012-03-26 17:29           ` [PATCH] kernel.bbclass: touch .scmversion also in ${S} Martin Jansa
2012-03-26 18:32             ` Bruce Ashfield
2012-03-23 12:56 ` [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory Martin Jansa
2012-03-23 14:37   ` [PATCHv2 " Martin Jansa
2012-03-23 12:56 ` [PATCH 6/6] kernel.bbclass: don't create /etc/modutils/* Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.