Specifications
14.2.17.4. General rules
If a command line (or an environment variable executed by a run command) contains several
commands separated by semicolons, and one of these commands fails, the remaining commands will
still be executed.
1.
If you execute several variables with one call to run (i. e. calling run with a list of variables as
arguments), any failing command will cause run to terminate, i. e. the remaining variables are not
executed.
2.
14.2.18. How can I load and uncompress a
compressed image
Question:
Can I use U-Boot to load and uncompress a compressed image from flash into RAM? And can I
choose whether I want to automatically run it at that time, or wait until later?
Answer:
Yes to both questions. First, you should generate your image as type "standalone" (using "mkimage
... -T standalone ..."). When you use the bootm command for such an image, U-Boot
will automatically uncompress the code while it is storing it at that image's load address in RAM
(given by the -a option to the mkimage command).
As to the second question, by default, unless you say differently, U-Boot will automatically start the
image by jumping to its entry point (given by the -e option to mkimage) after loading it. If you want
to prevent automatic execution, just set the environment variable "autostart" to "no"
("setenv autostart no") before running bootm.
14.2.19. How can I create an uImage from a ELF file
Question:
I would like to run a standard distribution kernel on my target, but I can find only ELF kernel images
or even RPM files. How can I use these?
Answer:
If you have just the kernel ELF file, this may be difficult, as you will usually also need a bunch of
kernel modules that the distribution of your choice probably bundles with this kernel file. Try to
locate and install these first.
If you have a kernel RPM, this usually includes both the kernel ELF file and the required modules.
Install these in the ELDK root file system so you can use this for example mounted over NFS. The
following example uses a Fedora kernel RPM on a 4xxFP target:
$ cd /tmp/
$ wget http://download.fedora.redhat.com/pub/fedora/linux/updates/11/ppc/kernel-2.6.30.9-90.fc11.ppc.rpm
After downloading the RPM we install it (manually using "rpm2cpio" and "cpio" in the root of
the ELDK file system, "/opt/eldk/ppc_4xxFP/" :
$ cd /opt/eldk/ppc_4xxFP/
$ rpm2cpio /tmp/kernel-2.6.30.9-90.fc11.ppc.rpm | sudo cpio -vidum
14.2.19. How can I create an uImage from a ELF file 171