Arch Linux

Install to a micro SD card

Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.

Zero the beginning of the SD card:

dd if=/dev/zero of=/dev/sdX bs=1M count=8

Start fdisk to partition the SD card:

fdisk /dev/sdX

At the fdisk prompt, create the new partition:

  1. Type o. This will clear out any partitions on the drive.
  2. Type p to list partitions. There should be no partitions left.
  3. Type n, then p for primary, 1 for the first partition on the drive, 4096 for the first sector, and then press ENTER to accept the default last sector.
  4. Write the partition table and exit by typing w.

Create the ext4 filesystem:

mkfs.ext4 /dev/sdX1

Mount the filesystem:

mkdir root
mount /dev/sdX1 root

Download and extract the root filesystem (as root, not via sudo):

wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C root

Download the boot.scr script for U-Boot and place it in the /boot directory:

wget http://os.archlinuxarm.org/os/allwinner/boot/pine64/boot.scr -O root/boot/boot.scr

Unmount the partition:

umount root

Download and install the U-Boot bootloader:

wget http://os.archlinuxarm.org/os/allwinner/boot/pine64/u-boot-sunxi-with-spl.bin
dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1

Insert the micro SD card into the Pine64, connect ethernet, and apply 5V power.

Use the serial console or SSH to the IP address given to the board by your router.

  • Login as the default user alarm with the password alarm.
  • The default root password is root.
  • HDMI video is not yet supported in the mainline kernel.

Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:

pacman-key --init
pacman-key --populate archlinuxarm

Install the U-Boot package

Remove the boot.scr file manually downloaded previously:

rm /boot/boot.scr

Install the U-Boot package:

pacman -Sy uboot-pine64

When prompted, press y and hit enter to write the latest bootloader to the micro SD card.

Set Keymap

localectl set-keymap --no-convert es

It will change /etc/vconsole.conf

Install the xorg-server

pacman -S \
  xorg-server \
  xinit \
  chromium \
  i3-wm xterm xorg-xclock

Configure ~/.xinitrc

/home/david/.xinitrc
Info

To send keyboard events from the terminal, install xdotool and run DISPLAY=:0 xdotool key F5 for example.