diff --git a/device/testing/device-samsung-w767/APKBUILD b/device/testing/device-samsung-w767/APKBUILD new file mode 100644 index 000000000..f6f4d9a2e --- /dev/null +++ b/device/testing/device-samsung-w767/APKBUILD @@ -0,0 +1,66 @@ +# Reference: +# Maintainer: Jenneron +pkgname=device-samsung-w767 +pkgdesc="Samsung Galaxy Book S" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck pmb:strict" +depends=" + linux-postmarketos-qcom-sc8180x + postmarketos-base + soc-qcom-sc8180x +" +makedepends="devicepkg-dev grub grub-efi" +source="deviceinfo" +subpackages="$pkgname-nonfree-firmware:nonfree_firmware" + +build() { + devicepkg_build $startdir $pkgname + + grub-mkimage \ + --prefix="/grub" \ + --output="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 + + install -Dm644 "$srcdir"/bootaa64.efi \ + -t "$pkgdir"/boot/EFI/Boot +} + +nonfree_firmware() { + pkgdesc="WiFi firmware" + depends="firmware-samsung-w767 linux-firmware-ath10k soc-qcom-sc8180x-nonfree-firmware" + mkdir "$subpkgdir" +} + + +sha512sums=" +313be64ddb5091264ff4be3d1423af7e5c2b4fc99393d5c9ff5fa446b2c701ed4363e6f8ac6ed461d5a54ac67e12e45174d5ebc402155d6b3e20d75994764da1 deviceinfo +" diff --git a/device/testing/device-samsung-w767/deviceinfo b/device/testing/device-samsung-w767/deviceinfo new file mode 100644 index 000000000..b3615fd25 --- /dev/null +++ b/device/testing/device-samsung-w767/deviceinfo @@ -0,0 +1,26 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Samsung Galaxy Book S" +deviceinfo_manufacturer="Samsung" +deviceinfo_codename="samsung-w767" +deviceinfo_year="2020" +deviceinfo_dtb="qcom/sc8180x-samsung-w767" +deviceinfo_modules_initfs="hid-generic i2c-hid-of i2c-hid-acpi msm drm-dp-aux-bus phy-qcom-edp panel-edp leds-qcom-lpg pwm-bl drm pdr-interface qcom-common qcom-q6v5-pas qrtr-smd" +deviceinfo_arch="aarch64" + +# Device related +deviceinfo_chassis="laptop" +deviceinfo_keyboard="true" +deviceinfo_external_storage="true" +deviceinfo_screen_width="1920" +deviceinfo_screen_height="1080" + +# Bootloader related +deviceinfo_flash_method="none" +deviceinfo_kernel_cmdline="efi=novamap clk_ignore_unused pd_ignore_unused console=null" +deviceinfo_generate_grub_config="true" +deviceinfo_boot_filesystem="fat32" +deviceinfo_partition_type="gpt" diff --git a/device/testing/firmware-samsung-w767/30-gpu-firmware.files b/device/testing/firmware-samsung-w767/30-gpu-firmware.files new file mode 100644 index 000000000..9c9bad12a --- /dev/null +++ b/device/testing/firmware-samsung-w767/30-gpu-firmware.files @@ -0,0 +1,3 @@ +/lib/firmware/qcom/a680_gmu.bin +/lib/firmware/qcom/a680_sqe.fw +/lib/firmware/qcom/samsung/w767/qcdxkmsuc8180.mbn diff --git a/device/testing/firmware-samsung-w767/31-remoteproc-firmware.files b/device/testing/firmware-samsung-w767/31-remoteproc-firmware.files new file mode 100644 index 000000000..913513bc2 --- /dev/null +++ b/device/testing/firmware-samsung-w767/31-remoteproc-firmware.files @@ -0,0 +1,2 @@ +/lib/firmware/qcom/samsung/w767/qcadsp8180.mbn +/lib/firmware/qcom/samsung/w767/qccdsp8180.mbn diff --git a/device/testing/firmware-samsung-w767/APKBUILD b/device/testing/firmware-samsung-w767/APKBUILD new file mode 100644 index 000000000..8fea19c47 --- /dev/null +++ b/device/testing/firmware-samsung-w767/APKBUILD @@ -0,0 +1,55 @@ +# Maintainer: Jenneron +pkgname=firmware-samsung-w767 +pkgver=1 +pkgrel=0 +pkgdesc="Firmware files for Samsung Galaxy Book S" +url="https://gitlab.com/jenneron/firmware-samsung-galaxy-boo-s" +arch="aarch64" +license="proprietary" +options="!strip !check !archcheck !spdx !tracedeps pmb:cross-native" + +_commit="984886db0d4f5a90c45e7d89f8345d6ddca45273" +source=" + $pkgname-$_commit.tar.gz::https://gitlab.com/jenneron/firmware-samsung-galaxy-book-s/-/archive/$_commit/firmware-lenovo-yoga-5g-$_commit.tar.gz + 30-gpu-firmware.files + 31-remoteproc-firmware.files +" + +builddir="$srcdir/firmware-samsung-galaxy-book-s-$_commit" + +package() { + _fwdir="$pkgdir/lib/firmware/qcom" + install -Dm644 a680_gmu.bin -t "$_fwdir" + install -Dm644 a680_sqe.fw -t "$_fwdir" + + _fwdir="$pkgdir/lib/firmware/qca" + install -Dm644 crnv01.bin -t "$_fwdir" + install -Dm644 crbtfw01.tlv -t "$_fwdir" + + _fwdir="$pkgdir/lib/firmware/qcom/samsung/w767" + install -Dm644 adspr.jsn -t "$_fwdir" + install -Dm644 adspua.jsn -t "$_fwdir" + install -Dm644 battmgr.jsn -t "$_fwdir" + install -Dm644 cdspr.jsn -t "$_fwdir" + install -Dm644 modemuw.jsn -t "$_fwdir" + install -Dm644 qcadsp8180.mbn -t "$_fwdir" + install -Dm644 qccdsp8180.mbn -t "$_fwdir" + install -Dm644 qcdxkmsuc8180.mbn -t "$_fwdir" + install -Dm644 qcmpss8180_XEF.mbn -t "$_fwdir" + install -Dm644 wlanmdsp.mbn -t "$_fwdir" + + install -Dm644 "$srcdir"/30-gpu-firmware.files -t \ + "$pkgdir"/etc/postmarketos-mkinitfs/files + + # While loading ADSP firmware which is responsible for VBUS supply, + # USB loses power for a short time. We need remoteproc firmware + # on initramfs stage to boot from USB. + install -Dm644 "$srcdir"/31-remoteproc-firmware.files -t \ + "$pkgdir"/etc/postmarketos-mkinitfs/files +} + +sha512sums=" +73eb208c04c259bc9a0e58dce026767a8fd4c897d150577cd8a190d97411a8128f7d9846ac31dd1a65178d9ce35c6e4a63427fb02e7c9b37967cfca987284559 firmware-samsung-w767-984886db0d4f5a90c45e7d89f8345d6ddca45273.tar.gz +a930c4f89640ff8f5de5146ede37d87844c7f75cf0fc0e3afd7708cda4543f11dcf2ae4483d34b44dc34ce8285aecc5c9fa9921cfbfdb81c2bf6e86a72da4945 30-gpu-firmware.files +2445ce36adea1cfdcbe5fc112ae299caea340125b186c12aa6fe54d25d4b21ce6fbab11cd5d16ff83049fce8f139d8af68f929e79b84539396b5fb1b605f1008 31-remoteproc-firmware.files +"