From Fedora Project Wiki
(Added pcDuino3 Nano)
mNo edit summary
 
Line 1: Line 1:
{{autolang|base=yes}}
{{autolang|base=yes}}


[[Category:Fedora ARM]][[Category:Fedora 20]]
[[Category:Fedora ARMv7]][[Category:Fedora 20]]
=Fedora 20 for ARM=
=Fedora 20 for ARM=



Latest revision as of 11:01, 6 June 2017

Fedora 20 for ARM

The Fedora ARM team is pleased to announce that Fedora 20 for the ARM Architecture is now available for download from:

http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/

Fedora 20 for ARM includes two image types - one for use with platforms requiring a VFAT partition (such as Texas Instruments's AM335x-based Beaglebone Black), the other for use with devices that boot from an EXT3/4 partition (such as CompuLab's Tegra2-based TrimSlice). For each of these image types, there are a number of images providing for a variety of desktop choices (including MATE, KDE, XFCE, LXDE, SOAS), as well as a minimal image that does not include the desktop. Any of these images can be used with QEMU on an x86_64 desktop to emulate a fully functional ARM environment.

The image-based installation process involves downloading an image file (depending upon the target type and desktop/non-desktop option desired), inserting removable media into a "host" system (e.g. an ARM or x86_64 PC class desktop, laptop, etc.) and performing a few simple commands to write this image onto the media. This media is then used by the ARM "target" system to boot the Fedora 20 environment.

Note
The examples provided here are from a Fedora 19/20 host and may need to be adjusted depending on your host environment.

For the BeagleBone Black

IMPORTANT
At this time you must have a serial console cable for the BeagleBone Black. For those that do not, please see the FAQ at the bottom of the page

Support for the BeagleBone Black has been added in Fedora 20. The GA release includes basic support which will be extended to include HDMI and USB with the release of the 3.12 kernel. A remix is planned when support is available. In the interim, the minimal image is recommended.

TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-VFAT-armhfp-20-1-sda.raw.xz

Copy the image to the intended media:

xzcat Fedora-$TYPE-VFAT-armhfp-20-1-sda.raw.xz | sudo dd of=/dev/<location-of-your-media>

Auto-mount the newly created media and copy the U-Boot files from the root partition to the UBOOT partition (when auto-mounting on Fedora the partitions will show up as follows):

USER= #your username
cp /run/media/$USER/__/usr/share/uboot-beaglebone/* /run/media/$USER/uboot/
cp /run/media/$USER/uboot/uEnv.txt.beaglebone /run/media/$USER/uboot/uEnv.txt

Insert into your BeagleBone Black and boot. (NOTE - do not hold any buttons on the Beaglebone Black to allow U-Boot to be loaded from eMMC. The LEDs will remain lit in U-Boot and will shut off when the Fedora kernel is booted)

Change one option in this file(only BeagleBone Black):

vi /run/media/$USER/uboot/uEnv.txt
abcboard=am335x-bone > abcboard=am335x-boneblack
U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
If you have a recent BeagleBone black (04/2014), the bootloader from the internal eMMC may refuse to process the Fedora boot script with the following error:
 syntax error
 ## Error: "catX" not defined"

In such case, you may boot into the factory Debian installation on the eMMC, and replace the loader:

# cp /media/uboot/u-boot.img /boot/uboot/

For the CompuLab TrimSlice

IMPORTANT
You must use the latest Device Tree enabled U-Boot to boot the Fedora 20 Trimslice image, which you can find here. And environmental variables described here. Failure to do so will result in a non-booting system.

Download the image of your choice for use with the TrimSlice:

TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-armhfp-20-1-sda.raw.xz

Copy the image to the intended media:

xzcat Fedora-$TYPE-armhfp-20-1-sda.raw.xz | sudo dd of=/dev/<location-of-your-media> 

Insert into the TrimSlice and boot. Fedora will boot to an initial setup screen allowing you to create your user, set the root password and timezone.

Known Issues on the Trimslice

  • Loading a graphically enabled Initrd from some SD cards fails with an 'mmc_timeout' error. This is reported to be a bug with the version of U-Boot provided by CompuLab. The Initrd on the images is a generic ram disk that is replaced with a host specific version after the first kernel update. To work around this issue on the Fedora 20 release image, a host specific initrd is provided here.

For the Wandboard (Freescale i.MX6)

The Fedora kernel currently does not support a display on the Wandboard. For this reason the Minimal image is recommended.

wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-Minimal-armhfp-20-1-sda.raw.xz
xzcat Fedora-Minimal-armhfp-20-1-sda.raw.xz | sudo dd of=/dev/<location-of-your-media>
sync

Remove and reinsert the media into the host PC to automatically mount the image.

The Wandboard includes a Solo, Dual, and Quad core configuration. Determine your hardware configuration and use the appropriate value. While the Wandboard Quad has been tested and confirmed working, the Solo and Dual core models should also work as well.

USER= # your username
cd /run/media/$USER/__boot
sudo ln -sf dtb-3.11.10-301.fc20.armv7hl dtb

Create the extlinux.conf file manually (from the current directory 'sudo vi extlinux/extlinux.conf):

# extlinux.conf generated by anaconda

#ui menu.c32

menu autoboot Welcome to Fedora. Automatic boot in # second{,s}. Press a key for options.
#menu title Fedora Boot Options.
#menu hidden

timeout 60
#totaltimeout 9000

label Fedora (3.11.10-301.fc20.armv7hl) 20 (Heisenbug)
        kernel /vmlinuz-3.11.10-301.fc20.armv7hl
        append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
        fdt /dtb/imx6q-wandboard.dtb
        initrd /initramfs-3.11.10-301.fc20.armv7hl.img
Notes regarding the extlinux.conf
  • You may need to edit the extlinux.conf file and add the UUID of your root filesystem. To check this use 'sudo blkid /dev/<location-of-your-media>'. Make note of the Root filesystem UUID (the UUID from the example above corresponds to the Minimal image UUID).
  • The Wandboard Solo uses the same dtb as the Dual: imx6dl-wandboard.dtb

Copy the U-boot for the hardware in use:

BOARD= # Choose 'solo', 'dl' or 'quad'
sudo cp /run/media/$USER/__/usr/share/uboot-imx6$BOARD/u-boot.imx /home/$USER/
sync

Unmount the media and copy the U-boot file:

cd ~
sudo umount /run/media/$USER/__boot
sudo umount /run/media/$USER/__
sudo dd if=/home/$USER/u-boot.imx of=/dev/<location-of-your-media> bs=1k seek=1 conv=fsync
sync

Remove the media and insert into the Wandboard and boot.

IMPORTANT
MicroSD for booting is located under the heatsink

Network Installation on the Wandboard

Regardless of how you you choose to network install your wandboard you will need to install u-boot onto the microsd card first.

The prefered way to network install Fedora on the wandboard is to setup a pxe install tree you will need to mirror all the contents of the pxeboot tree including the dtb directory that has dtbs for all boards

if for some reason you can not use pxe you can manually load each of the bits from a tftp server by following the following steps.

This has been tested on the Wandboard Quad, use the appropriate 'dtb' for your board and adjust the IP addresses to match your network. This will also require a working tftp server and a MicroSD with U-Boot.

setenv ipaddr $WANDBOARDIP # or use 'dhcp get' for IP
setenv serverip $TFTPBOOTSEVER # Set this to your TFTP boot server
setenv bootargs console=ttymxc0,115200 ip=eth0:dhcp inst.repo=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/ rd.shell
tftpboot ${ramdisk_addr_r} ${serverip}:initrd.img
tftpboot ${kernel_addr_r} ${serverip}:vmlinuz
tftpboot ${fdt_addr} ${serverip}:imx6q-wandboard.dtb
bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}

Install MicroSD

A pre-made MicroSD image is available here:

wget http://pwhalen.fedorapeople.org/Fedora/20/Fedora-20-Wandboard-Installer.raw.xz
xzcat Fedora-20-Wandboard-Installer.raw.xz | sudo dd of=/dev/<location-of-your-media>
sync

Remove and re-insert the media, unmount the MicroSD and copy U-Boot:

wget http://pwhalen.fedorapeople.org/Fedora/20/u-boot.imx
dd if=u-boot.imx of=/dev/<location-of-your-media> bs=1k seek=1

If you reformatted '/boot' during the installation to the MicroSD you will need re-write U-Boot to the MicroSD card and create the DTB symlink as noted above.

Known issues on the Wandboard

  • When updating the kernel you will need to update the symlink for the DTB in '/boot'
  • USB Root not booting. SATA untested.
  • The secondary sdcard slot is not enabled when booting the original kernel from the image. A kernel (and dtb) which make it work is available as update.

For the Pandaboard

Note
This Respin includes an updated version of 'Arm-Boot-Config' for the Pandaboard to boot, all other packages are from Fedora 20 GA

Fedora 20 did not include support for the Pandaboard due to issues booting with the DTB. This has now been resolved with an update to 'arm-boot-config' and the addition of a U-Boot environmental variable 'bootm_size'. Because these changes were not ready in time for the official release, a Fedora Respin was created specifically for use with the Pandaboard, and using all Fedora 20 GA release packages with the addition of the 'arm-boot-config-0.62-1.fc20' from the Fedora Updates repository.

# Download the disk image (Minimal and Xfce images available)
TYPE= # Minimal or Xfce
 wget http://pwhalen.fedorapeople.org/Fedora/20/Fedora-$TYPE-VFAT-armhfp-20-Respin-sda.raw.xz

# Write to the media of your choosing
 xzcat -v Fedora-Xfce-VFAT-armhfp-20-Respin-sda.raw.xz | sudo dd of=/dev/<location-of-your-media>
# Auto-mount the newly created media and copy the U-Boot files from the root partition to the UBOOT partition 
# (when auto-mounting on Fedora the partitions will show up as follows):
 USER= #your username
 cp /run/media/$USER/__/usr/share/uboot-panda/* /run/media/$USER/uboot/
 
# Copy the appropriate file to uEnv.txt (depending on your board - panda, panda-es, panda-a4)
 cp /run/media/$USER/uboot/uEnv.txt{.panda,}

Insert into your device and boot.

Known Issues on the Pandaboard

  • When booting for the first time it is possible for the Pandaboard to get caught in an indefinite loop. If this occurs, stop the boot and load the 'boot.scr' manually by entering the following:
ext4load mmc 0:3 ${loadaddr} /boot/boot.scr; echo Running boot.scr script from mmc ...; source ${loadaddr}

For Versatile Express Emulation with QEMU

No ARM hardware? No problem! Even without hardware, it is possible to run the Fedora 20 Beta for ARM images using the QEMU emulator program. Any image can be used, and you can choose a script method or manual depending on your preference.

Using an Existing Disk Image

TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-armhfp-20-1-sda.raw.xz

Extract the image:

unxz Fedora-$TYPE-armhfp-20-1-sda.raw.xz

Install 'libguestfs-tools' to use virt-copy

sudo yum install -y libguestfs-tools

Extract the kernel and initramfs for use with booting.

virt-copy-out -a Fedora-$TYPE-armhfp-20-1-sda.raw /boot/vmlinuz-3.11.10-301.fc20.armv7hl .
virt-copy-out -a Fedora-$TYPE-armhfp-20-1-sda.raw /boot/initramfs-3.11.10-301.fc20.armv7hl.img .

To boot:

sudo qemu-system-arm -machine vexpress-a9 -m 1024 -nographic -net nic -net user \
 -append "console=ttyAMA0,115200n8 rw root=/dev/mmcblk0p3 rootwait physmap.enabled=0" \
 -kernel vmlinuz-3.11.10-301.fc20.armv7hl \
 -initrd initramfs-3.11.10-301.fc20.armv7hl.img \
 -sd Fedora-$TYPE-armhfp-20-1-sda.raw \

For convenience you can also download a script for booting the system here. To run the script:

chmod 755 boot-vexpress
./boot-vexpress -h
Usage: ./boot-vexpress [--gui] --kernel=vmlinuz... --ramfs=initramfs --image=fsimage [--dtb=vexpress.dtb]

To boot the image:

sudo ./boot-vexpress --kernel=vmlinuz-3.11.10-301.fc20.armv7hl --ramfs=initramfs-3.11.10-301.fc20.armv7hl.img --image=Fedora-$TYPE-armhfp-20-1-sda.raw

Booting with device tree is possible, although passing --gui for graphics will not work at this time (this is due to ongoing platform reword occurring within the Versatile Express kernel code). Booting without device tree is recommended for F-20, as it will work in both serial and graphics mode, whereas passing a DTB will only work with serial.

Expanding the Disk Image

You can easily expand the root partition of the disk image using qemu-img.

For example to increase the image size by 10GB you can issue:

 qemu-img resize ./file.img +10G

Interactive Network Installation

Fedora 20 offers the ability to perform a network installation using either 'vexpress-a15' or 'vexpress-a9'. Using 'vexpress-a15' will allow you to leverage more RAM using the LPAE kernel.

# vexpress-a15
# Create the disk image
qemu-img create Fedora-QEMU-A15-armhfp-20-1-sda.raw $SIZE #add a size EG 8G
# retrieve DTB 
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
# Begin Install
sudo virt-install --name Fedora-QEMU-A15-armhfp-20-1-sda \
--ram 2048         \
--arch armv7l      \
--machine vexpress-a15 \
--location=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/ \
--disk Fedora-QEMU-A15-armhfp-20-1-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora20             \
--graphics none \
--boot dtb=`pwd`/vexpress-v2p-ca15-tc1.dtb

# vexpress-a9
# Create the disk image
sudo qemu-img create Fedora-QEMU-A9-armhfp-20-1-sda.raw $SIZE #add a size EG 8G
# retrieve DTB
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
# Begin Install
sudo virt-install \
--name Fedora-QEMU-A9-armhfp-20-1-sda \
--ram 1024 \
--arch armv7l      \
--machine vexpress-a9 \
--location=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/ \
--disk Fedora-QEMU-A9-armhfp-20-1-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora20             \
--graphics none \
--boot dtb=`pwd`/vexpress-v2p-ca9.dtb 

Complete a Text or VNC Installation choosing a software packge and partitioning scheme (note when choosing LVM or BTRFS you will need to edit the kernel arguments appropriately). The system will attempt to reboot but fail until the next step is completed.

Extracting Files from the Disk Image

Once completed you will need to copy the kernel and initramfs and DTB from the disk image for use with Virt-Manager or command line.

# vexpress-a15
sudo virt-copy-out -a Fedora-QEMU-A15-armhfp-20-1-sda.raw /boot/{vmlinuz-3.11.10-301.fc20.armv7hl+lpae,initramfs-3.11.10-301.fc20.armv7hl+lpae.img} .
sudo virt-copy-out -a Fedora-QEMU-A15-armhfp-20-1-sda.raw /boot/dtb-3.11.10-301.fc20.armv7hl+lpae/dtb-3.11.10-301.fc20.armv7hl/vexpress-v2p-ca15-tc1.dtb .
# vexpress-a9
sudo virt-copy-out -a Fedora-QEMU-A9-armhfp-20-1-sda.raw /boot/{vmlinuz-3.11.10-301.fc20.armv7hl,initramfs-3.11.10-301.fc20.armv7hl.img} .
sudo virt-copy-out -a Fedora-QEMU-A9-armhfp-20-1-sda.raw /boot/dtb-3.11.10-301.fc20.armv7hl/vexpress-v2p-ca9.dtb .

Booting the New System

Once the files have been extracted you can choose to use the system on commandline or with Virt-Manager. Virt-Manager offers additional flexibility and is recommended for most users.

Virt-Manager

  • Open Virt-Manager and select the image created above. Click on "Edit-> Virtual Machine Details -> View -> Details"
  • Under "Boot Options", add the kernel, initramfs and dtb extracted above (the DTB should point to the correct path)
  • For kernel args add (note- if custom partitioning was used for the installation you will to make adjustments to 'root='):
# If you selected Standard Partitioning
console=ttyAMA0,115200n8 rw root=/dev/vda3 rootwait
# If you selected LVM
console=ttyAMA0,115200n8 rw root=/dev/mapper/fedora-root rootwait
  • When using the A15 DTB and LPAE kernel it is possible to use more RAM (12GB tested).

Known Issues when using QEMU

  • After updating the kernel you will need to extract the kernel, initramfs and dtb files and update the paths used in Virt-Manager as described above.

Resize the Root Filesystem

By default the root partition should be re-sized to fill the media in use on first boot. To use this additional space run:

resize2fs /dev/sda3

Calxeda EnergyCore (HighBank and Midway)

Fedora 20 for ARM includes support for systems that are able to perform a network installation using a kickstart, including enterprise hardware such as the Highbank and Midway processors from Calxeda. A working kickstart can be found here. Note the same kickstart can be used interchangeably on Highbank and Midway.

For more detailed instructions on setting this up, please visit this page.

pcDuino3 Nano

Installing Fedora 20 on the pcDuino3 Nano is possible, but it needs a little love and attention.

  • Create a bootable micro-sd card on pcDuino using board-config.sh
  • On another linux machine, repartition the card, leaving partition 1 alone, and partition 2 has to be /
  • Format micro-sd card partition 2 as ext4, and mount it.
  • Download your favorite VFAT arm image from Fedora Arm Image - and decompress it.
  • Extract the / filesystem from your image onto your mounted partition using virt-tar-out (from libguestfs-tools)
virt-tar-out -a Fedora-Minimal-VFAT-armhfp-20-1-sda.raw / – | (cd
/media/sdroot/ && tar xvf -)
  • Edit the fstab, while still mounted. Only have /, and change the UUID to match the UUID of part 2
  • Edit the passwd file so root can login without a password
    • Remove the ‘x’ from the line beginning with ‘root’
    • initial-setup crashes when it runs, so you have no way to log in if you don't do this.
  • sync, remove micro-sd card from your linux machine, put it in you pcDuino, power on pcDuino.
  • Detailed Instructions

Booting for the First Time

Initial-setup

  • During the first boot the system will launch the 'initial-setup' utility. For graphical images this will occur on the display, for minimal images this will occur on the serial console. Failure to complete the initial-setup will prevent logging into the system. To log in to the root account without completing the initial-setup you will need to minimally edit '/etc/passwd' file and remove the 'x' from the line beginning with 'root' (this will allow you to log into the root account without entering a password).

Known Issues

  • The Beaglebone Black will boot the Fedora 20 Beta VFAT images, however there is currently no USB. This is actively being worked on, if you would like to contribute please visit #fedora-arm on Freenode.
  • The images include dracut-modules-growroot and cloud-utils-growpart which should automatically resize the root partition on first boot, due to a bug this does not occur. The work around is to resize the root partition using GParted or equivalent.
  • Display will not work with Kernels 3.13+ - this is actively being worked on (BZ#1082815)

FAQ

QUESTION : How do I use Fedora ARM when I have no serial cable or display.

ANSWER: Though not recommended it is possible to use Fedora ARM without a serial cable or display. When doing so you may want to limit updates to reduce the possibility of not being able to boot. (This example is from a Fedora 19 system, you may need to adjust the mounts used).

USER= # your user account
rm /run/media/$USER/__/etc/systemd/system/graphical.target.wants/initial-setup-graphical.service
rm /run/media/$USER/__/etc/systemd/system/multi-user.target.wants/initial-setup-text.service
mkdir /run/media/$USER/__/root/.ssh/
cat /home/$USER/.ssh/id_rsa.pub >> /run/media/$USER/__/root/.ssh/authorized_keys
chmod u=rwX,o=,g=-r /run/media/$USER/__/root/.ssh/

Give the system a few minutes to boot, when it obtains an IP you should be able to ssh to the root account.