device/pine64-{pinebookpro,rockpro64}: new device (MR 882)
[ci:skip-build]
This commit is contained in:
parent
02435b0b41
commit
a134f3fc22
14 changed files with 9091 additions and 0 deletions
4
device/testing/device-pine64-pinebookpro/10-usb-kbd.hwdb
Normal file
4
device/testing/device-pine64-pinebookpro/10-usb-kbd.hwdb
Normal file
|
@ -0,0 +1,4 @@
|
|||
evdev:input:b0003v258Ap001E*
|
||||
KEYBOARD_KEY_700a5=brightnessdown
|
||||
KEYBOARD_KEY_700a6=brightnessup
|
||||
KEYBOARD_KEY_70066=sleep
|
59
device/testing/device-pine64-pinebookpro/APKBUILD
Normal file
59
device/testing/device-pine64-pinebookpro/APKBUILD
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-pine64-pinebookpro
|
||||
pkgdesc="PINE64 Pinebook Pro"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-postmarketos-rockchip u-boot-rockpro64 mesa-git-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
install="$pkgname.post-install"
|
||||
source="
|
||||
deviceinfo
|
||||
extlinux.conf
|
||||
10-usb-kbd.hwdb
|
||||
mem_sleep.conf
|
||||
ucm/rockchip,es8316-codec.conf
|
||||
ucm/HiFi
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/extlinux.conf \
|
||||
"$pkgdir"/boot/extlinux/extlinux.conf
|
||||
|
||||
# Keyboard mapping
|
||||
install -D -m644 "$srcdir"/10-usb-kbd.hwdb \
|
||||
"$pkgdir"/etc/udev/hwdb.d/10-usb-kbd.hwdb
|
||||
|
||||
# Sleep workaround
|
||||
install -D -m644 "$srcdir"/mem_sleep.conf \
|
||||
"$pkgdir"/etc/sysfs.d/mem_sleep.conf
|
||||
|
||||
# Alsa usecase manager config
|
||||
install -D -m644 "$srcdir"/rockchip,es8316-codec.conf \
|
||||
"$pkgdir"/usr/share/alsa/ucm2/rockchip,es8316-codec.conf/rockchip,es8316-codec.conf
|
||||
install -D -m644 "$srcdir"/HiFi \
|
||||
"$pkgdir"/usr/share/alsa/ucm2/rockchip,es8316-codec.conf/HiFi
|
||||
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi, Bluetooth and video-out firmware"
|
||||
depends="firmware-pine64-pinebookpro"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="a8d2d60ae752c16a9f9e2627a367636d36d61e82cf38fdb2c4f408f2f09d6fcf8f88a25cf0091e9aa4fa8e64488968663ff73af6b9c4150821a6922ff5e65826 deviceinfo
|
||||
6b3695373d6df7b6ac9f59a8c492d2f5e1ef1c6192662224547b500b071bf00ee4335c57736ba787eec236a2e8bde3c559f3cfc3d1e6fe13a7386d7a0db3ff78 extlinux.conf
|
||||
13a53bd00dd0afb8908b0bc98d388d5f37ab1df334a3ff0f56928f0f4e4e658253c78f2c368e31979cf8b4ebcc519d0efe0e2255979c00198b82a8eb37d93dd0 10-usb-kbd.hwdb
|
||||
bcae155e24a151d3c098833680b83b6004a329962f115480d560ebe19257eab87286b8a4c194e456c067ca54fb53e59a5a16b022cea13c11135b0855145db563 mem_sleep.conf
|
||||
846384cab3e9581a03007cf4f39f8538315e804d1573903dd223d22d5ca0b6f260e348467aead5124689288fb7d2ec22c1e9aba8e89683efdbd33ddfe10de852 rockchip,es8316-codec.conf
|
||||
520157f8215bd33e89f530fc37db451cf672df697de8883c91635df4fc32c4788dde1dd313c7d8b229916579fa25e0d60c8baf4721dcd9f95550abaa6d98a536 HiFi"
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# We'll update the hwdb so that the meta key gets fixed
|
||||
echo "UPDATING HWDB..."
|
||||
udevadm hwdb --update
|
||||
|
||||
rc-update add sysfsconf default
|
22
device/testing/device-pine64-pinebookpro/deviceinfo
Normal file
22
device/testing/device-pine64-pinebookpro/deviceinfo
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="PINE64 Pinebook Pro"
|
||||
deviceinfo_manufacturer="PINE64"
|
||||
deviceinfo_codename="pine64-pinebookpro"
|
||||
deviceinfo_year="2019"
|
||||
deviceinfo_dtb="rockchip/rk3399-pinebook-pro"
|
||||
deviceinfo_modules_initfs="panel_simple pwm_bl rockchipdrm dw_mipi_dsi drm_kms_helper gpu_sched rockchip_rga dw_wdt videobuf2_dma_sg analogix_dp drm_panel_orientation_quirks"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1920"
|
||||
deviceinfo_screen_height="1080"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_sd_embed_firmware="u-boot/pine64-rockpro64/u-boot-rockchip.bin:32"
|
||||
deviceinfo_boot_part_start="32768"
|
9
device/testing/device-pine64-pinebookpro/extlinux.conf
Normal file
9
device/testing/device-pine64-pinebookpro/extlinux.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
timeout 10
|
||||
default POSTMARKETOS
|
||||
menu title boot prev kernel
|
||||
|
||||
label POSTMARKETOS
|
||||
kernel /vmlinuz-postmarketos-rockchip
|
||||
fdt /rk3399-pinebook-pro.dtb
|
||||
initrd /initramfs-postmarketos-rockchip
|
||||
append console=tty0 console=ttyS2,1500000n8 panic=10 coherent_pool=1M video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 loglevel=5 mem_sleep_default=s2idle PMOS_NO_OUTPUT_REDIRECT
|
1
device/testing/device-pine64-pinebookpro/mem_sleep.conf
Normal file
1
device/testing/device-pine64-pinebookpro/mem_sleep.conf
Normal file
|
@ -0,0 +1 @@
|
|||
power/mem_sleep = s2idle
|
60
device/testing/device-pine64-pinebookpro/ucm/HiFi
Normal file
60
device/testing/device-pine64-pinebookpro/ucm/HiFi
Normal file
|
@ -0,0 +1,60 @@
|
|||
SectionVerb {
|
||||
EnableSequence [
|
||||
cset "name='Headphone Playback Volume' 0"
|
||||
cset "name='Headphone Mixer Volume' 100%"
|
||||
cset "name='DAC Playback Volume' 100%"
|
||||
cset "name='DAC Source Mux' LDATA TO LDAT, RDATA TO RDAC"
|
||||
cset "name='Left Headphone Mixer Left DAC Switch' on"
|
||||
cset "name='Left Headphone Mixer LLIN Switch' off"
|
||||
cset "name='Right Headphone Mixer Right DAC Switch' on"
|
||||
cset "name='Right Headphone Mixer RLIN Switch' off"
|
||||
]
|
||||
DisableSequence [
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
CapturePCM "hw:${CardId},0"
|
||||
}
|
||||
}
|
||||
|
||||
SectionDevice."Speaker" {
|
||||
Comment "Internal speaker"
|
||||
EnableSequence [
|
||||
cset "name='Headphone Playback Volume' 0"
|
||||
cset "name='Headphone Mixer Volume' 100%"
|
||||
cset "name='Speaker Switch' on"
|
||||
]
|
||||
DisableSequence [
|
||||
cset "name='Speaker Switch' off"
|
||||
]
|
||||
Value {
|
||||
PlaybackPriority 200
|
||||
PlaybackChannels "2"
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
PlaybackVolume "DAC Playback Volume"
|
||||
}
|
||||
ConflictingDevice [
|
||||
"Headphone"
|
||||
]
|
||||
}
|
||||
SectionDevice."Headphone" {
|
||||
Comment "Headphones"
|
||||
EnableSequence [
|
||||
cset "name='Headphone Playback Volume' 50%"
|
||||
cset "name='Headphone Mixer Volume' 100%"
|
||||
cset "name='Speaker Switch' off"
|
||||
]
|
||||
DisableSequence [
|
||||
]
|
||||
Value {
|
||||
PlaybackPriority 100
|
||||
PlaybackChannels "2"
|
||||
PlaybackPCM "hw:${CardId},0"
|
||||
PlaybackVolume "DAC Playback Volume"
|
||||
JackControl "Headphones Jack"
|
||||
}
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
Syntax 2
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "HiFi"
|
||||
Comment "Play high quality music"
|
||||
}
|
35
device/testing/device-pine64-rockpro64/APKBUILD
Normal file
35
device/testing/device-pine64-rockpro64/APKBUILD
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-pine64-rockpro64
|
||||
pkgdesc="PINE64 RockPro64"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="postmarketos-base linux-postmarketos-rockchip u-boot-rockpro64 mesa-git-dri-gallium"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
source="
|
||||
deviceinfo
|
||||
extlinux.conf
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/extlinux.conf \
|
||||
"$pkgdir"/boot/extlinux/extlinux.conf
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi, Bluetooth and video-out firmware"
|
||||
depends="firmware-pine64-pinebookpro"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="434545492e9bc18ddd46080979a4df99f0339867fbd28c4e20d7500f4f567a02df07b05152ae1189ae12eb2884b3d30627463830481ab2192160076b8a7ffbf4 deviceinfo
|
||||
bd974f4f2b27b868bd63d0134c3e4c062a786be781d2585f42326cfb135211cb038be8d769ec178b94cfe860290d2e502e5eb88ff077ea04b808980237cf624c extlinux.conf"
|
21
device/testing/device-pine64-rockpro64/deviceinfo
Normal file
21
device/testing/device-pine64-rockpro64/deviceinfo
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="PINE64 RockPro64"
|
||||
deviceinfo_manufacturer="PINE64"
|
||||
deviceinfo_codename="pine64-rockpro64"
|
||||
deviceinfo_year="2017"
|
||||
deviceinfo_dtb="rockchip/rk3399-rockpro64"
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1920"
|
||||
deviceinfo_screen_height="1080"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_sd_embed_firmware="u-boot/pine64-rockpro64/u-boot-rockchip.bin:32"
|
9
device/testing/device-pine64-rockpro64/extlinux.conf
Normal file
9
device/testing/device-pine64-rockpro64/extlinux.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
timeout 10
|
||||
default POSTMARKETOS
|
||||
menu title boot prev kernel
|
||||
|
||||
label POSTMARKETOS
|
||||
kernel /vmlinuz-postmarketos-rockchip
|
||||
fdt /rk3399-rockpro64.dtb
|
||||
initrd /initramfs-postmarketos-rockchip
|
||||
append console=tty0 console=ttyS2,1500000n8 panic=10 coherent_pool=1M video=HDMI-A-1:1920x1080@60 video=eDP-1:1920x1080@60 loglevel=5 PMOS_NO_OUTPUT_REDIRECT
|
27
firmware/firmware-pine64-pinebookpro/APKBUILD
Normal file
27
firmware/firmware-pine64-pinebookpro/APKBUILD
Normal file
|
@ -0,0 +1,27 @@
|
|||
pkgname=firmware-pine64-pinebookpro
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware files for Pinebook Pro (pine64-pinebookpro)"
|
||||
url="https://postmarketos.org"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck"
|
||||
|
||||
# source
|
||||
_commit="937f0d52d27d7712da6a008d35fd7c2819e2b077"
|
||||
_repo="pinebook-firmware"
|
||||
_btcommit="a30bf312b268eab42d38fab0cc3ed3177895ff5d"
|
||||
_btrepo="ap6256-firmware"
|
||||
source="
|
||||
https://gitlab.manjaro.org/tsys/pinebook-firmware/-/archive/$_commit/pinebook-firmware-$_commit.tar.gz
|
||||
https://gitlab.manjaro.org/manjaro-arm/packages/community/ap6256-firmware/-/archive/$_btcommit/ap6256-firmware-$_btcommit.tar.gz
|
||||
"
|
||||
|
||||
package() {
|
||||
install -d "$pkgdir/lib/firmware/postmarketos/"
|
||||
cp -rv "$srcdir/$_repo-$_commit/brcm" "$pkgdir/lib/firmware/postmarketos/"
|
||||
cp -rv "$srcdir/$_repo-$_commit/rockchip" "$pkgdir/lib/firmware/postmarketos/"
|
||||
cp -v "$srcdir/$_btrepo-$_btcommit/BCM4345C5.hcd" "$pkgdir/lib/firmware/postmarketos/brcm/BCM4345C5.hcd"
|
||||
}
|
||||
sha512sums="83bcd2751830ec6ab702473508494e70ad076c276afe17d899aadabaa4c0c7e80f5d757f23974f78ca25a8db65b42364d77ed06e0d56d17ec8c0b45dd97d13c3 pinebook-firmware-937f0d52d27d7712da6a008d35fd7c2819e2b077.tar.gz
|
||||
4a6c72562898d90c62f66b0654028481646d9b39ef279bccdbe5cb0efd3fafeabab54c5da75e4cbee47061f8c70689a49949e6a24067cde07fc601688466f1e5 ap6256-firmware-a30bf312b268eab42d38fab0cc3ed3177895ff5d.tar.gz"
|
48
main/linux-postmarketos-rockchip/APKBUILD
Normal file
48
main/linux-postmarketos-rockchip/APKBUILD
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Contributor: Martijn Braam <martijn@brixit.nl>
|
||||
# Maintainer: Martijn Braam <martijn@brixit.nl>
|
||||
|
||||
pkgname=linux-postmarketos-rockchip
|
||||
pkgver=5.6.0_git20200402
|
||||
pkgrel=0
|
||||
pkgdesc="Kernel fork with Pinebook Pro and Rockpro64 patches"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
_flavor="postmarketos-rockchip"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="devicepkg-dev perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex rsync"
|
||||
|
||||
# Source
|
||||
_commit="93293259039d6fc3a725961d42b4f11bfc3f5127"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/archive/$_commit/linux-pinebook-pro-$_commit.tar.gz
|
||||
config-postmarketos-rockchip.aarch64
|
||||
"
|
||||
builddir="$srcdir/linux-pinebook-pro-$_commit"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
REPLACE_GCCH=0 \
|
||||
. downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-$_flavor" \
|
||||
CFLAGS_MODULE=-fno-pic
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
|
||||
|
||||
make -j1 modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
||||
}
|
||||
|
||||
sha512sums="d386cb5c562cb6ae150b34d30724a2bcf9bcee0d7ae7ae70b34853a420e6125ad7ead5b554c9861d134ad69f59ac6615072a28950fc823d31d3cdf02745da087 linux-pinebook-pro-93293259039d6fc3a725961d42b4f11bfc3f5127.tar.gz
|
||||
54d759e3bc0dd13a5dd47eb72e6c7d6c2e777ac6194089ceb93c987d2fe4ad1e439a3b47dd3177d5cd2937bc49dac9dedb55d40a8af1d5304354416ab0e304b1 config-postmarketos-rockchip.aarch64"
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue