diff options
author | Jarielle Catbagan <jcatbagan93@gmail.com> | 2015-07-03 10:54:55 -0700 |
---|---|---|
committer | Ed Sutter <edsutterjr@gmail.com> | 2015-07-04 21:12:19 -0400 |
commit | f34423048968ced91c03f7b0a22389c6ec4d12bb (patch) | |
tree | 336e4b249b7fbc1e7c0f98c4c2cc18b7467a7d54 | |
parent | BBB: xcmddcl.h/xcmdtbl.h: Remove irrelevant commands (diff) | |
download | umon-f34423048968ced91c03f7b0a22389c6ec4d12bb.tar.bz2 |
BBB: Build an MLO file when booting from non-XIP devices (e.g. SD)
An MLO file will be created from the concatenation of a corresponding GP header
and the uMon image. A GP header must be prepended to the uMon image when
booting from non-XIP devices. Refer to the AM335x TRM, Section 26.1.9 for more
information.
These type of images have been tested when booting the MLO file from an SD card
with a FAT32 primary partition marked as Active.
-rw-r--r-- | ports/beagleboneblack/Makefile | 7 | ||||
-rw-r--r-- | ports/beagleboneblack/gp_header.S | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/ports/beagleboneblack/Makefile b/ports/beagleboneblack/Makefile index 0525dec..db285bd 100644 --- a/ports/beagleboneblack/Makefile +++ b/ports/beagleboneblack/Makefile @@ -83,8 +83,15 @@ OBJS = $(LOCSOBJ) $(CPUSOBJ) $(LOCCOBJ) $(CPUCOBJ) $(COMCOBJ) \ # load a new version onto an already running system. # 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 + $(OBJCOPY) -O binary gp_header.o build_$(PLATFORM)/gp_header.bin + @cat build_$(PLATFORM)/gp_header.bin build_$(PLATFORM)/boot.bin > build_$(PLATFORM)/MLO @echo Boot version of uMon built under $(BUILDDIR) ... @ls $(BUILDDIR)/boot* + @echo Boot version of uMon attached with GP header build under $(BUILDDIR) ... + @ls $(BUILDDIR)/MLO # ramtst: # A shortcut to $(BUILDDIR)/ramtst.$(FILETYPE). This is a version of uMon diff --git a/ports/beagleboneblack/gp_header.S b/ports/beagleboneblack/gp_header.S new file mode 100644 index 0000000..3efceae --- /dev/null +++ b/ports/beagleboneblack/gp_header.S @@ -0,0 +1,7 @@ + .file "gp_header.S" + +/* This GP header is prepended to uMon images when booting from non-XIP devices (e.g. SD). + * Refer to the AM335x TRM, Section 26.1.9 for more information. + */ + .word BIN_SIZE + 8 + .word 0x402f0400 |