Skip to content

Commit 011f3f5

Browse files
jjsullivan5196the-maldridge
authored andcommitted
Add support for Pinephone (pinephone)
Support for creating a pinephone platformfs and live image. Closes: #150 [via git-merge-pr]
1 parent 88af7e3 commit 011f3f5

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

lib.sh.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ set_target_arch_from_platform() {
295295
x86_64*) XBPS_TARGET_ARCH="x86_64";;
296296
GCP*) XBPS_TARGET_ARCH="x86_64";;
297297
pinebookpro*) XBPS_TARGET_ARCH="aarch64";;
298+
pinephone*) XBPS_TARGET_ARCH="aarch64";;
298299
*) die "$PROGNAME: Unable to compute target architecture from platform";;
299300
esac
300301

mkimage.sh.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fi
143143

144144
# Be absolutely certain the platform is supported before continuing
145145
case "$PLATFORM" in
146-
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|GCP|pinebookpro|*-musl);;
146+
bananapi|beaglebone|cubieboard2|cubietruck|odroid-c2|odroid-u2|rpi|rpi2|rpi3|GCP|pinebookpro|pinephone|*-musl);;
147147
*) die "The $PLATFORM is not supported, exiting..."
148148
esac
149149

@@ -219,6 +219,7 @@ _EOF
219219
mount "${LOOPDEV}p1" "${ROOTFS}/boot"
220220
BOOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p1")
221221
ROOT_UUID=$(blkid -o value -s UUID "${LOOPDEV}p2")
222+
ROOT_PARTUUID=$(blkid -o value -s PARTUUID "${LOOPDEV}p2")
222223
;;
223224
esac
224225

@@ -296,6 +297,12 @@ pinebookpro*)
296297
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f pinebookpro-kernel"
297298
cleanup_chroot
298299
;;
300+
pinephone*)
301+
sed -i "s/CMDLINE=\"\(.*\)\"\$/CMDLINE=\"\1 root=PARTUUID=${ROOT_PARTUUID}\"/" "${ROOTFS}/etc/default/pinephone-uboot-config"
302+
dd if="${ROOTFS}/boot/u-boot-sunxi-with-spl.bin" of="${LOOPDEV}" bs=1024 seek=8 conv=notrunc,fsync >/dev/null 2>&1
303+
run_cmd_chroot "${ROOTFS}" "xbps-reconfigure -f pinephone-kernel"
304+
cleanup_chroot
305+
;;
299306
GCP*)
300307
# Google Cloud Platform image configuration for Google Cloud
301308
# Engine. The steps below are built in reference to the

mkplatformfs.sh.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Usage: $PROGNAME [options] <platform> <base-tarball>
5151
Supported platforms: i686, x86_64, GCP, bananapi, beaglebone,
5252
cubieboard2, cubietruck, odroid-c2, odroid-u2,
5353
rpi, rpi2 (armv7), rpi3 (aarch64), ci20,
54-
pinebookpro
54+
pinebookpro, pinephone
5555
5656
Options
5757
-b <syspkg> Set an alternative base-system package (defaults to base-system)
@@ -125,6 +125,7 @@ case "$PLATFORM" in
125125
x86_64*) PKGS="$BASEPKG" ;;
126126
GCP*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
127127
pinebookpro*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
128+
pinephone*) PKGS="$BASEPKG ${PLATFORM%-*}-base" ;;
128129
*) die "$PROGNAME: invalid platform!";;
129130
esac
130131

0 commit comments

Comments
 (0)