You are not logged in.
Hi everyone, I am trying to recompile my kernel for it to support some debugging options(kgdb, debug symbols and etc). I follow the guide in the wiki, for some reason the changes to the config get canceled, and I don`t have the debug symbols\the kgdb support. I tried it a few times, to see if I configured something wrong in the first time, but each and every time the config defaults back to its old form. My estimation for the cause of the problem, is that my prepare function have make oldefconfig before the make menuconfig/nconfig(tried with both) . My guess, is that is somehow causes the kernel to compile the old config no matter what changes I do after it. I even tried to add vim .config to the prepare function too see if the make menuconfig/nconfig really works, and in both cases the changes were there. But somehow after the process finished it dosen`t have the new features I set in the .config. My question is: what do I need to change, or might cause the problem, and if it is indeed the make olddefconfig, how can I edit my new config based on the old config/arch default config as a template?
Offline
What is the PKGBUILD. What is the .config with your changes. What is the .config after that has been processed by make olddefconfig?
Offline
What is the PKGBUILD. What is the .config with your changes. What is the .config after that has been processed by make olddefconfig?
This is the PKGBUILD https://pastebin.com/qNf8UXcR (the vim .config is for debugging purposes, I added it after the first fail). The old .config had the (DEBUG_SYMBOLS, kgdb(options), readable assembly, and magic sysreq as 0x1). The new .config, after the makepkg is done is just the same as it was before, with the default arch config.
Offline
I need to see the .config before and after. DEBUG_SYMBOLS or CONFIG_DEBUG_SYMBOLS would be invalid.
Offline
I need to see the .config before and after. DEBUG_SYMBOLS or CONFIG_DEBUG_SYMBOLS would be invalid.
Well it seems this is the root of the problem. When the prepare function shows me the config (using the vim .config), it has all the setting I set. But if I put it in the background and check the config, it dosen`t have the changes (https://pastebin.com/DyC0iwGg). Do you have any idea what can cause this problem ?
Offline
msg2 "Setting config..."
cp ../config .config
make olddefconfig
make menuconfig
vim .config
make -s kernelrelease > ../version
msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
You save the contents in vim but keep do not exit vim and compare the contents with src/arch-linux/.config and they are not the same?
Offline
msg2 "Setting config..." cp ../config .config make olddefconfig make menuconfig vim .config make -s kernelrelease > ../version msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
You save the contents in vim but keep do not exit vim and compare the contents with src/arch-linux/.config and they are not the same?
I just looked and I have a config file in /build/linux/trunk and in /build/linux/trunk/src that they are both the config without the changes the link I sent before(https://pastebin.com/DyC0iwGg), and a .config(that starts with a dot) file in /build/linux/trunk/src/archlinux-linux that is the custom config,, that I want to compile the kernel by it(https://pastebin.com/uPE9HYBy). If you have any idea, how to solve this problem, and compile the kernel by the current config, I will be grateful.
Offline
If you boot the custom kernel what is the output of
zgrep CONFIG_DEBUG_INFO /proc/config.gz
Offline
If you boot the custom kernel what is the output of
zgrep CONFIG_DEBUG_INFO /proc/config.gz
It`s not set, I checked every time I compiled, and its just the old config. The exact message right now with the command is "# CONFIG_DEBUG_INFO is not set".
Offline
What is the output of (this should be the config that was used for last build)
grep CONFIG_DEBUG_INFO /build/linux/trunk/src/archlinux-linux/.config
Offline
What is the output of (this should be the config that was used for last build)
grep CONFIG_DEBUG_INFO /build/linux/trunk/src/archlinux-linux/.config
I just rebuild only the config, to try to find if it was the bug, so I don`t have it. Is there other way, I can try debug this other then getting this file. Or should I rebuild the kernel and get back to you. Right now this is the current setting, but something might cause it to change while building.
Offline
Run makepkg until it reaches the build() function then abort it and check then.
Edit:
Please do not use makepkg -o as I want the build function to invoke make and see if that changes the .config.
Last edited by loqs (2019-02-01 19:34:06)
Offline
Run makepkg until it reaches the build() function then abort it and check then.
Edit:
Please do not use makepkg -o as I want the build function to invoke make and see if that changes the .config.
So that what I already did and this is the correct config (https://pastebin.com/uPE9HYBy).
Offline
Run makepkg -e let that build continue install it and check the kernel package produced.
Offline
loqs wrote:Run makepkg until it reaches the build() function then abort it and check then.
Edit:
Please do not use makepkg -o as I want the build function to invoke make and see if that changes the .config.So that what I already did and this is the correct config (https://pastebin.com/uPE9HYBy).
I get an error that the package group has already been built, its from the last kernel built. I think that if I force(-f) it will produce the same result.
Offline
I can only suggest testing with makepkg -ef. I can not explain how the .config at /build/linux/trunk/src/archlinux-linux/.config can not match the one from the package.
You could use /build/linux/trunk/src/archlinux-linux/scripts/extract-ikconfig to extract the config from /build/linux/trunk/pkg/linux/boot/vmlinuz-linux and check that.
Edit:
Or use bsdtar to extract the contents of the .pkg if makepkg has already cleaned the pkg directory.
Edit:
From dmesg the Linux version string matches the kernel you just built? Trying to rule out the possibility the package is built correctly but the generated kernel is not the one being booted.
Last edited by loqs (2019-02-01 20:11:12)
Offline
I can only suggest testing with makepkg -ef. I can not explain how the .config at /build/linux/trunk/src/archlinux-linux/.config can not match the one from the package.
You could use /build/linux/trunk/src/archlinux-linux/scripts/extract-ikconfig to extract the config from /build/linux/trunk/pkg/linux/boot/vmlinuz-linux and check that.
Edit:
Or use bsdtar to extract the contents of the .pkg if makepkg has already cleaned the pkg directory.
Edit:
From dmesg the Linux version string matches the kernel you just built? Trying to rule out the possibility the package is built correctly but the generated kernel is not the one being booted.
How can I check if the iinux version string matches the kernel (I checked uname -r, but I am not sure this is how I do it)? I just recompiled the kernel using makepkg -ef, and it didn`t change the config, so I am kind of clueless how should I proceed.
Offline
In the first few lines of dmesg should be an entry similar to this one (this one is for a custom kernel I am using)
[ 0.000000] Linux version 4.20.6-1-stable (builduser@buildbox) (gcc version 8.2.1 20181127 (GCC)) #1 SMP Thu Jan 31 14:24:10 UTC 2019
You could also get the build time from `uname -a`.
Offline
In the first few lines of dmesg should be an entry similar to this one (this one is for a custom kernel I am using)
[ 0.000000] Linux version 4.20.6-1-stable (builduser@buildbox) (gcc version 8.2.1 20181127 (GCC)) #1 SMP Thu Jan 31 14:24:10 UTC 2019
You could also get the build time from `uname -a`.
Sorry to have waste your time, but it seems part of the problem was a stupid mistake of my own. But I couldn`t have figured that out without your help. The guide in the wiki tells that the installationshould be done by # pacman -U kernel-headers_package
# pacman -U kernel_package. Those command didn`t work and due to my own stupidity I thought they weren't necessary, so each time I just compiled the kernel, reconfigured the boot, but didn't install the damn kernel. But even now, when the config in /proc/config.gz is the updated config, the changes I made still dont apply(heres the config in /rpoc/config.gz: https://pastebin.com/gjisxrWL), gdb cant use symbols, and I cant use kgdb.
Last edited by dmg1337 (2019-02-02 15:20:49)
Offline