Arm Linux Kernel Shim

From Buici

Jump to: navigation, search

There are some systems where is it infeasible or undesirable to replace the boot loader. Consumer products may not have the JTAG chain control pins available, or it may just not be sensible to expect that end-users will want to solder up a JTAG header, a serial console, and acquire all of the pieces necessary to safely reprogram flash.

The ARM Linux kernel requires that data are passed to the kernel at boot time. Many vendors have patched the kernel, circumventing the standard argument passing protocol, but this is discouraged because those patches will never be merged into the kernel and, therefore, those systems cannot be upgraded simply by replacing the kernel.

There are two sorts of acceptable solutions. Inveigle a second-stage boot loader in the boot process, or prepend a shim to the kernel. The first method could easily be used to initialize system hardware that is not supported by the vendor, or has been modified by the end user. The second method, documented here, is a shim that is prepended to a kernel to setup the proper boot parameters.

Getting the Arm Linux Kernel Shim

The latest code can be downloaded from [this ftp site].

It will require some modification for a given target. The Makefile defines the CROSS_COMPILE macro that is prepended to the compile, link and objdump programs. Set this appropriately for your development system.

The config.h should be modified with appropriate values for the RAM physical start address, length, the physical address for ATAG list, the machine type, and the kernel command line. If you don't know what these are, you probably shouldn't be working with the shim.

Personal tools