Architectures/Fedora ARM Kernels

From FedoraProject

< Architectures(Difference between revisions)
Jump to: navigation, search
(First draft of Building and Installing a Fedora Kernel Package on ARM Systems)
 
(Approach)
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Building and Installing a Fedora Kernel Package on ARM Systems =
+
== Building and Installing a Fedora Kernel Package on ARM Systems ==
 +
 
 +
This was originally written for Fedora 13.  If you are already familiar with the concepts discussed and are only interesting in Fedora 15, you can skip to [[Architectures/Fedora_ARM_Kernels#Set Up the F15 Repository | Set Up the F15 Repository]].
 +
 
 +
This page is largely obsolete, as the Fedora ARM kernels are now being built in ARM Koji, and can be updated via yum.  The grubby changes have also been pushed upstream and are available in F17 and newer.  For F15, please use the patched version of grubby from the xpfa repository, as mentioned above.
  
 
== Goal ==
 
== Goal ==
Line 5: Line 9:
 
To be able to build and install a Fedora kernel package on ARM systems in a similar manner to installing on an x86 PC.
 
To be able to build and install a Fedora kernel package on ARM systems in a similar manner to installing on an x86 PC.
  
Since ARM-based hardware varies greatly, I decided to start with a single architecture and focus on the board(s) for which I have access.  It is my hope that this can be expanded to support other ARM variants and boards over time.  The specific ARM systems initially targeted are the Beagle-xM and Panda boards.  These are TI OMAP3 and OMAP4, respectively.
+
Since ARM-based hardware varies greatly, I decided to start with a single architecture and focus on the board(s) for which I had access.  It is my hope that this can be expanded to support other ARM variants and boards over time.  The specific ARM systems initially targeted were the Beagle-xM and Panda boards.  These are TI OMAP3 and OMAP4, respectively.  Only armv7l builds were supported.
 +
 
 +
Support has now been added to the kernel sources for the CompuLab Trim Slice (NVIDIA Tegra 2), and it may be built for armv5tel, armv7l, and armv7hl.  This is available in the Fedora kernel as of version kernel-2.6.40.3-0.fc15.
  
 
== Kernel Version ==
 
== Kernel Version ==
Although F13 Beta is the base version of Fedora currently running on the boards, a more recent stable kernel from F15 was selected for the kernel baseline.  The plan is to tract the F15 kernel versions, keeping up with the most recent builds until F16 is released.
+
Although F13 Beta is the base version of Fedora currently running on the boards, a more recent stable kernel from F15 was selected for the kernel baseline.  The plan is to track the F15 kernel versions, keeping up with the most recent builds until F16 is released.
  
This newer kernel version has a dependency for a newer (F15 based) version of linux-firmware, so it was also built and installed.
+
This newer kernel version has a dependency on a newer (F15 based) version of linux-firmware, so it was also built and installed for F13.
  
 
== Building the Kernel Package ==
 
== Building the Kernel Package ==
The kernel.spec file and Makefile.config were modified to add ARM OMAP specific support, and an applicable kernel config file was added.  The kernel package was then built on a Panda board using the following command:
+
The kernel.spec file and Makefile.config were modified to add ARM OMAP and Tegra specific support, and applicable kernel config files were added.  The kernel packages were then built for F13 on a Panda board using the following command:
  
<code>
+
<pre>
 
rpmbuild -ba --target=armv7l SPECS/kernel.spec
 
rpmbuild -ba --target=armv7l SPECS/kernel.spec
</code>
+
</pre>
  
 
The source and binary packages are available via yum:
 
The source and binary packages are available via yum:
  
  http://dmarlin.fedorapeople.org/yum/f13/
+
http://dmarlin.fedorapeople.org/yum/f13/
 +
 
 +
Details on setting up and using the repository are covered [[Architectures/Fedora_ARM_Kernels#Set Up the Repository | below]].
  
 
The Fedora ARM kernel source tree is also available in git:
 
The Fedora ARM kernel source tree is also available in git:
  
<code>
+
<pre>
 
git clone ssh://git.fedorahosted.org/git/arm.git
 
git clone ssh://git.fedorahosted.org/git/arm.git
 
git branch kernel origin/kernel
 
git branch kernel origin/kernel
</code>
+
</pre>
  
A scratch build through Koji can be performed using:
+
These sources are also available in the upstream Fedora kernel.
  
<code>
+
If you are [[Architectures/ARM/Package Maintainers | setup]] to use the [http://zenit.senecac.on.ca/wiki/index.php/Fedora_ARM_Koji_Buildsystem Fedora ARM Koji Build System], a scratch build can be performed using:
 +
 
 +
<pre>
 
fedpkg --dist=f13 srpm
 
fedpkg --dist=f13 srpm
 
arm-koji build dist-f13 --arch-override=armv7l --scratch kernel-<KERNEL_VERSION>.fc13.src.rpm
 
arm-koji build dist-f13 --arch-override=armv7l --scratch kernel-<KERNEL_VERSION>.fc13.src.rpm
</code>
+
</pre>
  
 
== Installing the Fedora ARM Kernel ==
 
== Installing the Fedora ARM Kernel ==
Both the boards selected for testing use the uBoot bootloader, so support was added to the grubby package to automate the creation of appropriate images to allow automatic boot of the installed kernel.  This is accomplished through the uBoot autoboot script and appropriate image selection.
+
Both of the boards selected for testing use the U-Boot bootloader, so support was added to the grubby package to automate the creation of appropriate U-Boot images for the kernel being installed.  Automatic boot of the installed kernel is accomplished through configuring the U-Boot autoboot script to use those U-Boot image files.
  
 
=== Issues ===
 
=== Issues ===
* uBoot does not support a "boot menu", like lilo or grub
+
* U-Boot does not support a "boot menu", like lilo or grub
* uboot partitions are vfat, which means no hard links
+
* U-Boot partitions are vfat, which means no hard links
* uboot does not support symlinks
+
* U-Boot does not support symlinks
  
 
=== Assumptions ===
 
=== Assumptions ===
* uBoot will use an autoboot script (boot.scr)
+
* U-Boot will use an autoboot script (<strike>boot.scr</strike> uEnv.txt)
 
* The kernel will boot using an initrd
 
* The kernel will boot using an initrd
* The uBoot partition (vfat) will be mounted on /boot/uboot
+
* The U-Boot partition (vfat) will be mounted on <code>/boot/uboot</code>
* the "default" boot images will use "standard" named files (i.e. uImage, uInitrd)
+
* the default boot images will use ''standard'' named files (i.e. uImage, uInitrd)
  
 
=== Approach ===
 
=== Approach ===
To automate the kernel installation for uBoot, the grubby package was modified as follows:
+
To automate the kernel installation for U-Boot, the grubby package was modified as follows:
* require uboot-utils
+
* require uboot-tools
* add sections to handle uBoot images in both update and remove
+
* add sections to handle U-Boot images in both update and remove
* run mkimage in the RPM posttrans script if uBoot is configured
+
* run mkimage in the RPM posttrans script if U-Boot is configured
 
* copy the new images to uImage and uInitrd (making it the default)
 
* copy the new images to uImage and uInitrd (making it the default)
* remove the corresponding version of uBoot images when a kernel is removed
+
* remove the corresponding version of U-Boot images when a kernel is removed
  
A simple text file was added that keeps a log of the installed kernel versions (assuming they were installed via yum or rpm).  When a new kernel is installed its version is appended to the list.  When a kernel is removed its version entry is removed from the list.  The last entry in the list is always assumed to be the default.  If the default kernel is removed, the "new default" version of the uBoot image files (the new "last" version in the list) are copied to uImage and uInitrd.
+
Multiple kernel version images may be installed, and kernel versions may be switched by simply copying the desired image versions to uImage and uInitrd and rebooting.  The only negative is some wasted space in the U-Boot partition,
 +
since two copies of the default kernel and initrd are stored.
 +
 
 +
No U-Boot specific changes were made to the kernel package, so it can be installed elsewhere without using the modified grubby, although in that case the U-Boot files would not be automatically updated.
 +
 
 +
A simple text file was added that keeps a log of the installed kernel versions (assuming they were installed via yum or rpm).  When a new kernel is installed its version is appended to the list.  When a kernel is removed its version entry is removed from the list.  The last entry in the list is always assumed to be the default.  If the default kernel is removed, the "new default" version of the U-Boot image files (the new "last" version in the list) are copied to uImage and uInitrd.
  
 
Minimal error checking is performed by the install and remove code.
 
Minimal error checking is performed by the install and remove code.
  
One other caveat, the uBoot directory may not always be mounted, since it is not required once Linux is booted.  If the uBoot partition is not already mounted, grubby will attempt to mount it and proceed.  If grubby had to perform the mount, the partition will be unmounted when the process is complete (left in the same state as before the transaction).
+
{{admon/note|Information:|The U-Boot directory may not always be mounted, since it is not required once Linux is booted.  If the U-Boot partition is not already mounted, grubby will attempt to mount it and proceed.  If grubby performs the mount, the partition will be unmounted when the process is complete (left in the same state as before the transaction).}}
 +
 
  
This is an example of how the uBoot directory should look after installing a kernel:
+
This is an example of how the U-Boot directory should look after installing a kernel:
 
<pre>
 
<pre>
  -rwxr-xr-x 1 root root   20632 May  5 10:15 MLO
+
-rwxr-xr-x. 1 root root     506 Jun 18 16:51 armhfp-panda-xfce-mmcblk0-mmc-uEnv.txt
  -rwxr-xr-x 1 root root     240 May 16 13:02 boot.cmd
+
-rwxr-xr-x. 1 root root     506 Jun 18 16:51 armhfp-panda-xfce-mmcblk0-usb-uEnv.txt
  -rwxr-xr-x 1 root root     312 May 16 13:05 boot.scr
+
-rwxr-xr-x. 1 root root       71 Jun 18 16:51 boot.scr
  -rwxr-xr-x 1 root root     112 Jun 1 18:12 klist.txt
+
-rwxr-xr-x. 1 root root       26 Jun 18 16:58 klist.txt
  -rwxr-xr-x 1 root root  146536 May 5 10:16 u-boot.bin
+
-rwxr-xr-x. 1 root root   34152 Apr 24 13:53 MLO
  -rwxr-xr-x 1 root root 3934012 Jun 1 18:12 uImage
+
  -rwxr-xr-x. 1 root root      260 Jun 18 16:51 README.txt
  -rwxr-xr-x 1 root root 3934012 Jun 1 18:12 uImage-2.6.38.8-31.01.fc13.armv7l.omap
+
  -rwxr-xr-x. 1 root root  238068 Apr 24 13:53 u-boot.img
  -rwxr-xr-x 1 root root 8476083 Jun 1 18:12 uInitrd
+
-rwxr-xr-x. 1 root root     506 Jun 18 16:51 uEnv.txt
  -rwxr-xr-x 1 root root 8476083 Jun 1 18:12 uInitrd-2.6.38.8-31.01.fc13.armv7l.omap
+
-rwxr-xr-x. 1 root root 3974848 Jun 18 16:57 uImage-3.4.2-3.fc17.armv7hl.omap
 +
-rwxr-xr-x. 1 root root  3974848 Jun 18 16:57 uImage-omap
 +
-rwxr-xr-x. 1 root root 11742382 Jun 18 16:58 uInitrd-3.4.2-3.fc17.armv7hl.omap
 +
-rwxr-xr-x. 1 root root 11742382 Jun 18 16:58 uInitrd-omap
 
</pre>
 
</pre>
  
This is an example of the autoboot command file (boot.cmd):
 
  
<code>
+
This is an example of the autoboot command file (boot.cmd) for the Pandaboard:
setenv bootargs console=ttyO2,115200n8 ro rootwait root=/dev/mmcblk0p4 init=/sbin/init earlyprintk rd_NO_PLYMOUTH
+
 
setenv bootcmd 'mmc init; fatload mmc 0:1 0x80300000 uImage; fatload mmc 0:1 81600000 uInitrd; bootm 80300000 81600000'
+
<pre>
boot
+
bootfile=uImage-omap
<code>
+
bootinitrd=uInitrd-omap
 +
boot=bootm
 +
address_image=0x80300000
 +
address_initrd=0x81600000
 +
mmcroot=LABEL=rootfs ro
 +
mmcargs=setenv bootargs root=${mmcroot} init=/sbin/init quiet rootwait rhgb earlyprintk
 +
loaduimage=run xyz_mmcboot; run mmcargs; ${boot} ${address_image} ${address_initrd}
 +
xyz_load_image=fatload mmc 0:1 ${address_image} ${bootfile}
 +
xyz_load_initrd=fatload mmc 0:1 ${address_initrd} ${bootinitrd}
 +
xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; echo Booting from mmc ...
 +
</pre>
 +
 
  
 
Your command options may vary, depending on your specific configuration, but the uImage and uInitrd files must be used for this method to work.
 
Your command options may vary, depending on your specific configuration, but the uImage and uInitrd files must be used for this method to work.
Line 90: Line 119:
 
This file can be converted to the autoboot script (boot.scr) using the following command:
 
This file can be converted to the autoboot script (boot.scr) using the following command:
  
<code>
+
<pre>
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "PandaBoard boot script" -d boot.cmd boot.scr
+
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "PandaBoard boot script" -d uEnv.txt boot.scr
</code>
+
</pre>
  
The name of the uBoot directory, the device partition used, the name of the installed kernel version list, and the image file names used are all configurable through the /etc/sysconfig/uboot file.  The defaults are provided:
+
 
 +
The name of the U-Boot directory, the device partition used, the name of the installed kernel version list, and the image file names used are all configurable through the <code>/etc/sysconfig/uboot</code> file.  The defaults are provided, here is the config for Pandaboard:
  
 
<pre>
 
<pre>
 
   UBOOT_DIR=/boot/uboot
 
   UBOOT_DIR=/boot/uboot
   UBOOT_DEVICE=mmcblk0p1
+
   UBOOT_IMGADDR=0x80008000
 
   UBOOT_KLIST=klist.txt
 
   UBOOT_KLIST=klist.txt
 +
  UBOOT_DEVICE=mmcblk0p1
 
   UBOOT_UIMAGE=uImage
 
   UBOOT_UIMAGE=uImage
   UBOOT_UINITRD=uInitrd
+
   UBOOT_UINITRD=uInitrd-omap
 
</pre>
 
</pre>
  
{{admon/warning|Important Note|Please make any changes to this configuration _before_ performing any kernel installation or removal.  Changing these after a kernel has been installed may cause future attempts to install or remove kernels to fail.  The most likely values to change are UBOOT_DIR and/or UBOOT_DEVICE, since these are based on how your flash device is partitioned and mounted.}}
+
{{admon/warning|Important Note|Please make any changes to this configuration '''before''' performing any kernel installation or removal.  Changing these after a kernel has been installed may cause future attempts to install or remove kernels to fail.  The most likely values to change are <code>UBOOT_DIR</code> and/or <code>UBOOT_DEVICE</code>, since these are based on how your flash device is partitioned and mounted.}}
 
+
 
+
== Installing the Kernel ==
+
  
 
=== Set Up the Repository ===
 
=== Set Up the Repository ===
* get the arm-omap yum repo definition:
+
* get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
<code>
+
<pre>
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/arm-omap-13-1.noarch.rpm
+
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-13-1.noarch.rpm
</code>
+
</pre>
 
* update grubby to get the modified version:
 
* update grubby to get the modified version:
<code>
+
<pre>
sudo yum --enablerepo=arm-omap update grubby
+
sudo yum --enablerepo=xpfa update grubby
</code>
+
</pre>
* make any required changes to the uBoot configuration (optional)
+
* make any changes to the U-Boot configuration (if needed):
<code>
+
<pre>
 
sudo vi /etc/sysconfig/uboot
 
sudo vi /etc/sysconfig/uboot
</code>
+
</pre>
  
 
=== Install the Kernel ===
 
=== Install the Kernel ===
 
* install the latest ARM OMAP kernel version:
 
* install the latest ARM OMAP kernel version:
<code>
+
<pre>
sudo yum --enablerepo=arm-omap install kernel-omap
+
sudo yum --enablerepo=xpfa update linux-firmware
</code>
+
sudo yum --enablerepo=xpfa install kernel-omap
 +
</pre>
 +
 
 +
{{admon/note|Please be patient.|The kernel installation may require several minutes (installing the kernel images, modules, creating the initramfs, and creating the U-Boot image files), and there is little feedback during the process.}}
 +
 
 +
 
 +
If all goes well, the latest kernel-omap version should installed, the U-Boot images copied to the default U-Boot image files, and the latest kernel-omap version appended to the installed kernel version list file (klist.txt).  On the next reboot, the new kernel version should be booted automatically.
 +
 
 +
=== Set Up the F15 Repository ===
 +
* get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
 +
<pre>
 +
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-15-1.noarch.rpm
 +
</pre>
 +
* update grubby to get the modified version:
 +
<pre>
 +
sudo yum --enablerepo=xpfa update grubby
 +
</pre>
 +
* make any changes to the U-Boot configuration (if needed):
 +
<pre>
 +
sudo vi /etc/sysconfig/uboot
 +
</pre>
 +
 
 +
=== Install the F15 Kernel ===
 +
* Install the latest kernel version:
 +
{{admon/note|Note:|Be sure to install the correct kernel variant for your system.}}
 +
<pre>
 +
    sudo yum --enablerepo=xpfa install kernel-omap # for Panda
 +
    sudo yum --enablerepo=xpfa install kernel-tegra # for Trim Slice
 +
</pre>
 +
 
 +
=== Issues ===
 +
 
 +
We are currently carrying three patches that will probably not go upstream:
 +
* arm-readl.patch - workaround for issue with gcc-4.6.x
 +
** http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45819
 +
** http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45704
 +
** patch from http://www.delorie.com/tmp/arm-readl.patch
 +
 
 +
  Update: arm-readl.patch is not necessary if using gcc-4.6.1-9.fc15.0.arm4.armv7hl
 +
 
 +
* arm-2.6.40.3-dma.patch - workaround for DMA coherency issue on ARM SMP systems
 +
** patch from http://myplugbox.com/bunghole/linux-tegra/armdma.patch
 +
 
 +
* TEGRA-2.6.40.2-USB-SATA-hack.patch - workaround for disconnection of USB-SATA on TrimSlice
 +
** patch from Compulab: http://gitorious.org/trimslice-kernel/trimslice-kernel/commit/437e615d22291f1822808715e4e016ef5cf043bd
 +
** This merely prevents USB disconnect.  Replace or remove as soon as practical.
 +
 
 +
== To Do ==
  
If all goes well, the latest kernel-omap version should installed, the uBoot images copied to the default uBoot image files, and the latest kernel-omap version appended to the installed kernel version list file (klist.txt)On the next reboot, the new kernel version should be booted automatically.
+
* The current kernel config files have been split up like other Fedora architures (generic, arch-generic, board).  Currently this kernel uses config-generic, config-arm-generic, and config-omap-generic or config-tegra to produce the merged kernel configThese need to be further refined to ensure the correct division between arm-generic and the board specific config settings.
 +
* The ARM config options should be reviewed to make sure they are appropriate for the current kernel and Fedora versions.
 +
* Support for other ARM variants and boards could be added (other kernel variants).

Revision as of 16:58, 21 August 2012

Contents

Building and Installing a Fedora Kernel Package on ARM Systems

This was originally written for Fedora 13. If you are already familiar with the concepts discussed and are only interesting in Fedora 15, you can skip to Set Up the F15 Repository.

This page is largely obsolete, as the Fedora ARM kernels are now being built in ARM Koji, and can be updated via yum. The grubby changes have also been pushed upstream and are available in F17 and newer. For F15, please use the patched version of grubby from the xpfa repository, as mentioned above.

Goal

To be able to build and install a Fedora kernel package on ARM systems in a similar manner to installing on an x86 PC.

Since ARM-based hardware varies greatly, I decided to start with a single architecture and focus on the board(s) for which I had access. It is my hope that this can be expanded to support other ARM variants and boards over time. The specific ARM systems initially targeted were the Beagle-xM and Panda boards. These are TI OMAP3 and OMAP4, respectively. Only armv7l builds were supported.

Support has now been added to the kernel sources for the CompuLab Trim Slice (NVIDIA Tegra 2), and it may be built for armv5tel, armv7l, and armv7hl. This is available in the Fedora kernel as of version kernel-2.6.40.3-0.fc15.

Kernel Version

Although F13 Beta is the base version of Fedora currently running on the boards, a more recent stable kernel from F15 was selected for the kernel baseline. The plan is to track the F15 kernel versions, keeping up with the most recent builds until F16 is released.

This newer kernel version has a dependency on a newer (F15 based) version of linux-firmware, so it was also built and installed for F13.

Building the Kernel Package

The kernel.spec file and Makefile.config were modified to add ARM OMAP and Tegra specific support, and applicable kernel config files were added. The kernel packages were then built for F13 on a Panda board using the following command:

rpmbuild -ba --target=armv7l SPECS/kernel.spec

The source and binary packages are available via yum:

http://dmarlin.fedorapeople.org/yum/f13/

Details on setting up and using the repository are covered below.

The Fedora ARM kernel source tree is also available in git:

git clone ssh://git.fedorahosted.org/git/arm.git
git branch kernel origin/kernel

These sources are also available in the upstream Fedora kernel.

If you are setup to use the Fedora ARM Koji Build System, a scratch build can be performed using:

fedpkg --dist=f13 srpm
arm-koji build dist-f13 --arch-override=armv7l --scratch kernel-<KERNEL_VERSION>.fc13.src.rpm

Installing the Fedora ARM Kernel

Both of the boards selected for testing use the U-Boot bootloader, so support was added to the grubby package to automate the creation of appropriate U-Boot images for the kernel being installed. Automatic boot of the installed kernel is accomplished through configuring the U-Boot autoboot script to use those U-Boot image files.

Issues

  • U-Boot does not support a "boot menu", like lilo or grub
  • U-Boot partitions are vfat, which means no hard links
  • U-Boot does not support symlinks

Assumptions

  • U-Boot will use an autoboot script (boot.scr uEnv.txt)
  • The kernel will boot using an initrd
  • The U-Boot partition (vfat) will be mounted on /boot/uboot
  • the default boot images will use standard named files (i.e. uImage, uInitrd)

Approach

To automate the kernel installation for U-Boot, the grubby package was modified as follows:

  • require uboot-tools
  • add sections to handle U-Boot images in both update and remove
  • run mkimage in the RPM posttrans script if U-Boot is configured
  • copy the new images to uImage and uInitrd (making it the default)
  • remove the corresponding version of U-Boot images when a kernel is removed

Multiple kernel version images may be installed, and kernel versions may be switched by simply copying the desired image versions to uImage and uInitrd and rebooting. The only negative is some wasted space in the U-Boot partition, since two copies of the default kernel and initrd are stored.

No U-Boot specific changes were made to the kernel package, so it can be installed elsewhere without using the modified grubby, although in that case the U-Boot files would not be automatically updated.

A simple text file was added that keeps a log of the installed kernel versions (assuming they were installed via yum or rpm). When a new kernel is installed its version is appended to the list. When a kernel is removed its version entry is removed from the list. The last entry in the list is always assumed to be the default. If the default kernel is removed, the "new default" version of the U-Boot image files (the new "last" version in the list) are copied to uImage and uInitrd.

Minimal error checking is performed by the install and remove code.

Note.png
Information:
The U-Boot directory may not always be mounted, since it is not required once Linux is booted. If the U-Boot partition is not already mounted, grubby will attempt to mount it and proceed. If grubby performs the mount, the partition will be unmounted when the process is complete (left in the same state as before the transaction).


This is an example of how the U-Boot directory should look after installing a kernel:

 -rwxr-xr-x. 1 root root      506 Jun 18 16:51 armhfp-panda-xfce-mmcblk0-mmc-uEnv.txt
 -rwxr-xr-x. 1 root root      506 Jun 18 16:51 armhfp-panda-xfce-mmcblk0-usb-uEnv.txt
 -rwxr-xr-x. 1 root root       71 Jun 18 16:51 boot.scr
 -rwxr-xr-x. 1 root root       26 Jun 18 16:58 klist.txt
 -rwxr-xr-x. 1 root root    34152 Apr 24 13:53 MLO
 -rwxr-xr-x. 1 root root      260 Jun 18 16:51 README.txt
 -rwxr-xr-x. 1 root root   238068 Apr 24 13:53 u-boot.img
 -rwxr-xr-x. 1 root root      506 Jun 18 16:51 uEnv.txt
 -rwxr-xr-x. 1 root root  3974848 Jun 18 16:57 uImage-3.4.2-3.fc17.armv7hl.omap
 -rwxr-xr-x. 1 root root  3974848 Jun 18 16:57 uImage-omap
 -rwxr-xr-x. 1 root root 11742382 Jun 18 16:58 uInitrd-3.4.2-3.fc17.armv7hl.omap
 -rwxr-xr-x. 1 root root 11742382 Jun 18 16:58 uInitrd-omap


This is an example of the autoboot command file (boot.cmd) for the Pandaboard:

 bootfile=uImage-omap
 bootinitrd=uInitrd-omap
 boot=bootm
 address_image=0x80300000
 address_initrd=0x81600000
 mmcroot=LABEL=rootfs ro
 mmcargs=setenv bootargs root=${mmcroot} init=/sbin/init quiet rootwait rhgb earlyprintk
 loaduimage=run xyz_mmcboot; run mmcargs; ${boot} ${address_image} ${address_initrd}
 xyz_load_image=fatload mmc 0:1 ${address_image} ${bootfile}
 xyz_load_initrd=fatload mmc 0:1 ${address_initrd} ${bootinitrd}
 xyz_mmcboot=run xyz_load_image; run xyz_load_initrd; echo Booting from mmc ...


Your command options may vary, depending on your specific configuration, but the uImage and uInitrd files must be used for this method to work.

This file can be converted to the autoboot script (boot.scr) using the following command:

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "PandaBoard boot script" -d uEnv.txt boot.scr


The name of the U-Boot directory, the device partition used, the name of the installed kernel version list, and the image file names used are all configurable through the /etc/sysconfig/uboot file. The defaults are provided, here is the config for Pandaboard:

  UBOOT_DIR=/boot/uboot
  UBOOT_IMGADDR=0x80008000
  UBOOT_KLIST=klist.txt
  UBOOT_DEVICE=mmcblk0p1
  UBOOT_UIMAGE=uImage
  UBOOT_UINITRD=uInitrd-omap
Warning (medium size).png
Important Note
Please make any changes to this configuration before performing any kernel installation or removal. Changing these after a kernel has been installed may cause future attempts to install or remove kernels to fail. The most likely values to change are UBOOT_DIR and/or UBOOT_DEVICE, since these are based on how your flash device is partitioned and mounted.

Set Up the Repository

  • get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-13-1.noarch.rpm
  • update grubby to get the modified version:
sudo yum --enablerepo=xpfa update grubby
  • make any changes to the U-Boot configuration (if needed):
sudo vi /etc/sysconfig/uboot

Install the Kernel

  • install the latest ARM OMAP kernel version:
sudo yum --enablerepo=xpfa update linux-firmware
sudo yum --enablerepo=xpfa install kernel-omap
Note.png
Please be patient.
The kernel installation may require several minutes (installing the kernel images, modules, creating the initramfs, and creating the U-Boot image files), and there is little feedback during the process.


If all goes well, the latest kernel-omap version should installed, the U-Boot images copied to the default U-Boot image files, and the latest kernel-omap version appended to the installed kernel version list file (klist.txt). On the next reboot, the new kernel version should be booted automatically.

Set Up the F15 Repository

  • get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-15-1.noarch.rpm
  • update grubby to get the modified version:
sudo yum --enablerepo=xpfa update grubby
  • make any changes to the U-Boot configuration (if needed):
sudo vi /etc/sysconfig/uboot

Install the F15 Kernel

  • Install the latest kernel version:
Note.png
Note:
Be sure to install the correct kernel variant for your system.
     sudo yum --enablerepo=xpfa install kernel-omap		# for Panda
     sudo yum --enablerepo=xpfa install kernel-tegra		# for Trim Slice

Issues

We are currently carrying three patches that will probably not go upstream:

  Update: arm-readl.patch is not necessary if using gcc-4.6.1-9.fc15.0.arm4.armv7hl

To Do

  • The current kernel config files have been split up like other Fedora architures (generic, arch-generic, board). Currently this kernel uses config-generic, config-arm-generic, and config-omap-generic or config-tegra to produce the merged kernel config. These need to be further refined to ensure the correct division between arm-generic and the board specific config settings.
  • The ARM config options should be reviewed to make sure they are appropriate for the current kernel and Fedora versions.
  • Support for other ARM variants and boards could be added (other kernel variants).