[OE-core] kernel config, scripts/setlocalversion

Trevor Woerner twoerner at gmail.com
Tue Mar 21 07:23:13 UTC 2017


Hi,

Currently openembedded-core/meta/classes/kernel.bbclass contains:

	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 ${S}/.scmversion

According to the log message for this commit, the kernel's
scripts/setlocalversion was leaving and/or appending a '+' to the end of
directory names (e.g. /lib/modules/2.6.37+). The conversation can be seen
here:

	http://lists.openembedded.org/pipermail/openembedded-core/2011-December/053263.html

The problem is that creating an empty .scmversion file circumvents the kernel
build's CONFIG_LOCALVERSION handling. In other words, if the user enables this
kernel option, touching .scmversion prevents this option from having any
effect (which doesn't seem right). It seems like overkill for simply wanting
to remove a trailing '+' character.

I've been playing around with this by removing the "touch" line and in my
testing I don't see any '+' characters appended to /lib/modules in the image.
In other words, it *seems* as though the issue this commit was trying to fix
doesn't seem to be an issue anymore?

But maybe I'm not doing enough testing? Could anyone clarify the issue with
commit 56fe5300ab5?

I'd like to further point out that this only happens if/when the user enables
the kernel's CONFIG_LOCALVERSION option, and that, by default, this option is
turned off in linux-yocto* kernels.

Best regards,
	Trevor



More information about the Openembedded-core mailing list