|
| 1 | +# ARM Devices |
| 2 | + |
| 3 | +Void Linux provides packages and images for several ARM devices. Installing Void |
| 4 | +on such devices can be done in several ways: |
| 5 | + |
| 6 | +- [Pre-built images](#pre-built-images): images that can be flashed directly |
| 7 | + onto an SD card or other storage medium, but give you a limited partition |
| 8 | + layout and require manual expansion if you wish to increase the partitions; |
| 9 | +- [Tarball installation](#tarball-installation): PLATFORMFS and ROOTFS tarballs |
| 10 | + that can be extracted to a previously prepared partition scheme; |
| 11 | +- [Chroot installation](#chroot-installation): follows most of the steps |
| 12 | + outlined in [the chroot guide](../chroot.md). |
| 13 | + |
| 14 | +Since most of the commands on this guide will be run on external storage, it is |
| 15 | +important to run [sync(1)](https://man.voidlinux.org/sync.1) before removing the |
| 16 | +device. |
| 17 | + |
| 18 | +Further [configuration steps](#configuration) that are mostly specific to such |
| 19 | +devices are also outlined. |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +If you are installing Void Linux on one of the ARM devices covered in the |
| 24 | +"[Supported platforms](./platforms.md)" page, make sure to read its section |
| 25 | +thoroughly. |
| 26 | + |
| 27 | +### Pre-built images |
| 28 | + |
| 29 | +After [downloading and verifying](../../index.md#downloading-installation-media) |
| 30 | +an image, it can be flashed onto an SD card in `/dev/mmcblk0`, for example, with |
| 31 | +the [cat(1)](https://man.voidlinux.org/cat.1), |
| 32 | +[pv(1)](https://man.voidlinux.org/pv.1) or |
| 33 | +[dd(1)](https://man.voidlinux.org/dd.1) command: |
| 34 | + |
| 35 | +``` |
| 36 | +# dd if=<image>.img of=/dev/mmcblk0 bs=4M status=progress |
| 37 | +``` |
| 38 | + |
| 39 | +### Custom partition layout |
| 40 | + |
| 41 | +It is possible to customize an installation further, for example with a custom |
| 42 | +partition layout, but it requires a more involved process. Two available options |
| 43 | +are: |
| 44 | + |
| 45 | +- [Tarball installation](#tarball-installation); and |
| 46 | +- [Chroot installation](#chroot-installation) |
| 47 | + |
| 48 | +To prepare the storage for these installation methods, it is necessary to |
| 49 | +partition the storage medium to then mount the partitions in the correct |
| 50 | +mounting points. |
| 51 | + |
| 52 | +The usual partitioning scheme for ARM devices requires at least two partitions |
| 53 | +on a drive formatted with an MSDOS partition table: |
| 54 | + |
| 55 | +- one formatted as FAT32 with partition type `0c`, which will be mounted on |
| 56 | + `/boot`; |
| 57 | +- one that can be formatted as any file system that Linux can boot from, such as |
| 58 | + ext4, which will be mounted on `/`. If you are using an SD card, for example, |
| 59 | + it might be interesting to create the ext4 file system with the |
| 60 | + `^has_journal` option, which disables journaling and might increase the |
| 61 | + drive's life, at the cost of a higher chance of data loss. |
| 62 | + |
| 63 | +This can be done with the [cfdisk(8)](https://man.voidlinux.org/cfdisk.8) |
| 64 | +utility, for example. |
| 65 | + |
| 66 | +To access the newly created file systems, it is necessary to mount them. This |
| 67 | +guide will assume that the second partition will be mounted on `/mnt`, but you |
| 68 | +may mount it elsewhere. To mount these filesystems, you can use the commands |
| 69 | +below, replacing the device names with the appropriate ones for your setup. |
| 70 | + |
| 71 | +``` |
| 72 | +# mnt /dev/mmcblk0p2 /mnt |
| 73 | +# mkdir /mnt/boot |
| 74 | +# mount /dev/mmcblk0p1 /mnt/boot |
| 75 | +``` |
| 76 | + |
| 77 | +#### Tarball installation |
| 78 | + |
| 79 | +First, [download and verify](../../index.md#downloading-installation-media) a |
| 80 | +PLATFORMFS or ROOTFS tarball for your desired platform and [prepare your storage |
| 81 | +medium](#preparing-your-storage). Then, it is necessary to unpack the tarball |
| 82 | +onto the file system, which can be done using |
| 83 | +[tar(1)](https://man.voidlinux.org/tar.1): |
| 84 | + |
| 85 | +``` |
| 86 | +# tar xvfp <image>.tar.xz -C /mnt |
| 87 | +``` |
| 88 | + |
| 89 | +#### Chroot installation |
| 90 | + |
| 91 | +It is also possible to perform a chroot installation, which requires using the |
| 92 | +`qemu-user-static` package together with either the `binfmt-support` or `proot` |
| 93 | +package. This guide explains how to use the `qemu-<platform>-static` program |
| 94 | +from `qemu-user-static` with [proot(1)](https://man.voidlinux.org/proot.1). |
| 95 | + |
| 96 | +First, [download and verify](../../index.md#downloading-installation-media) a |
| 97 | +PLATFORMFS or ROOTFS tarball for your desired platform and [prepare your storage |
| 98 | +medium](#preparing-your-storage). Then, follow the [XBPS chroot installation |
| 99 | +steps](../chroot.md#the-xbps-method) using the appropriate architecture and base |
| 100 | +packages, some of which are listed in the "[Supported |
| 101 | +platforms](./platforms.md)" page. |
| 102 | + |
| 103 | +Finally, follow the [chroot configuration steps](../chroot.md#configuration) |
| 104 | +steps, but instead of using the [chroot(1)](https://man.voidlinux.org/chroot.1) |
| 105 | +command to [enter the chroot](../chroot.md#entering-the-chroot), use the command |
| 106 | +below: |
| 107 | + |
| 108 | +``` |
| 109 | +# proot -q qemu-arm-static -r /mnt -w / |
| 110 | +``` |
| 111 | + |
| 112 | +## Configuration |
| 113 | + |
| 114 | +Some additional configuration steps need to be followed to guarantee a working |
| 115 | +system. Configuring a [graphical |
| 116 | +session](../../../config/graphical-session/index.md) should work as normal. |
| 117 | + |
| 118 | +### Logging in |
| 119 | + |
| 120 | +For the pre-built images and tarball installations, the `root` user password is |
| 121 | +`voidlinux`. |
| 122 | + |
| 123 | +### fstab |
| 124 | + |
| 125 | +The `/boot` partition should be added to `/etc/fstab`, with an entry similar to |
| 126 | +the one below. It is possible to boot without that entry, but updating the |
| 127 | +kernel package in that situation can lead to breakage, such as being unable to |
| 128 | +find kernel modules, which is essential for functionality such as wireless |
| 129 | +connectivity. If you aren't using an SD card, replace `/dev/mmcblk0p1` with the |
| 130 | +appropriate device path. |
| 131 | + |
| 132 | +``` |
| 133 | +/dev/mmcblk0p1 /boot vfat defaults 0 0 |
| 134 | +``` |
| 135 | + |
| 136 | +### System time |
| 137 | + |
| 138 | +Several of the ARM devices supported by Void Linux don't have battery powered |
| 139 | +real time clocks (RTC), which means they won't keep track of time once powered |
| 140 | +off. This issue can present itself as HTTPS errors when browsing the web or |
| 141 | +using the package manager. It is possible to set the time manually using the |
| 142 | +[date(1)](https://man.voidlinux.org/date.1) utility. In order to fix this issue |
| 143 | +for subsequent boots, install and enable [an NTP |
| 144 | +client](../../../config/date-time.md#ntp). Furthermore, it is possible to |
| 145 | +install the `fake-hwclock` package, which provides the `fake-hwclock` service. |
| 146 | +[fake-hwclock(8)](https://man.voidlinux.org/fake-hwclock.8) periodically stores |
| 147 | +the current time in a configuration file and restores it at boot, leading to a |
| 148 | +better initial approximation of the current time, even without a network |
| 149 | +connection. |
| 150 | + |
| 151 | +**Warning**: Images from before 2019-11-09 might have an issue where the |
| 152 | +installation of the `chrony` package, which comes as the default NTP daemon, is |
| 153 | +incomplete, and the system will be missing the `chrony` user. This can be |
| 154 | +checked in the output of the [getent(1)](https://man.voidlinux.org/getent.1) |
| 155 | +command, which will be empty if it doesn't exist: |
| 156 | + |
| 157 | +``` |
| 158 | +$ getent group chrony |
| 159 | +chrony:x:997 |
| 160 | +``` |
| 161 | + |
| 162 | +In order to fix this, it is necessary to reconfigure the `chrony` package using |
| 163 | +[xbps-reconfigure(1)](https://man.voidlinux.org/xbps-reconfigure). |
| 164 | + |
| 165 | +### Graphical session |
| 166 | + |
| 167 | +The `xf86-video-fbturbo` package ships a modified version of the [DDX Xorg |
| 168 | +driver](../../../config/graphical-session/xorg.md#ddx) found in the |
| 169 | +`xf86-video-fbdev` package, which is optimized for ARM devices. This can be used |
| 170 | +for devices which lack more specific drivers. |
0 commit comments