Introduction

ARM processors are widely used on various devices, like smartphones, tablets and small computers/boards. The main advantages of the ARM processor are :

For more informations about the ARM architecture, feel free to read the following links :

Why CentOS on ARMv7hl boards

A lot of people are interested in running Linux on such kind of cheap/small boards , as home server appliance, domestic controller, small vpn endpoint, etc (the list isn't exhaustive). While it exists a lot of distributions already providing support for such boards, someone already using CentOS 7 x86_64 for his servers/workstations/laptops will be probably interested in managing even such small armv7hl boards with the same tools. That's why the CentOS AltArch SIG decided to try to port the exiting code from CentOS 7 x86_64 to the armv7hl/armhfp platform.

: it's worth knowing that the distribution for armv7hl platform is called "CentOS Userland Linux" and not "CentOS Linux". The reason is that for some packages, the AltArch SIG can decide to include some other packages, replace some components, or not build some packages from the upstream distribution. The most and obvious case is the kernel, as kernel 3.10.0-* (as used in the main CentOS 7 x86_64 distro) doesn't support such armv7hl boards/arch. (see the [Supported Boards] section below)

Supported Boards

Cubietruck

working

not working

untested

Bananapi

working

not working

untested

RaspberryPI2

working

i2c

echo -e "dtparam=i2c1=on\ndtparam=i2c_arm=on" >> /boot/config.txt
echo -e "i2c-bcm2708\ni2c-dev" >> /etc/modules-load.d/i2c.conf
yum install -y i2c-tools
systemctl reboot

not working

untested

RaspberryPI3

working

== i2c == see instructions for rpi2

not working

untested

[/RaspberryPi3 More information]

How to install CentOS Userland armv7hl

How to unpack the image for your board

The first thing to do is to download the appropriate image for your board. You need at least a 4Gb SD card

You can find those here (see [Supported Boards] section) : http://mirror.centos.org/altarch/7/isos/armhfp

Attention, be sure to verify your sd card path, as the next command, run with sudo rights, can destroy the target device if it has not been correctly identified! Most of the time, it will be /dev/mmcblk0, but be careful!

Once you have downloaded the corresponding image for your board model, transfer it to your SD card:

xzcat CentOS-Userland-7-armv7hl-Minimal-$RELEASE-$MODEL.img.xz | sudo dd of=$/path/to/sd/card status=progress bs=4M
sudo sync

TIP: : the 'status=progress' parameter for dd exists in the version supplied with CentOS 7.2.1511. If you're running another version or another distribution, verify first that it's supported. That parameter isn't mandatory, but written here for convenience, to track the transfer rate status to the SD card. The 'bs=4M' parameter is also used for a faster transfer rate to the SD card, as most SD cards have an erase block size of 4MB||

Once the image is transferred, you can put the SD card in the dedicated slot for your arm device, and boot it up.

The default settings for the installed image are :

You can automatically set the correct time with the following commands :

yum install chrony
systemctl start chronyd

How to resize/expand the RootFS for the whole SD card

Depending on the SD card size you used, you probably want to expand the RootFS (/) to the maximum capacity of the underlying SD card. For your convenience, we've added the cloud-utils-growpart tool, packaged as rpm and also available through the Extras repository for armv7hl.

If you just want to use/expand the whole remaining capacity, just run (as root, or with sudo right) the following command :

/usr/local/bin/rootfs-expand

Your board will reboot, load kernel/initrd, expand the partition, resize it and reboot. Once done, you'll be using your whole SD card.

SElinux status

Depending on your board model, the kernel used in the image can or not support selinux. See then first if that's the case (listed in the [Supported Boards] section)

Because of the way the images are generated on the buider machines, the selinux context isn't the correct one on the filesystem in those images. That's the reason why we decided to just have selinux configured in permissive mode (through /etc/sysconfig/selinux), but even started with selinux turned off (enforce=0 boot parameter)

If you want to switch to enforcing mode, you'll have so to first modify the following files

After that (and before rebooting ! ), be sure to issue the following command :

touch /.autorelabel

You can now reboot and the whole filesystem will get the correct selinux contexts applied

The relabel process can be really slow on such SD card : as an example, it can take up to 5 minutes on a cubietruck with a 4Gb SD card !

Interacting with the AltArch Arm32 group

Getting help

Contributing to the Arm32 group

FAQ

How can I update my kernel ?

Depending on which board image you're using, it can use the "generic" kernel or the raspberrypi variant. It's normally all configured automatically but even if you point to the correct repository, you'll have take care of the following (depending on the board variant):

raspberrypi 2 and 3

yum update will bring the updated kernel and nothing to be done, just reboot and you'll be using the new kernel

"generic" kernel

After yum will have installed the updated kernel, you'll still have to edit /boot/extlinux.conf to modify the kernel/initrd and then reboot

How can I enable EPEL 7 on armhfp ?

The answer is easy in a sense that there is no official EPEL repository for armfhp. But because lot of users were asking for this, we decided to use the centos armhfp builders to (re)build Source packages from EPEL 7 (and try to track those automatically) when they're idle. Please note that it's just an automatic rebuild without any QA/test, and also resulting pkgs aren't signed either. To use that repository, proceed like this :

cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0

EOF

SpecialInterestGroup/AltArch/Arm32 (last edited 2017-03-12 20:06:51 by FabianArrotin)