Architecture: Difference between revisions
Prabuanand (talk | contribs) (fixed links to the category or start pages) |
Prabuanand (talk | contribs) m (added Category:Architectures category so this page can be easily reached) |
||
Line 160: | Line 160: | ||
<code>/etc/init.d/modules</code> loads all modules specified in <code>/etc/modules</code> and <code>/(etc|run|usr/lib|lib)/modules-load.d/*.conf</code> | <code>/etc/init.d/modules</code> loads all modules specified in <code>/etc/modules</code> and <code>/(etc|run|usr/lib|lib)/modules-load.d/*.conf</code> | ||
[[Category:Hardware]] | [[Category:Hardware]][[Category:Architectures]] |
Revision as of 04:20, 19 December 2024
This page documents various components that make up Alpine Linux distribution.
Architectures supported
Arch | Port/Model | Description |
---|---|---|
x86 | x86 | 32 bit Intel and AMD processors,(ia32) Requires SSE2 and CMOV. |
x86_64 | 64 bit x86 (amd64) | |
ARM | armhf | 32 bit ARM (hard-float ABI) - ARMv6- (defconfig bcmrpi) Raspberry Pi 1, Zero, ZeroW, cm1 |
armv7 | 32 bit ARMv7 - (defconfig bcm2709) Raspberry Pi 2, 3, 3+, Zero2W, cm3, cm3+ | |
aarch64 | 64 bit ARM - ARMv8 -(defconfig bcm2711) Raspberry Pi 3, 3+, 4, 400, Zero2W, cm3, cm3+, cm4, 5 | |
PowerPC | ppc64le | 64 bit PowerPC (little-endian) (POWER8 minimum) |
IBM System Z | s390x | IBM mainframes using the z/Architecture (z196 minimum) |
RISC V | riscv64 | 64 bit RISC V |
LoongArch | loongarch64 | 64 bit LoongArch |
Alpine Packaging
Package Building
Alpine Package Building Ports
Package Building Tools
Package Format
Alpine uses packages in the .apk file format.
Package Management Tools
Boot Process
Boot Loader
The Bootloader is responsible for finding the initfs, cmdline and kernel, and handling execution over to the kernel.
Some bootloaders allow the user to interactively pick which OS or kernel to use (if more than one is available).
EFI
- The default setup uses GRUB2.
- See also UEFI Secure Boot
BIOS
- The default setup uses GRUB2.
Other
Kernel
Versioning
Flavors
- lts - long-term support kernel, general purpose
- virt - for running under virtual machines
- edge - Latest stable kernel
- rpi - Raspberry Pi
- rpi2 - Raspberry Pi 2 (Alpine ≤v3.18 only, merged with rpi in current versions)
- rpi4 - Raspberry Pi 4 (Alpine ≤v3.18 only, merged with rpi in current versions)
- ashai - Apple M1
Signing
Command line options
- modules="<modules>" - specify list of modules to be loaded by initramfs /init needed to mount real root filesystem.
Initfs
The kernel will decompress the stream of compressed cpio archives passed to it by the 'append' bootloader option to the root of 'rootfs', a tmpfs automatically mounted at '/' by the kernel at boot.
'/init' Script
Not to be confused with /sbin/init
(see below)
This script is in the root of the initfs filesystem and is called by the kernel upon completion of its boot process. It is responsible for doing whatever steps are necessary to mount the real root file system to /
and hand over control to /sbin/init
.
- Parses kernel command line options.
- Uses nlplug-findfs to discover devices.
- [Optionally] prompts for disk encryption secrets and unlocked encrypted partitions.
Initfs Module Handling
Modules required to mount the root filesystem and boot must either built into the kernel or available from with the initramfs filesystem through use of appended initrd cpio.gz files provided by the bootloader.
The /init script will first modprobe the modules specified by the modules= kernel command line option and by the name of the specified rootfs type. It will then load the contents of /etc/modules, which may include module options. Modules may be blacklisted from autoprobing (but NOT explicit insertion!) using the blacklist= kernel command line option which appends blacklist entries to '/etc/modprobe.d/boot-opt-blacklist.conf'.
Minimal Required Set
Directory Structure
- / /bin /boot /dev /etc /lib /lib/modules /media /media/cdrom /media/usb /mnt /proc /sbin /sys /usr /usr/bin /usr/sbin
Devices
- /dev/null
- /dev/console
- /dev/kmsg
Mounts
- /proc
- /sys
- /dev (can be disabled?)
Configuration
- /etc/passwd
- /etc/group
- /etc/fstab
Binaries
Feature Sets
Feature sets consist of lists for the set of modules and files that need to be included in a final initramfs to support the indicated feature.
Init
/sbin/init
is the first process to be started in the live system after the initramfs completes its work. It is part of the Busybox package and should not be confused with the /init
script mentioned above.
Loading of Kernel Modules
/etc/init.d/modules
loads all modules specified in /etc/modules
and /(etc|run|usr/lib|lib)/modules-load.d/*.conf