User Tools

Site Tools


qLinux
… a distribution study


<< Prev
Setup the Shutdown Process

Next >>
Make the System Bootable


Linux-5.10.85

Patches

Reference: 10.3. Linux-5.13.12. Against the book we use the long term kernel 5.10.85. First run  fixsrctree  inside the source tree:

fixsrctree -d .

This fixes nearly all pathes to be qLinux conform. However, some patterns like  /lib/modules  and  /usr/include  are not covered yet. Apply a patch to fix this:

patch -Np1 -i linux-5.10.85-qlnx-1-pathes.patch

Apply a patch to the sources tree to fix that some (included) files will not be found:

patch -Np1 -i linux-5.10.85-qlnx-2-missing-files.patch

Apply a patch to prevent an error during modules_install (the “depmode hack”):

patch -Np1 -i linux-5.10.85-qlnx-3-depmod-hack.patch

Unfortunately the  depmod.sh  script doesn't set this correct. This is required for older  depmod  versions, but our  depmod  is new enough and doesn't require it.

Apply a patch to fix the length parameter in string functions

patch -Np1 -i linux-5.10.85-qlnx-4-strn-length.patch

Apply a patch to fix the location of the /boot directory (this is  /qlnx/etc/.boot  in qLinux):

patch -Np1 -i linux-5.10.85-qlnx-5-boot.patch

To configure what  uname  returns have a look into  include/linux/uts.h ..

Configure the kernel:

make defconfig kvm_guest.config

Run  make menuconfig  to tweak the kernels config, e.g usb and sound drivers are not required yet1). It is also recommended to review the frame buffer devices.

The build process could be interrupted by missing (header) files inside the kernel source tree. Simply create symlinks to fulfill the requirements.

Build the kernel:

make INSTALL_MOD_PATH=/qlnx bzImage

Maybe the PKG_CONFIG_PATH have to be set to find the openssl header files. Additional  /libs/lib  have to be in the library search path (in  /qlnx/etc/ld-musl-x86_64.path ).

Install the modules:

make INSTALL_MOD_PATH=/qlnx install modules_install

Now, the  INSTALL_MOD_PATH  will not be recognized by  depmod , thus2):

depmod -b "$INSTALL_MOD_PATH" 5.10.85

The new kernel version will be prefixed with a '+' sign, e.g. with  uname . This happens because our kernel is beyond the original .git status. It will be set in  scripts/setlocalversion .


<< Prev
Setup the Shutdown Process

        

Next >>
Make the System Bootable

1)
this reduces the build time too
2)
this is maybe no longer required as depmod is adjusted accordingly