Architecture: Difference between revisions

From Alpine Linux
(Deleted on request from kaniini - it is a fantasy land, things does not work as described)
m (+ draft)
Tag: Undo
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{TOC right}}
{{draft}}


== Alpine Hardware Architecture ("arch") Support ==
=== x86 Based ===
* [[x86]] - 32 bit x86 (ia32)
* [[x86_64]] - 64 bit x86 (amd64)
=== ARM Based ===
* [[armhf]] - 32 bit ARM (hard-float ABI)
* [[aarch64]] - 64 bit ARM
=== PowerPC Based ===
* [[ppc64le]] - 64 bit PowerPC (little-endian)
=== IBM System Z Based ===
* [[s390x]]
== Alpine Packaging ==
=== Package Building ===
==== Alpine Package Building Ports ====
* [[APKBUILD]] - Package build scripts
* [[aports]] - Official Alpine ports git repository
==== Package Building Tools ====
* [[abuild]]
=== Package Format ===
Alpine uses packages in the [[.apk file format]].
=== Package Management Tools ===
* [[apk]] - Alpine Package Keeper (see [[apk internals]] for more detail)
== Boot Process ==
=== Boot Loader ===
==== EFI ====
==== BIOS ====
==== Other ====
=== Kernel ===
==== Versioning ====
===== Flavors =====
* vanilla
* hardened
* virthardened
* rpi
==== 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' [[Bootloaders|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', the '/init' script in the root of the 'rootfs' is called by the kernel upon completion of its boot process, and is responsible for doing whatever steps are necessary to mount the real root file system to '/' and transfer control to '/sbin/init'.
* Parses kernel command line options.
* Uses [[nlplug-findfs]] to discover devices.
==== 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 =====
* [[busybox]]
* [[apk]]
==== 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 ===
Not to be confused with the '/init' script in the initramfs, '/sbin/init' is the first process to be started in the live system after the initramfs completes its work.
==== Module Loading ====
'/etc/init.d/modules' loads all modules specified in '/etc/modules' and '/(etc|run|usr/lib|lib)/modules-load.d/*.conf'
[[Category:Hardware]]
[[Category:Newbie]]

Revision as of 06:37, 14 September 2019

This material is work-in-progress ...

Do not follow instructions here until this notice is removed.
(Last edited by Innsill on 14 Sep 2019.)

Alpine Hardware Architecture ("arch") Support

x86 Based

  • x86 - 32 bit x86 (ia32)
  • x86_64 - 64 bit x86 (amd64)

ARM Based

PowerPC Based

  • ppc64le - 64 bit PowerPC (little-endian)

IBM System Z Based

Alpine Packaging

Package Building

Alpine Package Building Ports

  • APKBUILD - Package build scripts
  • aports - Official Alpine ports git repository

Package Building Tools


Package Format

Alpine uses packages in the .apk file format.

Package Management Tools

Boot Process

Boot Loader

EFI

BIOS

Other

Kernel

Versioning

Flavors
  • vanilla
  • hardened
  • virthardened
  • rpi

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', the '/init' script in the root of the 'rootfs' is called by the kernel upon completion of its boot process, and is responsible for doing whatever steps are necessary to mount the real root file system to '/' and transfer control to '/sbin/init'.

  • Parses kernel command line options.
  • Uses nlplug-findfs to discover devices.

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

Not to be confused with the '/init' script in the initramfs, '/sbin/init' is the first process to be started in the live system after the initramfs completes its work.

Module Loading

'/etc/init.d/modules' loads all modules specified in '/etc/modules' and '/(etc|run|usr/lib|lib)/modules-load.d/*.conf'