Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.
Kevin Mihelich edited this page May 27, 2014 · 9 revisions

Arch Linux ARM U-Boot for ARMv5 Marvell Kirkwood Platforms

This repository contains the modifications and additions for the distributed version of U-Boot for Marvell Kirkwood platforms supported by Arch Linux ARM.

The head of this git repository is the current release branch, tagged per release. Branches exist for the work in progress for individual systems prior to merging into the release branch. The PKGBUILDs branch contains packages to build the current individual WIP branches, while the uboot-kirkwood package contains the release version available for installation.

The primary changes include:

  • Unified environment between all platforms
  • ext4 filesystem and generic loading support
  • Support for both zImage+dtb and uImage booting
  • Boot script support via a /boot/uEnv.txt
Supported Systems ALARM Package
Pogoplug E02 uboot-pogo_e02
Seagate DockStar uboot-dockstar
Seagate GoFlex Home uboot-goflexhome
Seagate GoFlex Net uboot-goflexnet

Installation

The packages listed above for each system can be installed on a running Arch Linux ARM installation via pacman. The installation will prompt to flash to NAND or not. If accepted, the MAC address for the system will be retrieved from the current U-Boot environment, the NAND space for U-Boot and the environment (0x0-0x80000, 0xc0000-0xe0000) will be erased, the new U-Boot image and corresponding environment flashed, and the original MAC address set via fw_setenv.

Unified Environment

Having identical environments between all systems makes debugging, troubleshooting, and expansion universally applicable and portable. The style of environment used mirrors what is being standardized across ARMv7 U-Boot environments already distributed for Arch Linux ARM. This will also ease transitions for users between other supported platforms.

Additional Support

Included in all U-Boot builds is support for the ext4 filesystem, generic loading, booting zImage+dtb's, and raw initrd's. Generic loading implements the load and ls commands which replace usage of filesystem-specific commands. Using load will automatically determine the filesystem type on the target disk and load the requested file if the filesystem is one of those supported by U-Boot (FAT, ext2/3/4).

The default bootcmd logic will attempt to load a uImage or zImage+dtb kernel, allowing for seamless switching between legacy kernels and new FDT kernels. The dtb file is set in the default environment for each platform, and bootcmd will attempt to load a zImage and the corresponding platform dtb file first. If that fails, it will attempt to load a uImage.

uEnv.txt

This is a plain text file located in the /boot folder of the root filesystem, which contains U-Boot variable assignments. Usage of this file is preferred to editing the environment via serial or fw_setenv.

uEnv.txt is loaded and parsed prior to loading and booting the kernel. The uenvcmd variable can be declared, which will be run before loading and booting the kernel. Re-declaring variables in uEnv.txt will replace variables in the default environment.

The variable optargs can be set to add any extra settings to the bootargs.

Example uEnv.txt:

uenvcmd=run mycommand; run anothercommand
optargs=console=ttyS1,115200

Useful environment variables that are set by the bootcmd when uenvcmd is run are type and disk. Depending on the system, type will be one of usb or ide. Depending on the number of ports of type type available, disk will be an integer typically between 0 and 3. These variables are particularly useful for running a load command on the same drive that uEnv.txt just got loaded from. For example, if uEnv.txt just got loaded from the first SATA drive, load ${type} ${disk} 0x1234 /some/file would transform to load ide 0 0x1234 /some/file.

Best-guess Booting

The default environment for each platform includes a best-guess root filesystem booting routine. This ensures that if a SATA drive is used for storage and a USB drive for the root filesystem, that the arguments to the kernel specifying the root partition are correctly set to the right partition.