<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nabbi</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nabbi"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Nabbi"/>
	<updated>2026-04-29T01:00:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Ddclient&amp;diff=23094</id>
		<title>Ddclient</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Ddclient&amp;diff=23094"/>
		<updated>2023-04-02T22:02:18Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: update links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
== How to download and install the latest version of ddclient ==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ddclient/ddclient DDclient] is a perl script to update accounts for Dynamic DNS Service Provider.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
ddclient is available in testing/edge repository.&lt;br /&gt;
&lt;br /&gt;
In order to use it, you need first to enable that [[Repositories|repository]] by adding to /etc/apk/repositories:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# echo http://dl-cdn.alpinelinux.org/alpine/edge/testing&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# apk update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# apk add ddclient&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
A sample configuration file is installed by default in &amp;lt;code&amp;gt;/etc/ddclient/ddclient.conf.sample.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rename it as &amp;lt;code&amp;gt;/etc/ddclient/ddclient.conf&amp;lt;/code&amp;gt; and modify it according to your needs.&lt;br /&gt;
&lt;br /&gt;
Then, start ddclient as usual:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# rc-service ddclient start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want/need, configure the service to start automatically on boot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;# rc-update add ddclient default&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Networking]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23060</id>
		<title>Alpine Linux:Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23060"/>
		<updated>2023-03-23T03:40:04Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: /* Efficient */ fix broken apk link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alpine uses [https://musl.libc.org/ musl] as its libc, and [https://en.wikipedia.org/wiki/BusyBox BusyBox] as core utilities. These choices tend to make Alpine especially minimalist and secure. &lt;br /&gt;
&lt;br /&gt;
== General overview ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has one of the &#039;&#039;&#039;fastest boot times&#039;&#039;&#039; of any operating system.&lt;br /&gt;
&lt;br /&gt;
Famous because of its small size, it&#039;s &#039;&#039;&#039;heavily used in containers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Also well know for &#039;&#039;&#039;wide use in embedded devices&#039;&#039;&#039; and as a &#039;&#039;&#039;base system for many enterprise routers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The postmarketOS project which is designed to run on mobile devices is based on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
=== Distinctive ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux follows the principles of &#039;&#039;&#039;the SSS distro: Simple+Small+Secure&#039;&#039;&#039;: due to usage of [http://musl-libc.org/ muslc] as the minimalist libc, BusyBox simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also) and userland binaries compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
=== Efficient ===&lt;br /&gt;
&lt;br /&gt;
Some main reasons:&lt;br /&gt;
&lt;br /&gt;
# Usage of [https://musl.libc.org/ musl] as the minimalist libc&lt;br /&gt;
# Its own package manager called [[Alpine Package Keeper|apk]], &lt;br /&gt;
# The {{Pkg|openrc}} init system, script driven set-ups and that’s it!&lt;br /&gt;
# {{Pkg|busybox}}: simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also)&lt;br /&gt;
&lt;br /&gt;
This provides you with a simple, &#039;&#039;&#039;crystal-clear Linux environment without all the noise&#039;&#039;&#039;, nothing else will get in the way.&lt;br /&gt;
&lt;br /&gt;
=== Secure ===&lt;br /&gt;
&lt;br /&gt;
All userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
== Technical overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The OS design&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine uses &#039;&#039;&#039;Linux&#039;&#039;&#039; as [https://www.kernel.org/ OS kernel], and has a focus on &#039;&#039;&#039;SSS distribution, Simple Small and Secure&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A variety of architectures are officially supports:&lt;br /&gt;
* &#039;&#039;&#039;x86_64&#039;&#039;&#039;: The popular AMD64 compatible 64-bit x86 based machines, i386 are not recommended for newer/latest hardware.&lt;br /&gt;
* &#039;&#039;&#039;x86&#039;&#039;&#039;: (i386 pc 32bit) and x86_64 (i686 pc 64bit and amd64)&lt;br /&gt;
* &#039;&#039;&#039;armhf&#039;&#039;&#039;: The newer ARM hard-float for newer, more powerful 32-bit devices alongside 64-bit&lt;br /&gt;
* &#039;&#039;&#039;armv7&#039;&#039;&#039;: The 32-bit ARM only execution state of the ARMv7 devices machines.&lt;br /&gt;
* &#039;&#039;&#039;aarch64&#039;&#039;&#039;: The 64-bit ARM only execution state of the ARMv8 device machines.&lt;br /&gt;
* &#039;&#039;&#039;ppc64le&#039;&#039;&#039;: For 64-bit PowerPC devices with pure little-endian mode, mostly for POWER8 and POWER9.&lt;br /&gt;
* &#039;&#039;&#039;s390x&#039;&#039;&#039;: For IBM Z mainframes, especially IBM Z and IBM LinuxONE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine can be installed to a hard disk/SSD/other storage medium like any other distro; (sys mode). The storage medium in question can be any block device (USB, Flash, SDD, HDD). Always in start, the base Alpine system and all your changes will be unpacked into a memory-based filesystem. If run some install script process (data mode) will keep your setup on a hard disk/SSD/other storage medium, rather than unpacking into memory. The default setup here is to store your /var partition directly on the hard storage medium. But as in the diskless mode, your root system still comes from a static ISO image. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In Alpine&#039;s case, &#039;&#039;&#039;the installer consists of the {{Path|/sbin/setup-*}} scripts&#039;&#039;&#039;, which are also part of the {{Pkg|alpine-conf}} package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&#039;&#039;&#039;A base Alpine install will include only needed packages&#039;&#039;&#039; such like {{Pkg|alpine-base}}, {{Pkg|syslinux}}, {{Pkg|linux-lts}} (or another kernel package), and depending of purpose some like {{Pkg|openssh}}/{{Pkg|chrony}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Alpine&#039;s boot loader case this is {{Pkg|syslinux}}, or its companions &amp;lt;code&amp;gt;isolinux&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;. Latest releases have Grub and [[Alpine and UEFI|UEFI support]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The init system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An &amp;quot;init system&amp;quot; includes several different components. First, there is the initramfs, which is loaded by the bootloader. Alpine&#039;s tool for generating the initramfs is {{Path|/sbin/mkinitfs}}, part of the {{Pkg|mkinitfs}} package, which is required by Alpine&#039;s kernel packages and by its {{Pkg|syslinux}} package. This tool&#039;s settings are read from {{Path|/etc/mkinitfs/*}}, and it installs the initscript {{Path|/usr/share/mkinitfs/initramfs-init}} into the initramfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Second, Alpine uses [[Alpine Linux Init System|OpenRC]] to handle the rest of its initscripts. The base framework of this is in the {{Pkg|openrc}} package, which is required by {{Pkg|alpine-conf}}.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The packaging and development system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The last important distinguishing feature of a Linux distro is its packaging and development systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;In Alpine&#039;s case, these are something a hybrid between [https://www.archlinux.org/ ArchLinux]&#039;s, on the one hand, and [http://www.gentoo.org/ Gentoo] and [http://www.freebsd.org/ FreeBSD]&#039;s, on the other. Our package-management and build utilities work much like Arch&#039;s:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|mkinitfs}}, mentioned above, rebuilds Alpine&#039;s initramfs, like Arch&#039;s &amp;quot;mkinitcpio&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;apk&#039;&#039;&#039; from {{Pkg|apk-tools}} is Alpine&#039;s package manager, like Arch&#039;s &amp;quot;pacman&amp;quot;; see [[Alpine Linux package management]]&lt;br /&gt;
* {{Pkg|abuild}} is Alpine&#039;s build utility, like Arch&#039;s &amp;quot;makepkg&amp;quot;; see [[Abuild and Helpers]]&lt;br /&gt;
* Alpine&#039;s package-building scripts are named APKBUILD, like Arch&#039;s &amp;quot;PKGBUILD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;What Alpine borrows from Gentoo and FreeBSD is a tree of all the package-building scripts. It is called the [[Aports tree]], and is kept as a single git repository. (Compare Gentoo&#039;s &amp;quot;Portage&amp;quot; and FreeBSD&#039;s &amp;quot;ports&amp;quot;. Something similar can be set up with Arch&#039;s &amp;quot;abs&amp;quot;, but it&#039;s not as tightly integrated with their package manager and build utilities.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;If you&#039;re only planning to install packages on a given system, and not do any development there, then the only pieces of this you&#039;ll need are {{Pkg|mkinitfs}} and {{Pkg|apk-tools}}, both included in a base Alpine install. If you do plan to do development, install {{Pkg|alpine-sdk}}, which includes gcc, git, abuild, and the like, and see [[Developer Documentation]].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [[Comparison with other distros]]&lt;br /&gt;
* [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23059</id>
		<title>Alpine Linux:Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23059"/>
		<updated>2023-03-23T03:35:00Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: /* Technical overview */ grammer, add link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alpine uses [https://musl.libc.org/ musl] as its libc, and [https://en.wikipedia.org/wiki/BusyBox BusyBox] as core utilities. These choices tend to make Alpine especially minimalist and secure. &lt;br /&gt;
&lt;br /&gt;
== General overview ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has one of the &#039;&#039;&#039;fastest boot times&#039;&#039;&#039; of any operating system.&lt;br /&gt;
&lt;br /&gt;
Famous because of its small size, it&#039;s &#039;&#039;&#039;heavily used in containers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Also well know for &#039;&#039;&#039;wide use in embedded devices&#039;&#039;&#039; and as a &#039;&#039;&#039;base system for many enterprise routers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The postmarketOS project which is designed to run on mobile devices is based on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
=== Distinctive ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux follows the principles of &#039;&#039;&#039;the SSS distro: Simple+Small+Secure&#039;&#039;&#039;: due to usage of [http://musl-libc.org/ muslc] as the minimalist libc, BusyBox simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also) and userland binaries compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
=== Efficient ===&lt;br /&gt;
&lt;br /&gt;
Some main reasons:&lt;br /&gt;
&lt;br /&gt;
# Usage of [https://musl.libc.org/ musl] as the minimalist libc&lt;br /&gt;
# Its own package manager called {{Pkg|apk}}, &lt;br /&gt;
# The {{Pkg|openrc}} init system, script driven set-ups and that’s it!&lt;br /&gt;
# {{Pkg|busybox}}: simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also)&lt;br /&gt;
&lt;br /&gt;
This provides you with a simple, &#039;&#039;&#039;crystal-clear Linux environment without all the noise&#039;&#039;&#039;, nothing else will get in the way.&lt;br /&gt;
&lt;br /&gt;
=== Secure ===&lt;br /&gt;
&lt;br /&gt;
All userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
== Technical overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The OS design&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine uses &#039;&#039;&#039;Linux&#039;&#039;&#039; as [https://www.kernel.org/ OS kernel], and has a focus on &#039;&#039;&#039;SSS distribution, Simple Small and Secure&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A variety of architectures are officially supports:&lt;br /&gt;
* &#039;&#039;&#039;x86_64&#039;&#039;&#039;: The popular AMD64 compatible 64-bit x86 based machines, i386 are not recommended for newer/latest hardware.&lt;br /&gt;
* &#039;&#039;&#039;x86&#039;&#039;&#039;: (i386 pc 32bit) and x86_64 (i686 pc 64bit and amd64)&lt;br /&gt;
* &#039;&#039;&#039;armhf&#039;&#039;&#039;: The newer ARM hard-float for newer, more powerful 32-bit devices alongside 64-bit&lt;br /&gt;
* &#039;&#039;&#039;armv7&#039;&#039;&#039;: The 32-bit ARM only execution state of the ARMv7 devices machines.&lt;br /&gt;
* &#039;&#039;&#039;aarch64&#039;&#039;&#039;: The 64-bit ARM only execution state of the ARMv8 device machines.&lt;br /&gt;
* &#039;&#039;&#039;ppc64le&#039;&#039;&#039;: For 64-bit PowerPC devices with pure little-endian mode, mostly for POWER8 and POWER9.&lt;br /&gt;
* &#039;&#039;&#039;s390x&#039;&#039;&#039;: For IBM Z mainframes, especially IBM Z and IBM LinuxONE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine can be installed to a hard disk/SSD/other storage medium like any other distro; (sys mode). The storage medium in question can be any block device (USB, Flash, SDD, HDD). Always in start, the base Alpine system and all your changes will be unpacked into a memory-based filesystem. If run some install script process (data mode) will keep your setup on a hard disk/SSD/other storage medium, rather than unpacking into memory. The default setup here is to store your /var partition directly on the hard storage medium. But as in the diskless mode, your root system still comes from a static ISO image. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In Alpine&#039;s case, &#039;&#039;&#039;the installer consists of the {{Path|/sbin/setup-*}} scripts&#039;&#039;&#039;, which are also part of the {{Pkg|alpine-conf}} package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&#039;&#039;&#039;A base Alpine install will include only needed packages&#039;&#039;&#039; such like {{Pkg|alpine-base}}, {{Pkg|syslinux}}, {{Pkg|linux-lts}} (or another kernel package), and depending of purpose some like {{Pkg|openssh}}/{{Pkg|chrony}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Alpine&#039;s boot loader case this is {{Pkg|syslinux}}, or its companions &amp;lt;code&amp;gt;isolinux&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;. Latest releases have Grub and [[Alpine and UEFI|UEFI support]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The init system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An &amp;quot;init system&amp;quot; includes several different components. First, there is the initramfs, which is loaded by the bootloader. Alpine&#039;s tool for generating the initramfs is {{Path|/sbin/mkinitfs}}, part of the {{Pkg|mkinitfs}} package, which is required by Alpine&#039;s kernel packages and by its {{Pkg|syslinux}} package. This tool&#039;s settings are read from {{Path|/etc/mkinitfs/*}}, and it installs the initscript {{Path|/usr/share/mkinitfs/initramfs-init}} into the initramfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Second, Alpine uses [[Alpine Linux Init System|OpenRC]] to handle the rest of its initscripts. The base framework of this is in the {{Pkg|openrc}} package, which is required by {{Pkg|alpine-conf}}.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The packaging and development system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The last important distinguishing feature of a Linux distro is its packaging and development systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;In Alpine&#039;s case, these are something a hybrid between [https://www.archlinux.org/ ArchLinux]&#039;s, on the one hand, and [http://www.gentoo.org/ Gentoo] and [http://www.freebsd.org/ FreeBSD]&#039;s, on the other. Our package-management and build utilities work much like Arch&#039;s:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|mkinitfs}}, mentioned above, rebuilds Alpine&#039;s initramfs, like Arch&#039;s &amp;quot;mkinitcpio&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;apk&#039;&#039;&#039; from {{Pkg|apk-tools}} is Alpine&#039;s package manager, like Arch&#039;s &amp;quot;pacman&amp;quot;; see [[Alpine Linux package management]]&lt;br /&gt;
* {{Pkg|abuild}} is Alpine&#039;s build utility, like Arch&#039;s &amp;quot;makepkg&amp;quot;; see [[Abuild and Helpers]]&lt;br /&gt;
* Alpine&#039;s package-building scripts are named APKBUILD, like Arch&#039;s &amp;quot;PKGBUILD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;What Alpine borrows from Gentoo and FreeBSD is a tree of all the package-building scripts. It is called the [[Aports tree]], and is kept as a single git repository. (Compare Gentoo&#039;s &amp;quot;Portage&amp;quot; and FreeBSD&#039;s &amp;quot;ports&amp;quot;. Something similar can be set up with Arch&#039;s &amp;quot;abs&amp;quot;, but it&#039;s not as tightly integrated with their package manager and build utilities.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;If you&#039;re only planning to install packages on a given system, and not do any development there, then the only pieces of this you&#039;ll need are {{Pkg|mkinitfs}} and {{Pkg|apk-tools}}, both included in a base Alpine install. If you do plan to do development, install {{Pkg|alpine-sdk}}, which includes gcc, git, abuild, and the like, and see [[Developer Documentation]].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [[Comparison with other distros]]&lt;br /&gt;
* [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23058</id>
		<title>Alpine Linux:Overview</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:Overview&amp;diff=23058"/>
		<updated>2023-03-23T03:30:21Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: /* Efficient */ point musl at the current http link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alpine uses [https://musl.libc.org/ musl] as its libc, and [https://en.wikipedia.org/wiki/BusyBox BusyBox] as core utilities. These choices tend to make Alpine especially minimalist and secure. &lt;br /&gt;
&lt;br /&gt;
== General overview ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has one of the &#039;&#039;&#039;fastest boot times&#039;&#039;&#039; of any operating system.&lt;br /&gt;
&lt;br /&gt;
Famous because of its small size, it&#039;s &#039;&#039;&#039;heavily used in containers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Also well know for &#039;&#039;&#039;wide use in embedded devices&#039;&#039;&#039; and as a &#039;&#039;&#039;base system for many enterprise routers&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The postmarketOS project which is designed to run on mobile devices is based on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
=== Distinctive ===&lt;br /&gt;
&lt;br /&gt;
Alpine Linux follows the principles of &#039;&#039;&#039;the SSS distro: Simple+Small+Secure&#039;&#039;&#039;: due to usage of [http://musl-libc.org/ muslc] as the minimalist libc, BusyBox simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also) and userland binaries compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
=== Efficient ===&lt;br /&gt;
&lt;br /&gt;
Some main reasons:&lt;br /&gt;
&lt;br /&gt;
# Usage of [https://musl.libc.org/ musl] as the minimalist libc&lt;br /&gt;
# Its own package manager called {{Pkg|apk}}, &lt;br /&gt;
# The {{Pkg|openrc}} init system, script driven set-ups and that’s it!&lt;br /&gt;
# {{Pkg|busybox}}: simple coreutils (with possibilities to alternate on inflated original packages of each coreutils tools also)&lt;br /&gt;
&lt;br /&gt;
This provides you with a simple, &#039;&#039;&#039;crystal-clear Linux environment without all the noise&#039;&#039;&#039;, nothing else will get in the way.&lt;br /&gt;
&lt;br /&gt;
=== Secure ===&lt;br /&gt;
&lt;br /&gt;
All userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection.&lt;br /&gt;
&lt;br /&gt;
== Technical overview ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The OS design&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine uses &#039;&#039;&#039;Linux&#039;&#039;&#039; as OS kernel, and has a focus on &#039;&#039;&#039;SSS distribution, Simple Small and Secure&#039;&#039;&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;A variety of architectures are officially supports:&lt;br /&gt;
* &#039;&#039;&#039;x86_64&#039;&#039;&#039;: The popular AMD64 compatible 64-bit x86 based machines, i386 are not recommended for newer/latest hardware.&lt;br /&gt;
* &#039;&#039;&#039;x86&#039;&#039;&#039;: (i386 pc 32bit) and x86_64 (i686 pc 64bit and amd64)&lt;br /&gt;
* &#039;&#039;&#039;armhf&#039;&#039;&#039;: The newer ARM hard-float for newer, more powerful 32-bit devices alongside 64-bit&lt;br /&gt;
* &#039;&#039;&#039;armv7&#039;&#039;&#039;: The 32-bit ARM only execution state of the ARMv7 devices machines.&lt;br /&gt;
* &#039;&#039;&#039;aarch64&#039;&#039;&#039;: The 64-bit ARM only execution state of the ARMv8 device machines.&lt;br /&gt;
* &#039;&#039;&#039;ppc64le&#039;&#039;&#039;: For 64-bit PowerPC devices with pure little-endian mode, mostly for POWER8 and POWER9.&lt;br /&gt;
* &#039;&#039;&#039;s390x&#039;&#039;&#039;: For IBM Z mainframes, especially IBM Z and IBM LinuxONE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Alpine can be installed to a hard disk/SSD/other storage medium like any other distro; (sys mode). The storage medium in question can be any block device (USB, Flash, SDD, HDD). Always in start, the base Alpine system and all your changes will be unpacked into a memory-based filesystem. If run some install script process (data mode) will keep your setup on a hard disk/SSD/other storage medium, rather than unpacking into memory. The default setup here is to store your /var partition directly on the hard storage medium. But as in the diskless mode, your root system still comes from a static ISO image. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The installation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In Alpine&#039;s case, &#039;&#039;&#039;the installer consists of the {{Path|/sbin/setup-*}} scripts&#039;&#039;&#039;, which are also part of the {{Pkg|alpine-conf}} package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&#039;&#039;&#039;A base Alpine install will include only needed packages&#039;&#039;&#039; such like {{Pkg|alpine-base}}, {{Pkg|syslinux}}, {{Pkg|linux-lts}} (or another kernel package), and depending of purpose some like {{Pkg|openssh}}/{{Pkg|chrony}}.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Alpine&#039;s boot loader case this is {{Pkg|syslinux}}, or its companions &amp;lt;code&amp;gt;isolinux&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;extlinux&amp;lt;/code&amp;gt;. Latest releases have Grub and [[Alpine and UEFI|UEFI support]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The init system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An &amp;quot;init system&amp;quot; includes several different components. First, there is the initramfs, which is loaded by the bootloader. Alpine&#039;s tool for generating the initramfs is {{Path|/sbin/mkinitfs}}, part of the {{Pkg|mkinitfs}} package, which is required by Alpine&#039;s kernel packages and by its {{Pkg|syslinux}} package. This tool&#039;s settings are read from {{Path|/etc/mkinitfs/*}}, and it installs the initscript {{Path|/usr/share/mkinitfs/initramfs-init}} into the initramfs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Second, Alpine uses [[Alpine Linux Init System|OpenRC]] to handle the rest of its initscripts. The base framework of this is in the {{Pkg|openrc}} package, which is required by {{Pkg|alpine-conf}}.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&#039;&#039;&#039;The packaging and development system&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The last important distinguishing feature of a Linux distro is its packaging and development systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;In Alpine&#039;s case, these are something a hybrid between [https://www.archlinux.org/ ArchLinux]&#039;s, on the one hand, and [http://www.gentoo.org/ Gentoo] and [http://www.freebsd.org/ FreeBSD]&#039;s, on the other. Our package-management and build utilities work much like Arch&#039;s:&lt;br /&gt;
&lt;br /&gt;
* {{Pkg|mkinitfs}}, mentioned above, rebuilds Alpine&#039;s initramfs, like Arch&#039;s &amp;quot;mkinitcpio&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;apk&#039;&#039;&#039; from {{Pkg|apk-tools}} is Alpine&#039;s package manager, like Arch&#039;s &amp;quot;pacman&amp;quot;; see [[Alpine Linux package management]]&lt;br /&gt;
* {{Pkg|abuild}} is Alpine&#039;s build utility, like Arch&#039;s &amp;quot;makepkg&amp;quot;; see [[Abuild and Helpers]]&lt;br /&gt;
* Alpine&#039;s package-building scripts are named APKBUILD, like Arch&#039;s &amp;quot;PKGBUILD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;What Alpine borrows from Gentoo and FreeBSD is a tree of all the package-building scripts. It is called the [[Aports tree]], and is kept keep it as a git repository. (Compare Gentoo&#039;s &amp;quot;Portage&amp;quot; and FreeBSD&#039;s &amp;quot;ports&amp;quot;. Something similar can be set up with Arch&#039;s &amp;quot;abs&amp;quot;, but it&#039;s not as tightly integrated with their package manager and build utilities.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;If you&#039;re only planning to install packages on a given system, and not do any development there, then the only pieces of this you&#039;ll need are {{Pkg|mkinitfs}} and {{Pkg|apk-tools}}, both included in a base Alpine install. If you do plan to do development, install {{Pkg|alpine-sdk}}, which includes gcc, git, abuild, and the like, and see [[Developer Documentation]].&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [[Comparison with other distros]]&lt;br /&gt;
* [[Tutorials and Howtos]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=23057</id>
		<title>Custom Kernel</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=23057"/>
		<updated>2023-03-22T04:31:12Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: /* Creating your config */ 3.17 current stable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Draft}}&lt;br /&gt;
&lt;br /&gt;
This process of building a &#039;&#039;&#039;custom configured kernel&#039;&#039;&#039; assumes you are running on Alpine Linux utilizing abuild &amp;amp; aports.&lt;br /&gt;
&lt;br /&gt;
== But why? ==&lt;br /&gt;
&lt;br /&gt;
You want to build a custom kernel to enable experimental hardware or features or outdated hardware, to reduce bloat further, to tune the kernel to the hardware.&lt;br /&gt;
&lt;br /&gt;
The lts kernel for most Alpine ARCHs uses defaults to balance throughput at the expense of some responsiveness, and support for many devices.  You can tweak the kernel for desktop use and low latency and responsiveness.&lt;br /&gt;
&lt;br /&gt;
You should disable modules to increase security.  By default, Alpine will install modules but not disable most of them.  Disabling modules will reduce an DMA attack but not eliminate it completely.  If you have a newer processor with VT-d, you can mitigate as long as you:&lt;br /&gt;
&lt;br /&gt;
Leave CONFIG_INTEL_IOMMU_DEFAULT_ON=y or pass intel_iommu=on as a kernel parameter and disable kernel logging so the attacker doesn&#039;t gain DMAR address information through dmesg.[http://blog.frizk.net/2016/11/disable-virtualization-based-security.html]  Also remove references to the kernel version to calculate the IOMMU addresses.[https://link.springer.com/content/pdf/10.1186/s13173-017-0066-7.pdf]&lt;br /&gt;
&lt;br /&gt;
To increase the security of the boot process, if you have a TPM, you could set CONFIG_INTEL_TXT=y (Enable Intel(R) Trusted Execution Technology (Intel(R) TXT)) (which is not enabled in the hardened kernel by default), then you would need the SINIT module (provided only by Intel)[https://software.intel.com/en-us/articles/intel-trusted-execution-technology], a possibly compiled TrustedGrub2[https://github.com/Rohde-Schwarz-Cybersecurity/TrustedGRUB2], trousers[https://sourceforge.net/projects/trousers/?source=navbar], tboot[https://sourceforge.net/projects/tboot/].  These packages are not in aports and it is unknown if these tools work on musl.  It&#039;s not recommended for Edge.  Also, there would be trigger packages to generate hashes for the kernel and the mkinitfs updates.&lt;br /&gt;
&lt;br /&gt;
== Setting up the Alpine Build System ==&lt;br /&gt;
&lt;br /&gt;
First, you need to follow the steps in [[Creating_an_Alpine_package#Setup_your_system_and_account|Setup your system and account for building packages]].  You also need to configure your /etc/apk/repositories so that they search locally for your apks.  See [[Creating_an_Alpine_package#Testing_the_package_locally|Testing the package locally]] for details.&lt;br /&gt;
&lt;br /&gt;
After setting up accounts and repos, change your shell&#039;s current working directory to &#039;&#039;&#039;aports&#039;&#039;&#039; that you just cloned.&lt;br /&gt;
&lt;br /&gt;
    cd aports&lt;br /&gt;
&lt;br /&gt;
== Working with aports ==&lt;br /&gt;
&lt;br /&gt;
We will try using an existing lts kernel just tweaking the lts.ARCH.config file.  &lt;br /&gt;
&lt;br /&gt;
=== Switching to the proper release version ===&lt;br /&gt;
&lt;br /&gt;
You need to switch to the proper branch that matches the release so that the kernel compiles against the dependencies properly.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Alpine version&lt;br /&gt;
! Remote branch&lt;br /&gt;
|-&lt;br /&gt;
| Edge&lt;br /&gt;
| master&lt;br /&gt;
|-&lt;br /&gt;
| 3.17.0&lt;br /&gt;
| 3.17-stable&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following is required to get access to the APKBUILD released for that version of Alpine and which you will create a commit for.&lt;br /&gt;
&lt;br /&gt;
If you are on 3.17 do:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b 3.17-stable origin/3.17-stable&lt;br /&gt;
&lt;br /&gt;
If you are on Edge do:&lt;br /&gt;
&lt;br /&gt;
  git checkout master&lt;br /&gt;
&lt;br /&gt;
=== Creating your config ===&lt;br /&gt;
&lt;br /&gt;
You can use linux-lts but what you should do is create a local branch by doing:&lt;br /&gt;
&lt;br /&gt;
For Alpine Edge:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b my-custom-kernel&lt;br /&gt;
&lt;br /&gt;
For Alpine 3.17:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b my-custom-kernel origin/3.17-stable&lt;br /&gt;
&lt;br /&gt;
Doing it this way, you do less work in maintaining.  All you need to do is keep &#039;&#039;master&#039;&#039; or &#039;&#039;3.17-stable&#039;&#039; in sync[https://help.github.com/articles/syncing-a-fork/][https://help.github.com/articles/configuring-a-remote-for-a-fork/] and merge any conflicts.  &lt;br /&gt;
&lt;br /&gt;
First switch to the branch by doing &amp;lt;code&amp;gt;git checkout my-custom-kernel&amp;lt;/code&amp;gt;.  Then, you need to navigate to the &#039;&#039;main/linux-lts&#039;&#039; folder where you should see a APKBUILD and some config- files.  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 &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt; (discussed below in the &#039;&#039;Configuring kernel&#039;&#039; section).  After generating your config, you need to &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.  Then, do &amp;lt;code&amp;gt;git add APKBUILD lts.ARCH.config&amp;lt;/code&amp;gt; where ARCH is whatever architecture (x86, x86_64, ...) you use.  Then, you need to do &amp;lt;code&amp;gt;git commit APKBUILD config-NAME.ARCH -m &amp;quot;Enabled these options ....&amp;quot;&amp;lt;/code&amp;gt; for your customization the ARCHitecture of your system.  You do this so that git can keep your code separate from Alpine&#039;s and so your changes float forward between kernel updates.&lt;br /&gt;
&lt;br /&gt;
== Adding custom patches ==&lt;br /&gt;
&lt;br /&gt;
Custom patches should be added to &#039;&#039;sources=&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After you added the URL, you need to produce a checksum by doing &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The custom patches may not be autopatched, due to being distributed as an archive or different patch level, so you need to define what to do with it in the prepare().&lt;br /&gt;
&lt;br /&gt;
== Configuring kernel ==&lt;br /&gt;
&lt;br /&gt;
Attempt to build the kernel first.  To do that, you do abuild -rK to install most of the dependencies.  If it complains about a dependency like elfutils-dev use -rKd.  Then, when it prompts for values for new found config options just hold enter till it starts compiling the kernel.  There should be two sets one for -lts and the other for the -virt.  Just Ctrl+C out of the compilation process after the second set so you can further customize the config.  Then you go into the src/linux-VER and edit the config file.  Copy the .config file overriding the lts.ARCH.config in the srcdir.&lt;br /&gt;
&lt;br /&gt;
The alternative is to use the kernel configuration menu in the build-NAME folder, but before yo do that you need to &amp;lt;code&amp;gt;sudo apk add ncurses-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you are done using the menu in the build-NAME folder by doing &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt;, you want to remove &amp;lt;code&amp;gt;ncurses-dev&amp;lt;/code&amp;gt;.  When you are done, it will be stored in &#039;&#039;.config&#039;&#039; which you need to again override the lts.ARCH.config file.  When you are done updating the config-NAME.ARCH, you need to do &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The options in the kernel config are typically defaults.  If your device is old, it may be set to n by default.&lt;br /&gt;
&lt;br /&gt;
=== Vanilla targets and tuning ===&lt;br /&gt;
&lt;br /&gt;
{|cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!ARCH&lt;br /&gt;
!Processor Type / CPU Selection / System Type&lt;br /&gt;
!Code Generation / Instruction Extensions&lt;br /&gt;
!Timer Frequency&lt;br /&gt;
!Preemption Model&lt;br /&gt;
!Bitness&lt;br /&gt;
|-&lt;br /&gt;
|s390x&lt;br /&gt;
|IBM zEnterprise 114 and 196&lt;br /&gt;
|IBM zBC12 and zEC12 (&amp;lt;code&amp;gt;-march=zEC12 -mtune=zEC12&amp;lt;/code&amp;gt;)&lt;br /&gt;
|100 Hz&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc64le&lt;br /&gt;
|Server processors&lt;br /&gt;
|POWER8 (&amp;lt;code&amp;gt;-mcpu=power8&amp;lt;/code&amp;gt;), AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;), VSX&lt;br /&gt;
|100 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc&lt;br /&gt;
|&lt;br /&gt;
512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx&lt;br /&gt;
* Apple PowerMac based machines&lt;br /&gt;
|AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;) on &amp;gt;=74xx&lt;br /&gt;
|250 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|x86_64&lt;br /&gt;
|Generic-x86-64&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|x86&lt;br /&gt;
|586/K5/5x86/6x86/6x86MX&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|armhf&lt;br /&gt;
|&lt;br /&gt;
* ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)&lt;br /&gt;
* Freescale i.MX family -- Cortex A (i.MX51, i.MX53, i.MX6 Quad/DualLite, i.MX6 SoloLite, i.MX6 SoloX, i.MX6 UltraLite, i.MX7 Dual)&lt;br /&gt;
* Qualcomm -- (MSM8X60, MSM8960, MSM8974)&lt;br /&gt;
* Allwinner SoCs -- (A10 (sun4i), A10s / A13 (sun5i), A31 (sun6i), A20 (sun7i), sun8i Family, (sun9i))&lt;br /&gt;
* ARM Ldt Versatile Express family -- &lt;br /&gt;
|Either &amp;lt;code&amp;gt;-march=armv7-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-march=armv5t -Wa,-march=armv7-a&amp;lt;/code&amp;gt; based on a compile test. &amp;lt;code&amp;gt;-mfpu=vfp&amp;lt;/code&amp;gt;&lt;br /&gt;
|100 Hz&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|aarch64&lt;br /&gt;
|&lt;br /&gt;
* Allwinner sunxi 64-bit SoC Family&lt;br /&gt;
* Broadcom BCM2835 family&lt;br /&gt;
* Marvell Berlin SoC Family&lt;br /&gt;
* ARMv8 based Samsung Exynos SoC family&lt;br /&gt;
* ARMv8 based Freescale Layerscape SoC family&lt;br /&gt;
* Hisilicon SoC Family&lt;br /&gt;
* Mediatek MT65xx &amp;amp; MT81xx ARMv8 SoC&lt;br /&gt;
* Marvell EBU SoC Family&lt;br /&gt;
* Qualcomm Platforms&lt;br /&gt;
* Rockchip Platforms&lt;br /&gt;
* AMD Seattle SoC Family&lt;br /&gt;
* Altera&#039;s Stratix 10 SoCFPGA Family&lt;br /&gt;
* NVIDIA Tegra SoC Family&lt;br /&gt;
* Spreadtrum SoC platform&lt;br /&gt;
* Cavium Inc. Thunder SoC Family&lt;br /&gt;
* ARMv8 software model (Versatile Express)&lt;br /&gt;
* AppliedMicro X-Gene SOC Family&lt;br /&gt;
* Xilinx ZynqMP Family&lt;br /&gt;
|&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
If you do desktop multitasking, you may want to switch to Voluntary Kernel Preemption (Desktop) or Preemptible Kernel (Low-Latency Desktop) and up the Timer Frequency.  If you run a dedicated render farm node or a dedicated bitcoin miner use No Forced Preemption (Server) and decrease the Timer Frequency.&lt;br /&gt;
&lt;br /&gt;
Optimized modules (most are already compiled as modules):&lt;br /&gt;
* raid6 -- altivec, avx512, ssse3, avx2, mmx, sse, sse2, neon&lt;br /&gt;
* some operations of raid5 -- mmx (32 bit), sse (64 bit), avx&lt;br /&gt;
For Kernel API:&lt;br /&gt;
* 32-bit memcpy -- 3dnow&lt;br /&gt;
* 32-bit memory page clearing and copying -- sse (Athlon/K7 only), mmx&lt;br /&gt;
From x86/crypto, arm/crypto, powerpc/crypto:&lt;br /&gt;
* CAMELLIA -- avx2, avx, aes-ni&lt;br /&gt;
* CHACHA20 -- avx2, neon&lt;br /&gt;
* CAST5 -- avx&lt;br /&gt;
* CAST6 -- avx&lt;br /&gt;
* TWOFISH -- avx&lt;br /&gt;
* SERPENT -- avx2, avx, sse2&lt;br /&gt;
* SHA1 -- avx2, ssse3, neon, spe&lt;br /&gt;
* SHA2 -- avx2&lt;br /&gt;
* SHA256 -- ssse3, neon, spe&lt;br /&gt;
* SHA512 -- avx2, ssse3, neon&lt;br /&gt;
* POLY1305 -- avx2&lt;br /&gt;
* GHASH -- pclmulqdq (part of aes-ni), vmx (power8)&lt;br /&gt;
* AES -- aes-ni, neon, vmx (power8), spe&lt;br /&gt;
* CRC32 -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
* CRCT10DIF -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
&lt;br /&gt;
=== Fast reboots with kexec ===&lt;br /&gt;
&lt;br /&gt;
If you want to reboot the kernel fast avoiding the POST test, you need &amp;lt;code&amp;gt;sudo apk add kexec-tools&amp;lt;/code&amp;gt; and enable kexec in the kernel:&lt;br /&gt;
&lt;br /&gt;
  Processor type and features&lt;br /&gt;
    [*] kexec system call&lt;br /&gt;
&lt;br /&gt;
=== Hibernation to prevent data loss ===&lt;br /&gt;
&lt;br /&gt;
  Power management and ACPI options&lt;br /&gt;
    [*] Hibernation (aka &#039;suspend to disk&#039;)&lt;br /&gt;
&lt;br /&gt;
Hibernation should be used if you have a laptop.  You don&#039;t want the laptop to suddenly shut off resulting in data loss, you want it to save your work based on a percentage of battery life (this requires special script).  When you do hibernation and when it restores back, it should lock down the computer and ask for prompt.  Depending on your needs, the hibernated image can be encrypted/decrypted which again requires additional customization to scripts.&lt;br /&gt;
&lt;br /&gt;
Hibernation with an unsanitized swap file is generally insecure because data and unlocked memory pages is swapped out in plaintext.  To increase the security either disable swap (Alpine default) or use an encrypted swap.  The swap file/partition is typically used as a dump of the hibernated image.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Before building, you may want to remove as many modules as possible.  This will reduce the time to compile greatly.  Also, you may want to use [https://github.com/ccache/ccache/ ccache] for faster recompiles especially if you are searching for the minimal set of options or modules to use or include.&lt;br /&gt;
&lt;br /&gt;
You should then do an &amp;lt;code&amp;gt;abuild -r&amp;lt;/code&amp;gt; to attempt to build it.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
To install it you do a &amp;lt;code&amp;gt;sudo apk add linux-NAME&amp;lt;/code&amp;gt; where NAME is your custom kernel name.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Before you test, you should install the lts kernel too, using &amp;lt;code&amp;gt;sudo apk add linux-hardened&amp;lt;/code&amp;gt;.  You may be missing a module and can&#039;t boot, so you use the other kernel as the fallback boot kernel.  Don&#039;t forget to update your bootloader configuration.&lt;br /&gt;
&lt;br /&gt;
To test, first you should make a bootable Alpine USB image.  Then, when you have your rescue USB done, you &amp;lt;code&amp;gt;doas reboot&amp;lt;/code&amp;gt; the computer.&lt;br /&gt;
&lt;br /&gt;
To test it, you basically do trial and error.  Sometimes your config is missing something if you want to have a bare minimum setting.&lt;br /&gt;
&lt;br /&gt;
If you are curious about correctness testing, some kernel modules or components do preform self tests at the beginning of the boot process.  The tools may have test suites that you run with the make command.&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=23056</id>
		<title>Custom Kernel</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Custom_Kernel&amp;diff=23056"/>
		<updated>2023-03-22T04:30:07Z</updated>

		<summary type="html">&lt;p&gt;Nabbi: /* Switching to the proper release version */ 3.17 current stable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Draft}}&lt;br /&gt;
&lt;br /&gt;
This process of building a &#039;&#039;&#039;custom configured kernel&#039;&#039;&#039; assumes you are running on Alpine Linux utilizing abuild &amp;amp; aports.&lt;br /&gt;
&lt;br /&gt;
== But why? ==&lt;br /&gt;
&lt;br /&gt;
You want to build a custom kernel to enable experimental hardware or features or outdated hardware, to reduce bloat further, to tune the kernel to the hardware.&lt;br /&gt;
&lt;br /&gt;
The lts kernel for most Alpine ARCHs uses defaults to balance throughput at the expense of some responsiveness, and support for many devices.  You can tweak the kernel for desktop use and low latency and responsiveness.&lt;br /&gt;
&lt;br /&gt;
You should disable modules to increase security.  By default, Alpine will install modules but not disable most of them.  Disabling modules will reduce an DMA attack but not eliminate it completely.  If you have a newer processor with VT-d, you can mitigate as long as you:&lt;br /&gt;
&lt;br /&gt;
Leave CONFIG_INTEL_IOMMU_DEFAULT_ON=y or pass intel_iommu=on as a kernel parameter and disable kernel logging so the attacker doesn&#039;t gain DMAR address information through dmesg.[http://blog.frizk.net/2016/11/disable-virtualization-based-security.html]  Also remove references to the kernel version to calculate the IOMMU addresses.[https://link.springer.com/content/pdf/10.1186/s13173-017-0066-7.pdf]&lt;br /&gt;
&lt;br /&gt;
To increase the security of the boot process, if you have a TPM, you could set CONFIG_INTEL_TXT=y (Enable Intel(R) Trusted Execution Technology (Intel(R) TXT)) (which is not enabled in the hardened kernel by default), then you would need the SINIT module (provided only by Intel)[https://software.intel.com/en-us/articles/intel-trusted-execution-technology], a possibly compiled TrustedGrub2[https://github.com/Rohde-Schwarz-Cybersecurity/TrustedGRUB2], trousers[https://sourceforge.net/projects/trousers/?source=navbar], tboot[https://sourceforge.net/projects/tboot/].  These packages are not in aports and it is unknown if these tools work on musl.  It&#039;s not recommended for Edge.  Also, there would be trigger packages to generate hashes for the kernel and the mkinitfs updates.&lt;br /&gt;
&lt;br /&gt;
== Setting up the Alpine Build System ==&lt;br /&gt;
&lt;br /&gt;
First, you need to follow the steps in [[Creating_an_Alpine_package#Setup_your_system_and_account|Setup your system and account for building packages]].  You also need to configure your /etc/apk/repositories so that they search locally for your apks.  See [[Creating_an_Alpine_package#Testing_the_package_locally|Testing the package locally]] for details.&lt;br /&gt;
&lt;br /&gt;
After setting up accounts and repos, change your shell&#039;s current working directory to &#039;&#039;&#039;aports&#039;&#039;&#039; that you just cloned.&lt;br /&gt;
&lt;br /&gt;
    cd aports&lt;br /&gt;
&lt;br /&gt;
== Working with aports ==&lt;br /&gt;
&lt;br /&gt;
We will try using an existing lts kernel just tweaking the lts.ARCH.config file.  &lt;br /&gt;
&lt;br /&gt;
=== Switching to the proper release version ===&lt;br /&gt;
&lt;br /&gt;
You need to switch to the proper branch that matches the release so that the kernel compiles against the dependencies properly.&lt;br /&gt;
&lt;br /&gt;
{| cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Alpine version&lt;br /&gt;
! Remote branch&lt;br /&gt;
|-&lt;br /&gt;
| Edge&lt;br /&gt;
| master&lt;br /&gt;
|-&lt;br /&gt;
| 3.17.0&lt;br /&gt;
| 3.17-stable&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following is required to get access to the APKBUILD released for that version of Alpine and which you will create a commit for.&lt;br /&gt;
&lt;br /&gt;
If you are on 3.17 do:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b 3.17-stable origin/3.17-stable&lt;br /&gt;
&lt;br /&gt;
If you are on Edge do:&lt;br /&gt;
&lt;br /&gt;
  git checkout master&lt;br /&gt;
&lt;br /&gt;
=== Creating your config ===&lt;br /&gt;
&lt;br /&gt;
You can use linux-lts but what you should do is create a local branch by doing:&lt;br /&gt;
&lt;br /&gt;
For Alpine Edge:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b my-custom-kernel&lt;br /&gt;
&lt;br /&gt;
For Alpine 3.7:&lt;br /&gt;
&lt;br /&gt;
  git checkout -b my-custom-kernel origin/3.7-stable&lt;br /&gt;
&lt;br /&gt;
Doing it this way, you do less work in maintaining.  All you need to do is keep &#039;&#039;master&#039;&#039; or &#039;&#039;3.7-stable&#039;&#039; in sync[https://help.github.com/articles/syncing-a-fork/][https://help.github.com/articles/configuring-a-remote-for-a-fork/] and merge any conflicts.  &lt;br /&gt;
&lt;br /&gt;
First switch to the branch by doing &amp;lt;code&amp;gt;git checkout my-custom-kernel&amp;lt;/code&amp;gt;.  Then, you need to navigate to the &#039;&#039;main/linux-lts&#039;&#039; folder where you should see a APKBUILD and some config- files.  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 &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt; (discussed below in the &#039;&#039;Configuring kernel&#039;&#039; section).  After generating your config, you need to &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.  Then, do &amp;lt;code&amp;gt;git add APKBUILD lts.ARCH.config&amp;lt;/code&amp;gt; where ARCH is whatever architecture (x86, x86_64, ...) you use.  Then, you need to do &amp;lt;code&amp;gt;git commit APKBUILD config-NAME.ARCH -m &amp;quot;Enabled these options ....&amp;quot;&amp;lt;/code&amp;gt; for your customization the ARCHitecture of your system.  You do this so that git can keep your code separate from Alpine&#039;s and so your changes float forward between kernel updates.&lt;br /&gt;
&lt;br /&gt;
== Adding custom patches ==&lt;br /&gt;
&lt;br /&gt;
Custom patches should be added to &#039;&#039;sources=&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
After you added the URL, you need to produce a checksum by doing &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The custom patches may not be autopatched, due to being distributed as an archive or different patch level, so you need to define what to do with it in the prepare().&lt;br /&gt;
&lt;br /&gt;
== Configuring kernel ==&lt;br /&gt;
&lt;br /&gt;
Attempt to build the kernel first.  To do that, you do abuild -rK to install most of the dependencies.  If it complains about a dependency like elfutils-dev use -rKd.  Then, when it prompts for values for new found config options just hold enter till it starts compiling the kernel.  There should be two sets one for -lts and the other for the -virt.  Just Ctrl+C out of the compilation process after the second set so you can further customize the config.  Then you go into the src/linux-VER and edit the config file.  Copy the .config file overriding the lts.ARCH.config in the srcdir.&lt;br /&gt;
&lt;br /&gt;
The alternative is to use the kernel configuration menu in the build-NAME folder, but before yo do that you need to &amp;lt;code&amp;gt;sudo apk add ncurses-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you are done using the menu in the build-NAME folder by doing &amp;lt;code&amp;gt;make menuconfig&amp;lt;/code&amp;gt;, you want to remove &amp;lt;code&amp;gt;ncurses-dev&amp;lt;/code&amp;gt;.  When you are done, it will be stored in &#039;&#039;.config&#039;&#039; which you need to again override the lts.ARCH.config file.  When you are done updating the config-NAME.ARCH, you need to do &amp;lt;code&amp;gt;abuild checksum&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The options in the kernel config are typically defaults.  If your device is old, it may be set to n by default.&lt;br /&gt;
&lt;br /&gt;
=== Vanilla targets and tuning ===&lt;br /&gt;
&lt;br /&gt;
{|cellpadding=&amp;quot;5&amp;quot; border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!ARCH&lt;br /&gt;
!Processor Type / CPU Selection / System Type&lt;br /&gt;
!Code Generation / Instruction Extensions&lt;br /&gt;
!Timer Frequency&lt;br /&gt;
!Preemption Model&lt;br /&gt;
!Bitness&lt;br /&gt;
|-&lt;br /&gt;
|s390x&lt;br /&gt;
|IBM zEnterprise 114 and 196&lt;br /&gt;
|IBM zBC12 and zEC12 (&amp;lt;code&amp;gt;-march=zEC12 -mtune=zEC12&amp;lt;/code&amp;gt;)&lt;br /&gt;
|100 Hz&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc64le&lt;br /&gt;
|Server processors&lt;br /&gt;
|POWER8 (&amp;lt;code&amp;gt;-mcpu=power8&amp;lt;/code&amp;gt;), AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;), VSX&lt;br /&gt;
|100 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|ppc&lt;br /&gt;
|&lt;br /&gt;
512x/52xx/6xx/7xx/74xx/82xx/83xx/86xx&lt;br /&gt;
* Apple PowerMac based machines&lt;br /&gt;
|AltiVec (&amp;lt;code&amp;gt;-Wa,-maltivec&amp;lt;/code&amp;gt; to assembler or &amp;lt;code&amp;gt;-maltivec -mabi=altivec&amp;lt;/code&amp;gt;) on &amp;gt;=74xx&lt;br /&gt;
|250 HZ&lt;br /&gt;
|No Forced Preemption (Server)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|x86_64&lt;br /&gt;
|Generic-x86-64&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|x86&lt;br /&gt;
|586/K5/5x86/6x86/6x86MX&lt;br /&gt;
|(-mtune=generic ; SIMD assembly modules enabled based on simple compile test and/or presence of CPU flag)&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|armhf&lt;br /&gt;
|&lt;br /&gt;
* ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)&lt;br /&gt;
* Freescale i.MX family -- Cortex A (i.MX51, i.MX53, i.MX6 Quad/DualLite, i.MX6 SoloLite, i.MX6 SoloX, i.MX6 UltraLite, i.MX7 Dual)&lt;br /&gt;
* Qualcomm -- (MSM8X60, MSM8960, MSM8974)&lt;br /&gt;
* Allwinner SoCs -- (A10 (sun4i), A10s / A13 (sun5i), A31 (sun6i), A20 (sun7i), sun8i Family, (sun9i))&lt;br /&gt;
* ARM Ldt Versatile Express family -- &lt;br /&gt;
|Either &amp;lt;code&amp;gt;-march=armv7-a&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-march=armv5t -Wa,-march=armv7-a&amp;lt;/code&amp;gt; based on a compile test. &amp;lt;code&amp;gt;-mfpu=vfp&amp;lt;/code&amp;gt;&lt;br /&gt;
|100 Hz&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|32&lt;br /&gt;
|-&lt;br /&gt;
|aarch64&lt;br /&gt;
|&lt;br /&gt;
* Allwinner sunxi 64-bit SoC Family&lt;br /&gt;
* Broadcom BCM2835 family&lt;br /&gt;
* Marvell Berlin SoC Family&lt;br /&gt;
* ARMv8 based Samsung Exynos SoC family&lt;br /&gt;
* ARMv8 based Freescale Layerscape SoC family&lt;br /&gt;
* Hisilicon SoC Family&lt;br /&gt;
* Mediatek MT65xx &amp;amp; MT81xx ARMv8 SoC&lt;br /&gt;
* Marvell EBU SoC Family&lt;br /&gt;
* Qualcomm Platforms&lt;br /&gt;
* Rockchip Platforms&lt;br /&gt;
* AMD Seattle SoC Family&lt;br /&gt;
* Altera&#039;s Stratix 10 SoCFPGA Family&lt;br /&gt;
* NVIDIA Tegra SoC Family&lt;br /&gt;
* Spreadtrum SoC platform&lt;br /&gt;
* Cavium Inc. Thunder SoC Family&lt;br /&gt;
* ARMv8 software model (Versatile Express)&lt;br /&gt;
* AppliedMicro X-Gene SOC Family&lt;br /&gt;
* Xilinx ZynqMP Family&lt;br /&gt;
|&lt;br /&gt;
|300 HZ&lt;br /&gt;
|Voluntary Kernel Preemption (Desktop)&lt;br /&gt;
|64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
If you do desktop multitasking, you may want to switch to Voluntary Kernel Preemption (Desktop) or Preemptible Kernel (Low-Latency Desktop) and up the Timer Frequency.  If you run a dedicated render farm node or a dedicated bitcoin miner use No Forced Preemption (Server) and decrease the Timer Frequency.&lt;br /&gt;
&lt;br /&gt;
Optimized modules (most are already compiled as modules):&lt;br /&gt;
* raid6 -- altivec, avx512, ssse3, avx2, mmx, sse, sse2, neon&lt;br /&gt;
* some operations of raid5 -- mmx (32 bit), sse (64 bit), avx&lt;br /&gt;
For Kernel API:&lt;br /&gt;
* 32-bit memcpy -- 3dnow&lt;br /&gt;
* 32-bit memory page clearing and copying -- sse (Athlon/K7 only), mmx&lt;br /&gt;
From x86/crypto, arm/crypto, powerpc/crypto:&lt;br /&gt;
* CAMELLIA -- avx2, avx, aes-ni&lt;br /&gt;
* CHACHA20 -- avx2, neon&lt;br /&gt;
* CAST5 -- avx&lt;br /&gt;
* CAST6 -- avx&lt;br /&gt;
* TWOFISH -- avx&lt;br /&gt;
* SERPENT -- avx2, avx, sse2&lt;br /&gt;
* SHA1 -- avx2, ssse3, neon, spe&lt;br /&gt;
* SHA2 -- avx2&lt;br /&gt;
* SHA256 -- ssse3, neon, spe&lt;br /&gt;
* SHA512 -- avx2, ssse3, neon&lt;br /&gt;
* POLY1305 -- avx2&lt;br /&gt;
* GHASH -- pclmulqdq (part of aes-ni), vmx (power8)&lt;br /&gt;
* AES -- aes-ni, neon, vmx (power8), spe&lt;br /&gt;
* CRC32 -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
* CRCT10DIF -- pclmulqdq, sse, neon, vmx (power8)&lt;br /&gt;
&lt;br /&gt;
=== Fast reboots with kexec ===&lt;br /&gt;
&lt;br /&gt;
If you want to reboot the kernel fast avoiding the POST test, you need &amp;lt;code&amp;gt;sudo apk add kexec-tools&amp;lt;/code&amp;gt; and enable kexec in the kernel:&lt;br /&gt;
&lt;br /&gt;
  Processor type and features&lt;br /&gt;
    [*] kexec system call&lt;br /&gt;
&lt;br /&gt;
=== Hibernation to prevent data loss ===&lt;br /&gt;
&lt;br /&gt;
  Power management and ACPI options&lt;br /&gt;
    [*] Hibernation (aka &#039;suspend to disk&#039;)&lt;br /&gt;
&lt;br /&gt;
Hibernation should be used if you have a laptop.  You don&#039;t want the laptop to suddenly shut off resulting in data loss, you want it to save your work based on a percentage of battery life (this requires special script).  When you do hibernation and when it restores back, it should lock down the computer and ask for prompt.  Depending on your needs, the hibernated image can be encrypted/decrypted which again requires additional customization to scripts.&lt;br /&gt;
&lt;br /&gt;
Hibernation with an unsanitized swap file is generally insecure because data and unlocked memory pages is swapped out in plaintext.  To increase the security either disable swap (Alpine default) or use an encrypted swap.  The swap file/partition is typically used as a dump of the hibernated image.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Before building, you may want to remove as many modules as possible.  This will reduce the time to compile greatly.  Also, you may want to use [https://github.com/ccache/ccache/ ccache] for faster recompiles especially if you are searching for the minimal set of options or modules to use or include.&lt;br /&gt;
&lt;br /&gt;
You should then do an &amp;lt;code&amp;gt;abuild -r&amp;lt;/code&amp;gt; to attempt to build it.&lt;br /&gt;
&lt;br /&gt;
== Installing ==&lt;br /&gt;
&lt;br /&gt;
To install it you do a &amp;lt;code&amp;gt;sudo apk add linux-NAME&amp;lt;/code&amp;gt; where NAME is your custom kernel name.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Before you test, you should install the lts kernel too, using &amp;lt;code&amp;gt;sudo apk add linux-hardened&amp;lt;/code&amp;gt;.  You may be missing a module and can&#039;t boot, so you use the other kernel as the fallback boot kernel.  Don&#039;t forget to update your bootloader configuration.&lt;br /&gt;
&lt;br /&gt;
To test, first you should make a bootable Alpine USB image.  Then, when you have your rescue USB done, you &amp;lt;code&amp;gt;doas reboot&amp;lt;/code&amp;gt; the computer.&lt;br /&gt;
&lt;br /&gt;
To test it, you basically do trial and error.  Sometimes your config is missing something if you want to have a bare minimum setting.&lt;br /&gt;
&lt;br /&gt;
If you are curious about correctness testing, some kernel modules or components do preform self tests at the beginning of the boot process.  The tools may have test suites that you run with the make command.&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel]]&lt;/div&gt;</summary>
		<author><name>Nabbi</name></author>
	</entry>
</feed>