Skip to content

Commit

Permalink
Add support for Pinephone (pinephone)
Browse files Browse the repository at this point in the history
Support for creating a pinephone platformfs and live image.
  • Loading branch information
EliteTK authored and jjsullivan5196 committed Sep 10, 2020
1 parent e9dea2d commit e1fbe88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib.sh.in
Expand Up @@ -269,6 +269,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

Expand Down
9 changes: 8 additions & 1 deletion mkimage.sh.in
Expand Up @@ -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|usbarmory|GCP|pinebookpro|*-musl);;
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|usbarmory|GCP|pinebookpro|pinephone|*-musl);;
*) die "The $PLATFORM is not supported, exiting..."
esac

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -299,6 +300,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
Expand Down
3 changes: 2 additions & 1 deletion mkplatformfs.sh.in
Expand Up @@ -51,7 +51,7 @@ Usage: $PROGNAME [options] <platform> <base-tarball>
Supported platforms: i686, x86_64, GCP,
dockstar, bananapi, beaglebone, cubieboard2, cubietruck,
odroid-c2, odroid-u2, rpi, rpi2 (armv7), rpi3 (aarch64),
usbarmory, ci20, pogoplugv4, pinebookpro
usbarmory, ci20, pogoplugv4, pinebookpro, pinephone
Options
-b <syspkg> Set an alternative base-system package (defaults to base-system)
Expand Down Expand Up @@ -128,6 +128,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

Expand Down

0 comments on commit e1fbe88

Please sign in to comment.