From 4838e20685cbd3bfcbafbcef725a616d58b93cf0 Mon Sep 17 00:00:00 2001 From: x1y <23239177+x1y@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:04:27 +0100 Subject: [PATCH 01/13] Improved readability of the isntructions --- .../Various/Multi-distribution_image.adoc | 412 +++++++++--------- 1 file changed, 210 insertions(+), 202 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc index 4926f2f4..2111df15 100644 --- a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc @@ -15,108 +15,107 @@ This article explains how to install a multiple linux distribution enviroment on Make sure your phone has the link:/documentation/PinePhone_Pro/Software/Bootloaders/#rk2aw[rk2aw pre-loader] installed to SPI flash. PinePhone Pro models ordered after November 2023 are shipped with rk2aw pre-installed. Otherwise, follow the instructions in this section to install it. -TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot. +TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot to disable the SPI flash memory. -Please note that rk2aw and the userspace utility to flash it are free, but not open-source. They are supplied to the end user in binary form under the MIT license. +Make sure the phone’s SSH server is up and running. On the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: -Open the terminal application on your PinePhone Pro's stock operating system and make sure the phone’s SSH server is up and running. - - sudo apt install ssh - sudo systemctl enable --now sshd - ip address # phone's ip address - whoami # user name - -Open a terminal window on your Linux machine. - - ssh USER@PHONEIP # start ssh connection - mkdir -p ~/rk2aw - cd ~/rk2aw - curl -O https://xff.cz/kernels/bootloaders-2024.04/ppp.tar.gz - tar -xvzf ppp.tar.gz -C ~/rk2aw - cd ~/rk2aw/ppp - sudo ./spinor-flash-initial-setup.sh +---- +ssh USER@PHONEIP +mkdir -p ~/rk2aw +cd ~/rk2aw +curl -O https://xff.cz/kernels/bootloaders-2024.04/ppp.tar.gz +tar -xvzf ppp.tar.gz -C ~/rk2aw +cd ~/rk2aw/ppp +sudo ./spinor-flash-initial-setup.sh +---- Further instructions can be found on the link:https://xff.cz/kernels/bootloaders-2024.04/ppp/rk2aw/INSTALL[author's website]. -== Build multi-distro microSD card +== Build the multi-distribution microSD card -Insert microSD card into the Linux computer. Make sure there are no signatures or partitions left. Format cleared any partition using GParted GUI. Than open terminal window to wipe any content. +Insert microSD card into the Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/*[DEVICE]*`, where *[DEVICE]* is the name of the device displayed in the _lsblk_ command. To erase all signatures, type `sudo wipefs --all --force /dev/*[DEVICE]*`. - lsblk # shows the [DEVICE] name - - sudo wipefs /dev/[DEVICE] # shows current signatures - sudo wipefs --all --force /dev/[DEVICE] # erase current signatures - -Zero-write the microSD card +Overwrite the microSD card with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): - sudo dd if=/dev/zero of=/dev/[DEVICE] status=progress bs=32768 count=1 # quick way erasing - sudo dd if=/dev/zero of=/dev/[DEVICE] status=progress bs=32768 count=$(expr $(lsblk -bno SIZE /dev/[DEVICE] | head -1) \/ 32768) # full erase +. `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=1` +. `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=$(expr $(lsblk -bno SIZE /dev/[DEVICE] | head -1) \/ 32768)` === Partition the microSD card - PARTSIZE=16G # adjust depending on microSD card size - - sudo sfdisk /dev/[DEVICE] --wipe always <>> Script header accepted. - New situation: - Disklabel type: gpt - Disk identifier: A012E9D0-B4EB-4677-926F-D93AE4C696FA - Device Start End Sectors Size Type - sdb1 64 32767 32704 16M unknown - sdb2 32768 33587199 33554432 16G Linux fs - sdb3 33587200 67141631 33554432 16G Linux fs - sdb4 67141632 100696063 33554432 16G Linux fs - sdb5 100696064 134250495 33554432 16G Linux fs - sdb6 134250496 167804927 33554432 16G Linux fs - sdb7 167804928 247805951 80001024 38.1G Linux fs - The partition table has been altered. - Calling ioctl() to re-read partition table. - Syncing disks. +Set the _PARTSIZE_ variable to the size of your microSD card. A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions. + +For example for a microSD card with 16 GB, set: + +---- +PARTSIZE=16G +---- + +Then partition the microSD card for the multiple distributions (make sure to replace _[DEVICE]_ with the correct device): + +---- +sudo sfdisk /dev/[DEVICE] --wipe always <>> Script header accepted. +New situation: +Disklabel type: gpt +Disk identifier: A012E9D0-B4EB-4677-926F-D93AE4C696FA + Device Start End Sectors Size Type + sdb1 64 32767 32704 16M unknown + sdb2 32768 33587199 33554432 16G Linux fs + sdb3 33587200 67141631 33554432 16G Linux fs + sdb4 67141632 100696063 33554432 16G Linux fs + sdb5 100696064 134250495 33554432 16G Linux fs + sdb6 134250496 167804927 33554432 16G Linux fs + sdb7 167804928 247805951 80001024 38.1G Linux fs +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +---- === Install U-Boot to the microSD card -Download the following U-Boot build. The source code can be found https://xff.cz/git/u-boot/tree/?h=ppp-2023.07[here]. +Download the following U-Boot build (the source code of the build can be on link:https://xff.cz/git/u-boot/tree/?h=ppp-2023.07[xff.cz]): - mkdir -p ~/u-boot && cd ~/u-boot - curl -O https://xff.cz/kernels/bootloaders-2024.04/ppp.tar.gz - tar -xzf ppp.tar.gz +---- +cd ~/rk2aw +curl -O https://xff.cz/kernels/bootloaders-2024.04/ppp.tar.gz +tar -xzf ppp.tar.gz +---- -NOTE: This is the same `ppp.tar.gz` from the <> section; if you already have a copy of it on your Linux machine then you don't have to download it again. +NOTE: This is the same `ppp.tar.gz` from the <> section; if you already have a copy of it on your computer then you don't have to download it again. -NOTE: If you are interested in building this U-Boot image yourself, you will need to copy the `ppp/foss/.config` file from the archive above to the root of your U-Boot source directory. +Then write the U-Boot image to the microSD card using the following command, where *[DEVICE]* has to be replaced with the name of the microSD card as displayed under _lsblk_: -Write the U-Boot image to the microSD card. +---- +sudo dd if=ppp/foss/u-boot-rockchip.bin of=/dev/*[DEVICE]* bs=512 seek=64 status=progress conv=fsync +---- - sudo dd if=ppp/foss/u-boot-rockchip.bin of=/dev/[DEVICE] bs=512 seek=64 - sudo sync +If you are interested in building this U-Boot image yourself, you will need to copy the `ppp/foss/.config` file from the archive above to the root of your U-Boot source directory. -=== Building partition for each linux distribution +=== Building the partitions -Download, decompress and mount the distribution image on your linux machine. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. This guide has been tested with following images: +Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. This guide has been tested with following images: * https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz * https://github.com/manjaro-pinephone/phosh/releases/download/beta37/Manjaro-ARM-phosh-pinephonepro-beta37.img.xz @@ -126,129 +125,143 @@ Download, decompress and mount the distribution image on your linux machine. Cop Replace the VALUES according the updated distribution and real file name: - DISTROURL=IMAGE_URL_ADDRESS - PARTNAME=ARCH - PARTNUMBER=2 - - mkdir -p ~/ppp/distros - cd ~/ppp/distros - wget $DISTROURL - xz -v -d -k IMAGE.*.xz - mv IMAGE.img $PARTNAME.img - - sudo losetup -P /dev/loop0 $PARTNAME.img - sudo mkdir -p /mnt/$PARTNAME/boot /mnt/$PARTNAME/root /mnt/$PARTNAME/sd - sudo mount /dev/loop0p1 /mnt/$PARTNAME/boot/ # use loop0p2 for UT - sudo mount /dev/loop0p2 /mnt/$PARTNAME/root/ # use loop0p3 for UT - - sudo dd if=/dev/loop0p2 of=/dev/[DEVICE]$PARTNUMBER bs=1M status=progress conv=fsync # use loop0p3 for UT - sudo mount /dev/[DEVICE]$PARTNUMBER /mnt/$PARTNAME/sd/ - sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/sd/boot - # sudo mv /mnt/$PARTNAME/sd/boot/boot.scr /mnt/$PARTNAME/sd/boot/boot.scrORIG # rename if present - sudo mkdir -p /mnt/$PARTNAME/sd/boot/extlinux - # sudo mv /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf /mnt/$PARTNAME/sd/boot/extlinux/extlinux.confORIG # rename if present - # sudo mv /mnt/$PARTNAME/sd/etc/fstab /mnt/$PARTNAME/sd/etc/fstabORIG # rename - - sudo tee /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf < - #uncomment for ARCH - #PARTLABEL=$PARTNAME / ext4 rw,relatime 0 1 - # - #uncomment for MANJARO - #PARTLABEL=MANJARO / ext4 defaults 0 1 - # - #uncomment for MOBIAN - #PARTLABEL=$PARTNAME / ext4 defaults,x-systemd.growfs 0 1 - # - #uncomment for PMOS - #PARTLABEL=$PARTNAME / ext4 defaults 0 0 - # - #uncomment for UT - #PARTLABEL=$PARTNAME / ext4 defaults 0 1 - #PARTLABEL=$PARTNAME /boot ext4 defaults 0 2 - #PARTLABEL=$PARTNAME /userdata ext4 defaults 0 2 - EOF - -=== Unmount, detach all building images and resize partition. - - sudo umount /mnt/$PARTNAME/* - sudo rm -r /mnt/$PARTNAME - sudo losetup -D - -On the first boot, if it doesn't happen automatically, you can manually resize each image to fill the entire partition using GParted GUI software or using the following commands: - - sudo e2fsck -f /dev/[DEVICE]$PARTNUMBER - sudo resize2fs /dev/[DEVICE]$PARTNUMBER +---- +DISTROURL=image_url_address +PARTNAME=ARCH +PARTNUMBER=2 +---- + +---- +mkdir -p ~/ppp/distros +cd ~/ppp/distros +wget $DISTROURL +xz -v -d -k IMAGE.*.xz +mv IMAGE.img $PARTNAME.img +---- + +---- +sudo losetup -P /dev/loop0 $PARTNAME.img +sudo mkdir -p /mnt/$PARTNAME/boot /mnt/$PARTNAME/root /mnt/$PARTNAME/sd +sudo mount /dev/loop0p1 /mnt/$PARTNAME/boot/ # use loop0p2 for UT +sudo mount /dev/loop0p2 /mnt/$PARTNAME/root/ # use loop0p3 for UT +---- + +---- +sudo dd if=/dev/loop0p2 of=/dev/[DEVICE]$PARTNUMBER bs=1M status=progress conv=fsync # use loop0p3 for UT +sudo mount /dev/[DEVICE]$PARTNUMBER /mnt/$PARTNAME/sd/ +sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/sd/boot +# sudo mv /mnt/$PARTNAME/sd/boot/boot.scr /mnt/$PARTNAME/sd/boot/boot.scrORIG # rename if present +sudo mkdir -p /mnt/$PARTNAME/sd/boot/extlinux +# sudo mv /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf /mnt/$PARTNAME/sd/boot/extlinux/extlinux.confORIG # rename if present +# sudo mv /mnt/$PARTNAME/sd/etc/fstab /mnt/$PARTNAME/sd/etc/fstabORIG # rename +---- + +---- +sudo tee /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf < +#uncomment for ARCH +#PARTLABEL=$PARTNAME / ext4 rw,relatime 0 1 + +#uncomment for MANJARO +#PARTLABEL=MANJARO / ext4 defaults 0 1 + +#uncomment for MOBIAN +#PARTLABEL=$PARTNAME / ext4 defaults,x-systemd.growfs 0 1 + +#uncomment for PMOS +#PARTLABEL=$PARTNAME / ext4 defaults 0 0 + +#uncomment for UT +#PARTLABEL=$PARTNAME / ext4 defaults 0 1 +#PARTLABEL=$PARTNAME /boot ext4 defaults 0 2 +#PARTLABEL=$PARTNAME /userdata ext4 defaults 0 2 +EOF +---- + +=== Unmount and detach all building images + +To unmount and deatch all building images, run: + +---- +sudo umount /mnt/$PARTNAME/* +sudo rm -r /mnt/$PARTNAME +sudo losetup -D +---- + +=== Resize the partitions + +On the first boot, if it doesn't happen automatically, you can manually resize each image to fill the entire partition using GParted GUI software or using the CLI: + +---- +sudo e2fsck -f /dev/[DEVICE]$PARTNUMBER +sudo resize2fs /dev/[DEVICE]$PARTNUMBER +---- Repeat the building process for each needed distribution. === Build PostmarketOS image -You can optionally use bootstrap to generate distro image, instead of direct download. Make sure you install pmbootstrap before building image. - - git clone --depth=1 https://git.sr.ht/~postmarketos/pmbootstrap - mkdir -p ~/.local/bin - ln -s "$PWD/pmbootstrap/pmbootstrap.py" ~/.local/bin/pmbootstrap - pmbootstrap --version # if this returns error see next command - - tee -a ~/.profile < Date: Sat, 2 Mar 2024 15:35:49 +0100 Subject: [PATCH 02/13] Simplified structure and headlines --- .../Various/Multi-distribution_image.adoc | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc index 2111df15..db8d8e1a 100644 --- a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc @@ -9,9 +9,11 @@ menu: weight: --- +:toc: + This article explains how to install a multiple linux distribution enviroment on your PinePhone Pro that is bootable from a microSD card. -== Install rk2aw +== Installing rk2aw Make sure your phone has the link:/documentation/PinePhone_Pro/Software/Bootloaders/#rk2aw[rk2aw pre-loader] installed to SPI flash. PinePhone Pro models ordered after November 2023 are shipped with rk2aw pre-installed. Otherwise, follow the instructions in this section to install it. @@ -31,7 +33,7 @@ sudo ./spinor-flash-initial-setup.sh Further instructions can be found on the link:https://xff.cz/kernels/bootloaders-2024.04/ppp/rk2aw/INSTALL[author's website]. -== Build the multi-distribution microSD card +== Building Insert microSD card into the Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/*[DEVICE]*`, where *[DEVICE]* is the name of the device displayed in the _lsblk_ command. To erase all signatures, type `sudo wipefs --all --force /dev/*[DEVICE]*`. @@ -40,7 +42,7 @@ Overwrite the microSD card with zeroes by either overwriting the first sectors w . `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=1` . `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=$(expr $(lsblk -bno SIZE /dev/[DEVICE] | head -1) \/ 32768)` -=== Partition the microSD card +=== Partitioning Set the _PARTSIZE_ variable to the size of your microSD card. A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions. @@ -93,7 +95,7 @@ Calling ioctl() to re-read partition table. Syncing disks. ---- -=== Install U-Boot to the microSD card +=== Install U-Boot Download the following U-Boot build (the source code of the build can be on link:https://xff.cz/git/u-boot/tree/?h=ppp-2023.07[xff.cz]): @@ -113,7 +115,7 @@ sudo dd if=ppp/foss/u-boot-rockchip.bin of=/dev/*[DEVICE]* bs=512 seek=64 status If you are interested in building this U-Boot image yourself, you will need to copy the `ppp/foss/.config` file from the archive above to the root of your U-Boot source directory. -=== Building the partitions +=== Build the partitions Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. This guide has been tested with following images: @@ -216,28 +218,7 @@ sudo tee /mnt/$PARTNAME/sd/etc/fstab < Date: Sat, 2 Mar 2024 15:38:11 +0100 Subject: [PATCH 03/13] Adopted the site to Software section --- .../documentation/PinePhone_Pro/Software/Boot_order.adoc | 2 +- .../documentation/PinePhone_Pro/Software/Bootloaders.adoc | 2 +- .../{Various => Software}/Multi-distribution_image.adoc | 6 +++--- content/documentation/PinePhone_Pro/Software/Releases.adoc | 2 +- .../PinePhone_Pro/Software/Software_state.adoc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename content/documentation/PinePhone_Pro/{Various => Software}/Multi-distribution_image.adoc (99%) diff --git a/content/documentation/PinePhone_Pro/Software/Boot_order.adoc b/content/documentation/PinePhone_Pro/Software/Boot_order.adoc index 297c2e10..258221e3 100644 --- a/content/documentation/PinePhone_Pro/Software/Boot_order.adoc +++ b/content/documentation/PinePhone_Pro/Software/Boot_order.adoc @@ -6,7 +6,7 @@ menu: title: parent: "PinePhone_Pro/Software" identifier: "PinePhone_Pro/Software/Boot_order" - weight: + weight: 1 --- The RK3399S processor in the PinePhone Pro searches for the bootloader (such as _U-Boot_ or _Tow-Boot_) in the following order: diff --git a/content/documentation/PinePhone_Pro/Software/Bootloaders.adoc b/content/documentation/PinePhone_Pro/Software/Bootloaders.adoc index d9f9e937..dd1235e8 100644 --- a/content/documentation/PinePhone_Pro/Software/Bootloaders.adoc +++ b/content/documentation/PinePhone_Pro/Software/Bootloaders.adoc @@ -6,7 +6,7 @@ menu: title: parent: "PinePhone_Pro/Software" identifier: "PinePhone_Pro/Software/Bootloaders" - weight: + weight: 4 --- The following section contains notes regarding compatible bootloaders with the PinePhone Pro. diff --git a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc similarity index 99% rename from content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc rename to content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index db8d8e1a..c0e3b988 100644 --- a/content/documentation/PinePhone_Pro/Various/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -4,9 +4,9 @@ draft: false menu: docs: title: - parent: "PinePhone_Pro/Various" - identifier: "PinePhone_Pro/Various/Multi-distribution_image" - weight: + parent: "PinePhone_Pro/Software" + identifier: "PinePhone_Pro/Software/Multi-distribution_image" + weight: 99 --- :toc: diff --git a/content/documentation/PinePhone_Pro/Software/Releases.adoc b/content/documentation/PinePhone_Pro/Software/Releases.adoc index 99b977cc..b1591fa7 100644 --- a/content/documentation/PinePhone_Pro/Software/Releases.adoc +++ b/content/documentation/PinePhone_Pro/Software/Releases.adoc @@ -6,7 +6,7 @@ menu: title: parent: "PinePhone_Pro/Software" identifier: "PinePhone_Pro/Software/Releases" - weight: + weight: 2 --- This page contains a list of all available releases and tools for the link:/documentation/PinePhone_Pro[PinePhone Pro]. diff --git a/content/documentation/PinePhone_Pro/Software/Software_state.adoc b/content/documentation/PinePhone_Pro/Software/Software_state.adoc index b210450f..b0ae32bb 100644 --- a/content/documentation/PinePhone_Pro/Software/Software_state.adoc +++ b/content/documentation/PinePhone_Pro/Software/Software_state.adoc @@ -6,7 +6,7 @@ menu: title: parent: "PinePhone_Pro/Software" identifier: "PinePhone_Pro/Software/Software_state" - weight: + weight: 3 --- Presently the PinePhone Pro Explorer Edition is aimed at *Linux developers with an extensive knowledge of embedded systems and/or experience with mobile Linux*. It will take time for all the PinePhone Pro’s functionality to reach software parity with the original PinePhone and for mobile operating systems, in more general, to reach a higher degree of maturity. From 8abddd22c3cfedb793acc95651307f260ab35246 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 18:18:37 +0100 Subject: [PATCH 04/13] Revisioned and adapted to work with both eMMC and SD card. --- .../Software/Multi-distribution_image.adoc | 135 +++++++----------- 1 file changed, 55 insertions(+), 80 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index c0e3b988..f32785f3 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -11,7 +11,7 @@ menu: :toc: -This article explains how to install a multiple linux distribution enviroment on your PinePhone Pro that is bootable from a microSD card. +This article explains how to install a multiple linux distribution enviroment on your PinePhone Pro that is bootable both from the eMMC internal memory or a microSD card. == Installing rk2aw @@ -19,7 +19,7 @@ Make sure your phone has the link:/documentation/PinePhone_Pro/Software/Bootload TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot to disable the SPI flash memory. -Make sure the phone’s SSH server is up and running. On the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: +Make sure the phone’s link:/documentation/PinePhone_Pro/Software/Multi-distribution_image/#troubleshooting[SSH server] is up and running on the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: ---- ssh USER@PHONEIP @@ -33,29 +33,37 @@ sudo ./spinor-flash-initial-setup.sh Further instructions can be found on the link:https://xff.cz/kernels/bootloaders-2024.04/ppp/rk2aw/INSTALL[author's website]. -== Building +== Setting variables +During processes of partitioning target device or building the image, everytime you open a new terminal window, make sure needed `$VARIABLES` are properly defined: -Insert microSD card into the Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/*[DEVICE]*`, where *[DEVICE]* is the name of the device displayed in the _lsblk_ command. To erase all signatures, type `sudo wipefs --all --force /dev/*[DEVICE]*`. +`DISTROURL= is the image downloading URL address of Linux distribution, in example **DISTROURL=https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz**` +`DEVICE= is the name of the device displayed in the **lsblk** command, in example **DEVICE=sdb**` +`PARTSIZE= is the capacity of each partition, in example **PARTSIZE=16G**` +`PARTNAME= is the name of partition/distribution, in example **PARTNAME=ARCH**` +`PARTNUMBER= is the number of partition/distribution, in example **PARTNUMBER=2**` -Overwrite the microSD card with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): +This guide has been tested with following images: -. `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=1` -. `sudo dd if=/dev/zero of=/dev/**[DEVICE]** status=progress bs=32768 count=$(expr $(lsblk -bno SIZE /dev/[DEVICE] | head -1) \/ 32768)` +* https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz +* https://github.com/manjaro-pinephone/phosh/releases/download/beta37/Manjaro-ARM-phosh-pinephonepro-beta37.img.xz +* https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20240121.img.xz +* https://images.postmarketos.org/bpo/v23.12/pine64-pinephonepro/phosh/20240221-0448/20240221-0448-postmarketOS-v23.12-phosh-22.3-pine64-pinephonepro.img.xz -=== Partitioning +== Building -Set the _PARTSIZE_ variable to the size of your microSD card. A minimum capacity of 64 GB for the microSD card is recommended for 5 distributions. +Press power button on your PinePhone Pro. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. -For example for a microSD card with 16 GB, set: +Overwrite the device with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): ----- -PARTSIZE=16G ----- +. `sudo dd if=/dev/zero of=/dev/$DEVICE status=progress bs=32768 count=1` +. `sudo dd if=/dev/zero of=/dev/$DEVICE status=progress bs=32768 count=$(expr $(lsblk -bno SIZE /dev/$DEVICE | head -1) \/ 32768)` -Then partition the microSD card for the multiple distributions (make sure to replace _[DEVICE]_ with the correct device): +=== Partitioning + +Partition the device for the multiple distributions: ---- -sudo sfdisk /dev/[DEVICE] --wipe always <> section; if you already have a copy of it on your computer then you don't have to download it again. -Then write the U-Boot image to the microSD card using the following command, where *[DEVICE]* has to be replaced with the name of the microSD card as displayed under _lsblk_: +Then write the U-Boot image to the device using the following command: ---- -sudo dd if=ppp/foss/u-boot-rockchip.bin of=/dev/*[DEVICE]* bs=512 seek=64 status=progress conv=fsync +sudo dd if=ppp/foss/u-boot-rockchip.bin of=/dev/$DEVICE bs=512 seek=64 status=progress conv=fsync ---- If you are interested in building this U-Boot image yourself, you will need to copy the `ppp/foss/.config` file from the archive above to the root of your U-Boot source directory. === Build the partitions -Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. This guide has been tested with following images: - -* https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz -* https://github.com/manjaro-pinephone/phosh/releases/download/beta37/Manjaro-ARM-phosh-pinephonepro-beta37.img.xz -* https://images.mobian.org/pinephonepro/weekly/mobian-pinephonepro-phosh-20240121.img.xz -* https://images.postmarketos.org/bpo/v23.12/pine64-pinephonepro/phosh/20240221-0448/20240221-0448-postmarketOS-v23.12-phosh-22.3-pine64-pinephonepro.img.xz -* (https://ci.ubports.com/job/focal-hybris-rootfs-arm64/job/master/lastSuccessfulBuild/artifact/ubuntu-touch-pinephone-pro-img-arm64.raw.xz) Note: this distribution currently doesn't work on the multi-distro image - -Replace the VALUES according the updated distribution and real file name: - ----- -DISTROURL=image_url_address -PARTNAME=ARCH -PARTNUMBER=2 ----- +Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. ---- mkdir -p ~/ppp/distros @@ -149,72 +141,65 @@ sudo mount /dev/loop0p2 /mnt/$PARTNAME/root/ # use loop0p3 for UT ---- ---- -sudo dd if=/dev/loop0p2 of=/dev/[DEVICE]$PARTNUMBER bs=1M status=progress conv=fsync # use loop0p3 for UT -sudo mount /dev/[DEVICE]$PARTNUMBER /mnt/$PARTNAME/sd/ +sudo dd if=/dev/loop0p2 of=/dev/$DEVICE$PARTNUMBER bs=1M status=progress conv=fsync # use loop0p3 for UT +sudo mount /dev/$DEVICE$PARTNUMBER /mnt/$PARTNAME/sd/ sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/sd/boot # sudo mv /mnt/$PARTNAME/sd/boot/boot.scr /mnt/$PARTNAME/sd/boot/boot.scrORIG # rename if present -sudo mkdir -p /mnt/$PARTNAME/sd/boot/extlinux -# sudo mv /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf /mnt/$PARTNAME/sd/boot/extlinux/extlinux.confORIG # rename if present -# sudo mv /mnt/$PARTNAME/sd/etc/fstab /mnt/$PARTNAME/sd/etc/fstabORIG # rename ---- ---- +sudo mkdir -p /mnt/$PARTNAME/sd/boot/extlinux +# sudo mv /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf /mnt/$PARTNAME/sd/boot/extlinux/extlinux.confORIG # rename if present + sudo tee /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf < -#uncomment for ARCH + +#uncomment next line for ARCH #PARTLABEL=$PARTNAME / ext4 rw,relatime 0 1 -#uncomment for MANJARO +#uncomment next line for MANJARO #PARTLABEL=MANJARO / ext4 defaults 0 1 -#uncomment for MOBIAN +#uncomment next line for MOBIAN #PARTLABEL=$PARTNAME / ext4 defaults,x-systemd.growfs 0 1 -#uncomment for PMOS +#uncomment next line for PMOS #PARTLABEL=$PARTNAME / ext4 defaults 0 0 -#uncomment for UT -#PARTLABEL=$PARTNAME / ext4 defaults 0 1 -#PARTLABEL=$PARTNAME /boot ext4 defaults 0 2 -#PARTLABEL=$PARTNAME /userdata ext4 defaults 0 2 EOF ---- @@ -257,29 +242,12 @@ sudo losetup -D On the first boot, if it doesn't happen automatically, you can manually resize each image to fill the entire partition using GParted GUI software or using the CLI: ---- -sudo e2fsck -f /dev/[DEVICE]$PARTNUMBER -sudo resize2fs /dev/[DEVICE]$PARTNUMBER +sudo e2fsck -f /dev/$DEVICE$PARTNUMBER +sudo resize2fs /dev/$DEVICE$PARTNUMBER ---- Repeat the building process for each needed distribution. -== Usage - -According to megi's link:https://xnux.eu/rk2aw[rk2aw info], use the power button and LED feedback to operate the PinePhone Pro: - -* Plug in USB power cord. The LED blinks: 0.5s on, 0.5s off. Battery is slowly charging. -* Press shortly power button. The graphical menu appears, than just select the image to boot from. -* Press longer power button, LED starts to blinks rapidly. Release the power button, LED blinks N times each second depending on the selected image. - -For example: - -* LED blinks once each second and 1st image is selected; -* LED blinks twice each second and 2nd image is seleted; -* LED blinks triple each second and 3rd image is selected. -* Press shortly to move to next image. -* Press longer to boot the selected image. -* In case you hold the power button too long, the device is forced to power off. - == Troubleshooting To find the exact _LABEL_, _UUID_, _PARTLABEL_ and _PARTUUID_ names, open a terminal window on the phone and use the command `blkid`. @@ -288,4 +256,11 @@ Any time a distribution update rebuilds the initramfs it is necessary to delete In case you want to reinstall only one distribution, the easy way is to delete and recreate the selected partition using the GParted GUI. -If the device doesn't start, connect a compatible link:https://pine64.com/product/pinebook-pinephone-pinetab-serial-console[serial cable] to the headphone jack and a computer, switch off microswitch 6 and start a serial console to investigate further. Find out the corresponding USB device using `ls /dev/ttyUSB*` and then connect to it with for example _minicom_ using the command `minicom -b 1500000 -D /dev/ttyUSB**[...]**`, where *[...]* is the number of the USB device. \ No newline at end of file +If the device doesn't start, connect a compatible link:https://pine64.com/product/pinebook-pinephone-pinetab-serial-console[serial cable] to the headphone jack and a computer, switch off microswitch 6 and start a serial console to investigate further. Find out the corresponding USB device using `ls /dev/ttyUSB*` and then connect to it with for example _minicom_ using the command `minicom -b 1500000 -D /dev/ttyUSB**[...]**`, where *[...]* is the number of the USB device. + +In case the SSH server on your PinePhone Pro’s stock operating system is not available, you can install and/or start the service: + + sudo apt install ssh + sudo systemctl enable --now sshd + ip address # shows phone's ip address + whoami # shows user name From e55dceb14948a8900608f3281f5934819e71c810 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 18:40:54 +0100 Subject: [PATCH 05/13] minor revision --- .../Software/Multi-distribution_image.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index f32785f3..e8cf04a2 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -36,11 +36,11 @@ Further instructions can be found on the link:https://xff.cz/kernels/bootloaders == Setting variables During processes of partitioning target device or building the image, everytime you open a new terminal window, make sure needed `$VARIABLES` are properly defined: -`DISTROURL= is the image downloading URL address of Linux distribution, in example **DISTROURL=https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz**` -`DEVICE= is the name of the device displayed in the **lsblk** command, in example **DEVICE=sdb**` -`PARTSIZE= is the capacity of each partition, in example **PARTSIZE=16G**` -`PARTNAME= is the name of partition/distribution, in example **PARTNAME=ARCH**` -`PARTNUMBER= is the number of partition/distribution, in example **PARTNUMBER=2**` +`DISTROURL is the image downloading URL address of Linux distribution, in example **DISTROURL=https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz**` +`DEVICE is the name of the device displayed in the **lsblk** command, in example **DEVICE=sdb**` +`PARTSIZE is the capacity of each partition, in example **PARTSIZE=16G**` +`PARTNAME is the name of partition/distribution, in example **PARTNAME=ARCH**` +`PARTNUMBER is the number of partition/distribution, in example **PARTNUMBER=2**` This guide has been tested with following images: From 84ae9ea7e4e8034fea0022b7b6209e7a126f228e Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 18:53:24 +0100 Subject: [PATCH 06/13] sd replaced from device --- .../Software/Multi-distribution_image.adoc | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index e8cf04a2..d51607c2 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -135,23 +135,23 @@ mv IMAGE.img $PARTNAME.img ---- sudo losetup -P /dev/loop0 $PARTNAME.img -sudo mkdir -p /mnt/$PARTNAME/boot /mnt/$PARTNAME/root /mnt/$PARTNAME/sd -sudo mount /dev/loop0p1 /mnt/$PARTNAME/boot/ # use loop0p2 for UT -sudo mount /dev/loop0p2 /mnt/$PARTNAME/root/ # use loop0p3 for UT +sudo mkdir -p /mnt/$PARTNAME/boot /mnt/$PARTNAME/root /mnt/$PARTNAME/device +sudo mount /dev/loop0p1 /mnt/$PARTNAME/boot/ +sudo mount /dev/loop0p2 /mnt/$PARTNAME/root/ ---- ---- -sudo dd if=/dev/loop0p2 of=/dev/$DEVICE$PARTNUMBER bs=1M status=progress conv=fsync # use loop0p3 for UT -sudo mount /dev/$DEVICE$PARTNUMBER /mnt/$PARTNAME/sd/ -sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/sd/boot -# sudo mv /mnt/$PARTNAME/sd/boot/boot.scr /mnt/$PARTNAME/sd/boot/boot.scrORIG # rename if present +sudo dd if=/dev/loop0p2 of=/dev/$DEVICE$PARTNUMBER bs=1M status=progress conv=fsync +sudo mount /dev/$DEVICE$PARTNUMBER /mnt/$PARTNAME/device/ +sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/device/boot +# sudo mv /mnt/$PARTNAME/device/boot/boot.scr /mnt/$PARTNAME/device/boot/boot.scrORIG # rename if present ---- ---- -sudo mkdir -p /mnt/$PARTNAME/sd/boot/extlinux -# sudo mv /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf /mnt/$PARTNAME/sd/boot/extlinux/extlinux.confORIG # rename if present +sudo mkdir -p /mnt/$PARTNAME/device/boot/extlinux +# sudo mv /mnt/$PARTNAME/device/boot/extlinux/extlinux.conf /mnt/$PARTNAME/device/boot/extlinux/extlinux.confORIG # rename if present -sudo tee /mnt/$PARTNAME/sd/boot/extlinux/extlinux.conf < #uncomment next line for ARCH From dcf679941eb5f35478dd6a282eced737bece6837 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 19:04:15 +0100 Subject: [PATCH 07/13] minor rev --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index d51607c2..9e35d59b 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -51,7 +51,7 @@ This guide has been tested with following images: == Building -Press power button on your PinePhone Pro. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. +Connect your PinePhone Pro to a Linux computer amd press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. Overwrite the device with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): From e7878d342a6145a3557384323a648bbc2b187589 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 19:05:03 +0100 Subject: [PATCH 08/13] minor rev --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index 9e35d59b..263db946 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -51,7 +51,7 @@ This guide has been tested with following images: == Building -Connect your PinePhone Pro to a Linux computer amd press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. +Connect your PinePhone Pro to a Linux computer and press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. Overwrite the device with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): From 674c09df2ebf13e70c1f0772b4bb7277e21ceea3 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 19:10:08 +0100 Subject: [PATCH 09/13] readability improvement --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index 263db946..901825aa 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -123,7 +123,7 @@ If you are interested in building this U-Boot image yourself, you will need to c === Build the partitions -Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. +Download, decompress and mount the distribution image on your Linux computer. Copy root filesystem and boot to needed partition. Make sure you use an updated image from link:/documentation/PinePhone_Pro/Software/Releases[relases download link] for each distribution. ---- mkdir -p ~/ppp/distros @@ -147,6 +147,8 @@ sudo scp -r /mnt/$PARTNAME/boot/* /mnt/$PARTNAME/device/boot # sudo mv /mnt/$PARTNAME/device/boot/boot.scr /mnt/$PARTNAME/device/boot/boot.scrORIG # rename if present ---- +Replace/create `/boot/extlinux/extlinux.conf` and `/etc/fstab` files: + ---- sudo mkdir -p /mnt/$PARTNAME/device/boot/extlinux # sudo mv /mnt/$PARTNAME/device/boot/extlinux/extlinux.conf /mnt/$PARTNAME/device/boot/extlinux/extlinux.confORIG # rename if present From 2953dbf2f7dc3ee504992c9d166b23673e5eb005 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 19:18:45 +0100 Subject: [PATCH 10/13] repetition --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index 901825aa..5870662f 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -51,7 +51,7 @@ This guide has been tested with following images: == Building -Connect your PinePhone Pro to a Linux computer and press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Find out the device name using the command `lsblk` and then make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. +Connect your PinePhone Pro to a Linux computer and press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. Overwrite the device with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): From ee8c877fca4e85998ab5b6a0d1efbe385db1b027 Mon Sep 17 00:00:00 2001 From: giorez Date: Wed, 6 Mar 2024 19:48:46 +0100 Subject: [PATCH 11/13] repetition --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index 5870662f..d796e5eb 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -51,7 +51,7 @@ This guide has been tested with following images: == Building -Connect your PinePhone Pro to a Linux computer and press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your Linux computer. Make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. +Connect your PinePhone Pro to a Linux computer and press power button on. From the graphical menu select `eMMC over USB` or `SD over USB` to expose the device to your computer. Make sure there are no signatures or partitions left with the command `sudo wipefs /dev/$DEVICE`. To erase all signatures, type `sudo wipefs --all --force /dev/$DEVICE`. Overwrite the device with zeroes by either overwriting the first sectors with zeroes (command 1) or the whole device (command 2): From c34b820fb01dcb15949e7be48fa2747efbcc0570 Mon Sep 17 00:00:00 2001 From: x1y <23239177+x1y@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:19:29 +0100 Subject: [PATCH 12/13] Removed SSH instructions again -> user risks, enabled SSH server and mobile Internet --- .../Software/Multi-distribution_image.adoc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index d796e5eb..045c8ff6 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -19,7 +19,7 @@ Make sure your phone has the link:/documentation/PinePhone_Pro/Software/Bootload TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot to disable the SPI flash memory. -Make sure the phone’s link:/documentation/PinePhone_Pro/Software/Multi-distribution_image/#troubleshooting[SSH server] is up and running on the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: +Make sure the phone’s SSH server is up and running on the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: ---- ssh USER@PHONEIP @@ -34,6 +34,7 @@ sudo ./spinor-flash-initial-setup.sh Further instructions can be found on the link:https://xff.cz/kernels/bootloaders-2024.04/ppp/rk2aw/INSTALL[author's website]. == Setting variables + During processes of partitioning target device or building the image, everytime you open a new terminal window, make sure needed `$VARIABLES` are properly defined: `DISTROURL is the image downloading URL address of Linux distribution, in example **DISTROURL=https://github.com/dreemurrs-embedded/Pine64-Arch/releases/download/20230925/archlinux-pinephone-pro-phosh-20230925.img.xz**` @@ -258,11 +259,4 @@ Any time a distribution update rebuilds the initramfs it is necessary to delete In case you want to reinstall only one distribution, the easy way is to delete and recreate the selected partition using the GParted GUI. -If the device doesn't start, connect a compatible link:https://pine64.com/product/pinebook-pinephone-pinetab-serial-console[serial cable] to the headphone jack and a computer, switch off microswitch 6 and start a serial console to investigate further. Find out the corresponding USB device using `ls /dev/ttyUSB*` and then connect to it with for example _minicom_ using the command `minicom -b 1500000 -D /dev/ttyUSB**[...]**`, where *[...]* is the number of the USB device. - -In case the SSH server on your PinePhone Pro’s stock operating system is not available, you can install and/or start the service: - - sudo apt install ssh - sudo systemctl enable --now sshd - ip address # shows phone's ip address - whoami # shows user name +If the device doesn't start, connect a compatible link:https://pine64.com/product/pinebook-pinephone-pinetab-serial-console[serial cable] to the headphone jack and a computer, switch off microswitch 6 and start a serial console to investigate further. Find out the corresponding USB device using `ls /dev/ttyUSB*` and then connect to it with for example _minicom_ using the command `minicom -b 1500000 -D /dev/ttyUSB**[...]**`, where *[...]* is the number of the USB device. \ No newline at end of file From 9cb746047870cfcd62767e8fc2f82221847b9348 Mon Sep 17 00:00:00 2001 From: x1y <23239177+x1y@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:25:25 +0100 Subject: [PATCH 13/13] Adresses concern --- .../PinePhone_Pro/Software/Multi-distribution_image.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc index 045c8ff6..affe28ef 100644 --- a/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc +++ b/content/documentation/PinePhone_Pro/Software/Multi-distribution_image.adoc @@ -17,7 +17,7 @@ This article explains how to install a multiple linux distribution enviroment on Make sure your phone has the link:/documentation/PinePhone_Pro/Software/Bootloaders/#rk2aw[rk2aw pre-loader] installed to SPI flash. PinePhone Pro models ordered after November 2023 are shipped with rk2aw pre-installed. Otherwise, follow the instructions in this section to install it. -TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot to disable the SPI flash memory. +TIP: The multi-boot image _can_ function without rk2aw, but you may need to hold down the **RE** button during boot to force the phone to boot from microSD card by disabling the SPI flash memory and the eMMC. Make sure the phone’s SSH server is up and running on the PinePhone Pro's stock operating system. Then Connect to your phone from your Linux computer using SSH: