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.

Closes: #150 [via git-merge-pr]
  • Loading branch information
jjsullivan5196 authored and the-maldridge committed Mar 12, 2021
1 parent 88af7e3 commit 011f3f5
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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion mkimage.sh.in
Original file line number Diff line number Diff line change
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|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

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 @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mkplatformfs.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 011f3f5

Please sign in to comment.