[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
slackwarearm:cstmz_kernel [2022/07/05 07:14 (UTC)] – mozes | slackwarearm:cstmz_kernel [2023/06/06 16:36 (UTC)] (current) – mozes | ||
---|---|---|---|
Line 5: | Line 5: | ||
^ ^ ^ | ^ ^ ^ | ||
| Document | Describe how to customise the Slackware AArch64 Kernel packages | | | Document | Describe how to customise the Slackware AArch64 Kernel packages | | ||
- | | Version | 1.00, July 2022 | | + | | Version | 1.02, June 2023 | |
| Author | Stuart Winter < | | Author | Stuart Winter < | ||
| References | [[http:// | | References | [[http:// | ||
+ | | See also | [[cstmz_kernel_rpi_selfbuild|Raspberry Pi Kernel fork self build]] | | ||
==== Caveats / Warnings ==== | ==== Caveats / Warnings ==== | ||
Line 16: | Line 17: | ||
* When customising the Kernel, it's best to remain at the same major version and patch level. | * When customising the Kernel, it's best to remain at the same major version and patch level. | ||
+ | <note tip>If you want to add support for a Hardware Model that isn't yet supported, building a custom Kernel is just one part of the integration. | ||
=== Raspberry Pi Kernel fork === | === Raspberry Pi Kernel fork === | ||
Line 27: | Line 29: | ||
//You should consider using the Raspberry Pi Kernel fork as an **experimentation** rather than a suggestion or endorsement.// | //You should consider using the Raspberry Pi Kernel fork as an **experimentation** rather than a suggestion or endorsement.// | ||
+ | |||
+ | === Raspberry Pi & alternate Kernel Fork: automated build system === | ||
+ | |||
+ | |||
+ | To simplify building the Raspberry Pi Kernel fork, you should follow [[cstmz_kernel_rpi_selfbuild|this guide]]. | ||
+ | |||
+ | You can also use this guide to help get started using the script for building Slackware packages from alternate source repositories, | ||
===== Introduction ===== | ===== Introduction ===== | ||
Line 32: | Line 41: | ||
If you'd like to customise the Linux Kernel for your system - perhaps to add some hardware support or a Kernel feature, or perhaps add a patch, the easiest way is to use the Slackware ARM Kernel package build scripts. | If you'd like to customise the Linux Kernel for your system - perhaps to add some hardware support or a Kernel feature, or perhaps add a patch, the easiest way is to use the Slackware ARM Kernel package build scripts. | ||
+ | |||
+ | <note tip>If you are rebuilding your Kernel to enable some additional hardware support or a Kernel feature, please drop a note to [[https:// | ||
=== The Slackware ARM/AArch64 build system === | === The Slackware ARM/AArch64 build system === | ||
Line 71: | Line 82: | ||
rsync \ | rsync \ | ||
| | ||
- | | + | ftp.arm.slackware.com:: |
</ | </ | ||
+ | |||
+ | < | ||
<note important> | <note important> | ||
- | |||
- | === Remove the existing Kernel packages from the downloaded tree === | ||
- | |||
- | When building the vast majority of packages from the Slackware AArch64 source tree, the build system will remove any existing package prior to creating a new one (if configured in ''/ | ||
- | |||
- | Continuing within the directory above: | ||
- | |||
- | < | ||
- | $ cd slackwareaarch64-current/ | ||
- | $ rm -fv a/ | ||
- | $ rm -fv k/ | ||
- | $ rm -fv d/ | ||
- | </ | ||
==== Install the prerequisite packages ==== | ==== Install the prerequisite packages ==== | ||
Line 141: | Line 141: | ||
< | < | ||
$ cd /tmp ; mkdir rpikernel ; cd rpikernel | $ cd /tmp ; mkdir rpikernel ; cd rpikernel | ||
- | $ git clone --depth=1 --branch rpi-5.18.y https:// | + | $ git clone --depth=1 --branch rpi-6.1.y https:// |
</ | </ | ||
Line 154: | Line 154: | ||
$ kver=$( echo "$(sed -ne' | $ kver=$( echo "$(sed -ne' | ||
$ popd | $ popd | ||
- | $ mv -fv linux-rpi-5.18.y | + | $ mv -fv linux-rpi-* linux-$kver |
</ | </ | ||
Line 192: | Line 192: | ||
< | < | ||
$ egrep ' | $ egrep ' | ||
- | export VERSION=${VERSION: | + | export VERSION=${VERSION: |
</ | </ | ||
Line 203: | Line 203: | ||
$ cd /usr/src/ | $ cd /usr/src/ | ||
$ ls -d linux-* -la | $ ls -d linux-* -la | ||
- | drwxr-xr-x 24 root root 4096 Jun 30 10:41 linux-5.18.8/ | + | drwxr-xr-x 24 root root 4096 Jun 30 10:41 linux-6.1.27/ |
</ | </ | ||
Line 218: | Line 218: | ||
Example: | Example: | ||
< | < | ||
- | $ cd / | + | $ cd / |
$ make menuconfig | $ make menuconfig | ||
</ | </ | ||
Line 260: | Line 260: | ||
===== Building Kernel Packages ===== | ===== Building Kernel Packages ===== | ||
- | Now that you have customised the Kernel, | + | Now that you have customised the Kernel, |
As **root**: | As **root**: | ||
+ | |||
+ | == Create a directory to receive the new packahges == | ||
+ | |||
+ | To avoid overwriting the official packages within the Slackware tree, we will store them in an alternate location. | ||
+ | |||
+ | < | ||
+ | $ mkdir -p / | ||
+ | </ | ||
+ | |||
+ | == Enter the Slackware ARM Kernel source directory == | ||
+ | |||
+ | |||
< | < | ||
$ cd ~/ | $ cd ~/ | ||
</ | </ | ||
+ | |||
+ | == Build the Kernel packages == | ||
+ | |||
+ | <note warning> | ||
For the standard/ | For the standard/ | ||
< | < | ||
- | $ ./arm/build --srcdir /usr/src --noconfig --nopatches | + | $ ./arm/build --srcdir / |
</ | </ | ||
Line 275: | Line 292: | ||
< | < | ||
- | $ ./arm/build --srcdir / | + | $ ./arm/build --srcdir / |
</ | </ | ||
< | < | ||
- | < | + | < |
< | < | ||
+ | < | ||
The Kernel packages will build. | The Kernel packages will build. | ||
Line 312: | Line 330: | ||
===== Installing/ | ===== Installing/ | ||
- | If the build process worked, your Kernel packages will have been installed into your Slackware AArch64 tree within | + | If the build process worked, your Kernel packages will have been installed into the directory specified ('' |
As **root**: | As **root**: | ||
< | < | ||
- | $ cd ~/tgzstash/ | + | $ cd /tmp/testpkgs |
</ | </ | ||
Line 354: | Line 371: | ||
$ cp ../ | $ cp ../ | ||
$ make oldconfig | $ make oldconfig | ||
+ | $ make menuconfig # edit the configuration, | ||
$ cp .config ../ | $ cp .config ../ | ||
</ | </ | ||
Line 375: | Line 393: | ||
< | < | ||
- | $ ./arm/build | + | $ mkdir -p / |
+ | $ ./ | ||
</ | </ | ||
- | As with the Kernel packages, your new '' | + | As with the Kernel packages, your new '' |
< | < | ||
- | $ cd ~/tgzstash/a | + | $ cd /tmp/ |
$ upgradepkg hwm-bw-raspberrypi-*.t? | $ upgradepkg hwm-bw-raspberrypi-*.t? | ||
</ | </ | ||
+ | <note important> |