Architectures/ARM/Rawhide/Installation

From FedoraProject

< Architectures | ARM(Difference between revisions)
Jump to: navigation, search
(Using the BeagleBone with a 'ext' boot partition)
(Using an Existing Disk Image)
 
(74 intermediate revisions by 5 users not shown)
Line 9: Line 9:
 
This page is used to document the changing process of ARM image installation during the development cycle.  
 
This page is used to document the changing process of ARM image installation during the development cycle.  
  
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.
+
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.
  
 +
After writing the image and correct U-boot file(s), insert the media into the target platform and boot.
 +
 +
====Overview of Hardware Support Status====
 +
Visual overview of the current Hardware Status in the Fedora Kernel:
 +
* [[Architectures/ARM/Rawhide/Installation/Hardware_Status#Current_Rawhide_ARM_Hardware_Status| Rawhide Hardware Support Matrix]]
 +
 +
=Download the Disk Image & Copy to Media=
 
{{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.
 +
* http://pwhalen.fedorapeople.org/fedora-arm-image-installer.tar.bz2
 +
<pre>
 +
./fedora-arm-image-installer.sh
  
=For the BeagleBone ( Black & White ) =
+
Usage: fedora-arm-image-installer.sh <options>
{{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}}
+
Support for the BeagleBone White has been added in Fedora 21.  
+
  
TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
+
  --image=IMAGE    - raw image file name
  wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-VFAT-armhfp-20-1-sda.raw.xz
+
  --target=TARGET - target board
 +
      [beaglebone|Cubietruck|panda|trimslice|wandboard_dl|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
  
Copy the image to the intended media:
+
Example: fedora-arm-image-installer.sh --image=Fedora-Rawhide.xz --target=panda --media=/dev/mmcblk0 --selinux=OFF
xzcat Fedora-$TYPE-VFAT-armhfp-20-1-sda.raw.xz > /dev/<location-of-your-media>
+
</pre>
  
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):
+
== Manual==
  USER= #your username
+
Choose a disk image.
  cp /run/media/$USER/__/usr/share/uboot-beaglebone/* /run/media/$USER/uboot/
+
http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id
  cp /run/media/$USER/uboot/uEnv.txt.beaglebone /run/media/$USER/uboot/uEnv.txt
+
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
 +
MEDIA= #/dev/<location-of-your-media  
 +
xzcat Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz | sudo dd of=$MEDIA; sync
 +
After writing the image, read the new partition table and mount the root partition
 +
  partprobe $MEDIA
 +
mkdir /tmp/root; sudo mount /dev/<media-location> /tmp/root
 +
Copy the appropriate U-Boot files for your target hardware listed below.
  
Insert into your BeagleBone and boot. (NOTE - do not hold any buttons on the Beaglebone 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)
+
=Write U-Boot to Media=
 +
Follow theses steps to write the appropriate U-Boot for your Hardware.
 +
===For the CubieTruck (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
 +
Media should now be ready to boot on the Cubietruck. Insert into the device and boot.
  
Change one option in this file(only BeagleBone Black):
+
===For the BeagleBone ( Black & White ) ===
vi /run/media/$USER/uboot/uEnv.txt
+
{{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}}
abcboard=am335x-bone > abcboard=am335x-boneblack
+
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]]).
=== Using the BeagleBone with an 'Ext' Boot Partition ===
+
  sudo dd if=/tmp/root/usr/share/uboot/am335x_boneblack/MLO of=/dev/<media-location> count=1 seek=1 conv=notrunc bs=128k
  sudo dd if=/tmp/MLO of=/dev/sdd count=1 seek=1 conv=notrunc bs=128k
+
  sudo dd if=/tmp/root/usr/share/uboot/am335x_boneblack/u-boot.img of=/dev/<media-location> count=2 seek=1 conv=notrunc bs=384k
  sudo dd if=/tmp/u-boot.img of=/dev/sdd count=2 seek=1 conv=notrunc bs=384k
+
Media should now be ready to boot on the BeagleBone. Insert into the device and 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 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>}}
 
+
The Trimslice requires no additional steps, U-Boot is included on the device.  
Download the image of your choice for use with the TrimSlice:
+
=== For the Wandboard (Freescale i.MX6) ===
TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
+
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).
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-armhfp-20-1-sda.raw.xz
+
Copy the U-boot for the Wandboard hardware in use:
 
+
Copy the image to the intended media:
+
xzcat Fedora-$TYPE-armhfp-20-1-sda.raw.xz > /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 [http://pwhalen.fedorapeople.org/Fedora/20/uInitrd-3.11.10-301.fc20.armv7hl here].
+
** An updated version of U-Boot is also provided by Torez Smith and can be downloaded from her Fedora People page - http://torez.fedorapeople.org/trimslice/mmc_timeout_error. The 'Readme' contains installation instructions.
+
 
+
= 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.
+
<pre>
+
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 > /dev/<location-of-your-media>
+
sync
+
</pre>
+
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.
+
<pre>
+
USER= # your username
+
cd /run/media/$USER/__boot
+
sudo ln -sf dtb-3.11.10-301.fc20.armv7hl dtb
+
</pre>
+
Edit the extlinux.conf file to add the appropriate console (from the current directory 'sudo vi extlinux/extlinux.conf):
+
+
        append <b>console=ttymxc0,115200</b> root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
+
+
{{admon/warning|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:
+
 
<pre>
 
<pre>
 
BOARD= # Choose 'solo', 'dl' or 'quad'
 
BOARD= # Choose 'solo', 'dl' or 'quad'
sudo cp /run/media/$USER/__/usr/share/uboot-imx6$BOARD/u-boot.imx /home/$USER/
+
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
sync
+
 
</pre>
 
</pre>
Unmount the media and copy the U-boot file:
 
<pre>
 
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
 
</pre>
 
 
 
Remove the media and insert into the Wandboard and boot.  
 
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 ===
== Network Installation on the Wandboard ==  
+
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]]).
Regardless of how you you choose to network install your wandboard you will need to install u-boot onto the microsd card first.
+
sudo dd if=/tmp/root/usr/share/uboot/panda/MLO of=/dev/<location-of-your-media> count=1 seek=1 conv=notrunc bs=128k
 
+
  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
The prefered way to network install Fedora on the wandboard is to [http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ap-install-server.html setup a pxe install tree] you will need to mirror all the contents of [http://download.fedoraproject.org/pub/fedora/linux/releases/test/20/Fedora/armhfp/os/images/pxeboot/ the pxeboot tree] including the dtb directory that has dtbs for all boards
+
Media should now be ready to boot on the Pandaboard. Insert into the device and boot.
 
+
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.
+
<pre>
+
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}
+
</pre>
+
=== Install MicroSD ===
+
A pre-made MicroSD image is available here:
+
<pre>
+
wget http://pwhalen.fedorapeople.org/Fedora/20/Fedora-20-Wandboard-Installer.raw.xz
+
xzcat Fedora-20-Wandboard-Installer.raw.xz > /dev/<location-of-your-media>
+
sync
+
</pre>
+
Remove and re-insert the media, unmount the MicroSD and copy U-Boot:
+
<pre>
+
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
+
</pre>
+
 
+
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 =
+
{{admon/warning|Note|<b>This Respin includes an updated version of 'Arm-Boot-Config' for the Pandaboard to boot, all other packages are from Fedora 20 GA</b>}}
+
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.
+
 
+
<pre>
+
# 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 > /dev/<location-of-your-media>
+
</pre>
+
 
+
<pre>
+
# 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,}
+
</pre>
+
Insert into your device and boot.
+
=== Using the Pandaboard with an 'ext' boot partition ===
+
sudo dd if=/tmp/MLO of=/dev/sdd count=1 seek=1 conv=notrunc bs=128k
+
  sudo dd if=/tmp/u-boot.img of=/dev/sdd count=2 seek=1 conv=notrunc bs=384k
+
 
+
 
+
== 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=
 
=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 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 ===
 
=== Using an Existing Disk Image ===
<pre>
+
Choose a disk image.
TYPE= # options include KDE, LXDE, XFCE, SoaS, Mate and Minimal
+
http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-$TYPE-armhfp-20-1-sda.raw.xz
+
</pre>
+
 
+
 
Extract the image:
 
Extract the image:
 
<pre>
 
<pre>
unxz Fedora-$TYPE-armhfp-20-1-sda.raw.xz
+
DATE= # Date of the rawhide image eg - 20140502
 +
USER= # your username
 +
TYPE= # Type of image used. (eg Minimal, KDE, Xfce, SoaS, MATE)
 +
unxz Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz  
 
</pre>
 
</pre>
Install 'libguestfs-tools' to use virt-copy
+
Install 'libguestfs-tools' to use virt-copy by [[dnf|DNF]] or YUM:
<pre>sudo yum install -y libguestfs-tools</pre>
+
<pre>sudo dnf install -y libguestfs-tools
 +
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-20-1-sda.raw /boot/vmlinuz-3.11.10-301.fc20.armv7hl .
+
virt-copy-out -a Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw /boot .
virt-copy-out -a Fedora-$TYPE-armhfp-20-1-sda.raw /boot/initramfs-3.11.10-301.fc20.armv7hl.img .
+
 
</pre>
 
</pre>
  
To boot:
+
To boot (you will need to determine the kernel version used in the disk image):
 
<pre>
 
<pre>
 +
KERN= # kernel version
 +
INITRD= # initrd version
 
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 vmlinuz-3.11.10-301.fc20.armv7hl \
+
  -kernel $KERN \
  -initrd initramfs-3.11.10-301.fc20.armv7hl.img \
+
  -initrd $INTRD \
  -sd Fedora-$TYPE-armhfp-20-1-sda.raw \
+
  -sd Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw \
 
</pre>
 
</pre>
  
Line 203: Line 122:
 
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>
To boot the image:
+
<pre>
+
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
+
</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.
 
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.
  
Line 218: Line 133:
  
 
=== Interactive Network Installation ===
 
=== 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.
+
Fedora Rawhide 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-20-1-sda.raw $SIZE #add a size EG 8G
+
qemu-img create Fedora-QEMU-A15-armhfp-Rawhide-1-sda.raw $SIZE #add a size EG 8G
 
# retrieve DTB  
 
# retrieve DTB  
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
+
wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
 
# Begin Install
 
# Begin Install
sudo virt-install --name Fedora-QEMU-A15-armhfp-20-1-sda \
+
sudo virt-install --name Fedora-QEMU-A15-armhfp-Rawhide-1-sda \
 
--ram 2048        \
 
--ram 2048        \
 
--arch armv7l      \
 
--arch armv7l      \
 
--machine vexpress-a15 \
 
--machine vexpress-a15 \
--location=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/ \
+
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/ \
--disk Fedora-QEMU-A15-armhfp-20-1-sda.raw \
+
--disk Fedora-QEMU-A15-armhfp-Rawhide-1-sda.raw \
 
--extra-args="console=ttyAMA0 rw" \
 
--extra-args="console=ttyAMA0 rw" \
 
--os-variant fedora20            \
 
--os-variant fedora20            \
Line 239: Line 154:
 
# vexpress-a9
 
# vexpress-a9
 
# Create the disk image
 
# Create the disk image
sudo qemu-img create Fedora-QEMU-A9-armhfp-20-1-sda.raw $SIZE #add a size EG 8G
+
sudo qemu-img create Fedora-QEMU-A9-armhfp-Rawhide-1-sda.raw $SIZE #add a size EG 8G
 
# retrieve DTB
 
# retrieve DTB
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
+
wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
 
# Begin Install
 
# Begin Install
 
sudo virt-install \
 
sudo virt-install \
--name Fedora-QEMU-A9-armhfp-20-1-sda \
+
--name Fedora-QEMU-A9-armhfp-Rawhide-1-sda \
 
--ram 1024 \
 
--ram 1024 \
 
--arch armv7l      \
 
--arch armv7l      \
 
--machine vexpress-a9 \
 
--machine vexpress-a9 \
--location=http://download.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/armhfp/os/ \
+
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/ \
--disk Fedora-QEMU-A9-armhfp-20-1-sda.raw \
+
--disk Fedora-QEMU-A9-armhfp-Rawhide-1-sda.raw \
 
--extra-args="console=ttyAMA0 rw" \
 
--extra-args="console=ttyAMA0 rw" \
 
--os-variant fedora20            \
 
--os-variant fedora20            \
Line 260: Line 175:
 
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.
 
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.
 
<pre>
 
<pre>
 +
KERN= # kernel version
 +
INITRD= # initrd version
 
# vexpress-a15
 
# 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/{$KERN,$INITRD} .
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 .
+
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/{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/{$KERN,$INITRD} .
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 .
+
sudo virt-copy-out -a Fedora-QEMU-A9-armhfp-20-1-sda.raw /boot/dtb-*/vexpress-v2p-ca9.dtb .
 
</pre>
 
</pre>
  
Line 282: Line 199:
  
 
* 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 (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) =
 
= 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.
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 [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]].
 
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 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).
 +
=== 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
  
= Known Issues =
+
= Known Issues & Usage Tips=
 
+
* 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 is currently not working on all Target hardware platforms. Display is only working in Vexpress when no DTB is used (BZ#1082815)
 +
* 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>
 +
* <strike>Initial-Setup does not run on minimal images unless initial-setup-gui is installed (BZ#1091542)</strike>
 +
* qemu-1.6.2-4.fc20+ is required to boot the 3.15 Kernel (BZ#1091548)
 +
* 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 =  
 
= FAQ =  
Line 319: Line 233:
 
mkdir /run/media/$USER/__/root/.ssh/
 
mkdir /run/media/$USER/__/root/.ssh/
 
cat /home/$USER/.ssh/id_rsa.pub >> /run/media/$USER/__/root/.ssh/authorized_keys
 
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/
+
chmod -R u=rwX,o=,g= /run/media/$USER/__/root/.ssh/
 
</pre>
 
</pre>
  
 
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.

Latest revision as of 12:09, 8 October 2015

Contents

[edit] Rawhide for ARM

Warning.png
IMPORTANT
This is pre-release software and not intended for general use.

This page is used to document the changing process of ARM image installation during the development cycle.

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.

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

[edit] Overview of Hardware Support Status

Visual overview of the current Hardware Status in the Fedora Kernel:

[edit] Download the Disk Image & Copy to Media

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.

[edit] 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.

./fedora-arm-image-installer.sh 

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

   --image=IMAGE    - raw image file name
   --target=TARGET  - target board
		      [beaglebone|Cubietruck|panda|trimslice|wandboard_dl|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

[edit] Manual

Choose a disk image.

http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id

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
MEDIA= #/dev/<location-of-your-media 
xzcat Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz | sudo dd of=$MEDIA; sync

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

partprobe $MEDIA
mkdir /tmp/root; sudo mount /dev/<media-location> /tmp/root

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

[edit] Write U-Boot to Media

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

[edit] For the CubieTruck (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

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

[edit] 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

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 Fedora 20 Installation Page).

sudo dd if=/tmp/root/usr/share/uboot/am335x_boneblack/MLO of=/dev/<media-location> count=1 seek=1 conv=notrunc bs=128k
sudo dd if=/tmp/root/usr/share/uboot/am335x_boneblack/u-boot.img of=/dev/<media-location> count=2 seek=1 conv=notrunc bs=384k

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

[edit] For the CompuLab TrimSlice

Warning.png
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.

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

[edit] 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). Copy the U-boot for the Wandboard hardware in use:

BOARD= # Choose 'solo', 'dl' or 'quad'
 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

Remove the media and insert into the Wandboard and boot.

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

[edit] 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 Fedora 20 Installation Page).

sudo dd if=/tmp/root/usr/share/uboot/panda/MLO of=/dev/<location-of-your-media> count=1 seek=1 conv=notrunc bs=128k
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

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

[edit] 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.

[edit] Using an Existing Disk Image

Choose a disk image.

http://koji.fedoraproject.org/koji/tasks?state=all&view=tree&method=appliance&order=-id

Extract the image:

DATE= # Date of the rawhide image eg - 20140502
USER= # your username 
TYPE= # Type of image used. (eg Minimal, KDE, Xfce, SoaS, MATE)
unxz Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw.xz 

Install 'libguestfs-tools' to use virt-copy by DNF or YUM:

sudo dnf install -y libguestfs-tools
sudo yum install -y libguestfs-tools

Extract the kernel and initramfs for use with booting.

virt-copy-out -a Fedora-$TYPE-armhfp-rawhide-$DATE-sda.raw /boot .

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

KERN= # kernel version
INITRD= # initrd version
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 $INTRD \
 -sd Fedora-$TYPE-armhfp-rawhide-$DATE-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]

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.

[edit] 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

[edit] Interactive Network Installation

Fedora Rawhide 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-Rawhide-1-sda.raw $SIZE #add a size EG 8G
# retrieve DTB 
wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca15-tc1.dtb
# Begin Install
sudo virt-install --name Fedora-QEMU-A15-armhfp-Rawhide-1-sda \
--ram 2048         \
--arch armv7l      \
--machine vexpress-a15 \
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/ \
--disk Fedora-QEMU-A15-armhfp-Rawhide-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-Rawhide-1-sda.raw $SIZE #add a size EG 8G
# retrieve DTB
wget http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/images/pxeboot/dtb/vexpress-v2p-ca9.dtb
# Begin Install
sudo virt-install \
--name Fedora-QEMU-A9-armhfp-Rawhide-1-sda \
--ram 1024 \
--arch armv7l      \
--machine vexpress-a9 \
--location=http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/armhfp/os/ \
--disk Fedora-QEMU-A9-armhfp-Rawhide-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.

[edit] 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
# 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-A15-armhfp-20-1-sda.raw /boot/dtb-*/vexpress-v2p-ca15-tc1.dtb .
# 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-A9-armhfp-20-1-sda.raw /boot/dtb-*/vexpress-v2p-ca9.dtb .

[edit] 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.

[edit] 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).

[edit] 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 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.

[edit] Booting for the First Time

[edit] 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).

[edit] 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

[edit] 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)
  • Currently initial-setup will only run on minimal images due to on going display issues. You will also need to add 'enforcing=0' to the kernel args to disable SE Linux (BZ#1069792)
  • Initial-Setup does not run on minimal images unless initial-setup-gui is installed (BZ#1091542)
  • qemu-1.6.2-4.fc20+ is required to boot the 3.15 Kernel (BZ#1091548)
  • A15 emulation through QEMU provides no output on console
  • Cubietruck - By default the initramfs will not include the needed 'sunxi-mmc' driver.
  • 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.

[edit] 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.