From Fedora Project Wiki
(Undo revision 406274 by Pwhalen (talk))
(39 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{autolang|base=yes}}
{{autolang|base=yes}}


[[Category:Fedora ARM]][[Category:Fedora 21]]
[[Category:Fedora ARM]][[Category:Fedora 21 ]]
=Fedora 21 for ARM=
=Fedora 21 for ARM=
{{admon/warning|IMPORTANT |<b>This is pre-release software and not intended for general use.</b>}}


*[http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id Fedora 21 Images]
The Fedora ARM team is pleased to announce that Fedora 21 for the ARM Architecture is now available for download from:


This page is used to document the changing process of ARM image installation during the development cycle.  
http://download.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/


The image-based installation process involves downloading an image file (depending upon 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 Rawhide environment.
Fedora 21 for ARM includes 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.


After writing the image and correct U-boot file(s), insert the media into the target platform and boot.
The image-based installation process involves downloading an image file (depending upon the 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 21 environment.


====Overview of Hardware Support Status====
====Overview of Hardware Support Status====
Visual overview of the current Hardware Status in the Fedora Kernel:
* [http://fedoraproject.org/wiki/Architectures/ARM/F21/Installation/Hardware_Status Hardware Support Status]
* [[Architectures/ARM/Rawhide/Installation/Hardware_Status#Current_Rawhide_ARM_Hardware_Status| Rawhide Hardware Support Matrix]]


=Download the Disk Image & Copy to Media=
=Download the Disk Image & Copy to Media=
The image-based installation process involves downloading an image file
(depending upon 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 21 environment.
After writing the image and correct U-boot file(s), insert the media into the target platform and boot.
*http://download.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/
== Scripted ==
{{admon/note|Note | The examples provided here are from a Fedora 19/20 host and may need to be adjusted depending on your host environment.}}
{{admon/note|Note | The examples provided here are from a Fedora 19/20 host and may need to be adjusted depending on your host environment.}}
== Scripted ==
 
Execute the following script as a user with sudo privileges. It will copy the selected disk image and write the appropriate U-Boot for the target hardware platform. Optionally you can also enable and disable SE Linux and remove the root password requirement (allowing log in without completely initial setup). To add a board not listed, simply create a bash scriptlet with the commands needed to copy U-Boot to media.
Execute the following script as a user with sudo privileges. It will copy the
* http://pwhalen.fedorapeople.org/fedora-arm-image-installer.tar.bz2
selected disk image and write the appropriate U-Boot for the target hardware
platform. Optionally you can also enable and disable SE Linux and remove the
root password requirement (allowing log in without completing initial setup).
To add a board not listed, simply create a bash scriptlet with the commands
needed to copy U-Boot to media and add to the 'boards.d' directory.
* https://pwhalen.fedorapeople.org/fedora-arm-installer-0.06.tar.bz2
<pre>
<pre>
./fedora-arm-image-installer.sh  
./fedora-arm-image-installer.sh


Usage: fedora-arm-image-installer.sh <options>
Usage: fedora-arm-image-installer.sh <options>


   --image=IMAGE    - raw image file name
   --image=IMAGE    - xz compressed image file name
   --target=TARGET  - target board
   --target=TARGET  - target board
      [beaglebone|Cubietruck|panda|trimslice|wandboard_dl|wandboard_quad|wandboard_solo]
      [Bananapi|beaglebone|Cubietruck|none|panda|trimslice|wandboard_dual|wandboard_quad|wandboard_solo]
   --media=DEVICE  - media device file (/dev/[sdX|mmcblkX])
   --media=DEVICE  - media device file (/dev/[sdX|mmcblkX])
   --selinux=ON/OFF - Turn SELinux off/on as needed
   --selinux=ON/OFF - Turn SELinux off/on as needed
Line 38: Line 52:
Example: fedora-arm-image-installer.sh --image=Fedora-Rawhide.xz --target=panda --media=/dev/mmcblk0 --selinux=OFF
Example: fedora-arm-image-installer.sh --image=Fedora-Rawhide.xz --target=panda --media=/dev/mmcblk0 --selinux=OFF
</pre>
</pre>
Note, this is not the {{Package|fedora-arm-installer}} package.


== Manual==
== Manual==
Choose a disk image.  
Choose a disk image.
  http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id
  http://download.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/
Write the image to your media
Write the image to your media
DATE=  # Date of the rawhide image eg - 20140502
USER=  # your username
  TYPE=  # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
  TYPE=  # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
  MEDIA= #/dev/<location-of-your-media  
  MEDIA= #/dev/<location-of-your-media>
  xzcat Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz | sudo dd of=$MEDIA; sync
        # for example /dev/sdc, /dev/sdg, ...
        # read /var/log/messages to learn which device was assigned to your media
  xzcat Fedora-$TYPE-armhfp-21-5-sda.raw.xz | sudo dd of=$MEDIA; sync
After writing the image, read the new partition table and mount the root partition
After writing the image, read the new partition table and mount the root partition
  partprobe $MEDIA
  partprobe $MEDIA
  mkdir /tmp/root; sudo mount /dev/<media-location> /tmp/root
PART=  #/dev/<location-of-your-media><partition-number>
        # this needs to be the root partition on the written media
        # for example /dev/sdc3, /dev/sdg3, /dev/mmcblk0p3, ...
  mkdir /tmp/root; sudo mount $PART /tmp/root
Copy the appropriate U-Boot files for your target hardware listed below.
Copy the appropriate U-Boot files for your target hardware listed below.


=Write U-Boot to Media=
=Write U-Boot to Media=
Follow theses steps to write the appropriate U-Boot for your Hardware.  
Follow theses steps to write the appropriate U-Boot for your Hardware.
===For AllWinner Devices===
===For the Banana Pi (Allwinner A20)===
  sudo dd if=/tmp/root/usr/share/uboot/Cubietruck/u-boot-sunxi-with-spl.bin of=/dev/<media-location> bs=1024 seek=8 conv=fsync,notrunc
{{admon/warning|IMPORTANT | At this time you must have a serial console cable for the Banana Pi. For those that do not, please see the FAQ at the bottom of the page}}
MEDIA= #/dev/<location-of-your-media>
        # for example /dev/sdc, /dev/sdg, ...
        # read /var/log/messages to learn which device was assigned to your media
  sudo dd if=/tmp/root/usr/share/uboot/Bananapi/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc
Media should now be ready to boot on the Banana Pi. Insert into the device and boot.
===WARNING for Cubie* users===
Be sure you are using the correct uboot image for your specific board!  An incorrect uboot can cause unpredictable and confusing errors.
===For the CubieBoard v1 (Allwinner A10)===
MEDIA= #/dev/<location-of-your-media>
        # for example /dev/sdc, /dev/sdg, ...
        # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubieboard/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc
Media should now be ready to boot on the Cubieboard. Insert into the device and boot.
 
===For the CubieBoard v2 (Allwinner A20)===
MEDIA= #/dev/<location-of-your-media>
        # for example /dev/sdc, /dev/sdg, ...
        # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubieboard2/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc
Media should now be ready to boot on the Cubieboard. Insert into the device and boot.
 
===For the CubieTruck (Allwinner A20)===
MEDIA= #/dev/<location-of-your-media>
        # for example /dev/sdc, /dev/sdg, ...
        # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubietruck/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc
Media should now be ready to boot on the Cubietruck. Insert into the device and boot.
Media should now be ready to boot on the Cubietruck. Insert into the device and boot.


===For the BeagleBone ( Black & White ) ===
===For the BeagleBone ( Black & White ) ===
{{admon/warning|IMPORTANT | At this time you must have a serial console cable for the BeagleBone. For those that do not, please see the FAQ at the bottom of the page}}
{{admon/warning|IMPORTANT | At this time you must have a serial console cable for the BeagleBone. For those that do not, please see the FAQ at the bottom of the page}}
The Beaglebone Black/White no longer requires the use of a VFAT partition. When using a VFAT parition, copy U-Boot files to the first partition (for reference see [[Architectures/ARM/F20/Installation#For_the_BeagleBone_Black| Fedora 20 Installation Page]]).
MEDIA= #/dev/<location-of-your-media>
  sudo dd if=/tmp/root/usr/share/uboot/beaglebone/MLO of=/dev/<media-location> count=1 seek=1 conv=notrunc bs=128k
        # for example /dev/sdc, /dev/sdg, ...
  sudo dd if=/tmp/root/usr/share/uboot/beaglebone/u-boot.img of=/dev/<media-location> count=2 seek=1 conv=notrunc bs=384k
        # read /var/log/messages to learn which device was assigned to your media
Media should now be ready to boot on the BeagleBone. Insert into the device and boot.
  sudo dd if=/tmp/root/usr/share/uboot/beaglebone/MLO of=$MEDIA count=1 seek=1 conv=notrunc bs=128k
  sudo dd if=/tmp/root/usr/share/uboot/beaglebone/u-boot.img of=$MEDIA count=2 seek=1 conv=notrunc bs=384k
Media should now be ready to boot on the BeagleBone. Insert into the device and boot. To boot the Fedora 21 version of U-Boot on MicroSD you will need to hold the "User Boot" button (located near the MicroSD slot) when the device is powered on.
 
==== Copying Fedora U-Boot to eMMC on the Beaglebone Black====
To Copy the Fedora U-Boot to the eMMC on the Beaglebone Black execute the following steps:
 
<pre>
# mount emmc boot partition
mkdir /tmp/emmc; mount /dev/mmcblk1p1 /tmp/emmc
 
# optionally back up original U-Boot
mkdir /tmp/emmc/orig-uboot; cp /tmp/emmc/{MLO,u-boot.img} /tmp/emmc/orig-uboot/
 
# copy Fedora U-Boot
cp /usr/share/uboot/beaglebone/{MLO,u-boot.img} /tmp/emmc/
</pre>
 
Once completed you will no longer need to press the "User Boot" button to select the Fedora U-Boot.


===For the CompuLab TrimSlice===
===For the CompuLab TrimSlice===
{{admon/warning|IMPORTANT | You must use the latest Device Tree enabled U-Boot to boot the Fedora 20 Trimslice image, which you can find [http://www.trimslice.com/wiki/index.php/Trim-Slice_Firmware_Updater#v2012.04-1.02 here]. And environmental variables described [http://www.trimslice.com/wiki/index.php/Trim-Slice_Firmware_Updater#U-Boot_environment_variable here]. <b>Failure to do so will result in a non-booting system.</b>}}
{{admon/warning|IMPORTANT | You must use the latest Device Tree enabled U-Boot to boot the Fedora 21 Trimslice image, which you can find [http://www.trimslice.com/wiki/index.php/Trim-Slice_Firmware_Updater#v2012.04-1.02 here]. And environmental variables described [http://www.trimslice.com/wiki/index.php/Trim-Slice_Firmware_Updater#U-Boot_environment_variable here]. <b>Failure to do so will result in a non-booting system.</b>}}
The Trimslice requires no additional steps, U-Boot is included on the device.  
The Trimslice requires no additional steps, U-Boot is included on the device.
 
=== For the Wandboard (Freescale i.MX6) ===
=== For the Wandboard (Freescale i.MX6) ===
Note - 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. The Wandboard Solo uses the same dtb as the Dual(imx6dl-wandboard.dtb).
Note - 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 tes
ted and confirmed working, the Solo and Dual core models should also work as well. The Wandboard Solo uses the same dtb as the Dual(imx6dl-wandboard.dtb).
Copy the U-boot for the Wandboard hardware in use:
Copy the U-boot for the Wandboard hardware in use:
<pre>
BOARD= # Choose 'solo', 'dl' or 'quad'
BOARD= # Choose 'solo', 'dl' or 'quad'
MEDIA= #/dev/<location-of-your-media>
  sudo dd if=/tmp/root/usr/share/uboot/wandboard__$BOARD/u-boot.imx of=/dev/<location-of-your-media> bs=1k seek=1 conv=fsync; sync
        # for example /dev/sdc, /dev/sdg, ...
</pre>
        # read /var/log/messages to learn which device was assigned to your media
Remove the media and insert into the Wandboard and boot.  
  sudo dd if=/tmp/root/usr/share/uboot/wandboard_$BOARD/u-boot.imx of=$MEDIA bs=1k seek=1 conv=fsync; sync
Remove the media and insert into the Wandboard and boot.
{{admon/warning|IMPORTANT |<b>MicroSD for booting is located under the heatsink</b>}}
{{admon/warning|IMPORTANT |<b>MicroSD for booting is located under the heatsink</b>}}
=== For the Pandaboard ===
=== For the Pandaboard ===
The Pandaboard no longer requires the use of a VFAT partition. When using a VFAT parition, copy U-Boot files to the first partition (for reference see [[Architectures/ARM/F20/Installation#For_the_Pandaboard| Fedora 20 Installation Page]]).
MEDIA= #/dev/<location-of-your-media>
  sudo dd if=/tmp/root/usr/share/uboot/panda/MLO of=/dev/<location-of-your-media> count=1 seek=1 conv=notrunc bs=128k
        # for example /dev/sdc, /dev/sdg, ...
  sudo dd if=/tmp/root/usr/share/uboot/panda/u-boot.img of=/dev/<location-of-your-media> count=2 seek=1 conv=notrunc bs=384k
        # read /var/log/messages to learn which device was assigned to your media
  sudo dd if=/tmp/root/usr/share/uboot/panda/MLO of=$MEDIA count=1 seek=1 conv=notrunc bs=128k
  sudo dd if=/tmp/root/usr/share/uboot/panda/u-boot.img of=$MEDIA count=2 seek=1 conv=notrunc bs=384k
Media should now be ready to boot on the Pandaboard. Insert into the device and boot.
Media should now be ready to boot on the Pandaboard. Insert into the device and boot.


=For Versatile Express Emulation with QEMU=
=For Versatile Express Emulation with QEMU=
No ARM hardware? No problem! Even without hardware, it is possible to run the Fedora 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.
No ARM hardware? No problem! Even without hardware, it is possible to run the Fedora for ARM images using the QEMU emulator program. Any image can be used, and you can choose a scr
ipt method or manual depending on your preference.
=== Using an Existing Disk Image ===
=== Using an Existing Disk Image ===
Choose a disk image.  
Choose a disk image.
  http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id
  http://download.fedoraproject.org/pub/fedora/linux/releases/21/Images/armhfp/
Extract the image:
Extract the image:
<pre>
<pre>
DATE= # Date of the rawhide image eg - 20140502
USER= # your username
TYPE= # Type of image used. (eg Minimal, KDE, Xfce, SoaS, MATE)
TYPE= # Type of image used. (eg Minimal, KDE, Xfce, SoaS, MATE)
unxz Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz  
unxz Fedora-$TYPE-armhfp-21-5-sda.raw.xz
</pre>
</pre>
Install 'libguestfs-tools' to use virt-copy
Install 'libguestfs-tools' to use virt-copy
<pre>sudo yum install -y libguestfs-tools</pre>
<pre>sudo yum install -y libguestfs-tools</pre>
Extract the kernel and initramfs for use with booting.  
Extract the kernel and initramfs for use with booting.
<pre>
<pre>
virt-copy-out -a Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw /boot .
virt-copy-out -a Fedora-$TYPE-armhfp-21-5-sda.raw /boot .
</pre>
</pre>


To boot (you will need to determine the kernel version used in the disk image):
To boot (you will need to determine the kernel version used in the disk image):
<pre>
<pre>
KERN= # kernel version
KERN= # kernel version. eg - '/path/to/vmlinuz*'
INITRD= # initrd version
INITRD= # initrd version. eg - '/path/to/initramfs*'
DTB= # dtb version. eg - '/path/to/dtb*/vexpress-v2p-ca9.dtb
TYPE= # image used (Minimal recommended due to ongoing work with vexpress display)
sudo qemu-system-arm -machine vexpress-a9 -m 1024 -nographic -net nic -net user \
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" \
  -append "console=ttyAMA0,115200n8 rw root=/dev/mmcblk0p3 rootwait physmap.enabled=0" \
  -kernel $KERN \
  -kernel $KERN \
  -initrd $INTRD \
  -initrd $INITRD \
  -sd Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw \
  -sd Fedora-$TYPE-armhfp-21-5-sda.raw \
-dtb $DTB
 
* NOTE - to use Cortex-A15 emulation you will need to use '-machine vexpress-a15' and the A15 DTB - 'vexpress-v2p-ca15-tc1.dtb'.
</pre>
</pre>


For convenience you can also download a script for booting the system [http://pwhalen.fedorapeople.org/Fedora/20/boot-vexpress here].  
For convenience you can also download a script for booting the system [http://pwhalen.fedorapeople.org/Fedora/20/boot-vexpress here].
To run the script:
To run the script:
<pre>
<pre>
chmod 755 boot-vexpress
chmod 755 boot-vexpress
./boot-vexpress -h
./boot-vexpress -h
Usage: ./boot-vexpress [--gui] --kernel=vmlinuz... --ramfs=initramfs --image=fsimage [--dtb=vexpress.dtb]
Usage: ./boot-vexpress [--gui] --kernel=vmlinuz... --ramfs=initramfs --image=fsimage --dtb=vexpress.dtb
</pre>
</pre>
 
Booting with device tree is possible, although passing <b>--gui</b> 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.
NOTE: Booting with device tree is required. Passing <b>--gui</b> for graphics will not work at this time (this is due to ongoing platform reword occurring within the Versatile Expr
ess kernel code).


===Expanding the Disk Image===
===Expanding the Disk Image===
You can easily expand the root partition of the disk image using <code>qemu-img</code>.
You can easily expand the root partition of the disk image using <code>qemu-img</code>.


For example to increase the image size by 10GB you can issue:
For example to increase the image size by 10GB you can issue:
   qemu-img resize ./file.img +10G
   qemu-img resize Fedora-$TYPE-armhfp-21-5-sda.raw +10G


=== Interactive Network Installation ===
=== Interactive Network Installation ===
Fedora 21 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.
Fedora 21 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.
<pre>
<pre>
# vexpress-a15
# vexpress-a15
# Create the disk image
# Create the disk image
qemu-img create Fedora-QEMU-A15-armhfp-21-1-sda.raw $SIZE #add a size EG 8G
qemu-img create Fedora-QEMU-armhfp-21-sda.raw $SIZE #add a size EG 8G
# retrieve DTB  
# retrieve DTB
wget http://dl.fedoraproject.org/pub/fedora/linux/development/21/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
# Begin Install
# Begin Install
sudo virt-install --name Fedora-QEMU-A15-armhfp-Rawhide-1-sda \
sudo virt-install \
--name Fedora-QEMU-armhfp-21-A15 \
--ram 2048        \
--ram 2048        \
--arch armv7l      \
--arch armv7l      \
--machine vexpress-a15 \
--machine vexpress-a15 \
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/21/armhfp/os/ \
--location=https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/ \
--disk Fedora-QEMU-A15-armhfp-21-1-sda.raw \
--disk Fedora-QEMU-armhfp-21-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora20             \
--os-variant fedora21             \
--graphics none \
--graphics none \
--boot dtb=`pwd`/vexpress-v2p-ca15-tc1.dtb
--boot dtb=`pwd`/vexpress-v2p-ca15-tc1.dtb
Line 153: Line 227:
# vexpress-a9
# vexpress-a9
# Create the disk image
# Create the disk image
sudo qemu-img create Fedora-QEMU-A9-armhfp-21-1-sda.raw $SIZE #add a size EG 8G
sudo qemu-img create Fedora-QEMU-armhfp-21-sda.raw $SIZE #add a size EG 8G
# retrieve DTB
# retrieve DTB
wget http://dl.fedoraproject.org/pub/fedora/linux/development/21/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
# Begin Install
# Begin Install
sudo virt-install \
sudo virt-install \
--name Fedora-QEMU-A9-armhfp-21-1-sda \
--name Fedora-QEMU-armhfp-21-A9 \
--ram 1024 \
--ram 1024 \
--arch armv7l      \
--arch armv7l      \
--machine vexpress-a9 \
--machine vexpress-a9 \
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/21/armhfp/os/ \
--location=https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/ \
--disk Fedora-QEMU-A9-armhfp-21-1-sda.raw \
--disk Fedora-QEMU-armhfp-21-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora20             \
--os-variant fedora21             \
--graphics none \
--graphics none \
--boot dtb=`pwd`/vexpress-v2p-ca9.dtb  
--boot dtb=`pwd`/vexpress-v2p-ca9.dtb
</pre>
</pre>
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.
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). T
he system will attempt to reboot but fail until the next step is completed.


=== Extracting Files from the Disk Image  ===
=== Extracting Files from the Disk Image  ===
Line 176: Line 251:
KERN= # kernel version
KERN= # kernel version
INITRD= # initrd version
INITRD= # initrd version
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/{$KERN,$INITRD} .
# vexpress-a15
# vexpress-a15
sudo virt-copy-out -a Fedora-QEMU-A15-armhfp-20-1-sda.raw /boot/{$KERN,$INITRD} .
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/dtb-*/vexpress-v2p-ca15-tc1.dtb .
sudo virt-copy-out -a Fedora-QEMU-A15-armhfp-20-1-sda.raw /boot/dtb-*/vexpress-v2p-ca15-tc1.dtb .
# vexpress-a9
# vexpress-a9
sudo virt-copy-out -a Fedora-QEMU-A9-armhfp-20-1-sda.raw /boot/{$KERN,$INITRD} .
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/dtb-*/vexpress-v2p-ca9.dtb .
sudo virt-copy-out -a Fedora-QEMU-A9-armhfp-20-1-sda.raw /boot/dtb-*/vexpress-v2p-ca9.dtb .
</pre>
</pre>


=== Booting the New System ===
=== 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.  
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 user
s.
==== Virt-Manager ====
==== Virt-Manager ====
* Open Virt-Manager and select the image created above. Click on "Edit-> Virtual Machine Details -> View -> Details"  
* 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)
* 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='):
* For kernel args add (note- if custom partitioning was used for the installation you will to make adjustments to 'root='):
Line 197: Line 272:
</pre>
</pre>


* When using the A15 DTB and LPAE kernel it is possible to use more RAM (12GB tested).
* When using the A15 DTB and LPAE kernel it is possible to use more RAM.


= Calxeda EnergyCore (HighBank and Midway) =
Fedora Rawhide 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 [http://pwhalen.fedorapeople.org/Fedora/20/Fedora-20-Highbank.ks here]. Note the same kickstart can be used interchangeably on Highbank and Midway.
For more detailed instructions on setting this up, please visit this [[Architectures/ARM/F18/HighBank |page]].
= Booting for the First Time =
= Booting for the First Time =
===Initial-setup===
===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).
* 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 co
nsole. 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 edi
t '/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).
=== Resize the Root Filesystem ===
=== 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:
To resize the root partition use 'gparted' on a Fedora host.
resize2fs /dev/sda3


= Known Issues & Usage Tips=
= Known Issues & Usage Tips=


* Display is currently not working on all Target hardware platforms. Display is only working in Vexpress when no DTB is used (BZ#1082815)
* Display is not currently working in vexpress emulation.  
* Currently initial-setup will only run on minimal images due to on going display issues. <strike>You will also need to add 'enforcing=0' to the kernel args to disable SE Linux (BZ#1069792)</strike>
* A15 emulation through QEMU provides no output on console in Fedora 20(qemu-system-arm-1.6.2-9.fc20), working in Fedora 21(qemu-system-arm-2.1.2-6.fc21).
* <strike>Initial-Setup does not run on minimal images unless initial-setup-gui is installed (BZ#1091542)</strike>
* After installation with Anaconda you will need to manually edit '/etc/extlinux/extlinux.conf' and add 'fdtdir /dtb-<version>/' line. .
* qemu-1.6.2-4.fc20+ is required to boot the 3.15 Kernel (BZ#1091548)
* The system may hang during the update of 'initial-setup'. If this occurs, open another terminal and 'systemctl stop initial-setup-text' or 'systemctl stop initial-setup-graphical' depending on which image is in use.  
* A15 emulation through QEMU provides no output on console
* <strike>Cubietruck - By default the initramfs will not include the needed 'sunxi-mmc' driver. </strike>
* The installation tree in the Rawhide Repo may be broken at times during the development cycle
* Wandboard does not include console speed and needs to be edited during the boot. "setenv console ttymxc0,115200" (BZ#1044778)
* After new kernel installation the 'fdtdir' in '/boot/extlinux/extlinux.conf' needs to be manually updated.


= FAQ =
For a list of all common bugs please visit - http://fedoraproject.org/wiki/Common_F21_bugs .


<b>QUESTION</b> : How do I use Fedora ARM when I have no serial cable or display.
= FAQ =


<b>ANSWER</b>: 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).
*  <b>QUESTION</b> : How do I use Fedora ARM when I have no serial cable or display?
** <b>ANSWER</b>: 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).
<pre>
<pre>
USER= # your user account
USER= # your user account
Line 236: Line 305:


Give the system a few minutes to boot, when it obtains an IP you should be able to ssh to the root account.
Give the system a few minutes to boot, when it obtains an IP you should be able to ssh to the root account.
*  <b>QUESTION</b> : Why does 'yum update' fail?
** <b>ANSWER</b>: The system time might be incorrect, plesae ensure it is correct.

Revision as of 18:07, 11 March 2015

Fedora 21 for ARM

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

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

Fedora 21 for ARM includes 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 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 21 environment.

Overview of Hardware Support Status

Download the Disk Image & Copy to Media

The image-based installation process involves downloading an image file (depending upon 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 21 environment.

After writing the image and correct U-boot file(s), insert the media into the target platform and boot.

Scripted

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

Execute the following script as a user with sudo privileges. It will copy the selected disk image and write the appropriate U-Boot for the target hardware platform. Optionally you can also enable and disable SE Linux and remove the root password requirement (allowing log in without completing initial setup). To add a board not listed, simply create a bash scriptlet with the commands needed to copy U-Boot to media and add to the 'boards.d' directory.

./fedora-arm-image-installer.sh

Usage: fedora-arm-image-installer.sh <options>

   --image=IMAGE    - xz compressed image file name
   --target=TARGET  - target board
		      [Bananapi|beaglebone|Cubietruck|none|panda|trimslice|wandboard_dual|wandboard_quad|wandboard_solo]
   --media=DEVICE   - media device file (/dev/[sdX|mmcblkX])
   --selinux=ON/OFF - Turn SELinux off/on as needed
   --norootpass     - Remove the root password
    -y		    - Assumes yes, will not wait for confirmation
   --version	    - Display version and exit

Example: fedora-arm-image-installer.sh --image=Fedora-Rawhide.xz --target=panda --media=/dev/mmcblk0 --selinux=OFF

Note, this is not the Package-x-generic-16.pngfedora-arm-installer package.

Manual

Choose a disk image.

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

Write the image to your media

TYPE=  # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
xzcat Fedora-$TYPE-armhfp-21-5-sda.raw.xz | sudo dd of=$MEDIA; sync

After writing the image, read the new partition table and mount the root partition

partprobe $MEDIA
PART=  #/dev/<location-of-your-media><partition-number>
       # this needs to be the root partition on the written media
       # for example /dev/sdc3, /dev/sdg3, /dev/mmcblk0p3, ...
mkdir /tmp/root; sudo mount $PART /tmp/root

Copy the appropriate U-Boot files for your target hardware listed below.

Write U-Boot to Media

Follow theses steps to write the appropriate U-Boot for your Hardware.

For the Banana Pi (Allwinner A20)

Warning.png
IMPORTANT
At this time you must have a serial console cable for the Banana Pi. For those that do not, please see the FAQ at the bottom of the page
MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Bananapi/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc

Media should now be ready to boot on the Banana Pi. Insert into the device and boot.

WARNING for Cubie* users

Be sure you are using the correct uboot image for your specific board! An incorrect uboot can cause unpredictable and confusing errors.

For the CubieBoard v1 (Allwinner A10)

MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubieboard/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc

Media should now be ready to boot on the Cubieboard. Insert into the device and boot.

For the CubieBoard v2 (Allwinner A20)

MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubieboard2/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc

Media should now be ready to boot on the Cubieboard. Insert into the device and boot.

For the CubieTruck (Allwinner A20)

MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/Cubietruck/u-boot-sunxi-with-spl.bin of=$MEDIA bs=1024 seek=8 conv=fsync,notrunc

Media should now be ready to boot on the Cubietruck. Insert into the device and boot.

For the BeagleBone ( Black & White )

Warning.png
IMPORTANT
At this time you must have a serial console cable for the BeagleBone. For those that do not, please see the FAQ at the bottom of the page
MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/beaglebone/MLO of=$MEDIA count=1 seek=1 conv=notrunc bs=128k
sudo dd if=/tmp/root/usr/share/uboot/beaglebone/u-boot.img of=$MEDIA count=2 seek=1 conv=notrunc bs=384k

Media should now be ready to boot on the BeagleBone. Insert into the device and boot. To boot the Fedora 21 version of U-Boot on MicroSD you will need to hold the "User Boot" button (located near the MicroSD slot) when the device is powered on.

Copying Fedora U-Boot to eMMC on the Beaglebone Black

To Copy the Fedora U-Boot to the eMMC on the Beaglebone Black execute the following steps:

# mount emmc boot partition 
mkdir /tmp/emmc; mount /dev/mmcblk1p1 /tmp/emmc

# optionally back up original U-Boot
mkdir /tmp/emmc/orig-uboot; cp /tmp/emmc/{MLO,u-boot.img} /tmp/emmc/orig-uboot/

# copy Fedora U-Boot
cp /usr/share/uboot/beaglebone/{MLO,u-boot.img} /tmp/emmc/

Once completed you will no longer need to press the "User Boot" button to select the Fedora U-Boot.

For the CompuLab TrimSlice

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

The Trimslice requires no additional steps, U-Boot is included on the device.

For the Wandboard (Freescale i.MX6)

Note - 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 tes ted and confirmed working, the Solo and Dual core models should also work as well. The Wandboard Solo uses the same dtb as the Dual(imx6dl-wandboard.dtb). Copy the U-boot for the Wandboard hardware in use:

BOARD= # Choose 'solo', 'dl' or 'quad'
MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/wandboard_$BOARD/u-boot.imx of=$MEDIA bs=1k seek=1 conv=fsync; sync

Remove the media and insert into the Wandboard and boot.

Warning.png
IMPORTANT
MicroSD for booting is located under the heatsink

For the Pandaboard

MEDIA= #/dev/<location-of-your-media>
       # for example /dev/sdc, /dev/sdg, ...
       # read /var/log/messages to learn which device was assigned to your media
sudo dd if=/tmp/root/usr/share/uboot/panda/MLO of=$MEDIA count=1 seek=1 conv=notrunc bs=128k
sudo dd if=/tmp/root/usr/share/uboot/panda/u-boot.img of=$MEDIA count=2 seek=1 conv=notrunc bs=384k

Media should now be ready to boot on the Pandaboard. Insert into the device and boot.

For Versatile Express Emulation with QEMU

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

Using an Existing Disk Image

Choose a disk image.

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

Extract the image:

TYPE= # Type of image used. (eg Minimal, KDE, Xfce, SoaS, MATE)
unxz Fedora-$TYPE-armhfp-21-5-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-21-5-sda.raw /boot .

To boot (you will need to determine the kernel version used in the disk image):

KERN= # kernel version. eg - '/path/to/vmlinuz*'
INITRD= # initrd version. eg - '/path/to/initramfs*'
DTB= # dtb version. eg - '/path/to/dtb*/vexpress-v2p-ca9.dtb
TYPE= # image used (Minimal recommended due to ongoing work with vexpress display)
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 $KERN \
 -initrd $INITRD \
 -sd Fedora-$TYPE-armhfp-21-5-sda.raw \
 -dtb $DTB

* NOTE - to use Cortex-A15 emulation you will need to use '-machine vexpress-a15' and the A15 DTB - 'vexpress-v2p-ca15-tc1.dtb'. 

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

NOTE: Booting with device tree is required. Passing --gui for graphics will not work at this time (this is due to ongoing platform reword occurring within the Versatile Expr ess kernel code).

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 Fedora-$TYPE-armhfp-21-5-sda.raw +10G

Interactive Network Installation

Fedora 21 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-armhfp-21-sda.raw $SIZE #add a size EG 8G
# retrieve DTB
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
# Begin Install
sudo virt-install \
--name Fedora-QEMU-armhfp-21-A15 \
--ram 2048         \
--arch armv7l      \
--machine vexpress-a15 \
--location=https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/ \
--disk Fedora-QEMU-armhfp-21-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora21             \
--graphics none \
--boot dtb=`pwd`/vexpress-v2p-ca15-tc1.dtb

# vexpress-a9
# Create the disk image
sudo qemu-img create Fedora-QEMU-armhfp-21-sda.raw $SIZE #add a size EG 8G
# retrieve DTB
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
# Begin Install
sudo virt-install \
--name Fedora-QEMU-armhfp-21-A9 \
--ram 1024 \
--arch armv7l      \
--machine vexpress-a9 \
--location=https://dl.fedoraproject.org/pub/fedora/linux/releases/21/Server/armhfp/os/ \
--disk Fedora-QEMU-armhfp-21-sda.raw \
--extra-args="console=ttyAMA0 rw" \
--os-variant fedora21             \
--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). T he 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.

KERN= # kernel version
INITRD= # initrd version
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/{$KERN,$INITRD} .
# vexpress-a15
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/dtb-*/vexpress-v2p-ca15-tc1.dtb .
# vexpress-a9
sudo virt-copy-out -a Fedora-QEMU-armhfp-21-5-sda.raw /boot/dtb-*/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 user s.

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.

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 co

nsole. 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 edi t '/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).

Resize the Root Filesystem

To resize the root partition use 'gparted' on a Fedora host.

Known Issues & Usage Tips

  • Display is not currently working in vexpress emulation.
  • A15 emulation through QEMU provides no output on console in Fedora 20(qemu-system-arm-1.6.2-9.fc20), working in Fedora 21(qemu-system-arm-2.1.2-6.fc21).
  • After installation with Anaconda you will need to manually edit '/etc/extlinux/extlinux.conf' and add 'fdtdir /dtb-<version>/' line. .
  • The system may hang during the update of 'initial-setup'. If this occurs, open another terminal and 'systemctl stop initial-setup-text' or 'systemctl stop initial-setup-graphical' depending on which image is in use.

For a list of all common bugs please visit - http://fedoraproject.org/wiki/Common_F21_bugs .

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 -R u=rwX,o=,g= /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.

  • QUESTION : Why does 'yum update' fail?
    • ANSWER: The system time might be incorrect, plesae ensure it is correct.