Difference between revisions of "Quartz64 Installing Arch Linux ARM"

From PINE64
Jump to navigation Jump to search
(found the key after all.)
m (→‎Fetching The Root File System Tarball: since we do signature verification, we can drop the https requirement now)
Line 13: Line 13:
== Fetching The Root File System Tarball ==
== Fetching The Root File System Tarball ==


Fetch the root filesystem tarball over HTTPS from the de3 mirror, the autoselect mirror is broken and will sometimes feed you mirrors with broken HTTPS.
Fetch the root filesystem tarball and the PGP signature


  $ wget -N https://de3.mirror.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz{,.sig}
  <nowiki>$ wget -N http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz{,.sig}</nowiki>


Fetch the gpg keys:
Fetch the gpg keys:


  $ curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x68b3537f39a313b3e574d06777193f152bdbe6a6' | gpg --import=-
  <nowiki>$ curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x68b3537f39a313b3e574d06777193f152bdbe6a6' | gpg --import=-</nowiki>
 
Compare the key ID provided in the above command with the one listed here: https://archlinuxarm.org/about/package-signing (Take good note of the domain and HTTPS)


Verify the tarball's authenticity
Verify the tarball's authenticity


  $ gpg --verify ArchLinuxARM-aarch64-latest.tar.gz.sig
  $ gpg --verify ArchLinuxARM-aarch64-latest.tar.gz.sig
{{note|Do not skip verifying the authenticity. This is important. It also protects you from prematurely aborted transfers giving you a corrupt archive.}}


== Installing The Root File System ==
== Installing The Root File System ==

Revision as of 13:08, 6 December 2021

This page is a work in progress. It's not a tutorial you can follow yet. Wait for the 5.16 kernel release.

Commands to be run as a normal user are prefixed with $, commands to be run as root are prefixed with #. We assume your target device is /dev/sdb, adjust accordingly.

Partitioning The Block Device

TODO

Fetching and Flashing U-Boot

TODO

Fetching The Root File System Tarball

Fetch the root filesystem tarball and the PGP signature

$ wget -N http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz{,.sig}

Fetch the gpg keys:

$ curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x68b3537f39a313b3e574d06777193f152bdbe6a6' | gpg --import=-

Compare the key ID provided in the above command with the one listed here: https://archlinuxarm.org/about/package-signing (Take good note of the domain and HTTPS)

Verify the tarball's authenticity

$ gpg --verify ArchLinuxARM-aarch64-latest.tar.gz.sig
Do not skip verifying the authenticity. This is important. It also protects you from prematurely aborted transfers giving you a corrupt archive.

Installing The Root File System

Don't prefix the bsdtar command with sudo, run it from an interactive root shell as done here with sudo -i. At least the ALARM instructions claim this matters
$ sudo -i
# mount /dev/sdb5 /mnt/alarm-root
# mount /dev/sdb4 /mnt/alarm-root/boot
# bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt/alarm-root

Editing fstab

Find your partition UUIDs for both partitions using lsblk:

$ lsblk -o NAME,SIZE,MOUNTPOINTS,PARTUUID

In /mnt/alarm-root/etc/fstab, put the lines

PARTUUID=root-uuid-here  /       ext4    defaults        0       0
PARTUUID=boot-uuid-here  /boot   vfat    defaults        0       1

with your UUIDs in place of the placeholder.

Writing extlinux.conf

Create a /mnt/alarm-root/boot/extlinux/extlinux.conf with these contents:

default l0
menu title Quartz64 Boot Menu
prompt 0
timeout 50

label l0
menu label Boot Arch Kernel SDMMC
linux /Image
fdt /dtbs/rockchip/rk3566-quartz64-a.dtb
append initrd=/initramfs-linux.img earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8 root=/dev/mmcblk0p5 rw rootwait

For eMMC instead of SD, replace /dev/mmcblk0p5 with /dev/mmcblk1p5.

For a different type of Quartz64 device (e.g. Model B) replace the fdt line with the appropriate /boot-relative path to the device tree.

Once done, unmount the partitions:

# umount /mnt/alarm-root/boot
# umount /mnt/alarm-root