Updated 2022-04-11: Installed a minimal version of Manjaro, a SLICK flavour of Arch

The pinebook pro is a beautiful 64-bit ARM based laptop, that reminds me of the form factor of a modern macbook air, shipping with a premium magnesium alloy shell, 64GB eMMC and a 10,000 mAH battery. All this for $200.

As a NIX machine, I’ve found Manjaro to be delightful. I have dreams of one day installing OpenBSD.

  1. On another Linux box download and prep a microSD card with an ARM Linux distro. Tne PINE64 NOOB wiki spell everything out nicely.
  2. Pick you distro, for simplicity I’m sticking with the Manjaro ARM with no desktop pre-baked image that is known to work well with the pinebook pro hardware.
  3. Flash the microSD card sudo dd if=Manjaro-ARM-minimal-pbpro-22.02.img of=/dev/sdb bs=1M status=progress conv=fsync. balenaEtcher is another great option.
  4. Jack the SD into the PBP and boot it. If you’re in luck the majaro installed will bootstrap itself. Leave the microSD jacked in. Reboot. Winnning!
  5. At this point, you should be are fully operational running off the microSD card. Live your life and be happy. But since I purchased the version that comes with an internal 64GB eMMC storage I wanted to plant the O/S on it.
  6. Thinking aloud…given the pinebook was actively booted off the microSD, I basically needed to rince and repeat the exact same process I used to etch the image to the microSD card, but this time to the eMMC card. The raw img file was not on the filesystem of the microSD as it was mounted and running the actual running O/S. Hmmm. I needed to get Manjaro-ARM-minimal-pbpro-22.02.img onto the running pinebook, which was booted off the microSD and had no network currently setup. I could setup networking and curl it. From another Linux box I could just write the img to another USB drive and in-turn mount that on the pinebook. I tried the later option.
  7. Jack a USB thumb drive into your other stable Linux box. Prepare, partition, mkfs.ext4 if needed. Mount the drive to /mnt and write Manjaro-ARM-minimal-pbpro-22.02.img to it. Unmount it and unjack the USB thumbdrive.
  8. Jack the thumbdrive into the pinebook which is currently running happily bootstrapped off the microSD card. Mount the thumbdrive like normal e.g. sudo mount /dev/sda1 /mnt
  9. Now its just a matter of etching the manjaro image file to the internal eMMC card. You have all the ingredients to make this happen, that is sudo dd if=/mnt/Manjaro-ARM-minimal-pbpro-22.02.img of=/dev/mmcblk2
  10. Partition the internal eMMC card fdisk /dev/mmcblk2, leaving the first 16MB free for the u-boot boot loader. Enter g to create a new GPT partition table. Then n to create a new partition, with 65536 as the first sector. Then w to write the changes.
  11. Format the newly partitioned eMMC with mkfs.ext4 /dev/mmcblk2p1
  12. Mount it with mount /dev/mmcblk2p1 /mnt
  13. pacstrap the fleshly minted volume as per a normal Arch installation, such as pacstrap /mnt base base-devel. After pacstrap, chroot to /mnt. Setup everything as per normal, such as networking, accounts, and so on. Checkout the offical arch install wiki or my arch guide.
  14. Install a customised kernel, that includes support for the pinebook pro, by running pacman -Sy linux-pbp.
  15. Create u-boot configuration file /boot/extlinux/extlinux.conf, with the configuration template below, replacing <UUID> with the id of the eMMC partition which can be identified with the blkid command
  16. Add firmware for bluetooth, wifi and keyboard brightness pacman -Sy ap256-firmware pbp-keyboard-hwdb.
  17. Install u-boot bootloader with pacman -Sy uboot-pbp, this will vomit out the idbloader.img and u-boot.itb files into /boot. The first must be written at sector 64, the second at sector 16384.
  18. reboot and profit!

Write u-boot bootloader

dd if=/boot/idbloader.img of=/dev/mmcblk2 seek=64
dd if=/boot/u-boot.itb of=/dev/mmcblk2 seek=16384

extlinux.conf

LABEL Arch Linux ARM
KERNEL ../Image
FDT ../dtbs/rockchip/rk3399-pinebook-pro.dtb
APPEND initrd=../initramfs-linux.img console=tty1 rootwait root=UUID=<UUID> rw