OneNAND Initial Program Loader (IPL) support
PATCH 1/1 OneNAND Initial Program Loader (IPL) support
Hi,
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.
Any comments are welcome.
Thank you,
Kyungmin Park
---
Makefile +15 -1
@@ -251,13 +251,18 @@ NAND_SPL = nand_spl U_BOOT_NAND = $(obj)u-boot-nand.bin endif +ifeq ($(CONFIG_ONENAND_U_BOOT),y) +ONENAND_IPL = onenand_ipl +U_BOOT_ONENAND = $(obj)u-boot-onenand.bin +endif + __OBJS := $(subst $(obj),,$(OBJS)) __LIBS := $(subst $(obj),,$(LIBS)) ######################################################################### ######################################################################### -ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) +ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) all: $(ALL)
@@ -304,6 +309,12 @@ $(NAND_SPL): version $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin +$(ONENAND_IPL): version + $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all + +$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin + cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)oneboot.bin + version: @echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \ echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
@@ -2361,6 +2372,7 @@ omap2420h4_config : unconfig apollon_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm1136 apollon + @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk #======================================================================== # i386
@@ -2621,6 +2633,7 @@ clean: rm -f $(obj)board/bf537-stamp/u-boot.lds $(obj)board/bf561-ezkit/u-boot.lds rm -f $(obj)include/bmp_logo.h rm -f $(obj)nand_spl/u-boot-spl $(obj)nand_spl/u-boot-spl.map + rm -f $(obj)onenand_ipl/onenand-ipl $(obj)onenand_ipl/onenand-ipl.map clobber: clean find $(OBJTREE) -type f \( -name .depend \
@@ -2634,6 +2647,7 @@ clobber: clean rm -f $(obj)tools/inca-swap-bytes $(obj)cpu/mpc824x/bedbug_603e.c rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm [ ! -d $(OBJTREE)/nand_spl ] || find $(obj)nand_spl -lname "*" -print | xargs rm -f + [ ! -d $(OBJTREE)/onenand_ipl ] || find $(obj)onenand_ipl -lname "*" -print | xargs rm -f ifeq ($(OBJTREE),$(SRCTREE)) mrproper \
board/apollon/apollon.c +2 -1
@@ -440,7 +440,8 @@ void muxSetupTouchScreen(void)void muxSetupGPMC (void ) {/* gpmc_io_dir, MCR */ -writel (0x4800008C ,0x19000000 ); +volatile unsigned int *MCR = (unsigned int *)0x4800008C ; + *MCR =0x19000000 ;/* NOR FLASH CS0 */ /* signal - Gpmc_clk; pin - J4; offset - 0x0088; mode 0; Byte-3 */
cpu/arm1136/start.S +43 -0
107 lines not on this page · raw message
include/configs/apollon.h +1 -0
@@ -35,6 +35,7 @@#define CONFIG_OMAP2420 1/* which is in a 2420 */ #define CONFIG_OMAP2420_APOLLON 1#define CONFIG_APOLLON 1 +#define CONFIG_APOLLON_PLUS 1/* If you have apollon plus 1.x */ /* Clock config to target*/
onenand_ipl/board/apollon/Makefile new file +67 -0
67 lines not on this page · raw message
onenand_ipl/board/apollon/apollon.c new file +71 -0
71 lines not on this page · raw message
onenand_ipl/board/apollon/config.mk new file +14 -0
@@ -0,0 +1,14 @@ +# +# (C) Copyright 2005-2007 Samsung Elcronics +# Kyungmin Park <[email protected]> +# +# Samsung Apollon board with OMAP2420 (ARM1136) cpu +# +# Apollon has 1 bank of 128MB mDDR-SDRAM on CS0 +# Physical Address: +# 8000'0000 (bank0) +# 8800'0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +TEXT_BASE = 0x00000000
onenand_ipl/board/apollon/low_levelinit.S new file +205 -0
205 lines not on this page · raw message
onenand_ipl/board/apollon/u-boot.onenand.lds new file +53 -0
53 lines not on this page · raw message
onenand_ipl/onenand_boot.c new file +81 -0
81 lines not on this page · raw message
onenand_ipl/onenand_ipl.h new file +44 -0
44 lines not on this page · raw message
onenand_ipl/onenand_read.c new file +105 -0
105 lines not on this page · raw message