Another Proof of Concept armv7hl Release, this one for the Raspberry Pi2

Monday, 22, June 2015 Johnny Hughes arm, builds, distro, General, GSoC 36 Comments

Ten days ago I wrote an article here about an armv7hl test image for the Cubietruck 32-bit ARM board.  I have just uploaded a similar armv7hl image for the Raspberry Pi2. Both of these images are created with the RootFS Build Factory (a 2015 CentOS GSoC Project from Mandar Joshi sponsored by the CentOS Project).

The Raspberry Pi2 image (as well as the sha256sums for the compressed and uncompressed images) is available here:

http://people.centos.org/hughesjr/armv7hl/rpi2/images/

This RPI2 image actually uses the base kernel and boot files from the Raspberry Pi Firmware github site, and not the CentOS-7 armv7hl kernel.  This RPI2 kernel seems to be causing an issue with firewalld, and one must edit the file /etc/firewalld/firewalld.conf and change the variable IPv6_rpfilter from yes to IPv6_rpfilter=no.

Mandar has been making lots of progress on RootFS Build Factory and other people have reported that images generated from RBF for Odroid C1 and Banana PI are also functional, as is the image for QEMU.  I will be trying to obtain and post workable images from these boards soon.

I want to point out that the current images created are not signed and are taken directly from the output of our armv7hl builders 'as is' with no QA testing.  The armv7hl build is still very much a work in progress and the image manifest is based on a CentOS-7 (1503) minimal install from our x86_64 install media.  We have not yet completed the entire tree and the build repositories may at times NOT have complete closure and are only about 85% complete at this time.  We will finish the baseline build and then start the updates repository, but as of now these repos should be considered PRE-ALPHA and not production ready.

To use this image, you first extract it with this command:

unxz rpi2-centos-image.img.xz

Then just dd it to an SD Card and boot it in your Raspberry PI2 using a command like this from linux:

dd if=./rpi2-centos-image.img of=/dev/mmcblk0

(Note:  your SD Card device may vary .. you should be able to find the card device with fdisk -l )

If you are going to be at Red Hat Summit 2015 this upcoming week (June 23rd to 26th, 2015), please stop by the CentOS Booth in the Community Central area and we will have working armv7hl demos of a RPI2, Cubietruck, and Banana Pi .. as well as a working armv8 (aarch64) AppliedMicro X-Gene Server on a Chip  demo machine.  Hope to see you there.

