[ARM] Install EndeavourOS on a Pinebook Pro Part 1

@Shjim has written a guide for installing an Archlinux Arm base install on the Pinebook Pro.
Shjim was assisted by @lxn in this endeavour. A BIG EndeavourOS Thank You to everyone involved with this guide. :heart_eyes:

Considering that English is not the primary language for Shjim, I think he did an outstanding job on this. Without further ado, here is the guide…

#I would like to thank the team (Nadia Holmquist Pedersen)
who put together a flashable Arch Linux image… ###

#Installing Arch Linux on the Pinebook Pro #
#US keyboard used##

#create bootable iso on sd card

Flash the micro SD card with Nadia’s image ( PBP or X86 system will do )
PBP= Pinebook Pro

#current image

(archlinux-2020.07.02-pbp.img) It is tailored for ARM
and especially the Pinebook Pro! Get it from
[ https://github.com/nadiaholmquist/archiso-pbp/releases ]

#IDs to remember

SD card is /dev/mmcblk1 ( which has Arch iso on and is the one you booted from )
eMMC is /dev/mmcblk2
usb is /dev/sda ( this is the micro SD card if install Arch onto micro SD )

Boot into Arch running off the SD card inside PBP

#sync time
timedatectl set-ntp true

#partition disk

#Target Mirco sd card in usb 3 card reader/writer
#Target internal eMMC

Partition the internal eMMC /dev/mmcblk2 or Micro sd card in usb 3 card reader/writer /dev/sda.

#You must leave around 16MB or more of free space before your first partition
u-boot will be written here ( this is from the pine64 wiki for arch install ) …

I use GPT partition table. You can use gdisk ,cfdisk or if like use Gparted
before you boot into Arch iso ( you choice ) I forgive you if you do that way :stuck_out_tongue:

Starting at 16MB, create partition 1 for 200M
rest of the disk for 2nd partition

So it looks something like the examples below

#128G Micro SD card Example

sda1 200m
sda2 122.8G

#128G eMMc Example

mmcblk2p1 200m
mmcblk2p2 122.8G

#Format partitions… No need if you used Gparted, it should already be done

#Micro sd ( in usb 3 card reader/writer)
Format the newly partitioned sd card with F32 /dev/sda1
Format the newly partitioned sd card with ext4 /dev/sda2

#eMMc
Format the newly partitioned eMMC with F32 /dev/mmcblk2p1
Format the newly partitioned eMMC with ext4 /dev/mmcblk2p2

#Mount Partitions
#Example is micro SD

mount /dev/sda2 /mnt

mkdir /mnt/boot

mount /dev/sda1 /mnt/boot

#Pacstrap the New volume as per a normal Arch installation
#Example below

pacstrap /mnt base base-devel nano

#fstab

genfstab -U /mnt >> /mnt/etc/fstab

you can check with ( cat /mnt/etc/fstab )

#Make note of UUID of sda2 if SD or mmcblk2p2 if eMMc (You will need this later)

#After pacstrap chroot to /mnt

arch-chroot /mnt

#Add new repository to pacman.conf

use nano or vim … location of pacman.conf is ( /etc/pacman.conf )

(The pacman.conf installed when running pacstrap is the default one from Arch Linux ARM, so it won’t include the custom repo. Add the following to it after the entry for the aur repo )

[pinebookpro]
Server = https://nhp.sh/pinebookpro/
SigLevel = Optional

write & exit nano or vim …

#refesh

pacman -Syyy

( if all done right you see new repsitory … (pinebookpro)

#Install a customized kernel

#The one that includes support for the pinebook pro ( which in new pinebookpro repository )

pacman -Sy linux-pbp

#Extra things needed
#ap6256-firmware is needed for the Wi-Fi and Bluetooth to function, and pbp-keyboard-hwdb for the brightness control shortcuts to work correctly, both can be installed from the pinebookpro repo.

pacman -S ap6256-firmware pbp-keyboard-hwdb

#For headphone jack detection to work, you also need to install the pinebookpro-audio package from the pinebookpro repo, and enable acpid.

pacman -S pinebookpro-audio
systemctl enable acpid

#U-boot looks for a file called extlinux.conf file which you will need to create

create a directory in /boot and name it " extlinux "

Use nano or vim to create the extlinux.conf

#Example extlinux.conf file

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

#( Remember to replace yourUUID with your actual partition UUID )

The UUID you want is the one you wrote down at the beginning ( hope you did :stuck_out_tongue: )

#If you didn’t, don’t bother, I forgive you :slight_smile: You can find it with command
" blkid " ROOT is UUID you need ( sd card it be Sda2 or if eMMc it be mmcblk2p2)

Now save the file in /boot/extlinux

#Install u-boot bootloader

pacman -S uboot-pbp

#The Pinebook Pro currently uses u-boot as its bootloader, Two files will be placed in /boot that need to be written to the eMMC/sd card idbloader.img at sector 64 and u-boot.itb at sector 16384, they can be installed like this:

#eMMc

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

#Micro SD card in usb 3 card reader/writer

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

#Setup everything as normal . Checkout the official arch install wiki.

#swapfile
#locale
#keymap ( if not use US keyboard )
#hostname + hosts
#root password
#Create user account

#last things I install

pacman -S networkmanager network-manager-applet dialog linux-headers bluez bluez-utils mtools dosfstools alsa-utils pulseaudio xdg-user-dirs xdg-utils git

#Enable services

systemctl enable NetworkManager
systemctl enable bluetooth

#Fun time … fingers crossed and hope it all works :smiley:
#type in terminal

exit (get back to iso )

umount -a

reboot

Your Pinebook 64 Pro is ready to install EndeavouOS Part 2 including
a Desktop Environment. Go to this Topic for instructions>

https://forum.endeavouros.com/t/arm-how-to-install-endeavouros-arm-part-2/8236

##by Shjim ( it might not be the right way but it worked for me :smiley: )##

##Hope it helps someone##

7 Likes