Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why set CONFIG_LOCALVERSION to ""? #533

Closed
michaelbaisch opened this issue Dec 7, 2019 · 8 comments
Closed

Why set CONFIG_LOCALVERSION to ""? #533

michaelbaisch opened this issue Dec 7, 2019 · 8 comments

Comments

@michaelbaisch
Copy link

Hello again,

I would really like to set CONFIG_LOCALVERSION to something meaningful. But the meta-raspberrypi layer is making it really hard, because it's set inconveniently to "" here:

kernel_configure_variable LOCALVERSION "\"\""

Can someone tell me if there is a really good reason to do this, or if we can maybe get rid of this line? It also voids the use of LINUX_VERSION_EXTENSION.

Greetings,
Michael

@agherzan
Copy link
Owner

agherzan commented Dec 9, 2019

I can't remember why we did that but I think we should remove it now. I don't see any use of it anymore. And I agree, it renders LINUX_VERSION_EXTENSION useless. Do you mind pushing a PR?

@agherzan
Copy link
Owner

agherzan commented Dec 9, 2019

@kraj @pbrkr Do you remmeber why we reset that config?

@kraj
Copy link
Collaborator

kraj commented Dec 9, 2019

We did it after switching to linux-yocto include files which sets it to "-yocto-${LINUX_KERNEL_TYPE}" in do_kernel_configme
but ideally we should not be emptying out CONFIG_LOCALVERSION we should have a weak assignment to set LINUX_VERSION_EXTENSION

so something like below(untested) might be the way to go.

diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index ea7f778..6a7df4c 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -99,7 +99,7 @@ do_configure_prepend() {
CONF_SED_SCRIPT=""

# Localversion
-    kernel_configure_variable LOCALVERSION "\"\""
+    kernel_configure_variable LOCALVERSION "\"${LINUX_VERSION_EXTENSION}\""

if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
kernel_configure_variable OVERLAY_FS y

@michaelbaisch
Copy link
Author

You can see in meta/recipes-kernel/linux/linux-yocto.inc:58:

LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"

For completeness in meta/classes/kernel-yocto.bbclass:339, in do_kernel_configme(), it's where the value is acutally set:

echo "# Global settings from linux recipe" >> ${B}/.config
echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config

So I still think removing is the best solution. Nothing won by setting it manually.

michaelbaisch pushed a commit to michaelbaisch/meta-raspberrypi that referenced this issue Dec 10, 2019
@kraj
Copy link
Collaborator

kraj commented Dec 10, 2019

@michaelbaisch does it append yocto-xxx string if its not set here ? if so then its wrong.

@michaelbaisch
Copy link
Author

Not sure why this would be a problem? But I guess also setting

LINUX_VERSION_EXTENSION ?= ""

would help. Should I also add this in the pull request?

@kraj
Copy link
Collaborator

kraj commented Dec 10, 2019

because we are not building linux-yocto, so it will not be correct to append default string from linux-yocto. but if thats not happening then i am fine to punt it.

michaelbaisch pushed a commit to michaelbaisch/meta-raspberrypi that referenced this issue Dec 10, 2019
@agherzan
Copy link
Owner

@michaelbaisch I think this looks alright so I've kicked the builders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants