hp-elitebook-ultra-g1q: new device

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7270>
This commit is contained in:
askiiart 2025-10-29 21:55:37 -05:00 committed by [Merge Bot]
parent 367d72c17e
commit cb57de3975
No known key found for this signature in database
7 changed files with 320 additions and 0 deletions

View file

@ -0,0 +1,93 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-hp-elitebook-ultra-g1q
pkgdesc="HP EliteBook Ultra G1q"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
firmware-asus-s5507q-dpu
firmware-hp-elitebook-ultra-g1q-common
firmware-hp-elitebook-ultra-g1q-wifi
postmarketos-base
systemd-boot
"
_pmb_recommends="
bootmac
dtbloader
firmware-brcm43752
firmware-siliconlabs-rs9116
linux-firmware-qca
linux-firmware-rtw88
pd-mapper
rmtfs
soc-qcom-qbootctl
tqftpserv
woa-firmware-yoinker
"
install="$pkgname.pre-upgrade"
makedepends="devicepkg-dev"
subpackages="
$pkgname-kernel-next:kernel_next
$pkgname-kernel-mainline:kernel_mainline
$pkgname-kernel-lts:kernel_lts
$pkgname-kernel-stable:kernel_stable
$pkgname-kernel-postmarketos-qcom-laptop:kernel_postmarketos_qcom_laptop
"
source="
deviceinfo
kernel-cmdline.conf
modules-initfs
noremote_proc.conf
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
# blacklist kernel module so usb-c works properly
install -Dm644 "$srcdir/noremote_proc.conf" "$pkgdir/usr/lib/modprobe.d/noremote_proc.conf"
}
kernel_next() {
pkgdesc="Unstable next kernel (linux-next)"
depends="linux-next"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline() {
pkgdesc="Mainline postmarketOS kernel (linux-postmarketos-mainline)"
depends="linux-postmarketos-mainline"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_lts() {
pkgdesc="Long term support (LTS) kernel from Alpine Linux (linux-lts)"
depends="linux-lts"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_stable() {
pkgdesc="Stable kernel from Alpine Linux (linux-stable)"
depends="linux-stable"
provides="$pkgname-kernel-edge=$pkgver-r$pkgrel"
replaces="$pkgname-kernel-edge"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_postmarketos_qcom_laptop() {
pkgdesc="Mainline kernel with additional patches for Qualcomm Snapdragon-based laptops (linux-postmarketos-qcom-laptop)"
depends="linux-postmarketos-qcom-laptop"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
sha512sums="
39b86d82834c86510788b64ac118e4c2307a7f5ef0dfde7eefef88d09407ced1917499281829ad8b856f24e8d56edda1b3e074ce7462a969213f781d30613d32 deviceinfo
81492d13da96e7718ca546a6e879c54fc105e4b1dc4316b6e91f8c51cfbc816bbb0673222579afb5ce5a38fad91d8be7639aa938e0e8f77ff29a8d5d301d4949 kernel-cmdline.conf
e26948d1f5005b16fefcaa51985010a5e55adef9ba3ed9d1f3d046c4b8928afbdd317123d0ca2fb0904e5431536c0d995144f66ad9025c7937ff0aae0537dfef modules-initfs
6adc7d0c6822c2aa8ff53007391876bb591dddc0a6e3294eb6b1e48012b2fc808d5d2aca9233d6ca506a16e0df0cba17ba61731bf5b80d1241260405e4ea58dc noremote_proc.conf
"

View file

@ -0,0 +1,70 @@
#!/bin/sh -e
#
# Handle packages that were moved from depends to _pmb_recommends by nuking
# apk from orbit, adding the packages to world and then re-running it.
# The old version of the package is passed in as the second argument
OLD_VER="$2"
NEW_VER="$1"
old_ver_less() {
[ "$(apk version -t "$OLD_VER" "$1")" = "<" ]
}
# For a given upgrade, ensure that certain package are in
# the world file, otherwise fail with a nice message letting
# the user know how to manually add them
ensure_installed() {
# $1: version to check
# $@: list of packages
local missing ver cmd
ver="$1"
shift
# Only applicable if upgrading from a version older
# than $ver, otherwise we're all good here.
if ! old_ver_less "$ver"; then
return
fi
# Determine which packages in our list aren't in /etc/apk/world
# these packages were moved from depends to _pmb_recommends and
# must be manually installed to ensure we don't break booting
missing="$(printf '%s\n' "$@" | grep -v -f /etc/apk/world | tr '\n' ' ')"
# None missing? then we're good!
[[ -n "$missing" ]] || return
printf '\n\n'
printf 'ERROR: some packages that your device might need are no longer installed\n'
printf ' automatically. To ensure your device continues to function as expected\n'
printf ' plese run the following command:\n\n'
printf ' apk add '
printf '%s ' $missing
printf '\n'
return 0
}
# We migrated everything that isn't required on ALL
# platforms from depends to recommends in 12-r2. Since
# we can't know which packages are in use, the user must
# manually add them all to their world file for now. They
# can uninstall any unused ones after the upgrade at their
# own risk.
ensure_installed 12-r2 \
linux-firmware-qcom \
linux-firmware-ath10k \
linux-firmware-ath11k \
linux-firmware-ath12k \
linux-firmware-qca \
linux-firmware-rtw88 \
firmware-siliconlabs-rs9116 \
firmware-brcm43752 \
soc-qcom-qbootctl \
rmtfs \
pd-mapper \
tqftpserv \
bootmac \
woa-firmware-yoinker \
dtbloader

View file

@ -0,0 +1,19 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="HP EliteBook Ultra G1q"
deviceinfo_manufacturer="HP"
deviceinfo_codename="hp-elitebook-ultra-g1q"
deviceinfo_year="2024"
deviceinfo_dtb="qcom/x1e80100-hp-elitebook-ultra-g1q"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_chassis="laptop"
deviceinfo_external_storage="true"
deviceinfo_drm="true"
# Bootloader related
deviceinfo_boot_filesystem="fat32"

View file

@ -0,0 +1,3 @@
earlycon
clk_ignore_unused
pd_ignore_unused

View file

@ -0,0 +1,91 @@
atmel_mxt_ts
aux-hpd-bridge
backlight
bq25890_charger
clk-smd-rpm
display_connector
dispcc-x1e80100
dwc3
dwc3-qcom
edt-ft5x06
gcc-sm6115
goodix
gpi
gpio_sbu_mux
gpio_vibra
gpucc-x1e80100
i2c-hid
i2c-hid-of
i2c-hid-of-elan
i2c-qcom-geni
icc-bwmon
icc-osm-l3
icc-smd-rpm
led_bl
libcomposite
lmh
meson_drm
meson_dw_hdmi
msm
nvme
nvmem_qfprom
onboard-usb-dev
panel_edp
panel_samsung_atna33xc20
panel-samsung-s6d7aa0
panel-samsung-sofef00
panel_sitronix_st7703
panel-visionox-rm69299
phy-nxp-ptn3222
phy_qcom_edp
phy-qcom-eusb2-repeater
phy-qcom-qmp-combo
phy-qcom-qmp-pcie
phy-qcom-qmp-ufs
phy-qcom-qmp-usb
phy-qcom-qmp-usbc
phy-qcom-qusb2
phy-snps-eusb2
phy_sun6i_mipi_dphy
pinctrl-sm6115
pinctrl_sm8550
rtc_pm8xxx
pmic-glink
pmic-glink-altmode
ps883x
pwm_bl
pwm_sun4i
qcom-apcs-ipc-mailbox
qcom_glink
qcom_glink_rpm
qcom_hwspinlock
qcom_pmic_tcpm
qcom_smd
qcom_smd-regulator
qcom-spmi-pmic
qcom_usb_vbus-regulator
qnoc-qcm2290
qnoc-sm6115
rmi_core
rmi_i2c
rpmpd
rpm-proc
rpmsg_core
smd-rpm
smem
sun4i_drm
sun4i_i2s
sun4i_tcon
sun6i_dma
sun6i_mipi_dsi
sun8i_mixer
sun8i_tcon_top
tcpm
tcsrcc-x1e80100
typec
udc-core
ufs-qcom
ulpi
usb-storage
xhci-plat-hcd
zinitix

View file

@ -0,0 +1,3 @@
# not needed to boot off USB with qcom kernel
# but still needed so USB works properly
blacklist qcom_q6v5_pas

View file

@ -0,0 +1,41 @@
pkgname=firmware-hp-elitebook-ultra-g1q
pkgdesc="Firmware for the HP EliteBook Ultra G1q"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="proprietary"
arch="aarch64"
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
depends="
firmware-asus-s5507q-common
linux-firmware-ath11k
linux-firmware-qcom
"
_wifi_commit="4be38939a006c76e12436636843135713112de1c"
source="
https://github.com/jglathe/qca-swiss-army-knife/raw/$_wifi_commit/tools/scripts/ath11k/board-2.bin.zst
"
subpackages="
$pkgname-common:common
$pkgname-wifi:wifi
"
replaces="linux-firmware-ath11k"
package() {
mkdir -p "$pkgdir"
}
common() {
# just a symlink to make the asus-s5507q firmware work on here as well
mkdir -p "$subpkgdir/lib/firmware/qcom/x1e80100/hp/"
ln -s ../ASUSTeK/vivobook-s15/ "$subpkgdir/lib/firmware/qcom/x1e80100/hp/elitebook-ultra-g1q"
}
wifi() {
mkdir -p "$subpkgdir/lib/firmware/ath11k/WCN6855/hw2.1/"
install -Dm644 "$srcdir/board-2.bin.zst" "$subpkgdir/lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin.zst"
}
sha512sums="
fde93fb24fa17a0c8c279592819d99cb20c1271a4ae83f7e97ea390a36a331bc58ff7f91fb102193c85771c82e48325deae629f7a8e21fb71f0652fe2b096db0 board-2.bin.zst
"