Talk:Custom Kernel: Difference between revisions

From Alpine Linux
(Created page with "Needs to be adjusted for other archs === For kernel package maintainer === Each config-NAME.ARCH should be updated for all ARCHes so that it doesn't disrupt the building pro...")
 
(restored draft as i'm unsure of the accuracy of the content)
Tag: Manual revert
 
(21 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Needs to be adjusted for other archs
Needs to be adjusted for other archs


=== For kernel package maintainer ===
<small><span class="autosigned">—&nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Orson Teodoro|Orson Teodoro]] ([[User talk:Orson Teodoro|{{int:talkpagelinktext}}]] • [[Special:Contributions/Orson Teodoro|{{int:contribslink}}]]) 03:36, 4 March 2018</span></small>‎


Each config-NAME.ARCH should be updated for all ARCHes so that it doesn't disrupt the building process.  To do this:
== Locations/paths of build config files ==


  cd src/build-NAME
My goal is to build the Virt (not Standard/LTS) kernel using the defaults for Virt, and I don't understand which files are needed in exactly which paths.
  cp ../../config-NAME.ARCH .config
 
  make oldconfig
I had difficulty understanding the excerpt below. Is anyone willing to assist me in understanding it? For example, where/what is the "linux-4.15" folder?
  (hold enter to accept all default options)
 
  make menuconfig (optional to tweak it for the particular arch)
:''When you are done with your edits either by editing directly the APKBUILD and copying the lts.ARCH.config as .config in the linux-4.15 folder. You will then move the .config back overriding the lts.ARCH.config generated by make menuconfig.''
  cp .config ../../config-NAME.ARCH
 
<small><span class="autosigned">—&nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:-anthumchris-|-anthumchris-]] ([[User talk:-anthumchris-|{{int:talkpagelinktext}}]] • [[Special:Contributions/-anthumchris-|{{int:contribslink}}]]) 17:34, 23 November 2024‎</span></small>
 
== build_NAME ==
 
''After you are done using the menu in the build-NAME folder by doing make menuconfig''
 
It is really not clear what is meant by "the build-NAME folder" here.
 
== Locations/paths of build config files Answer ==
 
Usually these are the directories you would look for in linux-lts apk package development (replace "x86_64" with different $ARCH if needed) (replace $YOUR_WORK_DIR to which directory you downloaded aports to),
 
Below should contain <code>APKBUILD</code>, <code>lts.x86_64.config</code>, <code>virt.x86_64.config</code> and <code>.patch</code> files (and more $ARCH's by default, but to keep it simple, I will just state the x86_64 files)
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts}}
 
ALL <code>.patch</code> files that are in $YOUR_WORK_DIR/aports/main/linux-lts are also in below
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src}}
 
Below is a tar compressed linux file that decompresses into linux-$VERSION
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION.tar.gz}}
 
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION}}
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/build-lts.x86_64}}
{{cmd|$YOUR_WORK_DIR/aports/main/linux-lts/src/build-virt.x86_64}}
 
In the "<code>APKBUILD</code>" file, change this "<code>source</code>" line to this:
{{cat|$YOUR_WORK_DIR/aports/main/linux-lts/APKBUILD|...
source{{=}}"https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz
    0001-powerpc-boot-wrapper-Add-z-notext-flag-for-ppc64le.patch
    0002-x86-Compress-vmlinux-with-zstd-19-instead-of-22.patch
    0003-kexec-add-kexec_load_disabled-boot-option.patch
    0004-objtool-respect-AWK-setting.patch
    0005-powerpc-config-defang-gcc-check-for-stack-protector-.patch
 
    lts.x86_64.config
 
    virt.x86_64.config
    "
...}}
 
do <code>make menuconfig</code> within <code>$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION</code> and copy the .config file to <code>$YOUR_WORK_DIR/aports/main/linux-lts/lts.x86_64.config</code> and/or <code>$YOUR_WORK_DIR/aports/main/linux-lts/virt.x86_64.config</code>
 
<small><span class="autosigned">—&nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Pursuable1652|Pursuable1652]] ([[User talk:Pursuable1652|{{int:talkpagelinktext}}]] • [[Special:Contributions/Pursuable1652|{{int:contribslink}}]]) 16:55, 25 December 2024‎</span></small>
 
== build_NAME Answer ==
 
''After you are done using the menu in the build-NAME folder by doing make menuconfig''
 
the "build-NAME" folder should actually be <code>$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION</code>
 
<small><span class="autosigned">—&nbsp;Preceding [[Help:Signature|unsigned]] comment added by [[User:Pursuable1652|Pursuable1652]] ([[User talk:Pursuable1652|{{int:talkpagelinktext}}]] • [[Special:Contributions/Pursuable1652|{{int:contribslink}}]]) 16:55, 25 December 2024‎</span></small>
 
