diff options
author | Jarielle Catbagan <jcatbagan93@gmail.com> | 2015-07-08 14:28:41 -0700 |
---|---|---|
committer | Ed Sutter <edsutterjr@gmail.com> | 2015-07-08 18:51:38 -0400 |
commit | 220ee4ba5fd9f6ffe66fd57a081fd4520cc4a9b4 (patch) | |
tree | 40e756700266e3a04fb23bc43fc1951a84f95f64 | |
parent | BBB: Build an MLO file when booting from non-XIP devices (e.g. SD) (diff) | |
download | umon-220ee4ba5fd9f6ffe66fd57a081fd4520cc4a9b4.tar.bz2 |
BBB: Build a uMon image with a Configuration header and a GP header prepended.
-rw-r--r-- | ports/beagleboneblack/Makefile | 9 | ||||
-rw-r--r-- | ports/beagleboneblack/config_header.S | 46 |
2 files changed, 54 insertions, 1 deletions
diff --git a/ports/beagleboneblack/Makefile b/ports/beagleboneblack/Makefile index db285bd..c66ee62 100644 --- a/ports/beagleboneblack/Makefile +++ b/ports/beagleboneblack/Makefile @@ -86,12 +86,19 @@ boot: $(BUILDDIR)/boot.$(FILETYPE) $(CC) $(ASMFLAGS) -D \ BIN_SIZE=$(shell wc --bytes build_$(PLATFORM)/boot.bin | cut -f 1 -d ' ') \ -o gp_header.o gp_header.S + ${CC} ${ASMFLAGS} -o config_header.o config_header.S $(OBJCOPY) -O binary gp_header.o build_$(PLATFORM)/gp_header.bin + ${OBJCOPY} -O binary config_header.o build_${PLATFORM}/config_header.bin @cat build_$(PLATFORM)/gp_header.bin build_$(PLATFORM)/boot.bin > build_$(PLATFORM)/MLO + @cat build_$(PLATFORM)/config_header.bin build_$(PLATFORM)/gp_header.bin \ + build_$(PLATFORM)/boot.bin > build_$(PLATFORM)/rawboot.bin @echo Boot version of uMon built under $(BUILDDIR) ... @ls $(BUILDDIR)/boot* - @echo Boot version of uMon attached with GP header build under $(BUILDDIR) ... + @echo Boot version of uMon prepended with a GP header built under $(BUILDDIR) ... @ls $(BUILDDIR)/MLO + @echo Boot version of uMon prepended with a Configuration header and a GP header built + @echo under $(BUILDDIR) ... + @ls $(BUILDDIR)/rawboot.bin # ramtst: # A shortcut to $(BUILDDIR)/ramtst.$(FILETYPE). This is a version of uMon diff --git a/ports/beagleboneblack/config_header.S b/ports/beagleboneblack/config_header.S new file mode 100644 index 0000000..dbf6ff0 --- /dev/null +++ b/ports/beagleboneblack/config_header.S @@ -0,0 +1,46 @@ + .file "config_header.S" + +/* This is the Configuration Header TOC Structure that must be prepended to a GP Header followed + * by the uMon image in order to boot from non-XIP devices such as an SD card using "raw" mode. + * Please refer to the AM335x TRM, Section 26.1.7.5.5.1 "Configuration Header" for more information. + */ + + /* Start */ + .word 0x000000a0 + /* Size */ + .word 0x00000050 + /* Reserved */ + .word 0x00000000 + .word 0x00000000 + .word 0x00000000 + /* Filename */ + .word 0x45534843 + .word 0x4e495454 + .word 0x00005347 + /* Closing Item */ + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + .word 0xffffffff + + /* Gap between Configuration Header TOC Structure and Configuration Header Settings */ + .rept 24 + .word 0x00000000 + .endr + + /* Section Key */ + .word 0xc0c0c0c1 + /* Valid */ + .byte 0x00 + /* Version */ + .byte 0x01 + /* Reserved */ + .rept 86 + .word 0x00000000 + .endr + .byte 0x00 + .byte 0x00 |