ECE597 boot.scr

From eLinux.org
Revision as of 09:52, 15 April 2010 by Simonea (Talk | contribs) (Created page with ''''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.…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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:

 #define CONFIG_BOOTCOMMAND \
        "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]

  1. http://blog.harrylau.com/2009/08/generate-uboot-uimage.html