ECE597 boot.scr

Revision as of 11:01, 19 April 2010 by Simonea (talk | contribs) (moved ECE 597 boot.scr to ECE597 boot.scr: Generalize formatting)
Jump to: navigation, search

boot.scr is a user-defined image file that is read before loading uImage, allowing the user to supercede the loading of uImage, preventing the user from recompiling uImage.

The boot sequence can be found in the omap configuration file:

        "if mmcinit; then " \
                "if run loadbootscript; then " \
                        "run bootscript; " \
                "else " \
                        "if run loaduimage; then " \
                                "if run loadramdisk; then " \
                                        "run ramboot; " \
                                "else " \
                                        "run mmcboot; " \
                                "fi; " \
                        "else run nandboot; " \
                        "fi; " \
                "fi; " \
        "else run nandboot; fi"

While bootscript is defined several lines above, as an extra environment setting:

"bootscript=echo Running bootscript from mmc ...; " \
                "autoscr ${loadaddr}\0" \

The boot.scr file can be created using mkimage:

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage.bin' -d normal.cmd boot.scr

The previous command would create a file "boot.scr", for Linux on Arm, a script type, with the image name "Execute uImage.bin", with no compression a load address and entry point of 0x0 and image data file "normal.cmd"[1]