pine-dontbeevil: Touch and wifi (!331)

* Inverted the X-axis on the touchscreen
* Enabled the driver for the wifi/bluetooth chip and added it to the dts
* Added a horrible hack for making the touchscreen work

This also decreases the kernel version because the previous version I've
used was technically incorrect.

[ci:skip-build]: doesn't finish in time
This commit is contained in:
Martijn Braam 2019-04-24 13:50:00 +00:00 committed by Oliver Smith
parent d0f5d25e4d
commit 74142b4d67
7 changed files with 197 additions and 11 deletions

View file

@ -2,7 +2,7 @@
pkgname="device-pine-dontbeevil" pkgname="device-pine-dontbeevil"
pkgdesc="PINE64 PinePhone Don't be evil devkit" pkgdesc="PINE64 PinePhone Don't be evil devkit"
pkgver=0.1 pkgver=0.1
pkgrel=1 pkgrel=2
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
arch="aarch64" arch="aarch64"
@ -15,6 +15,9 @@ source="
uboot-script.cmd uboot-script.cmd
weston.ini weston.ini
xorg.conf xorg.conf
start_weston.sh
load_touchscreen.sh
load_touchscreen.start
" "
build() { build() {
@ -26,6 +29,10 @@ package() {
devicepkg_package $startdir $pkgname devicepkg_package $startdir $pkgname
install -D -m644 "$srcdir"/boot.scr \ install -D -m644 "$srcdir"/boot.scr \
"$pkgdir"/boot/boot.scr "$pkgdir"/boot/boot.scr
install -D -m755 "$srcdir"/load_touchscreen.sh \
"$pkgdir"/usr/bin/load_touchscreen.sh
install -D -m755 "$srcdir"/load_touchscreen.start \
"$pkgdir"/etc/local.d/load_touchscreen.start
} }
x11() { x11() {
@ -42,6 +49,8 @@ weston() {
install_if="$pkgname weston" install_if="$pkgname weston"
install -Dm644 "$srcdir"/weston.ini \ install -Dm644 "$srcdir"/weston.ini \
"$subpkgdir"/etc/xdg/weston/weston.ini "$subpkgdir"/etc/xdg/weston/weston.ini
install -Dm755 "$srcdir"/start_weston.sh \
"$subpkgdir"/etc/profile.d/000_start_weston.sh
} }
nonfree_firmware() { nonfree_firmware() {
@ -53,4 +62,7 @@ nonfree_firmware() {
sha512sums="a13743f37c982d0ba4524c9e3a3b8a1bb95dceeefe3f9aac01c893128c70b5a7f3e501dd3995fcfe231c1fbb59857af79508a14181263c9ea53a5f1109097a4b deviceinfo sha512sums="a13743f37c982d0ba4524c9e3a3b8a1bb95dceeefe3f9aac01c893128c70b5a7f3e501dd3995fcfe231c1fbb59857af79508a14181263c9ea53a5f1109097a4b deviceinfo
ef7d21144b8c33f80968a6a089dcc6b568abd54f66f30d21d5befc10e51217484440aa8edb1065cd871ffba7bc599f44502bb6d240ee01f59dc92706ec6eabfd uboot-script.cmd ef7d21144b8c33f80968a6a089dcc6b568abd54f66f30d21d5befc10e51217484440aa8edb1065cd871ffba7bc599f44502bb6d240ee01f59dc92706ec6eabfd uboot-script.cmd
c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini
f86ef35730b89bcc8160c08db7a7fcd0970adf60c0b77af68bac397de49c0d1783e6b8db1762380c9bf874aff2d030c6f44ecb75c803d69e79ede11376409369 xorg.conf" f86ef35730b89bcc8160c08db7a7fcd0970adf60c0b77af68bac397de49c0d1783e6b8db1762380c9bf874aff2d030c6f44ecb75c803d69e79ede11376409369 xorg.conf
aa11864b9960e94e13b1467e09d8eb528e3d3652bf1fb251c7a040f4d44270403072db8aa906405d4c81fa9d6043fafa8d9ccd1f97031fd96d0dcacc38da8f84 start_weston.sh
3898faf2c5fbdb3c9edf6fecc5c1bcc34b61a97de8067dca6446c72cf44bcbb8d744038e394fc0fa687b646610be2bbafcf6b06d1cd5d7f4f7a633a70b39c753 load_touchscreen.sh
40e553ec8d2f2c159acddcb8492e8a797120043c22e2fb00c941590f49adab304402189d1eaedb469ddb1d1f7dd19bf28e8332240a024c396b1f548c7c4539bd load_touchscreen.start"

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Keep reloading the touchscreen driver until the probe is successful
while ! [ -d /dev/input ] ;
do
rmmod edt_ft5x06
modprobe edt_ft5x06
sleep 2
done

View file

@ -0,0 +1,3 @@
#!/bin/sh
load_touchscreen.sh &

View file

@ -0,0 +1,48 @@
export DISPLAY=:0
. /etc/deviceinfo
if test -z "${XDG_RUNTIME_DIR}"; then
# https://wayland.freedesktop.org/building.html
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
# Weston autostart on tty1 (Autologin on tty1 is enabled in
# /etc/inittab by postmarketos-base post-install.hook)
if [ "$(id -u)" = "10000" ] && [ $(tty) = "/dev/tty1" ]; then
# Find right weston.ini
cfg="/etc/xdg/weston/weston.ini"
[ -e "$cfg" ] || cfg="$cfg.default"
WESTON_OPTS="-c $cfg"
echo "Waiting for touchscreen"
while ! [ -d /dev/input ] ;
do
echo -n "."
sleep 2
done
echo ""
echo "Touchscreen loaded. starting weston"
# #633: Weston doesn't support autostarting applications (yet), so
# we try to run postmarketos-demos for 10 seconds, until it succeeds.
(
for i in $(seq 0 19); do
sleep 0.5
postmarketos-demos && break
done
) &
weston-launch -- ${WESTON_OPTS} 2>&1 | logger -t "$(whoami):weston"
# In case of failure, restart after 1s
sleep 1
exit
fi
fi

View file

@ -3,8 +3,8 @@ _config="config-${_flavor}.${CARCH}"
pkgname=linux-${_flavor} pkgname=linux-${_flavor}
pkgver=5.0.0 pkgver=5.0.0_git20190420
pkgrel=2 pkgrel=0
arch="aarch64" arch="aarch64"
pkgdesc="Kernel fork with PinePhone Don't be evil patches" pkgdesc="Kernel fork with PinePhone Don't be evil patches"
@ -13,12 +13,11 @@ depends=""
makedepends="devicepkg-dev perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex" makedepends="devicepkg-dev perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev openssl-dev file bison flex"
options="!strip !check !tracedeps" options="!strip !check !tracedeps"
install= install=
_commit="a91169202e61c4876dde06a5548d76a385306d05" _commit="4b05d9617e12dc72882e652307effaaa25d1a468"
source=" source="
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz ${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
config-${_flavor}.aarch64 config-${_flavor}.aarch64
dtb-add.patch dtb-add.patch
stk3335.patch
sun50i-a64-dontbeevil.dts sun50i-a64-dontbeevil.dts
" "
@ -87,8 +86,7 @@ package() {
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb" INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
} }
sha512sums="4ae10aa5f141aa82610c65d0a5100bd86551a6323b67e4316ad43b2b5f1a6a1ff6f08e9747865b65381696385d4366f22eff5591ef8bc6fc988ac3978392dbc9 linux-postmarketos-allwinner-a91169202e61c4876dde06a5548d76a385306d05.tar.gz sha512sums="42818ce72ee8ca4d5017ac2ff1d1837bd7a39b34eabeff9aca8f616aa019fd97536e906e768c1673c6afecbbe05513991d05c01a835c8f0f9e8cfa794de42ea7 linux-postmarketos-allwinner-4b05d9617e12dc72882e652307effaaa25d1a468.tar.gz
788dc7a75875e884aff0b35db9ddf437ecbe58617eb7c937ba7381ed215188c950e0e95e7e4cd74142fff775bffcb3034b8bd6f3c38b540fe4b0f6e7b989a097 config-postmarketos-allwinner.aarch64 2d48abe7f7122b726cc02a7e6d9970dfe1a5fe5d35e6b4231de29e51fcca975cff7c6613ffb3bf9f4c1b991ee6c9ad309fc40bfd452d88e05fd4b69eaa9c419f config-postmarketos-allwinner.aarch64
3b5580adb3c8a4c88da5cd23d1cfdb7bfad9f544207c21d7d80b2086733460a627d9a49f4d67ac4b1d954f078af655580c7fa0b8d75980ea08df319ff3e757be dtb-add.patch 3b5580adb3c8a4c88da5cd23d1cfdb7bfad9f544207c21d7d80b2086733460a627d9a49f4d67ac4b1d954f078af655580c7fa0b8d75980ea08df319ff3e757be dtb-add.patch
1333d303e4259b4e5a9a30b0a9c7295453b61f37af8413c84fdbdb794da882ba4b5764211ab50aa0beecc580a38373b4473c3f7bffd0f22e02b186555a39be16 stk3335.patch a063fdfc5fd67de8fd6daf21bc6815fe7b4422e20484761b425ce8bc72e50d1e16c2bcad81786c58781b603c82e390150fb7065c7fd678f18fe2622ee9230f67 sun50i-a64-dontbeevil.dts"
f8e956b6044df719e2e3fe884624668418d9525565dc425004937bb7e06e3b86c90b5897c6910714844411032e088587760d9e751e3230b456f933e52aa94d49 sun50i-a64-dontbeevil.dts"

View file

@ -703,6 +703,7 @@ CONFIG_FRAME_VECTOR=y
# CONFIG_GUP_BENCHMARK is not set # CONFIG_GUP_BENCHMARK is not set
CONFIG_ARCH_HAS_PTE_SPECIAL=y CONFIG_ARCH_HAS_PTE_SPECIAL=y
CONFIG_NET=y CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y
CONFIG_NET_INGRESS=y CONFIG_NET_INGRESS=y
CONFIG_SKB_EXTENSIONS=y CONFIG_SKB_EXTENSIONS=y
@ -1066,6 +1067,10 @@ CONFIG_BT_HCIUART_BCM=y
# CONFIG_AF_RXRPC is not set # CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set # CONFIG_AF_KCM is not set
CONFIG_WIRELESS=y CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set # CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
@ -4837,7 +4842,101 @@ CONFIG_SWIOTLB_XEN=y
# CONFIG_XEN_PVCALLS_BACKEND is not set # CONFIG_XEN_PVCALLS_BACKEND is not set
CONFIG_XEN_PRIVCMD=y CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_AUTO_XLATE=y CONFIG_XEN_AUTO_XLATE=y
# CONFIG_STAGING is not set CONFIG_STAGING=y
# CONFIG_PRISM2_USB is not set
# CONFIG_COMEDI is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTLLIB is not set
CONFIG_RTL8723BS=m
# CONFIG_R8712U is not set
# CONFIG_R8188EU is not set
# CONFIG_R8822BE is not set
# CONFIG_RTS5208 is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
#
# IIO staging drivers
#
#
# Accelerometers
#
# CONFIG_ADIS16203 is not set
# CONFIG_ADIS16240 is not set
#
# Analog to digital converters
#
# CONFIG_AD7606 is not set
# CONFIG_AD7780 is not set
# CONFIG_AD7816 is not set
# CONFIG_AD7192 is not set
# CONFIG_AD7280 is not set
#
# Analog digital bi-direction converters
#
# CONFIG_ADT7316 is not set
#
# Capacitance to digital converters
#
# CONFIG_AD7150 is not set
# CONFIG_AD7152 is not set
# CONFIG_AD7746 is not set
#
# Direct Digital Synthesis
#
# CONFIG_AD9832 is not set
# CONFIG_AD9834 is not set
#
# Network Analyzer, Impedance Converters
#
# CONFIG_AD5933 is not set
#
# Active energy metering IC
#
# CONFIG_ADE7854 is not set
#
# Resolver to digital converters
#
# CONFIG_AD2S1210 is not set
# CONFIG_FB_SM750 is not set
# CONFIG_FB_XGI is not set
#
# Speakup console speech
#
# CONFIG_SPEAKUP is not set
# CONFIG_STAGING_MEDIA is not set
#
# Android
#
# CONFIG_STAGING_BOARD is not set
# CONFIG_LTE_GDM724X is not set
# CONFIG_GS_FPGABOOT is not set
# CONFIG_UNISYSSPAR is not set
# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
# CONFIG_FB_TFT is not set
# CONFIG_WILC1000_SDIO is not set
# CONFIG_WILC1000_SPI is not set
# CONFIG_MOST is not set
# CONFIG_KS7010 is not set
# CONFIG_GREYBUS is not set
# CONFIG_PI433 is not set
#
# Gasket devices
#
# CONFIG_STAGING_GASKET_FRAMEWORK is not set
# CONFIG_XIL_AXIS_FIFO is not set
# CONFIG_EROFS_FS is not set
# CONFIG_GOLDFISH is not set # CONFIG_GOLDFISH is not set
CONFIG_CHROME_PLATFORMS=y CONFIG_CHROME_PLATFORMS=y
CONFIG_CROS_EC_CTL=m CONFIG_CROS_EC_CTL=m

View file

@ -247,6 +247,8 @@
touchscreen-size-x = <720>; touchscreen-size-x = <720>;
touchscreen-size-y = <1440>; touchscreen-size-y = <1440>;
touchscreen-inverted-x;
}; };
}; };
@ -285,6 +287,20 @@
}; };
}; };
&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
vmmc-supply = <&reg_dcdc1>;
vqmmc-supply = <&reg_dldo4>;
bus-width = <4>;
non-removable;
status = "okay";
rtl8723bs: wifi@1 {
reg = <1>;
};
};
&mmc2 { &mmc2 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins>; pinctrl-0 = <&mmc2_pins>;