qemu-riscv64: new device (MR 3571)
Support launching postmarketOS in QEMU on riscv64 architecture. It is mostly copied from device-qemu-aarch64 with some riscv64-specific modifications. Currently UIs using Xorg like Mate, XFCE4 and LXQT work fine, Wayland UIs like weston, plasma-mobile etc didn't work in my testing. Also using "pmbootstrap qemu --tablet" is needed to make mouse input work, the defaults don't seem to work at the moment. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
3301dc90d8
commit
7553dc4011
4 changed files with 93 additions and 0 deletions
64
device/main/device-qemu-riscv64/APKBUILD
Normal file
64
device/main/device-qemu-riscv64/APKBUILD
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Minecrell <minecrell@minecrell.net>
|
||||
# Co-Maintainer: Luca Weiss <luca@z3ntu.xyz>
|
||||
pkgname=device-qemu-riscv64
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
pkgdesc="Simulated device in QEMU (riscv64)"
|
||||
url="https://postmarketos.org"
|
||||
arch="riscv64"
|
||||
license="MIT"
|
||||
depends="postmarketos-base"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="
|
||||
$pkgname-kernel-edge:kernel_edge
|
||||
$pkgname-mce
|
||||
$pkgname-sway
|
||||
$pkgname-weston
|
||||
"
|
||||
|
||||
source="
|
||||
deviceinfo
|
||||
mce-display-blanking.conf
|
||||
weston.ini
|
||||
"
|
||||
options="!check !archcheck"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
mce() {
|
||||
pkgdesc="Prevents screen blanking for UI's using mce (Glacier, Asteroid)"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel mce"
|
||||
install -Dm644 "$srcdir"/mce-display-blanking.conf \
|
||||
"$subpkgdir"/etc/mce/50display-blanking.conf
|
||||
}
|
||||
|
||||
sway() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-sway"
|
||||
depends="postmarketos-ui-sway-logo-key-alt"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
weston() {
|
||||
install_if="$pkgname=$pkgver-r$pkgrel weston"
|
||||
install -Dm644 "$srcdir"/weston.ini \
|
||||
"$subpkgdir"/etc/xdg/weston/weston.ini
|
||||
}
|
||||
|
||||
kernel_edge() {
|
||||
pkgdesc="Alpine Edge kernel"
|
||||
depends="linux-edge linux-firmware-none"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
42341299cfd0f301f6dbd626efd115ca5f7d3e9893f45bcb0a3428fedac5f61be97d5c3a0682fb2d38c4ae01d841dcbb2d0eda39670ca31c372a9d5842b97950 deviceinfo
|
||||
99d32eed6c5cda59e91516e982c5bd5165ff718133e2411a0dbba04e2057d1dfad49a75e5cc67140d0e0adcbe1383671bd2892335929b782a5b19f5472e635ad mce-display-blanking.conf
|
||||
de794566118f1744d068a94e6a75b61d43f6749a4b0871a5270fa7a2048164d609c71fcffa61845c2a7dd4cb5fbeb72c0e4f8b73b382f36d6ff0bcc9b8a5ae25 weston.ini
|
||||
"
|
23
device/main/device-qemu-riscv64/deviceinfo
Normal file
23
device/main/device-qemu-riscv64/deviceinfo
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="QEMU riscv64"
|
||||
deviceinfo_manufacturer="QEMU"
|
||||
deviceinfo_codename="qemu-riscv64"
|
||||
deviceinfo_modules_initfs="virtio_pci virtio_blk virtio-gpu virtio_input evdev"
|
||||
deviceinfo_arch="riscv64"
|
||||
|
||||
# Device related
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
deviceinfo_chassis="vm"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1024"
|
||||
deviceinfo_screen_height="768"
|
||||
deviceinfo_getty="ttyS0;230400"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_kernel_cmdline="console=tty1 console=ttyS0 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE"
|
||||
deviceinfo_disable_dhcpd="true"
|
|
@ -0,0 +1 @@
|
|||
/system/osso/dsm/display/display_never_blank=1
|
5
device/main/device-qemu-riscv64/weston.ini
Normal file
5
device/main/device-qemu-riscv64/weston.ini
Normal file
|
@ -0,0 +1,5 @@
|
|||
[core]
|
||||
xwayland=true
|
||||
backend=drm-backend.so
|
||||
[shell]
|
||||
background-image=/usr/share/wallpapers/postmarketos.jpg
|
Loading…
Reference in a new issue