== Page ready for regular release? ==
Perhaps this [[Custom Kernel]] page is now ready for regular use, and the "This material is work-in-progress" banner can be removed, unless there is a shortcoming found. This draft state has held since it was helpfully created in 2014. 
Thanks for kind updates by [[User:Prabuanand|Prabuanand]], [[User:Pawciobiel|Pawciobiel]], [[User:Teopp7|Teopp7]], [[User:Fossdd|Fossdd]], [[User:Anthumchris|Anthumchris]], [[User:Gsora|Gsora]], [[User:Zcrayfish|Zcrayfish]], [[User:Omni|Omni]], [[User:Nabbi|Nabbi]], [[User:Psykose|Psykose]], [[User:Egberts|Egberts]] and thanks also for kind contributions by others that have not been active on the wiki for over five years. [[User:John3-16|John3-16]] ([[User talk:John3-16|talk]]) 19:22, 30 December 2025 (UTC)

Latest revision as of 04:46, 31 December 2025

Needs to be adjusted for other archs

— Preceding unsigned comment added by Orson Teodoro (talkcontribs) 03:36, 4 March 2018

Locations/paths of build config files

My goal is to build the Virt (not Standard/LTS) kernel using the defaults for Virt, and I don't understand which files are needed in exactly which paths.

I had difficulty understanding the excerpt below. Is anyone willing to assist me in understanding it? For example, where/what is the "linux-4.15" folder?

When you are done with your edits either by editing directly the APKBUILD and copying the lts.ARCH.config as .config in the linux-4.15 folder. You will then move the .config back overriding the lts.ARCH.config generated by make menuconfig.

— Preceding unsigned comment added by -anthumchris- (talkcontribs) 17:34, 23 November 2024‎

build_NAME

After you are done using the menu in the build-NAME folder by doing make menuconfig

It is really not clear what is meant by "the build-NAME folder" here.

Locations/paths of build config files Answer

Usually these are the directories you would look for in linux-lts apk package development (replace "x86_64" with different $ARCH if needed) (replace $YOUR_WORK_DIR to which directory you downloaded aports to),

Below should contain APKBUILD, lts.x86_64.config, virt.x86_64.config and .patch files (and more $ARCH's by default, but to keep it simple, I will just state the x86_64 files)

$YOUR_WORK_DIR/aports/main/linux-lts

ALL .patch files that are in $YOUR_WORK_DIR/aports/main/linux-lts are also in below

$YOUR_WORK_DIR/aports/main/linux-lts/src

Below is a tar compressed linux file that decompresses into linux-$VERSION

$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION.tar.gz

$YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION

$YOUR_WORK_DIR/aports/main/linux-lts/src/build-lts.x86_64

$YOUR_WORK_DIR/aports/main/linux-lts/src/build-virt.x86_64

In the "APKBUILD" file, change this "source" line to this:

Contents of $YOUR_WORK_DIR/aports/main/linux-lts/APKBUILD

... source="https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz 0001-powerpc-boot-wrapper-Add-z-notext-flag-for-ppc64le.patch 0002-x86-Compress-vmlinux-with-zstd-19-instead-of-22.patch 0003-kexec-add-kexec_load_disabled-boot-option.patch 0004-objtool-respect-AWK-setting.patch 0005-powerpc-config-defang-gcc-check-for-stack-protector-.patch lts.x86_64.config virt.x86_64.config " ...

do make menuconfig within $YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION and copy the .config file to $YOUR_WORK_DIR/aports/main/linux-lts/lts.x86_64.config and/or $YOUR_WORK_DIR/aports/main/linux-lts/virt.x86_64.config

— Preceding unsigned comment added by Pursuable1652 (talkcontribs) 16:55, 25 December 2024‎

build_NAME Answer

After you are done using the menu in the build-NAME folder by doing make menuconfig

the "build-NAME" folder should actually be $YOUR_WORK_DIR/aports/main/linux-lts/src/linux-$VERSION

— Preceding unsigned comment added by Pursuable1652 (talkcontribs) 16:55, 25 December 2024‎

Page ready for regular release?

Perhaps this Custom Kernel page is now ready for regular use, and the "This material is work-in-progress" banner can be removed, unless there is a shortcoming found. This draft state has held since it was helpfully created in 2014. Thanks for kind updates by Prabuanand, Pawciobiel, Teopp7, Fossdd, Anthumchris, Gsora, Zcrayfish, Omni, Nabbi, Psykose, Egberts and thanks also for kind contributions by others that have not been active on the wiki for over five years. John3-16 (talk) 19:22, 30 December 2025 (UTC)