ARM Installation Guide
- 1 Create Parabola installation image
- 2 Test and customize installation image
- 3 How to install Parabola ARM
1 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.
1.1 Configuration files
Start by taking a copy of pacman.conf and editing it:
$ mkdir -p parabola-arm-workdir/mnt/ $ cp /etc/pacman.conf parabola-arm-workdir/ # 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. Disable or remove all respositories other than [libre], [core], [extra] and [community] (those which aren't available for armv7h).
[options] Architecture = armv7h
1.2 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 email@example.com # pacman -U https://www.parabola.nu/packages/core/any/archlinuxarm-keyring/download/
Get pacstrap if you haven't done it already and use it to install the base group packages to the empty folder:
# pacman -S arch-install-scripts # pacstrap -c -d -C parabola-arm-workdir/pacman.conf parabola-arm-workdir/mnt/ base
Optionally pack everything into a tarball:
# cd parabola-arm-workdir/mnt/ && tar xJf ../parabola_arm_rootfs.tar.xz ./ && cd ../../
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.
2 Test and customize installation image
Follow one of the methods described in Building_armv7h_packages_on_a_x86_system#QEMU_and/or_Proot up until section #Build_package. That will allow you to access and configure your new armv7h image using QEMU, previous to putting it on a real device.
3 How to install Parabola ARM
3.1 Install a bootloader
Installing the appropriate U-Boot package will copy the bootloader to your storage device's boot sector. Manual intervention shouldn't be necessary, unless you are installing for a BeagleBoard or BeagleBoard-xM.
18.104.22.168 BeagleBoard and BeagleBoard-xM
Manual intervention is needed to use uboot-omap3_beagle. Replace sdX1 in the following instructions with the FAT filesystem partition (the one with the boot files) for the SD card as it appears in your computer.
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
22.214.171.124 BeagleBone Black
To download the BeagleBone Black U-Boot in parabola-arm-workdir/mnt/, run
# pacstrap -c -d -C parabola-arm-workdir/pacman.conf parabola-arm-workdir/mnt/ uboot-am335x_bone
To make the SD card bootable in a BeagleBone Black (assuming the target SD card is /dev/sdb) it is necessary to run
# dd if=parabola-arm-workdir/mnt/boot/MLO of=/dev/sdb count=1 seek=1 conv=notrunc bs=128k # dd if=parabola-arm-workdir/mnt/boot/u-boot.img of=/dev/sdb count=2 seek=1 conv=notrunc bs=384k
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. This allows for interactive multi-boot and multiple kernels. 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].
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].
3.2 Device-specific instructions
3.2.1 GTA04 A3
We assume the user is on any 100% free software GNU/Linux distribution, Trisquel for instance.
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
3.2.2 BeagleBone Black
The following requires at minimum a functional 1 GiB SD card. Important: The SD card's contents will be lost, so make sure you have a backup of it before starting.
Insert the SD card into your computer and open a terminal.
Gain root privileges. Otherwise, make sure you have the required permissions to perform the following steps.
Find the /dev entry the SD card was detected under by running dmesg. For example, it could be /dev/sdb or /dev/sdc etc.
From now on, let /dev/CARD be the path to the device node respective to the SD card, where CARD is sdb or sdc, etc. (as detected above).
Next, run (press return after typing each line. Also, make sure you don't type <press return>, but actually press return):
# fdisk /dev/CARD o n p 1 2048 <press return> w
# mkfs.ext4 -F -O ^metadata_csum,^64bit /dev/CARD1
Next, follow the steps in #Create_Parabola_installation_image, except between
$ mkdir -p parabola-arm-workdir/mnt/
and the next command, run
# mount /dev/CARD1 parabola-arm-workdir/mnt/
Then, install U-Boot for your BeagleBone Black as described above.