[GUIDE] ArchLinuxARM on Pinebook Pro
#1
Hello!
I just got my Pinebook Pro (ANSI) a couple of days ago.
I tried a few of the various OS images out there, and was really impressed with the performance.

I do like to run ArchLinux on my machines though, and since I am relatively new to the ARM architecture, I felt like I owed it to myself to at least try and get arch running on my pinebook pro!

[Image: EOr8IRyWsAIhGG5?format=jpg]

Below is the process I used. There's probably a better way of going about this, but like I said, this is my first attempt at bringing arch up to an unsupported device.


1) Environment Setup

Boot from your SD card to any Manjaro image (I used the Manjaro XFCE one).

Code:
sudo -i
pacman -S arch-install-scripts

Next, get the Generic AArch64 ArchLinuxARM image from here.


2) Prepare the eMMC (or NVMe)

We will have to prepare our eMMC (or NVMe) for the installation.
I initially installed mine on an NVMe, but even though its power consumption was 2.5W, the maximum supported by the pinebook pro, it would keep crashing at peak draws from the drive, so I ended up installing to the emmc instead.
The following guide applies to the emmc, but if you're installing to an nvme, simply replace /dev/mmcblk2 with /dev/nvme0n1.

Code:
fdisk /dev/mmcblk2
g # to create a new GPT
n # to create a new partition
1 # partition mumber
65536 # as the starting sector (we will need this space to flash Uboot in)
<ENTER> # for the last sector (auto)
w # to write the changes to disk

# create a filesystem
mkfs.ext4 /dev/mmcblk2p1

# mount the partition
mount /dev/mmcblk2p1 /mnt

# extract the image to the mounted partition
bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt

# generate the fstab entry for your emmc partition
genfstab -U /mnt >> /mnt/etc/fstab

# switch to the arch chroot
arch-chroot /mnt


3) Configure the installation

We will now need to configure the installation, and make some necessary changes to make it work with the pinebook pro's SoC.
For this, I have used the Manjaro packages for the kernel, uboot and wifi firmware.
I imagine these packages will soon be backported from manjaro to arch, although I am not quite sure how this process works.
If I am mistaken, and they do not make it to the arch repos, then I'll try and create AUR packages for them, so we can get updates.

Code:
# initialize the pacman keyring
pacman-key --init
pacman-key --populate archlinuxarm

# install wget
pacman -S wget

# for now, get the packages from the manjaro arm repos (feel free to use a mirror closer to you instead)
cd
mkdir manjaro-packages
cd manjaro-packages
wget http://ftp-nyc.osuosl.org/pub/manjaro-arm/repo/stable/aarch64/core/linux-pinebookpro-5.5.0-0.2-aarch64.pkg.tar.xz
wget http://ftp-nyc.osuosl.org/pub/manjaro-arm/repo/stable/aarch64/core/uboot-pinebookpro-2020.01-4-aarch64.pkg.tar.xz
wget http://ftp-nyc.osuosl.org/pub/manjaro-arm/repo/stable/aarch64/community/pinebookpro-post-install-20191121-1-any.pkg.tar.xz
wget http://ftp-nyc.osuosl.org/pub/manjaro-arm/repo/stable/aarch64/community/ap6256-firmware-2020.01-1-aarch64.pkg.tar.xz

# install the downloaded packages
pacman -U linux-pinebookpro-5.5.0-0.2-aarch64.pkg.tar.xz
pacman -U uboot-pinebookpro-2020.01-4-aarch64.pkg.tar.xz
pacman -U pinebookpro-post-install-20191121-1-any.pkg.tar.xz
pacman -U ap6256-firmware-2020.01-1-aarch64.pkg.tar.xz

# install uboot on the emmc
dd if=/boot/idbloader.img of=/dev/mmcblk2 seek=64 conv=notrunc
dd if=/boot/u-boot.itb of=/dev/mmcblk2 seek=16384 conv=notrunc

# generate the new initramfs (chances are it's already been generated by now, but no harm in doing it again)
mkinitcpio -P


4)  Final Steps

- Rename the alarm user, and change passwords for your new user and root
(Reference: https://wiki.pine64.org/index.php/Pinebo...ame.2C_etc)

Code:
usermod -l myself -d /home/myself -m alarm
chfn -o "John A Doe" myself
groupmod -n myself alarm

passwd myself
passwd

- Follow the archwiki installation guide and complete any missing steps, like editing /etc/hostname, /etc/hosts, /etc/locale.gen, /etc/locale.conf, etc:
https://wiki.archlinux.org/index.php/Installation_guide

- Install optional packages
Code:
pacman -S base-devel vim bash-completion networkmanager htop lsof strace

- Power off your pinebook pro, remove the SD card, and boot to your new ArchLinuxARM installation!
Code:
exit # exit the chroot
umount /mnt
sync
poweroff

- Install a WM/DE. I am currently testing out SwayWM, and it appears to be very stable and fast!


5) Potential ToDos

- Consider creating AUR packages for the packages we borrowed from Manjaro in Step 3, if they don't get backported soon.
- Perhaps create an image you can flash straight to your emmc, instead of having to do all of the steps above.


Messages In This Thread
[GUIDE] ArchLinuxARM on Pinebook Pro - by hku2 - 01-21-2020, 10:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinebook Pro Recovery with Void Linux (xbps) bds 4 1,496 09-13-2024, 07:01 PM
Last Post: bds
  Write SD cards with Etcher for Pinebook Pro futurejones 17 33,546 03-19-2021, 12:52 AM
Last Post: Alex007
  Program SPI NOR Flash on Pinebook Pro with u-boot on micro SD Card hmuller 0 3,788 09-21-2020, 10:02 AM
Last Post: hmuller
  Installing Docker on Pinebook Pro - update 1/18/20 SuperXkoodA 4 8,530 03-24-2020, 03:19 PM
Last Post: chaoskampf
  Swaywm on Pinebook Pro anjanmomi 10 15,796 02-06-2020, 11:47 AM
Last Post: xmixahlx
  Quick Guide to installing Ubuntu Unity on your Pinebook Pro andybleaden@gmail.com 19 26,833 02-03-2020, 11:17 AM
Last Post: MIchael
  Installing Wine i386 on Pinebook Pro wrzomar 0 3,553 01-31-2020, 03:52 PM
Last Post: wrzomar
  Hardening your Pinebook Pro software Arwen 4 8,423 12-11-2019, 09:53 AM
Last Post: hdk

Forum Jump:


Users browsing this thread: 7 Guest(s)