From e32dcc0320b0cfbb041e3316349c109fcedf331f Mon Sep 17 00:00:00 2001 From: Federico Amedeo Izzo Date: Tue, 17 Feb 2026 20:53:00 +0100 Subject: [PATCH] device-nothing-spacewar: new device Part-of: --- .../81-libssc-nothing-spacewar.rules | 3 + .../testing/device-nothing-spacewar/APKBUILD | 59 +++++++++++++++++++ ...evice-nothing-spacewar-openrc.post-install | 2 + ...evice-nothing-spacewar-openrc.post-upgrade | 1 + .../device-nothing-spacewar/deviceinfo | 33 +++++++++++ .../device-nothing-spacewar/modules-initfs | 5 ++ .../firmware-nothing-spacewar/APKBUILD | 22 +++++++ 7 files changed, 125 insertions(+) create mode 100644 device/testing/device-nothing-spacewar/81-libssc-nothing-spacewar.rules create mode 100644 device/testing/device-nothing-spacewar/APKBUILD create mode 100644 device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-install create mode 120000 device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-upgrade create mode 100644 device/testing/device-nothing-spacewar/deviceinfo create mode 100644 device/testing/device-nothing-spacewar/modules-initfs create mode 100644 device/testing/firmware-nothing-spacewar/APKBUILD diff --git a/device/testing/device-nothing-spacewar/81-libssc-nothing-spacewar.rules b/device/testing/device-nothing-spacewar/81-libssc-nothing-spacewar.rules new file mode 100644 index 000000000..2bad47308 --- /dev/null +++ b/device/testing/device-nothing-spacewar/81-libssc-nothing-spacewar.rules @@ -0,0 +1,3 @@ +# iio-sensor-proxy with libssc: accelerometer mount matrix + +SUBSYSTEM=="misc", KERNEL=="fastrpc-*", ENV{ACCEL_MOUNT_MATRIX}+="-1, 0, 0; 0, -1, 0; 0, 0, -1" diff --git a/device/testing/device-nothing-spacewar/APKBUILD b/device/testing/device-nothing-spacewar/APKBUILD new file mode 100644 index 000000000..3f7da7f1f --- /dev/null +++ b/device/testing/device-nothing-spacewar/APKBUILD @@ -0,0 +1,59 @@ +# Reference: +maintainer="Federico Amedeo Izzo " +pkgname=device-nothing-spacewar +pkgdesc="Nothing Phone (1)" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends_openrc="hexagonrpcd-openrc" +depends=" + alsa-ucm-conf-qcom-sc7280 + firmware-nothing-spacewar + firmware-qcom-adreno-a660 + hexagonrpcd>=0.3.2-r3 + linux-firmware-ath11k + linux-firmware-qca + linux-postmarketos-qcom-sc7280 + make-dynpart-mappings + mkbootimg + postmarketos-base + soc-qcom + soc-qcom-modem + soc-qcom-pd-mapper + soc-qcom-qbootctl + systemd-boot + unl0kr-fbforcerefresh +" +makedepends="devicepkg-dev" +install="$pkgname-openrc.post-install $pkgname-openrc.post-upgrade" +subpackages="$pkgname-openrc" +source=" + 81-libssc-nothing-spacewar.rules + deviceinfo + modules-initfs +" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname + + install -Dm644 "$srcdir"/81-libssc-nothing-spacewar.rules -t \ + "$pkgdir"/usr/lib/udev/rules.d +} + +openrc() { + default_openrc + mkdir -p "$subpkgdir" +} + +sha512sums=" +2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-nothing-spacewar.rules +90ba83c8ebb09bfb279962570b39dc43bba774595a73d4c656f75e377db407e2f4d563899187a32cc34e9ab1db33d5281f6a517befb440952bfc9e722c9e8eba deviceinfo +39fdad0de104fb05d4fbf7883cda032c46ee25057ffaf2cf03cd0629d75cd0836e4ac857e4b1921c293fb5fc90ec18432bb7f5ff7afe73cdc3a4e1f9c153b854 modules-initfs +" diff --git a/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-install b/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-install new file mode 100644 index 000000000..973337620 --- /dev/null +++ b/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +rc-update add hexagonrpcd-adsp-sensorspd default diff --git a/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-upgrade b/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-upgrade new file mode 120000 index 000000000..504cde5e6 --- /dev/null +++ b/device/testing/device-nothing-spacewar/device-nothing-spacewar-openrc.post-upgrade @@ -0,0 +1 @@ +device-nothing-spacewar-openrc.post-install \ No newline at end of file diff --git a/device/testing/device-nothing-spacewar/deviceinfo b/device/testing/device-nothing-spacewar/deviceinfo new file mode 100644 index 000000000..ee313afc5 --- /dev/null +++ b/device/testing/device-nothing-spacewar/deviceinfo @@ -0,0 +1,33 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Nothing Phone (1)" +deviceinfo_manufacturer="Nothing" +deviceinfo_codename="nothing-spacewar" +deviceinfo_year="2022" +deviceinfo_dtb="qcom/sm7325-nothing-spacewar" +deviceinfo_append_dtb="true" +deviceinfo_arch="aarch64" +deviceinfo_flash_kernel_on_update="true" + +# Device related +deviceinfo_drm="true" +deviceinfo_chassis="handset" + +# Bootloader related +deviceinfo_flash_method="fastboot" + +deviceinfo_generate_bootimg="true" +deviceinfo_flash_pagesize="4096" +deviceinfo_flash_offset_base="0x00000000" +deviceinfo_flash_offset_dtb="0x01f00000" +deviceinfo_flash_offset_kernel="0x00008000" +deviceinfo_flash_offset_ramdisk="0x01000000" +deviceinfo_flash_offset_second="0x00000000" +deviceinfo_flash_offset_tags="0x00000100" +deviceinfo_header_version="2" +deviceinfo_rootfs_image_sector_size="4096" +deviceinfo_super_partitions="/dev/sda6 /dev/sda6" +deviceinfo_flash_sparse="true" diff --git a/device/testing/device-nothing-spacewar/modules-initfs b/device/testing/device-nothing-spacewar/modules-initfs new file mode 100644 index 000000000..e6496a6ba --- /dev/null +++ b/device/testing/device-nothing-spacewar/modules-initfs @@ -0,0 +1,5 @@ +fsa4480 +msm +panel-visionox-rm692e5 +spi-geni-qcom +fts_tp diff --git a/device/testing/firmware-nothing-spacewar/APKBUILD b/device/testing/firmware-nothing-spacewar/APKBUILD new file mode 100644 index 000000000..89f518ad3 --- /dev/null +++ b/device/testing/firmware-nothing-spacewar/APKBUILD @@ -0,0 +1,22 @@ +maintainer="Federico Amedeo Izzo " +pkgname=firmware-nothing-spacewar +pkgver=1 +pkgrel=0 +pkgdesc="Firmware for Nothing Phone (1)" +url="https://github.com/mainlining/firmware-nothing-spacewar" +arch="aarch64" +license="proprietary" +options="!check !strip !archcheck !tracedeps pmb:cross-native" +_commit="428184b45f1294a0e66979f570902de84883e1fc" +source="$pkgname-$_commit.tar.gz::https://github.com/mainlining/firmware-nothing-spacewar/archive/$_commit/$pkgname-$_commit.tar.gz" +builddir="$srcdir/$pkgname-$_commit" + +package() { + mkdir -p "$pkgdir" + + find . -type f -exec install -Dm644 {} "$pkgdir"/{} \; +} + +sha512sums=" +dfc805ee45158f67ecfba8d249fd5360799b9bb02d97b4ac726986575de4fa73f10a26325ea28b14d884207b358578b40b7dc18ddc876aab09db3460cb59cb52 firmware-nothing-spacewar-428184b45f1294a0e66979f570902de84883e1fc.tar.gz +"