pmaports/device/device-planet-geminipda/10-geminipda-loopback-device.sh
NeKit c54463924f
planet-geminipda: new device (Planet Gemini PDA) (!155)
Integrate Gemini PDA support into master from old branch:
https://github.com/postmarketOS/pmbootstrap/commits/device-planet-geminipda

Most of hybris-related changes (besides KWin) was merged, so it is just
device and kernel aports now.

The state of hardware support is unchanged from:
https://wiki.postmarketos.org/wiki/Planet_Computers_Gemini_PDA_(planet-geminipda)

Without hybris, it can boot to graphics with X11 fbdev driver, the
included config enables correct rotation (as it has portrait display,
but usable only in landscape).

For running it with hybris, which can allow for 3D acceleration, we need
a way to package and provide large LXC image for running Halium Android
container. Lately Adam Boardman from Gemini PDA community also got voice
calls working in Debian install with a mix of SailfishOS middleware and
Ubuntu Touch applications, which could be probably adapted for
postmarketOS if needed.
2019-01-21 07:39:41 +01:00

25 lines
500 B
Bash

#!/bin/sh
. /etc/deviceinfo
. ./init_functions.sh
mount_loopback_device() {
loopback_img=postmarketOS.img
partitions="/dev/mmcblk0p29 /dev/mmcblk0p30 /dev/mmcblk0p31"
mkdir /tmpmnt
for part in $partitions; do
mount -o ro $part /tmpmnt
if [ -f "/tmpmnt/$loopback_img" ]; then
mount -o remount,rw /tmpmnt
loopback_device=$(losetup -f)
losetup $loopback_device "/tmpmnt/$loopback_img"
kpartx -afs $loopback_device
return 0
fi
umount /tmpmnt
done
}
mount_loopback_device