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
iMX6: linux: cleanup kernel config #3722
Conversation
@@ -142,7 +142,6 @@ CONFIG_INITRAMFS_FORCE=y | |||
# CONFIG_RD_XZ is not set | |||
# CONFIG_RD_LZO is not set | |||
# CONFIG_RD_LZ4 is not set | |||
CONFIG_INITRAMFS_COMPRESSION="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
menuconfig removes it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make oldconfig
adds it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're running make oldconfig
or make menuconfig
with CONFIG_INITRAMFS_SOURCE=""
then CONFIG_INITRAMFS_COMPRESSION=""
will naturally drop out (as it's dependent on CONFIG_INITRAMFS_SOURCE
!= ""), but that's not how we build so you need to test the config with a temporary dummy path configured for CONFIG_INITRAMFS_SOURCE
else CONFIG_INITRAMFS_COMPRESSION
will keep being added back into .config
when building.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those instructions are wrong - it's fine up until the new config is copied over the post_patch()
'ed config which thus loses any config changes made specifically for the build system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those instructions are wrong - it's fine up until the new config is copied over the
post_patch()
'ed config which thus loses any config changes made specifically for the build system.
It's how it was always intended to be done. The config should not have to be manually edited every time someone changes the config. So either we fix the way the kernel config is edited in post_patch or we fix the kernel configs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use the kernel config that lives in the directory after running ./scripts/unpack linux
because it would add all the options that we change and we would have to manually edit the config all the time.
diff --git a/projects/NXP/devices/iMX6/linux/linux.arm.conf b/projects/NXP/devices/iMX6/linux/linux.arm.conf
index 064cec1b71..8284ad383a 100644
--- a/projects/NXP/devices/iMX6/linux/linux.arm.conf
+++ b/projects/NXP/devices/iMX6/linux/linux.arm.conf
@@ -32,7 +32,7 @@ CONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_XZ is not set
CONFIG_KERNEL_LZO=y
# CONFIG_KERNEL_LZ4 is not set
-CONFIG_DEFAULT_HOSTNAME="@DISTRONAME@"
+CONFIG_DEFAULT_HOSTNAME="LibreELEC"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
@@ -134,14 +134,17 @@ CONFIG_CGROUPS=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INITRAMFS_SOURCE="/home/lukas/libreelec/build.LibreELEC-iMX6.arm-9.80-devel/image/initramfs.cpio"
CONFIG_INITRAMFS_FORCE=y
+CONFIG_INITRAMFS_ROOT_UID=0
+CONFIG_INITRAMFS_ROOT_GID=0
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
+CONFIG_INITRAMFS_COMPRESSION=""
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's true, but the issue is that you can't currently run make oldconfig
on the "raw" config (from the project folder) as it's not the same config that will be used during the actual build, and consequently we end up with options being added/removed that should not be added or removed.
The current workflow of "copy in a new config and run make oldconfig
" is a little naiive as it doesn't result in an accurate representation of the config used during the build. Maybe this has only become an issue since we dropped initramfs compression - prior to this change I guess it went unnoticed (or didn't drop out?)
The simplest solution might be to change the kernel configs for all projects by specifying a dummy path for CONFIG_INITRAMFS_SOURCE="/dummy/path/initramfs.cpio"
, and adding CONFIG_INITRAMFS_ROOT_UID=0
/CONFIG_INITRAMFS_ROOT_GID=0
(removing the latter from linux/package.mk
).
Needs a rebase. |
still needs a rebase :) |
still still needs a rebase :) |
1 similar comment
still still needs a rebase :) |
still still still needs a rebase :) |
Mostly just removes unneeded platform support. Adds
CONFIG_DRM_DW_HDMI_CEC