About
-----

arm-boot-config is an automatic boot.scr generator.  If you run it every time
you install or uninstall a kernel you will always have a current boot.scr
that allows you to boot all installed kernels with their associated dtbs.

Written by Brendan Conoboy <blc@redhat.com>.

Installation
------------

Install with 'make install' as root.  Once installed you can regenerate
your boot.scr at any time by running /sbin/a-b-c.  If you install
or uninstall a kernel with rpm then grubby will run a-b-c for you
automatically.


TI Boards
---------

ARM Boards from Texas Instruments often lack any flash storage on which
to store uboot environment, or even u-boot itself.  The uBoot provided by
Fedora uses a file called uEnv.txt rather than boot.scr as part of startup.
To make use of the boot.scr, it is necessary to create a uEnv.txt which
chain loads boot.scr.  A typical uEnv.txt that causes this chain loading
to occur might look like this:

---
bootcmd=ext4load mmc 0:3 0x2000000 /boot/boot.scr; source 0x2000000;
---


Making Enhancements
-------------------

You can add support for new boards by adding a script to detect your device
in /etc/a-b-c.d.  Boards detection routines are customarily placed at
sequence 20.  These scripts run in uboot using the "hush" shell which is
a limited sh-like environment featuring "if" and "for" statements.  A
primitive "test" is available with -z (is zero?), -n (is non-zero?) as
well as = and != string comparisons.  The $? return-status parameter is
set after each command.  To add a new board, find a uboot environment
fingerprint unique to your board, test for this fingerprint, then
set the appropriate u_env variables.  This minimally includes the load
address for the kernel, initramfs, and dtb, as well as the dtb filename.
A good console= setting is also very desirable.  Some uboot 'printenv'
outputs from other boards are included to check against to ensure the
fingerprint you create is sufficiently unique.


Sanity checks for developers
----------------------------

Note: Devices such as the trimslice are limited to 15 tokens max per
u-boot enivornment variable.  This requires chaining a lot of variables
together or diligent escaped quoting.  Wrap the content of the variable
with single quotes to overcome this limitation.

Do not edit catcat.  It will eat your brain.

The number one syntax error is in forgetting to escape ";" in a setenv
that itself runs setenv.  This often results in uboot trying to run the
command "fi" or "done" from the end of an "if" or "for" statement.


TODO:
-----

Consolidate long execution sequences currently stored in multiple variables
into a single variable with single quotes.

