device-generic-x86_64: new aport (MR 4554)

This device package is intended to replace the tablet-x*uefi device
packages. It was made by basically merging config from those two
packages.

One important change (besides the name, covered later) is that it
replaces grub-efi with sd-boot for these devices.

The pkgver is starting at '8' to get ahead of the packages this is meant
to replace.

Because package names, especially for device packages(!), is important,
here's a long explanation of why the name is "device-generic-x86_64":

"uefi" was excluded from the device package name, because it should (in
theory at least...) be able to simultaneously support EFI and non-EFI
boot in 1 device package. The device-qemu-amd64 package kiiiinda does
this already and could be a useful example for how to do that, though in
this situation we'd need to support syslinux for legacy boot instead of
what qemu does (bypass installed bootloader and directly boot the
kernel). In other words, the packages this one is meant to replace only
support EFI boot, they currently don't support legacy boot. So IF we
need to support legacy boot in the future and IF there's no way to
support both in one package, THEN we can consider changing the name of
this one or calling the other "-legacy" or something.

"x86_64" instead of "amd64" (like the device-qemu-amd64 device package),
because "x86_64" is what Alpine uses to refer to this arch, and it
doesn't have a hw vendor name baked into it.

"tablet" was dropped from the name, because there are many other x86_64 devices
out there that people might want to install pmOS. For example, it might be
confusing if you want to install pmOS on an x86_64 toaster but best
pmOS image for it is named "device-tablet-..."
This commit is contained in:
Clayton Craft 2023-10-05 20:07:20 -07:00 committed by Anton Bambura
parent 3695e5b98f
commit 93b904420a
No known key found for this signature in database
GPG key ID: 1441EAFE8D7F4C2D
3 changed files with 128 additions and 0 deletions

View file

@ -0,0 +1,83 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-generic-x86_64
# note: this could also support legacy boot in the future, e.g. with syslinux!
pkgdesc="Generic x86_64 system, with EFI"
pkgver=8
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="x86_64"
options="!check !archcheck"
depends="
alsa-ucm-conf
postmarketos-base
sof-firmware
systemd-boot
"
makedepends="devicepkg-dev"
source="
deviceinfo
modules-initfs
"
subpackages="
$pkgname-kernel-edge:kernel_edge
$pkgname-kernel-lts:kernel_lts
$pkgname-libva
$pkgname-mesa
$pkgname-vulkan
"
provides="device-tablet-x64uefi=$pkgver-r$pkgrel device-tablet-x86uefi=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi device-tablet-x86uefi"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
libva() {
install_if="$pkgname=$pkgver-r$pkgrel libva"
provides="device-tablet-x64uefi-libva=$pkgver-r$pkgrel device-tablet-x86uefi-libva=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi-libva device-tablet-x86uefi-libva"
depends="intel-media-driver libva-intel-driver mesa-va-gallium"
mkdir "$subpkgdir"
}
mesa() {
install_if="$pkgname=$pkgver-r$pkgrel mesa-gl"
provides="device-tablet-x64uefi-mesa=$pkgver-r$pkgrel device-tablet-x86uefi-mesa=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi-mesa device-tablet-x86uefi-mesa"
depends="mesa-dri-gallium"
mkdir "$subpkgdir"
}
kernel_edge() {
pkgdesc="Alpine Edge kernel"
provides="device-tablet-x64uefi-kernel-edge=$pkgver-r$pkgrel device-tablet-x86uefi-kernel-edge=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi-kernel-edge device-tablet-x86uefi-kernel-edge"
depends="linux-edge"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_lts() {
pkgdesc="Alpine LTS kernel"
provides="device-tablet-x64uefi-kernel-lts=$pkgver-r$pkgrel device-tablet-x86uefi-kernel-lts=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi-kernel-lts device-tablet-x86uefi-kernel-lts"
depends="linux-lts"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
vulkan() {
install_if="$pkgname=$pkgver-r$pkgrel vulkan-loader"
provides="device-tablet-x64uefi-vulkan=$pkgver-r$pkgrel device-tablet-x86uefi-vulkan=$pkgver-r$pkgrel"
replaces="device-tablet-x64uefi-vulkan device-tablet-x86uefi-vulkan"
depends="mesa-vulkan-ati mesa-vulkan-intel mesa-vulkan-swrast"
mkdir "$subpkgdir"
}
sha512sums="
33f0450413c7b364390fdc715578b41389bced5ff69f04a2128155f5ad828ed0e1cc17a20b610eccf4bd99560e21be91e362faaa72e9decad4623f8669e8ab7a deviceinfo
d65ca12564ef032507c19359643794a14579fd1d065777f9042d40d38aad4d40d99c10aae9a3acd7799f4ad95651b6ca9d83335501d08869dc391f3050df4d1f modules-initfs
"

View file

@ -0,0 +1,23 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="generic x86_64 system"
deviceinfo_manufacturer="generic"
deviceinfo_codename="generic-x86_64"
deviceinfo_year="1999"
deviceinfo_arch="x86_64"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_gpu_accelerated="true"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_kernel_cmdline="PMOS_FORCE_PARTITION_RESIZE"
deviceinfo_partition_type="gpt"
deviceinfo_boot_filesystem="fat32"
deviceinfo_generate_systemd_boot="true"

View file

@ -0,0 +1,22 @@
ahci
ehci_hcd
ehci_pci
hid-multitouch
i2c_hid_acpi
i915
jbd2
libahci
libata
mbcache
mmc_block
mmc_core
scsi_mod
sd
sd_mod
sdhci_acpi
sg
uas
usb
usb_storage
xhci_hcd
xhci_pci