Contents
- How to Unpack the Image for Your Board
- How to Resize/Expand the RootFS for the Whole SD Card
- WiFi on the RaspberryPi 3B and 3B+
- Installing an armv7hl (32 bit) VM on an aarch64 (64 bit) Machine
- Getting help
- Contributing to the Arm32 Group
- How Can I Update My Kernel?
- How Can I Enable EPEL 7 on armhfp ?
Introduction
ARM processors are widely used on various devices, like smartphones, tablets and small computers/boards. The main advantages of the ARM processor are:
- Low power consumption
- Low cost
- Very small device form factor
For more information about the ARM architecture, please read the following links:
Special notes before you begin
While most of the information in this page applies to both CentOS 7 and CentOS 8, there are a few key differences.
- KDE was removed from RHEL 8, so CentOS 8 does not have KDE images.
The way RaspberryPi specific kernels (and images for that matter) is still being worked out, to make it more flexible, and easier to maintain. This means that CentOS 8 only has "generic" kernels (and images).
- Just like in 7, there is no official EPEL, but unlike 7, we still don't have an internal rebuild, and likely won't have in the near future, due to the tools needed to build modules. This doesn't mean that we have forgotten about this, we are always working on something new, we'll keep you posted.
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. While there already exists a number of distributions providing support for such boards, someone already using CentOS x86_64 for their servers/workstations/laptops will probably be 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 existing code from CentOS 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 the AltArch SIG can decide to include some other packages, replace some components or not build some packages from the upstream distribution. The most obvious case is the kernel, as kernel 3.10.0-* (used in the CentOS 7 x86_64 distribution), and 4.18.0-x (used in the CentOS 8 x86_64 distribution) don't support the armv7hl architecture.
Supported armhfp Boards
We currently support the following board types:
RaspberryPi (model 2, model 3, model 3B+)
- All other armhfp boards that:
- support mainline/upstream kernel (from kernel.org)
- support upstream uboot (and not a heavily patched custom one)
It is worth noting that we have so the following images:
RaspberryPi - Using a rebuilt kernel from https://github.com/raspberrypi/linux (only for CentOS 7)
Generic - Using a rebuilt LTS kernel from https://www.kernel.org
We still have the RaspberryPi images available, while as of CentOS 7.5.1804 the generic images can be used natively on R-Pi boards with the upstream kernel. (Support is not complete but it is very usable.)
If your device is based on an AllWinner chipset, you should also check https://linux-sunxi.org/Linux_mainlining_effort so you know what to expect.
How to Install CentOS Userland armv7hl
1. How to Unpack the Image for Your Board
The first thing to do is to download the appropriate image for your board. You will need at least a 4GB SD card (or larger) depending on the package selection (i.e. Minimal, GNOME or KDE): http://isoredirect.centos.org/altarch/7/isos/armhfp
|
ATTENTION: Be sure to verify the correct device name of, and path to, your SD card as the next command, run with superuser rights, will destroy all existing data on the target device if it has not been correctly identified. Most likely it will be /dev/mmcblk0 but be very careful. |
Once you have downloaded the corresponding image for your board model, transfer it to your SD card:
[root@host ~]# xzcat CentOS-Userland-7-armv7hl-$MODEL-$VARIANT-$RELEASE-sda.raw.xz | dd of=$/path/to/sd/card status=progress bs=4M [root@host ~]# sync
TIP: The 'status=progress' parameter of dd exists in the version supplied with CentOS 7.2.1511. If you are running another version or another distribution, verify first that the parameter is supported. It isn't mandatory but is written here for convenience, to track the status of the transfer rate to the SD card. The 'bs=4M' parameter is also used for a faster transfer rate, as most SD cards have an erase block size of 4MB. |
1.1. uBoot Setup (Not Needed for the RaspberryPi Boards)
After you have unpacked the generic image to your SD card, you have to do one additional step. The actual commands depend on many things but specially on the SoC vendor and the type of board.
First you need to install uboot images:
[root@host ~]# yum install uboot-images-armv7 uboot-images-armv8
Let's suppose you do this from your linux laptop and that your board is a Bananapro (AllWinner SoC):
[root@host ~]# export boardmodel="Bananapro" [root@host ~]# export sdcard="/dev/mmcblk0" [root@host ~]# dd if=/usr/share/uboot/${boardmodel}/u-boot-sunxi-with-spl.bin of=${sdcard} bs=1024 seek=8 conv=fsync,notrunc
Or assuming that your board is a Beagle Bone Black (TI):
[root@host ~]# export boardmodel="am335x_boneblack" [root@host ~]# export sdcard="/dev/mmcblk0" [root@host ~]# dd if=/usr/share/uboot/${boardmodel}/u-boot-spl.bin of=${sdcard} count=1 seek=1 bs=128k [root@host ~]# dd if=/usr/share/uboot/${boardmodel}/u-boot.img of=${sdcard} count=2 seek=1 bs=384k
For your information, here is a list of boards that have a uboot file for armhfp (from uboot-images-2018.09):
A10-OLinuXino-Lime A10s-OLinuXino-M A13-OLinuXino A13-OLinuXinoM A20-Olimex-SOM-EVB A20-OLinuXino-Lime A20-OLinuXino-Lime2 A20-OLinuXino_MICRO a64-olinuxino am335x_boneblack am335x_evm am335x_evm_usbspl am57xx_evm Ampe_A76 arndale Auxtek-T003 Auxtek-T004 avnet_ultra96_rev1 ba10_tv_box Bananapi bananapi_m2_berry Bananapi_M2_Ultra bananapi_m64 Bananapro chiliboard CHIP Chuwi_V7_CW0825 clearfog cl-som-am57x cm_fx6 Colombus colorfly_e708_q1 CSQ_CS908 Cubieboard Cubieboard2 Cubieboard4 Cubietruck Cubietruck_plus db-mv784mp-gp difrnce_dit4350 dragonboard410c dragonboard820c dserve_dsrv9703c espresso7420 evb-rk3229 evb-rk3328 evb-rk3399 fennec-rk3288 firefly-rk3288 firefly-rk3399 geekbox helios4 hikey Hummingbird_A31 Hyundai_A7HD i12-tvbox icnova-a20-swac inet1 iNet_3F iNet_3W inet86dz iNet_86VS inet97fv2 inet98v_rev2 inet9f_rev03 inet_q972 Itead_Ibox_A20 jesurun_q5 jetson-tk1 kc1 khadas-vim Lamobo_R1 libretech_all_h3_cc_h2_plus libretech_all_h3_cc_h5 libretech-cc Linksprite_pcDuino Linksprite_pcDuino3 Linksprite_pcDuino3_Nano liteboard marsboard Marsboard_A10 Mele_A1000 Mele_A1000G_quad Mele_I7 Mele_M3 Mele_M5 Mele_M9 Mini-X mk802 mk802_a10s mk802ii MK808C MSI_Primo73 MSI_Primo81 mvebu_espressobin-88f3720 mvebu_mcbin-88f8040 mx6cuboxi nanopi-k2 nanopi_m1 nanopi_m1_plus nanopi_neo nanopi_neo2 nanopi_neo_plus2 novena odroid odroid-c2 odroid-xu3 omap3_beagle omap3_pandora omap4_panda omap5_uevm Orangepi orangepi_2 orangepi_lite Orangepi_mini orangepi_one orangepi_one_plus orangepi_pc orangepi_pc2 orangepi_pc_plus orangepi_plus orangepi_plus2e orangepi_prime orangepi_r1 orangepi_win orangepi_zero orangepi_zero_plus orangepi_zero_plus2 origen p212 p2371-2180 p2771-0000-500 paz00 pine64_plus pine_h64 polaroid_mid2809pxe04 poplar pov_protab2_ips9 q8_a13_tablet q8_a23_tablet_800x480 q8_a33_tablet_1024x600 q8_a33_tablet_800x480 qemu_arm r7-tv-dongle riotboard rock rock2 rock960-rk3399 rpi_2 rpi_3 rpi_3_32b Sinlinx_SinA31s Sinovoip_BPI_M2 Sinovoip_BPI_M2_Plus Sinovoip_BPI_M3 smdkv310 sopine_baseboard stih410-b2260 sunxi_Gemei_G9 tbs_a711 tinker-rk3288 trimslice turris_mox turris_omnia udoo udoo_neo usbarmory UTOO_P66 vexpress_aemv8a_dram vexpress_aemv8a_juno vexpress_aemv8a_semi vexpress_ca15_tc2 vexpress_ca9x4 wandboard warp warp7 Wexler_TAB7200 Wits_Pro_A20_DKT xilinx_zynqmp_zcu100_revC Yones_Toptech_BS1078_V2 zynq_microzed zynq_zed zynq_zybo
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:
- root password: centos
- eth0 setting: dhcp
- selinux status: enforcing
2. How to Resize/Expand the RootFS for the Whole SD Card
Depending on the SD card size you used, you will 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 an rpm file and available through the Extras repository for armv7hl.
If you just want to use/expand the whole remaining capacity, just run (either as root or as a normal user with sudo rights) the following command:
[root@host ~]# /usr/bin/rootfs-expand
3. WiFi on the RaspberryPi 3B and 3B+
The CentOS Project is not allowed to distribute the RaspberryPi 3B/3B+ firmware files. You can use the following articles to understand the issue, to get the firmware and to set up the WiFi.
- First, obtain the two firmware files we can't distribute:
The Raspberry Pi 3 B+ in Fedora
- Next, use nmcli to connect to the wireless network:
Connect to a wireless network using command line nmcli
4. Installing an armv7hl (32 bit) VM on an aarch64 (64 bit) Machine
Do you have a CentOS-7 aarch64 machine and need to run a 32 bit arm Virtual Machine? ... If so, here is an outstanding blog post by Fabian Arrotin (one of our core CentOS team members):
Using CentOS 7 armhfp VM on CentOS 7 aarch64
Interacting with the AltArch Arm32 Group
1. Getting help
- Wiki release notes
- IRC: #centos-arm on libera.chat
2. Contributing to the Arm32 Group
- IRC: #centos-arm on libera.chat
Dedicated Arm-dev mailing list
Willing to test armv7hl for specific packages? or troubleshooting issues? See the builders wiki page
FAQ
1. 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):
1.1. RaspberryPi 2 and 3
yum update will bring the updated kernel and nothing else needs to be done. Just reboot and you'll be using the new kernel.
1.2. Generic Kernel
Before centos-userland-release-7-5.1804, in order to activate the new kernel and edit /boot/extlinux/extlinux.conf, you had to run /usr/bin/update-boot. This is no longer valid and it is done automatically by grubby.
2. How Can I Enable EPEL 7 on armhfp ?
The answer is easy in a sense that there is no official EPEL repository for armhfp. 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 the resulting packages are not signed. To use that repository, proceed as follows:
[root@host ~]# 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 [root@host ~]#