160 likes | 296 Views
U-boot on OMAP Steve Sakoman July 28, 2010. OMAP Boot Overview. A multi stage process OMAP internal boot ROM X-load U-boot Linux kernel. OMAP internal boot ROM. Code runs from ROM Minimal pinmux, clock, peripheral setup Determines source of X-load from SYS_BOOT:
E N D
U-boot on OMAP Steve Sakoman July 28, 2010
OMAP Boot Overview • A multi stage process • OMAP internal boot ROM • X-load • U-boot • Linux kernel
OMAP internal boot ROM • Code runs from ROM • Minimal pinmux, clock, peripheral setup • Determines source of X-load from SYS_BOOT: • Peripheral boot from serial or USB • Unsigned binary • Memory boot from NAND or MMC • Signed binary • First block in NAND • MLO file from MMC
X-load • Code runs from static RAM • “Stripped down” U-boot • Does board dependent pinmux, DDR, peripheral, clock, and power setup • Loads u-boot.bin • MMC • NAND • Serial via kermit protocol
U-boot • Code runs from DDR • Does more extensive board dependent pinmux, peripheral, clock, and power setup • Loads Linux kernel based upon script stored in U-boot environment • NAND • MMC/eMMC • Network
U-boot environment • Convenience definitions for command line boot arguments • console=ttyS2,115200n8 • vram=16M • mmcroot=/dev/mmcblk0p2 rw • mmcrootfstype=ext3 rootwait • mmcargs=setenv bootargs console=${console} vram=${vram} root=${mmcroot} rootfstype=${mmcrootfstype}
U-boot environment • Boot script is also in environment • if mmc init; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run nandboot; fi; fi; else run nandboot; fi • Checks for presence of MMC card • Tests for and runs boot.scr script file if present • Otherwise loads and executes uImage file • Uimage = Linux kernel
Booting without X-load • Configuration Header (CH) • 512 + 8 byte prefix to U-boot binary • Hard coded register values • clocks, sdram, gpmc, mmc controllers • Load address • For more information see: • TRM • http://nishanthmenon.blogspot.com/2009/05/configuration-header-no-more-x-loader.html • http://omappedia.org/wiki/E-MMC_boot
U-boot source code • Multiple versions depending on platform features required • Mainline U-boot • TI Internal U-boot • Beagle specific • U-boot “upstreaming project” • Resolve the confusion
Mainline U-boot • Contains basic support for several OMAP3 boards • Beagle, EVM, Overo, Pandora, SDP3430, Zoom1 and Zoom2 • Recent addition of OMAP4 support • More on this later in Upstreaming project section • Git repo • http://git.denx.de/?p=u-boot.git;a=summary
TI Internal U-boot • Most complete support for OMAP3 and OMAP4 • 4430SDP • 3430SDP/LDP • 3630SDP • Zoom2 and Zoom3 • U-boot version 1.1.4 fork (about 4 years old) • Patches not pushed upstream • Git repo • http://dev.omapzoom.org/?p=bootloader/u-boot.git;a=summary
Beagle U-boot • Base support is upstream • Tracks mainline U-boot • Goal is to support all Beagle versions with a single U-boot binary • Latest changes in beagleboard.org repository • http://gitorious.org/beagleboard-validation/u-boot
U-boot “Upstreaming” project • Goal is to move features and functionality of TI internal U-boot upstream • Current status • Base support for OMAP3 and OMAP4 submitted • Shared drivers for i2c, mmc, musb • Support for TWL4030 and TWL6030 • Status updates: • http://omappedia.org/wiki/U-boot_Upstreaming_Project
U-boot “Upstreaming” project • Goal is to move features and functionality of TI internal U-boot upstream • Current status • Base support for OMAP3 and OMAP4 submitted • Shared drivers for i2c, mmc, musb • Support for TWL4030 and TWL6030 • Status updates: • http://omappedia.org/wiki/U-boot_Upstreaming_Project
U-boot “Upstreaming” project • Repo which tracks upstream submissions • http://www.sakoman.com/cgi-bin/gitweb.cgi?p=u-boot.git;a=shortlog;h=refs/heads/omap4-next-upstream • Repo which contains development patches • http://www.sakoman.com/cgi-bin/gitweb.cgi?p=u-boot.git;a=shortlog;h=refs/heads/omap4-exp