From f35f57701156666c07548cd7112f1549e917899b Mon Sep 17 00:00:00 2001 From: jenneron Date: Mon, 1 Feb 2021 04:53:03 +0200 Subject: [PATCH] device-tablet-x86uefi: new device (MR 1913) This is a generic package for devices which use x86_64 CPU and 32-bit EFI. Most distributions don't provide installation for 32-bit EFI, so installation is not user-friendly. Actually, these tablets deserve device-specific packages (I am going to make ones for ASUS VivoTab Note 8 and ASUS Transformer Book T100TA), but this one includes basic functions and can be booted on any 32-bit EFI tablet with disabled secure boot and missing device-specific package. I guess 32-bit EFI with 64-bit CPU is Intel's "feature" and AMD doesn't have such stuff, so this package will be installed only on devices with Intel CPU, unlike device-tablet-x64uefi which can be installed on any x86_64 PC. So i decided to enable some Intel specific things (userspace GPU stuff and alsa-ucm-conf). I used for reference device-tablet-x64uefi and device-trekstor-surftabduow1 packages. This package also can be used as a reference for device-specific ones. --- device/testing/device-tablet-x86uefi/APKBUILD | 40 +++++++++++++++++++ .../testing/device-tablet-x86uefi/deviceinfo | 20 ++++++++++ device/testing/device-tablet-x86uefi/grub.cfg | 6 +++ .../device-tablet-x86uefi/rootston.ini | 5 +++ 4 files changed, 71 insertions(+) create mode 100644 device/testing/device-tablet-x86uefi/APKBUILD create mode 100644 device/testing/device-tablet-x86uefi/deviceinfo create mode 100644 device/testing/device-tablet-x86uefi/grub.cfg create mode 100644 device/testing/device-tablet-x86uefi/rootston.ini diff --git a/device/testing/device-tablet-x86uefi/APKBUILD b/device/testing/device-tablet-x86uefi/APKBUILD new file mode 100644 index 000000000..3eba37a65 --- /dev/null +++ b/device/testing/device-tablet-x86uefi/APKBUILD @@ -0,0 +1,40 @@ +# Reference: +pkgname=device-tablet-x86uefi +pkgdesc="Various tablets with atom CPU" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="x86_64" +options="!check !archcheck" +depends="postmarketos-base linux-lts mesa-dri-intel libva-intel-driver grub-x86 alsa-ucm-conf" +makedepends="devicepkg-dev" +source="deviceinfo grub.cfg rootston.ini" +subpackages="$pkgname-phosh $pkgname-x11" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname + install -D "$srcdir"/grub.cfg \ + "$pkgdir"/boot/grub/grub.cfg +} + +# most tablets don't need scaling, at least x2 +phosh() { + install_if="$pkgname postmarketos-ui-phosh" + install -Dm644 "$srcdir"/rootston.ini \ + "$subpkgdir"/etc/phosh/rootston.ini +} + +x11() { + install_if="$pkgname=$pkgver-r$pkgrel xorg-server" + depends="xf86-video-modesetting" + mkdir "$subpkgdir" +} + +sha512sums="fb6ada2de95a73630da3c57c58f51c32e18c5612796747e523b91e52e89547e6719af7cc542a74aac8d6f051d217c61fb6833258d254aaf04a4247d961d96990 deviceinfo +16fbd525c3068bcfb1ccbf346e00b3e0c033dd8836c3e281eb947561aa8495d9339cba63feacaeb31bfc5a0c61a0a22c6ac24636b171e49794336d1b2e1ffc95 grub.cfg +f3667b914bb955be9e97db31dc7ed4a7c5d0c369be9549d587bb7208e270590c0c3fa36a0dd997d6f8305c5c9afb3b906423af6ca8724e806f995e61226cfc83 rootston.ini" diff --git a/device/testing/device-tablet-x86uefi/deviceinfo b/device/testing/device-tablet-x86uefi/deviceinfo new file mode 100644 index 000000000..02fe398bc --- /dev/null +++ b/device/testing/device-tablet-x86uefi/deviceinfo @@ -0,0 +1,20 @@ +# Reference: +# Please use double quotes only. You can source this file in shell scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Various tablets with atom CPU" +deviceinfo_manufacturer="Various" +deviceinfo_codename="tablet-x86uefi" +deviceinfo_modules_initfs="jbd2 mbcache scsi_mod sd_mod sg libata sd ahci libahci usb_storage usb xhci_hcd ehci_hcd uas xhci_pci fat vfat nls_cp437 nls_utf8" +deviceinfo_arch="x86_64" + +# Device related +deviceinfo_chassis="tablet" +deviceinfo_keyboard="false" +deviceinfo_external_storage="true" +deviceinfo_screen_width="800" +deviceinfo_screen_height="600" + +# Bootloader related +deviceinfo_flash_method="none" +deviceinfo_boot_filesystem="fat16" diff --git a/device/testing/device-tablet-x86uefi/grub.cfg b/device/testing/device-tablet-x86uefi/grub.cfg new file mode 100644 index 000000000..e76d713d8 --- /dev/null +++ b/device/testing/device-tablet-x86uefi/grub.cfg @@ -0,0 +1,6 @@ +timeout=0 + +menuentry "postmarketOS" { + linux ($root)/vmlinuz-lts console=null + initrd ($root)/initramfs-lts +} diff --git a/device/testing/device-tablet-x86uefi/rootston.ini b/device/testing/device-tablet-x86uefi/rootston.ini new file mode 100644 index 000000000..8118a5e78 --- /dev/null +++ b/device/testing/device-tablet-x86uefi/rootston.ini @@ -0,0 +1,5 @@ +[cursor:seat0] +map-to-output:DSI-1 + +[output:DSI-1] +scale = 1