diff options
author | Kyungmin Park <kmpark@infradead.org> | 2008-01-17 16:43:25 +0900 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-14 22:08:13 +0100 |
commit | 751b9b5189f3274b03c809172631316d6b002c82 (patch) | |
tree | 026f1808f4919d37b2d3855615041fb9d4bbcbc6 /onenand_ipl/board/apollon/Makefile | |
parent | 21f6f9636f0e978397548751347425fbf8d42bb3 (diff) |
OneNAND Initial Program Loader (IPL) support
This patch enables the OneNAND boot within U-Boot.
Before this work, we used another OneNAND IPL called X-Loader based
on open source. With this work, we can build the oneboot.bin image
without other program.
The build sequence is simple.
First, it compiles the u-boot.bin
Second, it compiles OneNAND IPL
Finally, it becomes the oneboot.bin from OneNAND IPL and u-boot.bin
The mechanism is similar with NAND boot except it boots from itself.
Another thing is that you can only use the OneNAND IPL only to work
other bootloader such as RedBoot and so on.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'onenand_ipl/board/apollon/Makefile')
-rw-r--r-- | onenand_ipl/board/apollon/Makefile | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/onenand_ipl/board/apollon/Makefile b/onenand_ipl/board/apollon/Makefile new file mode 100644 index 00000000000..66a0959ee27 --- /dev/null +++ b/onenand_ipl/board/apollon/Makefile @@ -0,0 +1,65 @@ + +include $(TOPDIR)/config.mk +include $(TOPDIR)/include/config.mk +include $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/config.mk + +LDSCRIPT= $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/u-boot.onenand.lds +LDFLAGS = -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS) +AFLAGS += -DCONFIG_ONENAND_IPL +CFLAGS += -DCONFIG_ONENAND_IPL +OBJCLFAGS += --gap-fill=0x00 + +SOBJS = start.o low_levelinit.o # _memcpy32.o +COBJS = apollon.o onenand_read.o onenand_boot.o + +SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +__OBJS := $(SOBJS) $(COBJS) +LNDIR := $(OBJTREE)/onenand_ipl/board/$(BOARDDIR) + +onenandobj := $(OBJTREE)/onenand_ipl/ + +ALL = $(onenandobj)onenand-ipl $(onenandobj)onenand-ipl.bin $(onenandobj)onenand-ipl-2k.bin + +all: $(obj).depend $(ALL) + +$(onenandobj)onenand-ipl-2k.bin: $(onenandobj)onenand-ipl + $(OBJCOPY) ${OBJCFLAGS} --pad-to=0x800 -O binary $< $@ + +$(onenandobj)onenand-ipl.bin: $(onenandobj)onenand-ipl + $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ + +$(onenandobj)onenand-ipl: $(OBJS) + cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \ + -Map $(onenandobj)onenand-ipl.map \ + -o $(onenandobj)onenand-ipl + +# create symbolic links from common files + +# from cpu directory +$(obj)start.S: + rm -f $(obj)start.S + ln -s $(SRCTREE)/cpu/$(CPU)/start.S $(obj)start.S + +# from onenand_ipl directory +$(obj)onenand_ipl.h: + rm -f $(obj)onenand_ipl.h + ln -s $(SRCTREE)/onenand_ipl/onenand_ipl.h $(obj)onenand_ipl.h + +$(obj)onenand_boot.c: $(obj)onenand_ipl.h + rm -f $(obj)onenand_boot.c + ln -s $(SRCTREE)/onenand_ipl/onenand_boot.c $(obj)onenand_boot.c + +$(obj)onenand_read.c: $(obj)onenand_ipl.h + rm -f $(obj)onenand_read.c + ln -s $(SRCTREE)/onenand_ipl/onenand_read.c $(obj)onenand_read.c + +$(obj)%.o: $(obj)%.S + $(CC) $(AFLAGS) -c -o $@ $< + +$(obj)%.o: $(obj)$.c + $(CC) $(CFLAGS) -c -o $@ $< + +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend |