Repository navigation
Booting Linux
OpenABL gives Linux a standard UEFI boot. If your image boots on a UEFI arm64 machine with systemd-boot, GRUB or a unified kernel image, it should boot with OpenABL once it has the right devicetree.
Linux is booted from the drives the Boot source setting allows: internal storage (UFS or eMMC), the SD card, and USB drives. For USB, OpenABL switches the port to host mode. Auto tries internal storage first.
The order:
- UEFI
Boot####options:BootNext, thenBootOrder. - On each drive: Boot Loader Specification entries and unified kernel images, then extlinux.conf labels, then the default boot file.
| Method | Path on the drive |
|---|---|
| Boot Loader Specification Type #1 entries | \loader\entries\*.conf |
| Unified kernel images (Type #2 entries) | \EFI\Linux\*.efi |
| extlinux.conf |
\extlinux\extlinux.conf or \boot\extlinux\extlinux.conf
|
| Default boot file (GRUB, systemd-boot or any EFI loader) | \EFI\BOOT\BOOTAA64.EFI |
Kernels are started through their EFI stub, with their initrds and a devicetree. gzip-compressed kernels are decompressed first.
\loader\entries\linux.conf:
title My Linux
linux /vmlinuz
initrd /initramfs.img
devicetree /dtbs/qcom/sm8250-retroid-pocket-5.dtb
options root=PARTLABEL=rootfs rw quiet
\extlinux\extlinux.conf:
default linux
label linux
kernel /Image
initrd /initramfs.img
fdt /dtbs/qcom/sm8250-retroid-pocket-5.dtb
append root=PARTLABEL=rootfs rw quiet
The timeout key in \loader\loader.conf decides whether Boot entries
shows before Linux boots. It is read from the first allowed drive whose
loader.conf has one.
timeout |
At boot |
|---|---|
Not set, 0, menu-hidden or menu-disabled
|
Boots the default entry at once. |
| A number of seconds | Shows Boot entries and counts down to the default. Any key stops the countdown; Back opens the menu. |
menu-force |
Shows Boot entries until an entry is picked. |
As in systemd-boot:
-
bootctl set-timeout(theLoaderConfigTimeoutvariable) overrides it. -
systemctl reboot --boot-loader-menu=(LoaderConfigTimeoutOneShot) overrides both for one boot and always shows the entries. -
systemctl reboot --boot-loader-entry=(LoaderEntryOneShot) boots that entry at once.
Boot counting (name+3.conf) follows systemd's
Automatic Boot Assessment,
and the Boot Loader Interface
variables are set.
The devicetree Linux boots with comes from, in order:
- The boot entry's own devicetree (
devicetree, plus anydevicetree-overlay, in a BLS entry;fdtorfdtdirin extlinux.conf; or one a loader such as GRUB installs). - The Device model chosen in the menu.
- The firmware's own devicetree (Firmware default).
Device model lists the model name of every .dtb file in these folders on
the boot source's drives, and nowhere else:
\boot\grub-
\dtbs,\dtbs\qcom -
\dtb,\dtb\qcom
When the chosen model's devicetree has a panel rotation, Display rotation set to Auto follows it.
If the kernel's devicetree has a splash_region (or cont_splash_region)
node, OpenABL keeps the boot splash on screen and points that region at its
framebuffer, as Qualcomm's ABL does for Android, so the picture stays up
until Linux's display driver takes over. Without one, the display is switched
off before Linux starts and Linux brings it up from cold.
Loaders that call EFI_DT_FIXUP_PROTOCOL (systemd-boot, and GRUB 2.12 and
later) get the same fix-ups for the devicetree they load.
Before the OS starts, OpenABL hands it the memory XBL no longer needs: DRAM
outside the SoC's carveouts, XBL's unused regions, the plain reserved parts of
UEFI_FD and FV_Region, and the display region except the framebuffer
still on screen.
Linux reaches the UEFI variables (for bootctl, efibootmgr, boot counting
and the Boot Loader Interface) only through its QSEECOM driver,
qcom_qseecom_uefisecapp. That driver works only on SoCs in qcom_scm's
allowlist, so apply the kernel patch from the repository's Linux/ folder,
which adds SDM845, SM4450, SM6115, SM8250, SM8550, SM8650 and SM8750, and
enable CONFIG_QCOM_QSEECOM and CONFIG_QCOM_QSEECOM_UEFISECAPP.
OpenABL also publishes:
- an ESRT entry with its version:
/sys/firmware/efi/esrt/entries/entry0/fw_version(major << 16 | minor); - an
EFI_RT_PROPERTIES_TABLEtelling Linux which runtime services XBL lacks:SetVirtualAddressMapon SDM845, all of them on SM6115.
A whole disk image written to the userdata partition boots too: OpenABL
finds the ESP inside it. Linux doesn't read a partition table inside a
partition, so the initramfs must map the image's root itself, for example:
losetup -P --sector-size 4096 /dev/loop0 /dev/disk/by-partlabel/userdataUse --sector-size 4096 for an image made with 4096-byte sectors on UFS.
An install like this, or one that added its own partitions after
userdata, is what Uninstall CFW in the menu removes.
An image built with --no-standard-boot skips Boot Loader Specification
entries, UKIs, extlinux.conf and Boot#### options, and boots only
\EFI\BOOT\BOOTAA64.EFI.
Getting started
Linux
Help
Development
About