注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Category:PinePhone

From Funtoo
Jump to navigation Jump to search

Today we will be installing ARM64 Funtoo on a PinePhone the easy way.

First, we need the kernel already pre-built and ready to use. There are several PinePhone images from various Linux distros that we will be using from to get a pre-built kernel. We will be picking KDE Neon, which it has a 5.6 kernel which has builtin Mali 400 graphics support.

First download the latest image from the following URL: https://images.plasma-mobile.org/pinephone/

Attach a MicroSD card you want to use to flash the image with, to your system. Be sure you choose one knowing that all data will be lost! Once attached to the computer, use lsblk to locate which device file your MicroSD card is located. If its partitions have been automatically mounted, please unmount now.

We will be erasing the partition table and all metadata using the wipefs command, so run the following command, assuming /dev/sdb is your MicroSD card.

root # wipefs -a /dev/sdb

After everything has been wiped, we need to decompress the image we downloaded.

user $  cd /path/to/image; gunzip plasma-mobile-neon-<version>.img.gz

After decompressing, it's time to flash the actual KDE Neon image. Run the following command (again assuming /dev/sdb is your MicroSD)

   Warning
Be sure to use the right device file!
root # dd if=/path/to/image/plasma-mobile-neon-<version>.img of=/dev/sdb bs=1M

After flashing is complete, you should notice a single partition (e.g. /dev/sdb1). The partition is roughly 8GB in size. If your MicroSD is much larger in storage capacity, we should resize the partition and filesystem accordingly.

root # parted /dev/sdb
> resizepart 1 100%
> quit
root # resize2fs /dev/sdb1
root # e2fsck /dev/sdb1
root # resize2fs /dev/sdb1 # Yes, run the command a 2nd time after fsck'ing.

Once completed, we will now mount the partition somewhere, e.g. /mnt.

Inside the mounted directory, we're going to remove EVERYTHING except for /mnt/boot and /mnt/usr. Be sure to keep those two directories!

After removing them, we will need the modules/ sub-directory inside /mnt/usr/lib, so move it to the root directory of the partition for now.

root # mv /mnt/usr/lib/modules /mnt

Then remove the entire usr/ sub-directory. Create a new directory called lib64/ and move the modules/ sub-directory into it.

root # mkdir /mnt/lib64; mv /mnt/{modules,lib64}

Now download the latest Funtoo arm64 stage3 rootfs tarball and extract the contents into the partition.

root # tar --numeric-owner -xpf stage3-arm64_generic-*.tar.xz -C /mnt

Now, optionally, emerge fchroot and follow the rest of the Funtoo Install Guide after the Installation Part of the guide to setup your PinePhone installation. Once fchroot has been emerged, simply

root # fchroot /mnt

After, optionally, setting up your installation, now we need to unmount the partition, remove the MicroSD card from your computer. Then open the back cover of your PinePhone and insert the MicroSD card at the top right of the battery and close the cover.

Congratulations, you now have successfully installed Funtoo into your PinePhone. Hold the Power Button for at least 10 seconds or so and watch the screen turn on and eventually lead you to a TTY virtual terminal user prompt. :)

This category currently contains no pages or media.