I know Fedora has ARMv7 images. Can those be used on the Raspberry Pi 2, and if so, how?
[There is now a Fedora aarch64 release for the Pi 3, and on the same page an armv7 for the 2/3. I'm leaving this answer as is though, since it can be applied to any generic GNU/Linux ARM distribution.]
Yep, Fedora 21 [and more recently, 23...27] works. However, the pi 2 still requires a special out-of-tree kernel, and you need the firmware and bootloader, so you should start with an existing pi 2 image; here I'm using raspbian (make sure it is a version subsequent to 1-31-2015). There's an alternative to ripping stuff from Raspbian, see the note about
/opt/vc at bottom -- but using a Raspbian card at first is simpler.
The Xorg GUI server works using the fbdev driver, as it does on raspbian. The repo won't have pi specific things such as
oxmplayer, but they can be compiled from source or connived out of Raspbian packages (for an example involving
omxplayer see here). For
raspicam, see the
You'll also have to do your own kernel and firmware updates. This is simple enough -- you just need the
rpi-update script from the raspbian image (it's in
/usr/bin and has no dependencies other than
curl and the shell) or github. There is a slight potential complication with that, see step #6.
Create the SD card from the raspbian image normally and make sure it boots. This failed for me the first time and the kernel errors implied it was trying the armv6 kernel; "bcm_2835" was mentioned. Adding
config.txton the first partition fixed this. Once it boots to the blue set-up screen, you can pull the plug -- that root fs is about to get deleted anyway.
Put the card in another linux machine and mount the second partition. Inside
/lib/modulesyou should find a
3.18.5-v7. You want to copy that out and save it. Also get a copy of
/etc/fstab. You can instead pull this stuff out of the downloaded raspbian image later (see here).
Unmount the partition and run
fdiskon the card. Delete the second partition and replace it with a new 0x83 (Linux) second partition (this is your chance to make the second partition fill the card). Next, run
mkfs -t ext4 ...on that partition.
Download an image via Fedora 21's ARM release page. I used
Fedora-Minimal-armhfp-21-5-sda.raw.xz. This is xz compressed, uncompress it with
unxz. The image file contains three partitions. The first two are of no interest; the third one contains the root fs. You can get the offset with
fdisk Fedora-Minimal-armhfp-21-5-sda.raw; the "Start" number is probably 1251328 and the "Units" are probably 512 bytes, 1251328 * 512 = 640679936, so:
mount -o offset=640679936 Fedora-Minimal-armhfp-21-5-sda.raw /mnt/whatever
Copy everything into the new empty second partition on the SD card (
cp -aworks for this).
Copy the kernel module directory from raspbian into
/lib/modules/on the newly populated second partition; make sure you preserve the "-v7" subdirectory name exactly. Also copy the
/etc/fstab, replacing the Fedora one. Edit that so the first partition is mounted on
/boot/rpiinstead of just
/boot, and create such a directory on the second partition. This is in case subsequent Fedora updates put stuff here (they will) which will never get used; the actual raspberry pi stuff might as well be kept separate. There's a bit of a complication, though, if you are going to use
rpi-update, since that writes to
/boot. You can either remount the first partition over
/bootbefore you do that (and put it back afterward), or edit
rpi-update(but beware rpi-update updates itself).
See the note at bottom about
/opt/vcfor an option about keeping the firmware and kernel updated.
Unmount the SD card and stick it in the pi. The "minimal" version of Fedora 21 ARM I used had a minimal setup with 4 options (language, time zone, root password, create user). I had to go through a bit of work with
yumto test X, but if you choose one of the GUI images (KDE, Xfce, Mate etc.) you won't have to bother with that.
yum updateonce you log in.
You'll probably at some point want something from what's in
/opt/vc on Raspbian (and may be included other ways by other pi distros). This is actually from a github repo which includes the firmware and pre-compiled kernels, so if you clone the "firmware" part of that repo:
git clone https://github.com/raspberrypi/firmware
You get pretty much everything, including all the stuff for the first
/boot partition, and the corresponding
/lib/modules -- i.e., you could create the card completely from scratch using just this and the Fedora image, and update manually with
[Be warned that this is 3.5+ GB worth of stuff. Note you don't need to do it on the pi.]
/opt/vc directory of that repo contains some libraries and executables, including
/opt/vc/bin is in
$PATH on Raspbian and you can do the same thing or copy what you want where ever. What's critical is that the libraries in
/opt/vc/lib are found by the linker. If you copy
/opt/vc directly to the pi, as root:
echo "/opt/vc/lib" > /etc/ld.so.conf.d/rpi.conf ldconfig
Otherwise the stuff in
/opt/vc/bin won't work. The openGL ES libraries for hardware acceleration on the GPU are also in here.
You can install "Fedora 21 REMIX for Raspbery Pi 2B"
Since this question was answered, a version of Fedora 25 in a new state has been released for some Rasberry Pi models:
We currently only support the Raspberry Pi Model B versions 2 and 3.
Note that support is "very new":
The Raspberry Pi support is now supported in Fedora 25 Beta and later. Fedora 25 final release support is still very new so please report issues to the ARM mailing list or IRC channel
Yes, instructions for someone with minimal Linux experience are at: https://chisight.wordpress.com/2015/10/19/fedora-22-or-23-on-raspberry-pi-2/
On Windows, I was able to uncompress the unusual
.xz extension with the help of 7Zip. I then wrote it to the SD card using Win32DiskImager as I would do for Raspbian. Since the extracted file does not have the required
.img extension, you have to enter
* in the file open dialog to find it.
Like Raspbian it will resize the disk at first boot and ask for configuration when booted.
Try Fedberry Fedora remix. I'm currently using Fedberry and it works great. You can directly burn the image onto the sd card but using Pinn was easier for me.