View previous topic :: View next topic |
Author |
Message |
Cayman_1945 n00b

Joined: 02 Dec 2023 Posts: 3
|
Posted: Mon Dec 04, 2023 6:22 pm Post subject: Cant compile my kernel |
|
|
I tried making my kernel lighter by unmarking some things i didnt need using but after running it it shows these error:
Code: | "No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'. Stop.
make: *** [arch/x86/Makefile:242: archheaders] Error 2" |
im new to gentoo and i dont really now how to fix that please help me and thanks for you time!  |
|
Back to top |
|
 |
psycho Guru


Joined: 22 Jun 2007 Posts: 553 Location: New Zealand
|
Posted: Thu Dec 07, 2023 2:15 am Post subject: |
|
|
Hi Cayman.
Welcome to Gentoo. If you're following the handbook (so you meant "make menuconfig" rather than "make makeconfig"), everything should at least build successfully, even if you've disabled some functionality that you actually need. I'm not sure but it looks like you might have forgotten to configure before attempting make, or perhaps have the wrong kernel headers installed or something. Which kernel are you building? Are you following the handbook...
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel
...to the letter, or have you done something differently? What's the output of... Code: | eselect kernel list | ..?
The file that's actually being edited by kernel configuration tools like menuconfig is .config (/usr/src/linux/.config). As a "dotted" file it's hidden (it won't show up in ls /usr/src/linux, unless you ls -a) but it's there. It can be a good idea to keep backups of working kernel configs: everything else can simply be wiped and reinstalled, but that one little file can contain many hours of careful kernel pruning/tuning, so that's a file to look after (you'll often see configs backed up in boot directories with names like config-6.1.65 or whatever).
Kernel customisation can go disastrously wrong when you're not sure what you're doing (it's possible to, for example, accidentally remove something that the kernel needs to read anything off your primary disk, making the system unbootable), so it's a good idea to start with a working .config, make a few edits, then build and test your new kernel before editing it any further. This is time-consuming but it can actually save you a lot of time troubleshooting. Otherwise, if you're wading through the options for hours changing things all over the place, it can be very difficult to figure out what you did that broke things. If you're using make menuconfig I recommend going through from top to bottom systematically, configuring one small section at a time. Once you get familiar with it (and with the options your own systems require), you can potentially blast through the whole menu in one sitting, but when you're starting out it pays to be careful, testing your changes a bit at a time (so that it's easy to reverse any stuff-ups) rather than editing the whole .config at once.
I'm not exactly sure what's going on with your error there so can't provide you with a specific fix for it: if nobody else can either, you may have to start over, wiping and reinstalling your kernel source. If you do that, make a backup of your .config first, in case the customisations you made were fine, and it's just something wrong with your build system (e.g. you forgot to point /usr/src/linux to the right directory, or are using the wrong headers or something... they need to match the major version of your kernel source). |
|
Back to top |
|
 |
e8root Tux's lil' helper


Joined: 09 Feb 2024 Posts: 94
|
Posted: Wed Feb 14, 2024 6:45 pm Post subject: |
|
|
This error seems to be the error which happens when you try to manually make kernel installed by sys-kernel/gentoo-kernel because I just had this same error when trying that. I then specifically tested it on latest and greatest version 6.7.4 of both sys-kernel/gentoo-sources and sys-kernel/gentoo-kernel to be sure that is the case and it seems to be the case - you cannot use make to build kernels in /usr/src/ ending with -gentoo-dist
Funnily enough I googled this issue before figuring it out myself and it seems very common mistake/misunderstanding with lots and lots of topics about it. I am baffled why this isn't common Gentoo knowledge... maybe this info it should be included in to gentoo installation handbook? Just stating you should use sys-kernel/gentoo-sources doesn't mean it implies one cannot or should not use files left by sys-kernel/gentoo-kernel left in /usr/src/ and in fact it makes perfect sense to assume this should be doable.
Anyways, my understanding is that kernel built with Gentoo from sys-kernel/gentoo-kernel is quite heavily modified version of the kernel and it is built using compiler configured in /etc/portage/make.conf and generally configured USE flags and the patches include support for -march=native and maybe -O3 (though this I am not sure and I need to check logs) so its somewhat different beast than building with make. _________________ Unix Wars - Episode V: AT&T Strikes Back |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5665 Location: Bavaria
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|