device-pine64-pinephonepro: u-boot & systemd-boot

Remove Grub and replace with mainline u-boot & systemd-boot. The two
methods to boot now:
- Hold the RE button to boot off of the SD Card
- With a blank SPI, boot off of eMMC using the power button

SPI needs to be blank as u-boot chainloading is broken

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9135>
This commit is contained in:
Rudraksha Gupta
2026-08-10 10:46:37 +00:00
parent 2e4ca5cc20
commit 5f0d91ca84
9 changed files with 42 additions and 65 deletions
@@ -2,13 +2,12 @@
maintainer="Rudraksha Gupta <guptarud@gmail.com>"
pkgname=device-pine64-pinephonepro
pkgdesc="PINE64 PinePhone Pro"
pkgver=9
pkgrel=1
pkgver=10
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
# pmb:strict is required for grub
options="!check !archcheck pmb:strict"
options="!check !archcheck"
depends="
alsa-ucm-conf>=1.2.6.2
eg25-manager>=0.4.2
@@ -18,11 +17,11 @@ depends="
linux-pine64-pinephonepro
postmarketos-base>=25-r1
soc-rockchip-rk3399
systemd-boot
u-boot-rockchip
"
makedepends="
devicepkg-dev
grub
grub-efi
"
install="$pkgname-openrc.post-install $pkgname-openrc.post-upgrade"
subpackages="
@@ -50,40 +49,11 @@ builddir="$srcdir/build"
build() {
mkdir "$builddir"
devicepkg_build $startdir $pkgname
grub-mkimage \
--prefix="/grub" \
--output="$builddir/bootaa64.efi" \
--format="arm64-efi" \
--compression="xz" \
\
all_video \
cat \
configfile \
disk \
echo \
efi_gop \
fat \
gzio \
help \
iso9660 \
linux \
ls \
normal \
part_gpt \
part_msdos \
search \
search_label \
test \
true
}
package() {
devicepkg_package $startdir $pkgname
# Grub / bootloader
install -Dm644 -t "$pkgdir"/boot/EFI/Boot bootaa64.efi
# Alsa usecase manager config
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/PinePhonePro \
"$srcdir"/HiFi.conf \
@@ -134,7 +104,7 @@ x11() {
sha512sums="
2d68ffe143f633a86670f30e45dbad1cc313f219f22b7cd3319ab44bb7209c20cb29f2ff2c60c92390154af9c9a6815c4186be555364cf31552005eba024c0e7 51_keyboard.gschema.override
98e9dcfb36dd5843ff441b148e3bffb70757c59601c5f01f55a584e8f017c7ca73f2275c1bff46e4236dd8174df36a43d10abf9b8dadee988b962036846dc6ed 90-modem-eg25.rules
9ad6ca0bc493e98b9e80a5776f7cf13a8d684e1039911fe9f972ad5f9aa0c6b60dd2a5cfdd0a61e131b26221ccb0190cd40e08a7a03495aa68775bdd07218f3d deviceinfo
86a365e937e0e9bd420d49463a1140534b07c5ecb375ec9676169ca50c26ccb89116661feea2bd2638bc12d8a057d4c5fb93b939f35ab9d640bc01fec6d514b2 deviceinfo
7a17cdb8305dec26f8d78a6c229e9373c2a9d0d63e51d853772b4d78f31c417f217966a75c970121e45045b141b04afa3d7ba4a4f9898a75020512e8e4048d0f kernel-cmdline.conf
0555be124ef4add4d70b54f550e63b4ff15f099541dbe37c4f61bf64d38bfb8bb8c6b765a0cc6bf361419711b7d1124fd0cbbe8ff459f5e85e6f850d7d2cd88e modules-initfs
43f67e94491791685cdbb4874bb3034b1d297bdf3d23e7405c45ba8c58de72b4fb6a9943b79f46ef7b8f4dbc4d9db254ebec8eb3453d720a5a8fad277c6a9d88 ppkb.sh
@@ -22,5 +22,8 @@ deviceinfo_dev_internal_storage="/dev/mmcblk2"
deviceinfo_dev_internal_storage_repartition="true"
# Bootloader related
deviceinfo_generate_grub_config="true"
deviceinfo_uboot_boardname="pinephone-pro-rk3399"
deviceinfo_sd_embed_firmware="u-boot/pinephone-pro-rk3399/u-boot-rockchip.bin:32"
deviceinfo_sd_embed_firmware_step_size="1024"
deviceinfo_boot_part_start="32768"
deviceinfo_boot_filesystem="fat32"
@@ -1 +0,0 @@
../../community/device-pine64-pinephone/sway-pinephone-keyboard.conf
@@ -0,0 +1,5 @@
input "0:0:PinePhone_Keyboard" {
xkb_layout us
xkb_model ppkb
xkb_options lv3:ralt_switch
}
@@ -1 +0,0 @@
../../community/device-pine64-pinephone/x11-pinephone-keyboard.conf
@@ -0,0 +1,17 @@
Section "InputClass"
Identifier "generic-keyboard"
MatchIsKeyboard "True"
MatchDevicePath "/dev/input/event*"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
EndSection
Section "InputClass"
Identifier "PinePhone Keyboard"
MatchIsKeyboard "True"
MatchDevicePath "/dev/input/event*"
MatchProduct "PinePhone Keyboard"
Option "XkbLayout" "us"
Option "XkbModel" "ppkb"
Option "XkbOptions" "lv3:ralt_switch"
EndSection
@@ -1,7 +1,7 @@
maintainer="Rudraksha Gupta <guptarud@gmail.com>"
pkgname=linux-pine64-pinephonepro
pkgver=7.1
pkgrel=0
pkgrel=1
pkgdesc="Mainline kernel for the Pinephone Pro"
arch="aarch64"
_flavor="${pkgname#linux-}"
@@ -210,7 +210,7 @@ package() {
sha512sums="
10c0cfd70a7a5731963cb4c7538396f6ed637d7db532a1c04b00628af47f4b81ffb3d92200e64ba1ce04047e4b2e39e6845c4067762e85ad9df13f2740c10397 ppp-v7.1.tar.gz
f489be70242738c722dd588b9cadc94dbab329a76fed396473318f94abcc9d724ed54cd06f5d101e9b95e5a9098e46a5c8c95ddeb6d30f3b87f822b83080ac43 config-pine64-pinephonepro.aarch64
a0de9fbc7e532e4783f7d413e8ccef24097bed2f92cd64d7315a6f7df3df89a1832587d61eab1bc428ea587a5018c6140588c46a7a919fba1d0ab6fb69687411 config-pine64-pinephonepro.aarch64
cafe0f07dab850059475c8f84df0b859d65bedda455517a5996f75d4e5f28c7fe66ac5a2b2e4ee6b46ed173819b899cc37ac08d1106bf635beab018ad636ee1e 0001-ASoC-codecs-rt5640-Fix-output-mixer-input-channel-li.patch
5db306c6728666c3e64ca28a3cc330d7452c87c9119aa8cd57a4549cee7aee1c1137dedece8c50bb58d1040bd861d7722c6341112b24699919fb5a3bd816afdb 0002-ASoC-codecs-rt5640-Fix-hpout-restore-when-lout-is-en.patch
a734d758f0e84fbd7dd3c8e7daa24ca8778af2d25e8d1df3c7e27978f616428fa57e507dede65f59dab6ce23597380b69d83fde35b549b3c0d8b55a38f58a57b 0003-ASoC-codecs-rt5640-Add-input-mixer-input-volume-cont.patch
@@ -37,6 +37,10 @@ CONFIG_COMPILE_TEST=y
# CONFIG_WERROR is not set
CONFIG_LOCALVERSION=""
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_ZSTD is not set
CONFIG_DEFAULT_INIT=""
CONFIG_DEFAULT_HOSTNAME="localhost"
CONFIG_SYSVIPC=y
@@ -1998,7 +2002,7 @@ CONFIG_EFI_VARS_PSTORE=y
CONFIG_EFI_PARAMS_FROM_FDT=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_GENERIC_STUB=y
# CONFIG_EFI_ZBOOT is not set
CONFIG_EFI_ZBOOT=y
CONFIG_EFI_ARMSTUB_DTB_LOADER=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
CONFIG_EFI_CAPSULE_LOADER=m
@@ -3,7 +3,7 @@
maintainer="Arnav Singh <me@arnavion.dev>"
pkgname=device-pine64-pinephone
pkgver=15
pkgrel=0
pkgrel=1
pkgdesc="PINE64 PinePhone"
url="https://postmarketos.org"
license="MIT"
@@ -1,5 +0,0 @@
input "0:0:PinePhone_Keyboard" {
xkb_layout us
xkb_model ppkb
xkb_options lv3:ralt_switch
}
@@ -0,0 +1 @@
../../community/device-pine64-pinephonepro/sway-pinephone-keyboard.conf
@@ -1,17 +0,0 @@
Section "InputClass"
Identifier "generic-keyboard"
MatchIsKeyboard "True"
MatchDevicePath "/dev/input/event*"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
EndSection
Section "InputClass"
Identifier "PinePhone Keyboard"
MatchIsKeyboard "True"
MatchDevicePath "/dev/input/event*"
MatchProduct "PinePhone Keyboard"
Option "XkbLayout" "us"
Option "XkbModel" "ppkb"
Option "XkbOptions" "lv3:ralt_switch"
EndSection
@@ -0,0 +1 @@
../../community/device-pine64-pinephonepro/x11-pinephone-keyboard.conf