ARM Installation Guide
Contents
Create Parabola installation image
This step is necessary until the Parabola developers release an official tarball. You will need an existing Parabola installation to do this.
Configuration files
If you want an armv7h root filesystem in your existing Parabola system you only need take a copy from pacman.conf and edit it, eg:
$ mkdir -p parabola-arm-workdir/mnt && cd parabola-arm-workdir $ cp /etc/pacman.conf . # It's advised to use the default pacman.conf if you do a release
You must set the architecture to armv7h (the default is auto) in the "general options" section in /etc/pacman.conf. Then, you should remove the [multilib] repository.
pacman.conf
[options] Architecture = armv7h
Root filesystem
Make sure the pacman keyring has been initialized
# pacman-key --init
Import, trust and install the archlinuxarm keyring. When possible, Parabola leverages free packages that originally came from Arch ARM.
# pacman -U https://www.parabola.nu/packages/core/any/archlinuxarm-keyring/download/ # pacman-key --lsign-key builder@archlinuxarm.org # pacman -U https://www.parabola.nu/packages/core/any/archlinuxarm-keyring/download/
# pacman -U https://repo.parabola.nu/core/os/armv7h/archlinuxarm-keyring-20140119-1-any.pkg.tar.xz # pacman-key --lsign-key builder@archlinuxarm.org # pacman -U https://repo.parabola.nu/core/os/armv7h/archlinuxarm-keyring-20140119-1-any.pkg.tar.xz
Install pacstrap if you haven't already and install the base group packages with it
# pacman -S arch-install-scripts # pacstrap -c -d -C ./pacman.conf ./mnt/ base
Optionally pack everything into a tarball:
# cd mnt && tar xJf ../parabola_arm_rootfs.tar.xz ./
Congratulations, you now have a Parabola ARMv7 rootfs inside parabola-arm-workdir/mnt/, copy it to the storage media you plan to boot Parabola from. Since ARM computers are too diverse in their boot firmware, boot process and expected partitioning schemes we can only provide installation instructions for a limited number of free software-friendly devices.
Test and customize installation image
It is possible to use PRoot, a user-space chroot implementation, and the QEMU hypervisor to emulate an ARM machine with its filesystem placed inside the x86 host.
Requirements
PRoot Installation
PRoot is a user-space implementation of chroot, mount --bind, and binfmt_misc. This means that users don't need any privileges or setup to do things like using an arbitrary directory as the new root filesystem, making files accessible somewhere else in the filesystem hierarchy, or executing programs built for another CPU architecture transparently through QEMU user-mode. Also, developers can use PRoot as a generic GNU/Linux process instrumentation engine thanks to its extension mechanism, see CARE for an example. Technically PRoot relies on ptrace, an unprivileged system-call available in every Linux kernel.
To install, you run:
# pacman -S proot
QEMU
QEMU (short for Quick Emulator) is a free software hosted hypervisor that performs hardware virtualization (not to be confused with hardware-assisted virtualization)
We need it (qemu-arm) emulate an ARMv7 machine from a x86 machine, so you run:
# pacman -S qemu-arch-extra
Prepare chroot and enter from PRoot
# mount -o rbind /dev parabola-arm-workdir/mnt/dev
# mount -o bind /sys parabola-arm-workdir/mnt/sys
# mount -o bind /tmp parabola-arm-workdir/mnt/tmp
# mount -t proc none parabola-arm-workdir/mnt/proc
# rm parabola-arm-workdir/mnt/etc/resolv.conf
# cp -a /etc/resolv.conf parabola-arm-workdir/mnt/etc
# proot -0 -q /usr/bin/qemu-arm -r parabola-arm-workdir/mnt
Configuring chroot
Package signature verification
Make sure signature verification is enabled in /etc/pacman.conf:
pacman.conf
SigLevel = Required DatabaseOptional
To be able to install signed packages, you have to initialise the pacman keyring:
# pacman-key --init # pacman-key --populate archlinux # pacman-key --populate archlinuxarm # pacman-key --populate parabola
Generating locales
Before a locale can be enabled on the system, it has to be generated. The current generated/available locales can be viewed with:
$ locale -a
The locales that can be generated are listed in the /etc/locale.gen file: their names are defined using the format [language][_TERRITORY][.CODESET][@modifier]. To generate a locale, first uncomment the corresponding line in the file (or comment to remove); when doing this, also consider localizations needed by other users on the system and specific variables. For example, for American-English uncomment en_US.UTF-8 UTF-8. When done, save the file and generate the uncommented locale(s) by executing:
# locale-gen
More Configuration
Visit Installation_guide#Installation.
How to install Parabola ARM
We assume the user is on any 100% free software GNU/Linux distribution, Trisquel for instance.
GTA04 A3
The GTA04 typically has its bootloader in NAND. So here we will put everything on one partition for simplicity. We format a microSD card (all its content will be lost)
# fdisk /dev/mmcblk0 # Create a partition on your microSD card. # mkfs.ext4 /dev/mmcblk0p1 # Format it as ext4 # mount /dev/mmcblk0p1 /mnt
Then we extract the rootfs to it, --numeric-owner is needed for compatibility with other host distributions like Trisquel
# tar xf /path/to/parabola_arm_rootfs.tar.xz -C /mnt --numeric-owner
We then have the rootfs in place, but uboot expects an uImage in /boot/uImage, so we create that:
# cat /mnt/boot/vmlinuz-linux-libre /mnt/boot/dtbs/linux-libre/omap3-gta04a3.dtb > /tmp/zImage.dtb # mkimage -A arm -O linux -T kernel -C none -a 0x82000000 -e 0x82000000 -d /tmp/zImage.dtb /mnt/boot/uImage
You might need to adjust the boot parameters/cmdline given to the kernel and the uboot environment to fit your partioning scheme.
Parabola then boots and you are supposed to see the boot log on the serial console. At the time of writing the kernel lacks the GTA04 display driver, this is bug #587
Bootloader configuration
U-Boot
BeagleBoard and BeagleBoard-xM
Manual intervention is needed to use uboot-omap3_beagle
Mount the FAT filesystem
# mkdir boot # mount /dev/sdX1 boot
Copy boot files to the first partition
# cp -a /boot/* boot
Unmount the partition
# umount boot
GRUB
grub has support for ARMv7 machines with EFI support. See our GRUB article for more info.
U-Boot4GRUB
uboot4grub packages are under development yet for U-Boot with GRUB support. At the moment, we have some packages for testing and debugging from [libre-testing].
[libre-testing] Include = /etc/pacman.d/mirrorlist
U-Boot4Extlinux
Extlinux is one of the many spinoffs of Syslinux -- the bootloader used for live CDs and many other applications. It's not as commonly used as a bootloader for desktops and laptops, but it's perfectly capable of that and U-Boot supports it. uboot4extlinux packages are under development yet for U-Boot with Extlinux support. At the moment, we have some packages for testing and debugging from [libre-testing].
[libre-testing] Include = /etc/pacman.d/mirrorlist