Freenix forum

Home » Community » General Info and Discussion » Scripts to build (kernel packages)
Scripts to build [message #44] Mon, 04 March 2019 15:11 Go to next message
locutus is currently offline  locutus
Messages: 16
Registered: January 2018
Location: US
Junior Member
Looking to build the following
using the scripts from
having trouble to build
Could anyone give me a step by step guides to building these packages, so I could find my mistakes?
Re: Scripts to build [message #45 is a reply to message #44] Tue, 05 March 2019 18:25 Go to previous messageGo to next message
samtux is currently offline  samtux
Messages: 3
Registered: January 2017
Location: Germany
Junior Member
Here are the steps that worked for me to build the kernel package for Freenix 14.2. I'm not sure which is the recommended way how to do it, though.

1. Download the build scripts from the command line prompt as non-root user:
lftp -c "open; mirror linux-libre" && cd linux-libre

2. Get the source of the latest 4.4.x kernel version and install it manually, without building a package:
Set a variable for the download path we use later on:
Find the latest 4.4.x kernel source and put it to another variable:
SRC_ARCH=`curl -s $SRC_URL/ | egrep -o "linux-libre-4\.4\.[0-9]+-gnu.tar.bz2" | head -n1`
Set a version variable:
VERSION=`egrep -o "4\.4\.[0-9]+" <<<$SRC_ARCH`
Download the source archive:
Unpack the source archive to /usr/src/:
su -c "cd /usr/src; tar -xvf "`pwd`"/$SRC_ARCH && ln -sv linux-$VERSION linux"

3. Copy the downloaded config files to /usr/src/:
su -c "cp -v config-generic-4.4.*.x64 /usr/src/linux/config-generic && cp -v config-huge-4.4.*.x64 /usr/src/linux/config-huge"

4. Build the kernel image package:
su - -c "cd "`pwd`"; bash linux-libre-image.SlackBuild"

5. Read the downloaded README.TXT for instructions on further installation steps.

I didn't use the linux-libre-source.SlackBuild script, since it doesn't extract the kernel source archive but only copies it to /usr/src/, and I don't know what's the benefit of installing a Package, which copies an archive that isn't used by any program or script, and only becomes usable after extracting it manually, and also other steps are needed, like copying the config files and the README.TXT, in order to work with the image build script.

I hope this helps.
Re: Scripts to build [message #46 is a reply to message #45] Wed, 06 March 2019 12:04 Go to previous message
locutus is currently offline  locutus
Messages: 16
Registered: January 2018
Location: US
Junior Member
Thx for the assist
I prep my system like this:
su - root
cd /usr/src
tar -xvpf linux-4.4.176.tar.xz
cd linux-4.4.176
zcat /proc/config.gz > .config
make olddefconfig
make -j4 bzImage
make -j4 modules && make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-generic-4.4.176
cp /boot/
cp .config /boot/config-generic-4.4.176
####Also cp for rebuilding the iso
cp arch/x86/boot/bzImage /root/kernel/huge.s
cd /boot
rm config
ln -s
ln -s config-generic-4.4.176 config
/usr/share/mkinitrd/ -k 4.4.176
/sbin/lilo then reboot then start the package building process
Previous Topic: Install on X200
Next Topic: Thoughts on Freenix64-15.0
Goto Forum:

Current Time: Thu Sep 28 07:59:33 EDT 2023

Total time taken to generate the page: 0.00972 seconds