Add support for Pinephone (pinephone)

Support for creating a pinephone platformfs and live image.

Closes: #150 [via git-merge-pr]
This commit is contained in:
John Sullivan 2021-03-09 10:55:24 -08:00 committed by Michael Aldridge
parent 88af7e3963
commit 011f3f579f
3 changed files with 11 additions and 2 deletions

View File

@ -295,6 +295,7 @@ set_target_arch_from_platform() {
x86_64*) XBPS_TARGET_ARCH="x86_64";;
GCP*) XBPS_TARGET_ARCH="x86_64";;
pinebookpro*) XBPS_TARGET_ARCH="aarch64";;
pinephone*) XBPS_TARGET_ARCH="aarch64";;
*) die "$PROGNAME: Unable to compute target architecture from platform";;
esac

View File

@ -143,7 +143,7 @@ fi
# Be absolutely certain the platform is supported before continuing
case "$PLATFORM" in
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|GCP|pinebookpro|*-musl);;
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|GCP|pinebookpro|pinephone|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac
@ -219,6 +219,7 @@ _EOF
mount "${LOOPDEV}p1" "${ROOTFS}/boot"
BOOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p1")
ROOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p2")
ROOT_PARTUUID=$(blkid -o value -s PARTUUID "${LOOPDEV}p2")
;;
esac
@ -296,6 +297,12 @@ pinebookpro*)
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f pinebookpro-kernel"
cleanup_chroot
;;
pinephone*)
sed -i "s/CMDLINE=\"\(.*\)\"\$/CMDLINE=\"\1 root=PARTUUID=${ROOT_PARTUUID}\"/" "${ROOTFS}/etc/default/pinephone-uboot-config"
dd if="${ROOTFS}/boot/u-boot-sunxi-with-spl.bin" of="${LOOPDEV}" bs=1024 seek=8 conv=notrunc,fsync >/dev/null 2>&1
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f pinephone-kernel"
cleanup_chroot
;;
GCP*)
# Google Cloud Platform image configuration for Google Cloud
# Engine. The steps below are built in reference to the

View File

@ -51,7 +51,7 @@ Usage: $PROGNAME [options] <platform> <base-tarball>
Supported platforms: i686, x86_64, GCP, bananapi, beaglebone,
cubieboard2, cubietruck, odroid-c2, odroid-u2,
rpi, rpi2 (armv7), rpi3 (aarch64), ci20,
pinebookpro
pinebookpro, pinephone
Options
-b <syspkg> Set an alternative base-system package (defaults to base-system)
@ -125,6 +125,7 @@ case "$PLATFORM" in
x86_64*) PKGS="$BASEPKG" ;;
GCP*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
*) die "$PROGNAME: invalid platform!";;
esac