new device: device-pine-dontbeevil (Don't be evil devkit) (!308)
UART and SSH work and HDMI works in u-boot (just like the pine-a64lts). It should work now with display and xorg/weston works directly after installing. Plasma mobile doesn't work directly because both kms and fbdev are enabled and kms doesn't work yet. linux-postmarketos-allwinner: update to 5.0.0-rc3 with patches for this devkit, tested on this device and on pinea64lts (the only other device using the allwinner kernel). [ci:skip-build]: won't finish in time
This commit is contained in:
parent
9b6ea60690
commit
9b88689b9d
7 changed files with 2357 additions and 4673 deletions
56
device/device-pine-dontbeevil/APKBUILD
Normal file
56
device/device-pine-dontbeevil/APKBUILD
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-pine-dontbeevil"
|
||||
pkgdesc="PINE64 PinePhone Don't be evil devkit"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
subpackages="$pkgname-weston $pkgname-x11 $pkgname-nonfree-firmware:nonfree_firmware"
|
||||
depends="postmarketos-base linux-postmarketos-allwinner mesa-dri-swrast u-boot-pine64 uboot-tools"
|
||||
makedepends="devicepkg-dev"
|
||||
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="11e95b4fb8a0739559a03a21d6ab63a158538b8d6f0a97e324723b62f9c2de800fa4bd9bd0783584d723ab286a44886e745cfe620fd308cef72c5e558f18651e deviceinfo
|
||||
ef7d21144b8c33f80968a6a089dcc6b568abd54f66f30d21d5befc10e51217484440aa8edb1065cd871ffba7bc599f44502bb6d240ee01f59dc92706ec6eabfd uboot-script.cmd
|
||||
c4c57d1627dd451213e1ef20d89de9266cd4edcc2d33a69aa9a1f13e16d9f9742036b69dc149fd910d7213f7525c41eb79576d4457bc85cc96eba0d986382d27 weston.ini
|
||||
f86ef35730b89bcc8160c08db7a7fcd0970adf60c0b77af68bac397de49c0d1783e6b8db1762380c9bf874aff2d030c6f44ecb75c803d69e79ede11376409369 xorg.conf"
|
26
device/device-pine-dontbeevil/deviceinfo
Normal file
26
device/device-pine-dontbeevil/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 Don't be evil devkit"
|
||||
deviceinfo_manufacturer="PINE64"
|
||||
deviceinfo_codename="pine-dontbeevil"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb="allwinner/sun50i-a64-sopine-baseboard"
|
||||
deviceinfo_modules_initfs=""
|
||||
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"
|
||||
|
19
device/device-pine-dontbeevil/uboot-script.cmd
Normal file
19
device/device-pine-dontbeevil/uboot-script.cmd
Normal file
|
@ -0,0 +1,19 @@
|
|||
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 no_console_suspend earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1 PMOS_NO_OUTPUT_REDIRECT
|
||||
|
||||
printenv
|
||||
|
||||
echo Loading DTB
|
||||
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} dtb-postmarketos-allwinner.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-dtb
|
||||
|
||||
echo Resizing FDT
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
|
||||
echo Booting kernel
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
12
device/device-pine-dontbeevil/weston.ini
Normal file
12
device/device-pine-dontbeevil/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-dontbeevil/xorg.conf
Normal file
24
device/device-pine-dontbeevil/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
|
||||
|
|
@ -3,23 +3,23 @@ _config="config-${_flavor}.${CARCH}"
|
|||
|
||||
pkgname=linux-${_flavor}
|
||||
|
||||
pkgver=4.20.0
|
||||
pkgrel=0
|
||||
pkgver=5.0.0
|
||||
pkgrel=1
|
||||
|
||||
arch="aarch64"
|
||||
pkgdesc="Kernel close to mainline with extra patches for Allwinner devices"
|
||||
pkgdesc="Kernel fork with PinePhone Don't be evil patches"
|
||||
url="https://kernel.org/"
|
||||
depends=""
|
||||
makedepends="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"
|
||||
install=
|
||||
_commit="585a14815d2a2620c2b673d26147ceb4491dbf65"
|
||||
_commit="a91169202e61c4876dde06a5548d76a385306d05"
|
||||
source="
|
||||
linux-${_commit}.tar.gz::https://github.com/anarsoul/linux-2.6/archive/${_commit}.tar.gz
|
||||
${pkgname}-${_commit}.tar.gz::https://gitlab.com/pine64-org/linux/-/archive/${_commit}/linux-${_commit}.tar.gz
|
||||
config-${_flavor}.aarch64
|
||||
"
|
||||
|
||||
subpackages="$pkgname-dev"
|
||||
subpackages=""
|
||||
|
||||
license="GPL2"
|
||||
_abi_release=$_pkgver
|
||||
|
@ -34,40 +34,15 @@ esac
|
|||
HOSTCC="${CC:-gcc}"
|
||||
HOSTCC="${HOSTCC#${CROSS_COMPILE}}"
|
||||
|
||||
builddir="$srcdir/linux-2.6-${_commit}"
|
||||
builddir="$srcdir/linux-${_commit}"
|
||||
|
||||
prepare() {
|
||||
local _patch_failed=
|
||||
ls "$srcdir"
|
||||
cd "$builddir"
|
||||
# first apply patches in specified order
|
||||
for i in $source; do
|
||||
case $i in
|
||||
*.patch|*.patch::*)
|
||||
_patch=${i%::*}
|
||||
msg "Applying $_patch..."
|
||||
if ! patch -s -p1 -N -i "$srcdir"/$_patch; then
|
||||
echo $_patch >>failed
|
||||
_patch_failed=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ! [ -z "$_patch_failed" ]; then
|
||||
error "The following patches failed:"
|
||||
cat failed
|
||||
return 1
|
||||
fi
|
||||
|
||||
mkdir -p "$srcdir"/build
|
||||
cp -v "$srcdir"/$_config "$srcdir"/build/.config
|
||||
make -C "$builddir" O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
olddefconfig
|
||||
default_prepare
|
||||
REPLACE_GCCH=0 \
|
||||
downstreamkernel_prepare "$srcdir" "$builddir" "$_config" "$_carch" "$HOSTCC"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir"/build
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-${_flavor}" \
|
||||
|
@ -75,21 +50,25 @@ build() {
|
|||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/build/arch/${_carch}/boot"
|
||||
|
||||
if [ "$CARCH" == "aarch64" ]; then
|
||||
install -Dm644 "$srcdir/build/arch/${_carch}/boot/Image" \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
else
|
||||
install -Dm644 "$srcdir/build/arch/${_carch}/boot/"*zImage \
|
||||
"$pkgdir/boot/vmlinuz-$_flavor"
|
||||
fi
|
||||
|
||||
install -D "$srcdir/build/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
cd "$srcdir"/build
|
||||
# kernel.release
|
||||
install -D "$builddir/include/config/kernel.release" \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
|
||||
# zImage (find the right one)
|
||||
cd "$builddir/arch/$_carch/boot"
|
||||
_target="$pkgdir/boot/vmlinuz-$_flavor"
|
||||
for _zimg in zImage-dtb Image.gz-dtb *zImage Image; do
|
||||
[ -e "$_zimg" ] || continue
|
||||
msg "zImage found: $_zimg"
|
||||
install -Dm644 "$_zimg" "$_target"
|
||||
break
|
||||
done
|
||||
if ! [ -e "$_target" ]; then
|
||||
error "Could not find zImage in $PWD!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
cd "$builddir"
|
||||
local _install
|
||||
case "$CARCH" in
|
||||
aarch64*|arm*) _install="modules_install dtbs_install" ;;
|
||||
|
@ -102,79 +81,5 @@ package() {
|
|||
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
||||
}
|
||||
|
||||
|
||||
dev() {
|
||||
# copy the only the parts that we really need for build 3rd party
|
||||
# kernel modules and install those as /usr/src/linux-headers,
|
||||
# simlar to what ubuntu does
|
||||
#
|
||||
# this way you dont need to install the 300-400 kernel sources to
|
||||
# build a tiny kernel module
|
||||
#
|
||||
pkgdesc="Headers and script for third party modules for postmarketos kernel"
|
||||
depends="gmp-dev bash perl"
|
||||
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
|
||||
|
||||
# first we import config, run prepare to set up for building
|
||||
# external modules, and create the scripts
|
||||
mkdir -p "$dir"
|
||||
cp "$srcdir"/$_config "$dir"/.config
|
||||
make -j1 -C "$builddir" O="$dir" ARCH="$_carch" HOSTCC="$HOSTCC" \
|
||||
olddefconfig prepare modules_prepare scripts
|
||||
|
||||
# needed for 3rd party modules
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=11143
|
||||
case "$CARCH" in
|
||||
ppc*) (cd "$dir" && make arch/powerpc/lib/crtsavres.o);;
|
||||
esac
|
||||
|
||||
# remove the stuff that points to real sources. we want 3rd party
|
||||
# modules to believe this is the soruces
|
||||
rm "$dir"/Makefile "$dir"/source
|
||||
|
||||
# copy the needed stuff from real sources
|
||||
#
|
||||
# this is taken from ubuntu kernel build script
|
||||
# http://kernel.ubuntu.com/git/ubuntu/ubuntu-zesty.git/tree/debian/rules.d/3-binary-indep.mk
|
||||
|
||||
cd "$builddir"
|
||||
find . -path './include/*' -prune \
|
||||
-o -path './scripts/*' -prune -o -type f \
|
||||
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
|
||||
-name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
|
||||
-print | cpio -pdm "$dir"
|
||||
cp -a scripts include "$dir"
|
||||
find $(find arch -name include -type d -print) -type f \
|
||||
| cpio -pdm "$dir"
|
||||
|
||||
install -Dm644 "$srcdir"/build/Module.symvers \
|
||||
"$dir"/Module.symvers
|
||||
|
||||
mkdir -p "$subpkgdir"/lib/modules/${_abi_release}
|
||||
ln -sf /usr/src/linux-headers-${_abi_release} \
|
||||
"$subpkgdir"/lib/modules/${_abi_release}/build
|
||||
|
||||
# cross-compiling: delete binaries with host arch and replace them with
|
||||
# symlinks to binaries with the target arch (packaged in kernel-scripts)
|
||||
if [ -n "$CROSS_COMPILE" ]; then
|
||||
msg "Symlinking binary scripts..."
|
||||
depends="$depends kernel-scripts"
|
||||
local found="false"
|
||||
cd "$dir/scripts"
|
||||
local i
|
||||
for i in $(find . -type f); do
|
||||
local type="$(file -b --mime-type "$i")"
|
||||
[ "$type" != "application/x-pie-executable" ] && continue
|
||||
local native="/usr/bin/kernel-scripts/$(echo "$i" | cut -d '/' -f 2-)"
|
||||
ln -svf "$native" "$i"
|
||||
found="true"
|
||||
done
|
||||
if [ "$found" = "false" ]; then
|
||||
error "Failed to symlink binary scripts!"
|
||||
error "Did the mime-type change (see #1659)?"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
sha512sums="c8df91d946f0121f38992bddf4691b9fb999162424461c063851a685cae8329a1fc5a6add73100be197f899b6ccdb18faff2480161f5d24ce8996f35881e30fb linux-585a14815d2a2620c2b673d26147ceb4491dbf65.tar.gz
|
||||
2a92dcf0851eb08718d6a1a20210a5efd8ba4747be0e0cedb0fb5f5f64efd3ef3d5b1e05e1ba87385c76a192c55ea266cd2fd133e860d6db227d7650c3972a1a config-postmarketos-allwinner.aarch64"
|
||||
sha512sums="4ae10aa5f141aa82610c65d0a5100bd86551a6323b67e4316ad43b2b5f1a6a1ff6f08e9747865b65381696385d4366f22eff5591ef8bc6fc988ac3978392dbc9 linux-postmarketos-allwinner-a91169202e61c4876dde06a5548d76a385306d05.tar.gz
|
||||
232204692e8c2daae12cb8e2f12acab6a07fc14cdd59e5d9e2fb7435d9a31f150f2d05ee97b403f9ff96e6d02d314fdeb059e4528fab782d4870dcb6f3733fdb config-postmarketos-allwinner.aarch64"
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue