device-pine-pinephone: new device (PINE64 PinePhone) (!583)
* Added display in final pinephone to the kernel * Added getty * Use RGB led to signify booting status in u-boot * Enable CONFIG_GPIO_SYSFS [ci:skip-build]: won't finish in time
This commit is contained in:
parent
84e0f43802
commit
350ac7af21
8 changed files with 155 additions and 2 deletions
62
device/device-pine-pinephone/APKBUILD
Normal file
62
device/device-pine-pinephone/APKBUILD
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-pine-pinephone"
|
||||
pkgdesc="PINE64 PinePhone"
|
||||
pkgver=0.1
|
||||
pkgrel=9
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
subpackages="
|
||||
$pkgname-weston
|
||||
$pkgname-x11
|
||||
$pkgname-nonfree-firmware:nonfree_firmware
|
||||
"
|
||||
depends="postmarketos-base u-boot-pine64 uboot-tools mesa-git mesa-git-glapi mesa-git-gl mesa-git-gles mesa-git-egl mesa-git-gbm mesa-git-dri-lima mesa-git-dri-kmsro linux-postmarketos-allwinner"
|
||||
makedepends="devicepkg-dev"
|
||||
install="$pkgname.post-install"
|
||||
source="
|
||||
deviceinfo
|
||||
uboot-script.cmd
|
||||
weston.ini
|
||||
xorg.conf
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n postmarketos -d "$srcdir/uboot-script.cmd" "$srcdir/boot.scr"
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/boot.scr \
|
||||
"$pkgdir"/boot/boot.scr
|
||||
}
|
||||
|
||||
x11() {
|
||||
install_if="$pkgname xorg-server"
|
||||
depends="
|
||||
libinput
|
||||
xf86-input-libinput
|
||||
xf86-video-fbdev"
|
||||
install -Dm644 "$srcdir"/xorg.conf \
|
||||
"$subpkgdir"/etc/X11/xorg.conf.d/10-framebuffer.conf
|
||||
}
|
||||
|
||||
weston() {
|
||||
install_if="$pkgname weston"
|
||||
install -Dm644 "$srcdir"/weston.ini \
|
||||
"$subpkgdir"/etc/xdg/weston/weston.ini
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wifi and Bluetooth firmware"
|
||||
depends="linux-firmware-rtlwifi linux-firmware-rtl_bt firmware-rtl8723bt"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
|
||||
sha512sums="507ab2da45c7c6dfdb43de9b9f4ffba5b801edce4a34f4b9ac3b2a4c73fe79a348df6c7d916a06c2bed402aab98a5916e52b210d0d8dbaf29f1448caa8747e01 deviceinfo
|
||||
f577807fc5b62637ea550f4bfe3b9d95a043250722da5db791a40e62908b3364fad8963244a0b9c6d5b30c87d75d43aeb4fd5eb65a3927324b75cf46563c2bb6 uboot-script.cmd
|
||||
c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini
|
||||
f86ef35730b89bcc8160c08db7a7fcd0970adf60c0b77af68bac397de49c0d1783e6b8db1762380c9bf874aff2d030c6f44ecb75c803d69e79ede11376409369 xorg.conf"
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Enable getty on UART
|
||||
echo "ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab
|
||||
|
26
device/device-pine-pinephone/deviceinfo
Normal file
26
device/device-pine-pinephone/deviceinfo
Normal file
|
@ -0,0 +1,26 @@
|
|||
# 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 PinePhone"
|
||||
deviceinfo_manufacturer="PINE64"
|
||||
deviceinfo_codename="pine-pinephone"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb="allwinner/sun50i-a64-pinephone"
|
||||
deviceinfo_modules_initfs="sun6i_mipi_dsi sun4i_drm pwm_sun4i sun8i_mixer"
|
||||
deviceinfo_arch="aarch64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="720"
|
||||
deviceinfo_screen_height="1440"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_generate_legacy_uboot_initfs="true"
|
||||
deviceinfo_sd_embed_firmware="u-boot/pine64-lts/u-boot-sunxi-with-spl.bin:8"
|
||||
|
23
device/device-pine-pinephone/uboot-script.cmd
Normal file
23
device/device-pine-pinephone/uboot-script.cmd
Normal file
|
@ -0,0 +1,23 @@
|
|||
gpio set 114
|
||||
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 no_console_suspend earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 cma=256M PMOS_NO_OUTPUT_REDIRECT
|
||||
|
||||
printenv
|
||||
|
||||
echo Loading DTB
|
||||
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} sun50i-a64-pinephone.dtb
|
||||
|
||||
echo Loading Initramfs
|
||||
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} uInitrd-postmarketos-allwinner
|
||||
|
||||
echo Loading Kernel
|
||||
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} vmlinuz-postmarketos-allwinner
|
||||
|
||||
gpio set 115
|
||||
|
||||
echo Resizing FDT
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
|
||||
echo Booting kernel
|
||||
gpio set 116
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
12
device/device-pine-pinephone/weston.ini
Normal file
12
device/device-pine-pinephone/weston.ini
Normal file
|
@ -0,0 +1,12 @@
|
|||
# XWayland seems to be broken for this device.
|
||||
# NOTE: This information might be outdated! simply delete /etc/xdg/weston/weston.ini
|
||||
# after installation to check if it is still broken, and please report if it
|
||||
# isn't broken anymore (or even better: make a pull request, that removes this
|
||||
# config file).
|
||||
|
||||
[core]
|
||||
xwayland=true
|
||||
backend=fbdev-backend.so
|
||||
|
||||
[shell]
|
||||
background-image=/usr/share/wallpapers/postmarketos.jpg
|
24
device/device-pine-pinephone/xorg.conf
Normal file
24
device/device-pine-pinephone/xorg.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
Section "ServerLayout"
|
||||
Identifier "Layout0"
|
||||
Screen "Screen0"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "Card0"
|
||||
Driver "fbdev"
|
||||
Option "fbdev" "/dev/fb0" #linuxdeploy
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen0"
|
||||
Device "Card0"
|
||||
DefaultDepth 24
|
||||
SubSectionSub "Display"
|
||||
Depth 32
|
||||
EndSubSection
|
||||
EndSection
|
||||
|
||||
Section "ServerFlags"
|
||||
Option "Pixmap" "24"
|
||||
EndSection
|
||||
|
|
@ -100,6 +100,6 @@ dev() {
|
|||
|
||||
sha512sums="568c221d96475727d7b8a7ceb7b1f4d737cb251ef2d6ee23639071d62a4e33c855822a82c01ee98d1ed231fd6a7ff7852c49ede3544849a8e7ecf2dbdac8b905 linux-postmarketos-allwinner-eaba25a67af44141015739fb595e2877f8501690.tar.gz
|
||||
e4e585ce787301eeee07ff8e45a97343456808a47ed237053f0c83a49b4958a75514def4c5263f4507a282ea90bd2bb3f8f468839f7e5fd05ae947a796c8c6b9 rtl8723cs-1c9c0cb9d335626a66d8063399c6e16751ecc1a8.tar.gz
|
||||
4ccd2e9d49fe2e246ca1b9c35258177c0df0df1599d4108d86a4b8e82ad9eee5395232df62f2e65688c51091d93ee85a1f363e0172d4a16f8a8be74d54e32d1a config-postmarketos-allwinner.aarch64
|
||||
42642cec92fb890ba681c709455df0af3c2fd07e4717bf0c97405b2302dce920227b4c9e9d6bbd2c2595af7764f906a5e3ebc74a46ebaa11ec62dacd1110ce1a config-postmarketos-allwinner.aarch64
|
||||
9b13ddbb393ec5a52addbbfd20dfc9e6af60957c0726c6a2d67dc5693cf991192a7aa3ed49efb25a4101dbb8dd6cdc91c71a0c73e87bf3a9ee4eb76f82ec256e touch-dts.patch
|
||||
bf06f931fb543f4bf2f0567902c3021de237fc9684f92af2ed3e956f869d907c9cff1cf3e11a72eb97bda47c8f8b28aff226634f641bdffa04b08d434f419faa rtl8723cs.patch"
|
||||
|
|
|
@ -2365,7 +2365,7 @@ CONFIG_GPIOLIB_FASTPATH_LIMIT=512
|
|||
CONFIG_OF_GPIO=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
# CONFIG_DEBUG_GPIO is not set
|
||||
# CONFIG_GPIO_SYSFS is not set
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
|
||||
#
|
||||
|
@ -3237,6 +3237,7 @@ CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D=y
|
|||
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
|
||||
CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02=y
|
||||
CONFIG_DRM_PANEL_PINEPHONE_JD9365DA=y
|
||||
CONFIG_DRM_PANEL_XINGBANGDA_XBD599=y
|
||||
# end of Display Panels
|
||||
|
||||
CONFIG_DRM_BRIDGE=y
|
||||
|
|
Loading…
Reference in a new issue