SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008
Rep:
Quote:
Originally Posted by AlleyTrotter
You may not like my method which is patterned after the Kernel documentation But
You are still wrong about older GCC
You obviously have little experience building kernel
Code:
ls /boot/*4.4.240*
/boot/System.map-generic-4.4.240 /boot/config-generic-4.4.240.x64 /boot/vmlinuz-generic-4.4.240
/boot/System.map-huge-4.4.240 /boot/config-huge-4.4.240.x64 /boot/vmlinuz-huge-4.4.240
The above "not needed" is also installed by the SlackBuild.
Are we in the contest who build kernels longer? What would be the point? Kernels (from user point of view) are just a piece of software as any other: just follow the recipe (in this case config file) and if needed modify to your heart content.
Quote:
will not work because (as you mentioned) latest kernels refuse to compile with older versions of gcc and oldconfig is just a way to copy previous version of config file.
personally I don't see a point of recompiling default Slackware kernels.
this is what I exactly said. I don't know why @enorbet could not build 5.10.x on Slackware 14.2. He clearly got some GCC arrors
Quote:
it won't compile with the older gcc on 14.2
Easiest solution to his problem is to install latest current kernel from Slackware packages
"not needed" options are really not needed.
/boot/System.map
useful for kernel debugging (with the pace of kernel changing today it does not provide anything usefull for the user). Personally, I got rid from debugging info from the kernel (I don't need it). I have not seen Slackware user actually debugging kernel crashes.
System.map does not play a role if you have /proc filesystem support
by the way default System.map file is located in (e.g.)
/usr/src/linux-x.x.x/System.map
So no need to duplicate it as System.map has no role in boot proccess.
and
/boot/config
also does not play a role in boot proccess. It is kept there for documentation purpose on default system for curious user who wants to take look at the file. If user is building custom kernel, obviously /boot/config is not needed as the file is located in /usr/src/linux-x.x.x/
I still don't see a point of re-building default kernel. Provided by Slackware kernel just works (= boots). Missing hardware is something else, but re-building default kernel definitely does not solve this particular problem.
I was not talking about rebuilding the default kernel.
enorbet was talking about building the current kernel to use on 14.2
and my initial comment about the GCC was directed to him not you
john
Last edited by AlleyTrotter; 02-07-2021 at 10:38 AM.
sudo -s # a side effect of '-s' is that it allows root to run X programs
. /etc/profile # sourcing the global profile ensures
# that root has the ''sbin'' directories in the $PATH
cd /usr/src
rm linux # remove the existing symlink
ln -sf linux-5.4.96 linux # create a symlink pointing to your new linux source
zcat /proc/config.gz > /usr/src/linux-5.4.96/.config #grab the config
cd /usr/src/linux-5.4.96
make localmodconfig
make -j2 bzImage modules && make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-5.4.96 # copy the new kernel file
cp System.map /boot/System.map-custom-5.4.96 # copy the System.map (optional)
cp .config /boot/config-custom-5.4.96 # backup copy of your kernel config
make oldconfig && make prepare && make clean
rm -rf .config.old .version
cd /boot
rm System.map config vmlinuz # delete the old links
ln -sf System.map-custom-5.4.96 System.map # create a new link
ln -sf config-custom-5.4.96 config
ln -sf vmlinuz-custom-5.4.96 vmlinuz
/etc/lilo.conf:
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda4
label = Linux
read-only
mkinitrd:
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 5.4.96|bash && lilo
Last edited by mats_b_tegner; 02-07-2021 at 04:50 PM.
5.4.96 seems to compile and boot fine on -current:
Code:
Linux hp-laptop.example.org 5.4.96 #1 SMP Sun Feb 7 17:31:00 CET 2021 x86_64 Intel(R) Core(TM)2 Duo CPU T6400@2.00GHz GenuineIntel GNU/Linux
As Gomer would say "Surprise Surprise!"
My convoluted method to build, install and run the current kernel(5.10.14) on Slackware64-14.2 works just fine.
Following the best practices of those with greater knowledge than myself helps.
Come on. I can't be the only one running the 5.10 series on 64-14.2 can I?
Anyway
Just another me too.
HTH
John
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code:
Linux spidergawd 5.10.13 #1 SMP PREEMPT Sat Feb 6 20:31:40 EST 2021 x86_64 AMD Ryzen 5 1600 Six-Core Processor AuthenticAMD GNU/Linux
So it's the biggest sporting day of the year here in the US, when everybody is getting ready to watch the yearly top TV commercials, occasionally interrupted by some odd handegg carrying competition that I still haven't figured out the rules for after twenty-odd years here. It's kind of a more violent and hands-on team-oriented version of the traditional egg-and-spoon race, and involves a lot of standing around, apparently waiting for the next commercial to come on.
Outside the US, everybody scratches their heads about the whole thing, and...
... settles down in front of telly to watch "The 6 Nations" with a tankard of ale.
Recording the Superbowl (KC fan for many years: don't laugh!). Getting too old to stay up all night like I used to, so will watch it tomorrow as I'm likely to be snowed in. Not that our cv-19 restrictions would let me go out anyway. *sigh*
Anyway, found time to build .14 this evening. Seems ok.
... settles down in front of telly to watch "The 6 Nations" with a tankard of ale.
Recording the Superbowl (KC fan for many years: don't laugh!). Getting too old to stay up all night like I used to, so will watch it tomorrow as I'm likely to be snowed in. Not that our cv-19 restrictions would let me go out anyway. *sigh*
Anyway, found time to build .14 this evening. Seems ok.
I have compiled it (5.10.14) on Slackware64-14.2
works just fine
Not too excited over the super bowl here, A giants fan
HTH
john
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,107
Original Poster
Rep:
Quote:
Originally Posted by GazL
... settles down in front of telly to watch "The 6 Nations" with a tankard of ale.
Recording the Superbowl (KC fan for many years: don't laugh!). Getting too old to stay up all night like I used to, so will watch it tomorrow as I'm likely to be snowed in. Not that our cv-19 restrictions would let me go out anyway. *sigh*
Anyway, found time to build .14 this evening. Seems ok.
After all the nonsense of the last year, the NFL can go straight to h*ll.
enorbet was talking about building the current kernel to use on 14.2
Actually no I wasn't. It is extremely rare that I use any stock Slackware kernel with the occasional exception from installing from an iso and then I rebuild it in the first hour. In this specific case, I didn't download the kernel or any part of it from Current. For Slackpkg(+) I blacklist all kernel entries. I downloaded the source from kernel.org.
I have mentioned that I am mistaken that nobody can build a very new kernel by saying what I did about 14.2's gcc. It is most likely it is just my badly altered system I built a few years ago when Current came out with the Pure Alsa option that was never meant for 14.2. It did what I wanted for years even built some newer kernels like 5.5.12 just fine.
I wrongly jumped to a general conclusion that got quickly set straight as a "Doh! PEBKAC" moment. I haven't used 14.2 as my daily driver in almost a year, have 5 different Slack installs on this box, and just forgot that 14.2 had been so jury-rigged by yours truly.
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008
Rep:
Quote:
Originally Posted by AlleyTrotter
I was not talking about rebuilding the default kernel.
enorbet was talking about building the current kernel to use on 14.2
and my initial comment about the GCC was directed to him not you
john
...compiles and runs fine using the kernel config in Slackware64-current iso
slackware64/source/k/config-huge-5.10.13x64. ( I use huge kernel)
you suggested also the use of localmodconfig https://www.linuxquestions.org/quest...ml#post6215717
this is absolute useless if building huge: you have all devices build in so scanning for modules will not discover/add anything to kernel config (not to mention that localmodconfig in fact should be used only under special conditions. Is this harmful? No (in the case of huge kernel), yes it is if you don't know what this command do.
just to make it clear.
Regarding kernel building, my point is that steps that you suggest are not needed. They do not provide any specific advantage, nor they are not harmful, just make things unnecesary complicated.
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,107
Original Poster
Rep:
Let's get back track, shall we?
Year 2021, Round 11.
Another batch of updates has been scheduled for release on Wednesday, 10 February 2021, at approximately 15:00, GMT. If no problems are found while testing the release candidates, they might be available sometime on Tuesday (depending on your time zone).
just to make it clear.
Regarding kernel building, my point is that steps that you suggest are not needed. They do not provide any specific advantage, nor they are not harmful, just make things unnecesary complicated.
If not harmful then why the attack and condemnation over recommended procedures?
I am not the only one who copies those files to /boot directory
EG see the slackbuild for slackware slint and several other distros
Many people delete the source after building and could possibly need the copied files for other purposes such as the next time they build an out of tree kernel.
You jumped in where I was trying to suggest a successful method to build the 5.10 series kernel for slack14.2 for the OP
So I am done here
john
Per Cwizardone I intend to get back on track can you
Last edited by AlleyTrotter; 02-08-2021 at 12:32 PM.
I use the configs from current and constantly get the error when using build-all-kernels.sh on 14.2.
I had a look at this and found that CONFIG_BPF_PRELOAD=y runs a python3 script which causes the build to fail if python3 is not installed on the system. I've confirmed that if python3 is installed on Slackware 14.2 then the 5.10.x kernel build scripts from current's source/k/ work with no changes required.
Otherwise, you can edit out that line from the config, run make oldconfig and answer N when asked if you want BPF_PRELOAD. The resulting config will work fine on Slackware 14.2 without python3 installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.