You are not logged in.
I have a custom kernel, can anybody give me some advice how to simplify merge of old config with new?
Last edited by vitaliy.kuzmich (2020-04-19 19:29:12)
Offline
How was the new config generated?
You can update an old .config for a newer kernel with `make oldconfig` or `make olddefconfig` the latter setting new options to their recomended default.
Offline
How was the new config generated?
You can update an old .config for a newer kernel with `make oldconfig` or `make olddefconfig` the latter setting new options to their recomended default.
Thank you! I will use it. Also I have some difficulties during migrating to the newer kernel version by using standard https://wiki.archlinux.org/index.php/Ke … ild_System, sometimes it just does not update checksum. So have to do everything from step 1. Any advice on this ? Or maybe just use plain compilation ?
Offline
Could you provide the more details on when the checksum is not updated?
Offline
Could you provide the more details on when the checksum is not updated?
just checked, it works fine, have no idea what went wrong last time.
Offline
About the PKGBUILD changes, I found that the update for the PKGBUILD works out a lot more often if you don't touch the original "source=(...)" and "sha256sum=(...)" lines and instead put your stuff onto separate lines using "+=" to add to the source/sha256sums arrays. Here is an example about what I mean:
source+=(
my-config.fragment
0110-Initialize-ata-before-graphics.patch
futex-wait-multiple-5.2.1.patch
)
sha256sums+=(
SKIP
93344aa64331f7324b5a3647b9e9b15227f6fefc60037305d223d9e1cd273c73 #0110-Initialize-ata-before-graphics.patch
b8a9225b4b5cbabac26398d11cc26566e4407d150dacb92f3411c9bb8cc23942 #futex-wait-multiple-5.2.1.patch
)
I added these lines in front of the "prepare()" function.
About the config, I first did my customizations using menuconfig etc., and then I did a "diff -u ..." to get a list of what's different between the original Arch config and my own config. I then used that diff as a base to write a "fragment" file that looks like this:
$ cat my-config.fragment
# CONFIG_KERNEL_XZ is not set
CONFIG_KERNEL_LZ4=y
# CONFIG_NO_HZ_IDLE is not set
CONFIG_NO_HZ_FULL=y
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_TREE_RCU=y
CONFIG_RCU_NOCB_CPU=y
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
The kernel source comes with a script named "merge-config.sh" to add this kind of fragment file onto an existing config file. I changed the part in the PKGBUILD where the Arch config is copied into this here:
echo "Setting config..."
#cp ../config .config
./scripts/kconfig/merge_config.sh -m ../config ../my-config.fragment
make olddefconfig
I commented out the original "cp" line and added the merge-config.sh line. The merge-config.sh script does the same as copying while also applying the changes from the fragment file.
Offline
Could you provide the more details on when the checksum is not updated?
Yes, it happen again, git asked me to do merge(of the kernel source) manually, which obviously I do not want to do.. It did not happen when I upgrade from 5.6.x, but it happen when I upgrade to 5.6.8 from 5.6.7.
Last edited by vitaliy.kuzmich (2020-05-01 18:09:52)
Offline
About the PKGBUILD changes, I found that the update for the PKGBUILD works out a lot more often if you don't touch the original "source=(...)" and "sha256sum=(...)" lines and instead put your stuff onto separate lines using "+=" to add to the source/sha256sums arrays. Here is an example about what I mean:
source+=( my-config.fragment 0110-Initialize-ata-before-graphics.patch futex-wait-multiple-5.2.1.patch ) sha256sums+=( SKIP 93344aa64331f7324b5a3647b9e9b15227f6fefc60037305d223d9e1cd273c73 #0110-Initialize-ata-before-graphics.patch b8a9225b4b5cbabac26398d11cc26566e4407d150dacb92f3411c9bb8cc23942 #futex-wait-multiple-5.2.1.patch )
I added these lines in front of the "prepare()" function.
About the config, I first did my customizations using menuconfig etc., and then I did a "diff -u ..." to get a list of what's different between the original Arch config and my own config. I then used that diff as a base to write a "fragment" file that looks like this:
$ cat my-config.fragment # CONFIG_KERNEL_XZ is not set CONFIG_KERNEL_LZ4=y # CONFIG_NO_HZ_IDLE is not set CONFIG_NO_HZ_FULL=y CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_TREE_RCU=y CONFIG_RCU_NOCB_CPU=y # CONFIG_HZ_300 is not set CONFIG_HZ_1000=y CONFIG_HZ=1000 CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
The kernel source comes with a script named "merge-config.sh" to add this kind of fragment file onto an existing config file. I changed the part in the PKGBUILD where the Arch config is copied into this here:
echo "Setting config..." #cp ../config .config ./scripts/kconfig/merge_config.sh -m ../config ../my-config.fragment make olddefconfig
I commented out the original "cp" line and added the merge-config.sh line. The merge-config.sh script does the same as copying while also applying the changes from the fragment file.
Thats interesting, so it is different from running make oldconfig ? hmm, are there a chance that make oldconfig would miss something ?
Last edited by vitaliy.kuzmich (2020-05-01 18:17:11)
Offline
merge_config.sh merging two configs to produce .config.
make oldconfig is updating .config and will prompt when a required option is not present in .config.
make olddefconfig is updating .config and use the default value when a required option is not present in .config.
Offline