36 thoughts on "Another Proof of Concept armv7hl Release, this one for the Raspberry Pi2"

  1. Fantastic! I can't wait to try it. Thanks for your hard work!

  2. Fred Silva says:

    Are there images for the Banana Pi publicly available?

    1. Johnny Hughes says:

      Yes, here:

      http://people.centos.org/hughesjr/armv7hl/bananapi/images/

      Not for the Router, but the regular board.

  3. Espen Henriksen says:

    Awesome! I just put this on my pi2 and it works great! Great work, guys. yum isn't really happy though, I suppose there is no CentOS yum repos for armv7hl yet?

  4. sh says:

    Can't get this image to work. I flashed it correctly (Raspbian flashes okay and works), but both red and green LEDs light on and nothing is showing through HDMI.

    1. sh says:

      Suddenly it just worked on second reflash.

  5. usriniva says:

    When I flash my 32 GB SD card with this image, it shows only 1.6 GB free space. What am I missing?

    1. Jim Perrin says:

      You would need to grow the image. On the arm64 side, the command is something like -> sgdisk -e -d4 -n4:0:0 /dev/sda
      This would obviously need to be modified but should give you a basic idea for how it would work.

    2. Mandar Joshi says:

      After writing the image to your microSD, resize the partition using gparted. You need to run it as root.
      eg. gparted /dev/sdb

      1. usriniva says:

        Thanks for the reply. I use mac and what I see in the disk utility UI is "You cannot resize partitions on this disk because it uses the Master Boot Record partition Scheme"
        And also Gparted ISO does not work on MAC.

        1. Johnny Hughes says:

          Do it from the ARM device after boot. You can use fdisk, delete the 3rd partion, recreate it staring at the same point and go to the end of the disk .. then use online resize to grow the partition.

    3. Atik says:

      touch /.rootfs-repartition
      systemctl reboot

  6. arren says:

    yum makecache couldn't work ?
    no repos for armhfp yet ?

    1. arren says:

      I have found repos in yum.repos.d/
      Thanks for your great works !

      1. Wig says:

        How to get the correct repos on arm, thanks.

  7. rooto says:

    how to enable rpm fusion???

  8. usriniva says:

    I see this parted output.
    Number Start End Size Type File system Flags
    1 1049kB 525MB 524MB primary fat16 lba
    2 525MB 1599MB 1074MB primary linux-swap(v1)
    3 1599MB 31.9GB 30.3GB primary ext4

    but not sure how to use the space under ext4.

    1. Mandar Joshi says:

      I don't have access to a Mac.
      But if you can get 'e2fsck' and 'resize2fs', these steps should work. I tested them on a x86_64 on my 16GB MicroSD

      parted /dev/sdd
      resizepart 3 15.9GB
      quit
      e2fsck -f /dev/sdd3
      resize2fs /dev/sdd3

      Change 15.9GB in the resizepart command to the size reported by parted for your card.
      After the above modifications, the partition table looks like this
      -----------------------------------------------------------
      # parted /dev/sdd
      GNU Parted 3.2
      Using /dev/sdd
      Welcome to GNU Parted! Type 'help' to view a list of commands.
      (parted) print
      Model: SMI Reader (scsi)
      Disk /dev/sdd: 15.9GB
      Sector size (logical/physical): 512B/512B
      Partition Table: msdos
      Disk Flags:

      Number Start End Size Type File system Flags
      1 1049kB 525MB 524MB primary fat16 lba
      2 525MB 1599MB 1074MB primary linux-swap(v1)
      3 1599MB 15.9GB 14.3GB primary ext4
      ------------------------------------------------------------

      For installing e2fsck and resize2fs on a Mac, a quick Google got me to this page. It says you can install e2fsprogs via MacPorts
      http://raspberrypi.stackexchange.com/questions/309/how-do-i-resize-my-debian-partition)

  9. alessandro says:

    Hi, i need hdmi cable to setup this?
    Cuz im trying by ssh but seems that i cant connect to it

    1. Johnny Hughes says:

      Yes, you need to either have an HDMI cable or use a Serial to USB cable to initially use the image from this post, as the root password is initially blank. You can also use the RBF from the above link to generate a newer image with the root password set that you can ssh directly into if you know the ip address. The default sshd will not accept a blank password.

  10. Kevin says:

    Anyone else having USB disconnect and reconnect system messages? They will come through on the terminal. Each time it increments the USB device number.

  11. Carl T. Miller says:

    I can't get the image to boot on my 3.9 GB card. Since the image is about 4.1 GB and only 3.5 GB are used by the partitions, I tried using dd to create a smaller image without the extra unused space. This transfers properly to card, but then the pi won't boot.

    I've already checked and the partitions and filesystems are good. I also tried marking the first partition as bootable. No luck.

    I can boot from a raspbian image, so I know the hardware is good. Also, the boot process fails very early.

    Any suggestions?

    1. Mandar Joshi says:

      You have two options
      1. Generate a new image using RootFS Build Factory. You could reduce the size of one of the partitions or size of the disk image.
      2. Manually partition your card and copy over the files from this image using “cp -rpv”. Then set the new LABELs and UUIDs of the partitions in /etc/fstab

  12. Mandar Joshi says:

    You have two options
    1. Generate a new image using RootFS Build Factory. You could reduce the size of one of the partitions or size of the disk image.
    2. Manually partition your card and copy over the files from this image using "cp -rpv". Then set the new LABELs and UUIDs of the partitions in /etc/fstab

  13. Alberto says:

    Hi. Seems networking only works with NetworkManager enabled. If I disable NM and try to manage network with ifcfg-eth0 the interface won't go up ignoring the configuration file. Putting manually address, netmask and gw route with ifconfig and route commands everything is ok. Is it right?

  14. Ron says:

    No updates on the pre-alpha images? I am looking for the Banana Pi Router images.

    1. Mandar Joshi says:

      No one has tested the Banana Pi/Lamobo R1 image yet. You can generate an image using RBF and test it. I guess, many would be looking forward to having this image if it works.

      Steps on an ARMv7 board:
      git clone https://github.com/mndar/rbf.git
      cd rbf
      ./rbf.py build templates/lamobor1_centos_custom.xml
      Then write the image using dd
      dd if=lamobor1-centos-image.img of=/dev/sdb

      There was some discussion about this on the ARM-Dev mailing list. You can follow it on this thread https://lists.centos.org/pipermail/arm-dev/2015-July/000327.html

  15. NomadThanatos says:

    Hi, I just want to compile my WiFi driver. But the kernel-devel version is 4.2 and kernel version is 3.18. So I upgrade the kernel version to 4.2 but I do not find where is grub.conf.

    1. Mandar Joshi says:

      The Raspberry Pi 2 image uses the kernel from https://github.com/raspberrypi/firmware.git and not the CentOS kernel.

      There is no grub.conf. Kernel parameters are read from cmdline.txt and settings for the board from config.txt. Both are located on the first vfat partition.

  16. Hunter Devonshire says:

    I'd really like to start learning with CentOS on a Raspberry Pi, but this image is a long way from mainstream. Any plans to release a viable image for beginners?

  17. PixelDrift.NET says:

    Thanks for putting these images together Johnny!

    I have a CentOS 7 image (CubieTruck rootfs derived) built and running on the ODROID XU3/XU4.

    Details are here for anyone interested:
    https://gitlab.com/pixdrift/cendroid-xu4

    1. Markus Steinborn says:

      Could you explain how you made this image? Perheps the same way will do for the Odroid U3 - for which I need an image.

  18. Nicola says:

    Hello, I tried the image, and it works like a charm, but I was unable to have eth0 enabled on boot.
    I compiled the /etc/sysconfig/network-scripts/ifcfg-eth0 as usual, and if I do ifup eth0 it comes up, buo on boot only lo is configured.
    I'm not so good in debugginf systemd: how could I understand what is happening?

  19. mike says:

    echo "NMCONTROLLED=\"no\"" > /etc/sysconfig/network-scripts/ifcfg-eth0;systemctl stop NetworkManager; systemctl disable NetworkManager; systemctl enable network; systemctl restart network

    🙂

  20. Markus Steinborn says:

    The raspberry pi 2 image is working fine on our Raspberry Pi 2.

    I'd like to have an image for the Odroid U3.
    Unfortunately my tries to compile U-Boot for the U3 are failing.

  21. Cristian says:

    Hi,
    It is possible to pre-write the ssh key to this image? I don't have a keyboard to login, so I have to login remotely from my mac.
    Thank is advance!

Leave a Reply to Johnny Hughes Cancel reply

Your email address will not be published. Required fields are marked *