From f905432c04c54ef169b4ffe6dd310ddf72a67c86 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 22 Jul 2010 16:51:52 +0200 Subject: PXA: Voipac270 improvements 128MB NOR module support. Define __io to get harddrive working. Fix saving of environment into OneNAND. Boot from harddrive when possible. Add missing MAINTAINERS entry. Signed-off-by: Marek Vasut --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 30a564d3cbd..d18a973a244 100644 --- a/Makefile +++ b/Makefile @@ -1018,13 +1018,18 @@ trizepsiv_config : unconfig fi; @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv -vpac270_nor_config \ +vpac270_nor_256M_config \ +vpac270_nor_128M_config \ vpac270_onenand_config : unconfig @mkdir -p $(obj)include @if [ "$(findstring onenand,$@)" ] ; then \ echo "#define CONFIG_ONENAND_U_BOOT" \ >>$(obj)include/config.h ; \ fi; + @if [ "$(findstring 256M,$@)" ] ; then \ + echo "#define CONFIG_256M_U_BOOT" \ + >>$(obj)include/config.h ; \ + fi; @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270 ######################################################################### -- cgit v1.3.1 From 451a0c39ae8553cb7f1ae3385211c0c17d391465 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 16 Oct 2010 21:32:11 +0200 Subject: PXA: Fix vpac270 OneNAND booter NOTE: The modification in Makefile will be superseded by a pending patch! Signed-off-by: Marek Vasut --- Makefile | 2 ++ include/configs/vpac270.h | 3 ++- onenand_ipl/board/vpac270/Makefile | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d18a973a244..25e8fc83e09 100644 --- a/Makefile +++ b/Makefile @@ -1025,6 +1025,8 @@ vpac270_onenand_config : unconfig @if [ "$(findstring onenand,$@)" ] ; then \ echo "#define CONFIG_ONENAND_U_BOOT" \ >>$(obj)include/config.h ; \ + echo "#define CONFIG_256M_U_BOOT" \ + >>$(obj)include/config.h ; \ fi; @if [ "$(findstring 256M,$@)" ] ; then \ echo "#define CONFIG_256M_U_BOOT" \ diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index 1923a177a11..fc680fcd83c 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -180,7 +180,8 @@ #define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ -#define CONFIG_SYS_LOAD_ADDR (0x5c000000) +#define CONFIG_SYS_LOAD_ADDR PHYS_SDRAM_1 +#define CONFIG_SYS_IPL_LOAD_ADDR (0x5c000000) #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 #define CONFIG_SYS_INIT_SP_ADDR \ (PHYS_SDRAM_1 + CONFIG_SYS_GBL_DATA_SIZE + 2048) diff --git a/onenand_ipl/board/vpac270/Makefile b/onenand_ipl/board/vpac270/Makefile index ac7a8f05e6c..a86bc00864c 100644 --- a/onenand_ipl/board/vpac270/Makefile +++ b/onenand_ipl/board/vpac270/Makefile @@ -1,5 +1,6 @@ -IPL =onenand_ipl + include $(TOPDIR)/config.mk +include $(TOPDIR)/board/$(BOARDDIR)/config.mk LDSCRIPT= $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/u-boot.onenand.lds LDFLAGS = -Bstatic -T $(onenandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS) @@ -25,7 +26,7 @@ ALL = $(onenandobj)onenand-ipl $(onenandobj)onenand-ipl.bin $(onenandobj)onenand all: $(obj).depend $(ALL) $(onenandobj)onenand-ipl-2k.bin: $(onenandobj)onenand-ipl - $(OBJCOPY) ${OBJCFLAGS} --pad-to=0x5c040400 -O binary $< $@ + $(OBJCOPY) ${OBJCFLAGS} --pad-to=0x0800 -O binary $< $@ $(onenandobj)onenand-ipl.bin: $(onenandobj)onenand-ipl $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ -- cgit v1.3.1 From f97e9c65b3906cd656c14ed0fd35eae0c1649857 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 3 Oct 2010 18:27:36 +0200 Subject: Build: PXA: Fix Vpac270 build variants Signed-off-by: Marek Vasut --- MAKEALL | 3 --- Makefile | 16 ---------------- board/vpac270/vpac270.c | 2 +- boards.cfg | 3 +++ include/configs/vpac270.h | 12 ++++++------ 5 files changed, 10 insertions(+), 26 deletions(-) (limited to 'Makefile') diff --git a/MAKEALL b/MAKEALL index 01eb1536cfb..5eb857082c7 100755 --- a/MAKEALL +++ b/MAKEALL @@ -471,9 +471,6 @@ LIST_at91=" \ LIST_pxa="$(boards_by_cpu pxa) polaris \ trizepsiv \ - vpac270_nor_128M\ - vpac270_nor_256M\ - vpac270_onenand \ " LIST_ixp="$(boards_by_cpu ixp) diff --git a/Makefile b/Makefile index 25e8fc83e09..8078d71d93a 100644 --- a/Makefile +++ b/Makefile @@ -1018,22 +1018,6 @@ trizepsiv_config : unconfig fi; @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv -vpac270_nor_256M_config \ -vpac270_nor_128M_config \ -vpac270_onenand_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring onenand,$@)" ] ; then \ - echo "#define CONFIG_ONENAND_U_BOOT" \ - >>$(obj)include/config.h ; \ - echo "#define CONFIG_256M_U_BOOT" \ - >>$(obj)include/config.h ; \ - fi; - @if [ "$(findstring 256M,$@)" ] ; then \ - echo "#define CONFIG_256M_U_BOOT" \ - >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270 - ######################################################################### ## ARM1136 Systems ######################################################################### diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c index 91d85800bbf..43bbdff70e2 100644 --- a/board/vpac270/vpac270.c +++ b/board/vpac270/vpac270.c @@ -66,7 +66,7 @@ void dram_init_banksize(void) gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M gd->bd->bi_dram[1].start = PHYS_SDRAM_2; gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE; #endif diff --git a/boards.cfg b/boards.cfg index 4dba72e9f90..9717ed32b70 100644 --- a/boards.cfg +++ b/boards.cfg @@ -63,6 +63,9 @@ lubbock arm pxa palmld arm pxa palmtc arm pxa pleb2 arm pxa +vpac270_nor_128 arm pxa vpac270 - - vpac270:NOR,RAM_128M +vpac270_nor_256 arm pxa vpac270 - - vpac270:NOR,RAM_256M +vpac270_ond_256 arm pxa vpac270 - - vpac270:ONENAND,RAM_256M xaeniax arm pxa xm250 arm pxa zipitz2 arm pxa diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index fc680fcd83c..c9d9c69cda8 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -75,7 +75,7 @@ #undef CONFIG_LCD #define CONFIG_CMD_IDE -#ifdef CONFIG_ONENAND_U_BOOT +#ifdef CONFIG_ONENAND #undef CONFIG_CMD_FLASH #define CONFIG_CMD_ONENAND #else @@ -165,13 +165,13 @@ #define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */ #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M #define PHYS_SDRAM_2 0x80000000 /* SDRAM Bank #2 */ #define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB */ #endif #define CONFIG_SYS_DRAM_BASE 0xa0000000 /* CS0 */ -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M #define CONFIG_SYS_DRAM_SIZE 0x10000000 /* 256 MB DRAM */ #else #define CONFIG_SYS_DRAM_SIZE 0x08000000 /* 128 MB DRAM */ @@ -198,7 +198,7 @@ #if defined(CONFIG_CMD_FLASH) /* NOR */ #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */ -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M #define PHYS_FLASH_2 0x02000000 /* Flash Bank #2 */ #endif @@ -206,7 +206,7 @@ #define CONFIG_FLASH_CFI_DRIVER 1 #define CONFIG_SYS_MAX_FLASH_SECT (4 + 255) -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M #define CONFIG_SYS_MAX_FLASH_BANKS 2 #define CONFIG_SYS_FLASH_BANKS_LIST { PHYS_FLASH_1, PHYS_FLASH_2 } #else @@ -308,7 +308,7 @@ #define CONFIG_SYS_MSC0_VAL 0x3ffc95fa #define CONFIG_SYS_MSC1_VAL 0x02ccf974 #define CONFIG_SYS_MSC2_VAL 0x00000000 -#ifdef CONFIG_256M_U_BOOT +#ifdef CONFIG_RAM_256M #define CONFIG_SYS_MDCNFG_VAL 0x8ad30ad3 #else #define CONFIG_SYS_MDCNFG_VAL 0x88000ad3 -- cgit v1.3.1 From 7c957c0e7427e8bc1039e39850de1fead26b3c53 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 4 Oct 2010 00:21:51 +0200 Subject: Build: PXA: Fix TrizepsIV build variants Signed-off-by: Marek Vasut --- MAKEALL | 5 +---- Makefile | 8 -------- board/trizepsiv/conxs.c | 2 +- boards.cfg | 2 ++ 4 files changed, 4 insertions(+), 13 deletions(-) (limited to 'Makefile') diff --git a/MAKEALL b/MAKEALL index 5eb857082c7..51312dd5e3c 100755 --- a/MAKEALL +++ b/MAKEALL @@ -468,10 +468,7 @@ LIST_at91=" \ ## Xscale Systems ######################################################################### -LIST_pxa="$(boards_by_cpu pxa) - polaris \ - trizepsiv \ -" +LIST_pxa="$(boards_by_cpu pxa)" LIST_ixp="$(boards_by_cpu ixp) pdnb3 \ diff --git a/Makefile b/Makefile index 8078d71d93a..9dcd59ddb90 100644 --- a/Makefile +++ b/Makefile @@ -1010,14 +1010,6 @@ scpu_config: unconfig fi @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive -polaris_config \ -trizepsiv_config : unconfig - @mkdir -p $(obj)include - @if [ "$(findstring polaris,$@)" ] ; then \ - echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \ - fi; - @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv - ######################################################################### ## ARM1136 Systems ######################################################################### diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c index 7fac73d2395..0c67367a5fc 100644 --- a/board/trizepsiv/conxs.c +++ b/board/trizepsiv/conxs.c @@ -45,7 +45,7 @@ extern struct serial_device serial_ffuart_device; extern struct serial_device serial_btuart_device; extern struct serial_device serial_stuart_device; -#if CONFIG_POLARIS +#if CONFIG_MK_POLARIS #define BOOT_CONSOLE "serial_stuart" #else #define BOOT_CONSOLE "serial_ffuart" diff --git a/boards.cfg b/boards.cfg index 9717ed32b70..3960beff415 100644 --- a/boards.cfg +++ b/boards.cfg @@ -63,6 +63,8 @@ lubbock arm pxa palmld arm pxa palmtc arm pxa pleb2 arm pxa +polaris arm pxa trizepsiv - - trizepsiv:POLARIS +trizepsiv arm pxa vpac270_nor_128 arm pxa vpac270 - - vpac270:NOR,RAM_128M vpac270_nor_256 arm pxa vpac270 - - vpac270:NOR,RAM_256M vpac270_ond_256 arm pxa vpac270 - - vpac270:ONENAND,RAM_256M -- cgit v1.3.1 From f3a14d377e2fb4e48026810fbf67e189a5e5f515 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 13 Oct 2010 22:58:23 -0400 Subject: Makefile: allow boards to check file size limits Boards often have a reserved size limit on the flash where they're stored. Sometimes during upgrades or config changes, those limits are exceeded, but no one notices until they try to upgrade and the limit screws things up. Either not enough of U-Boot is written to flash (and so the reboot fails), or too much is written (and so things after it get clobbered). So allow boards to declare a size limit (in bytes) and have the build system check it while building. Signed-off-by: Mike Frysinger --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 30a564d3cbd..e9c069d3fae 100644 --- a/Makefile +++ b/Makefile @@ -304,6 +304,21 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) ######################################################################### ######################################################################### +ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) +BOARD_SIZE_CHECK = \ + @actual=`wc -c $@ | awk '{print $$1}'`; \ + limit=$(CONFIG_BOARD_SIZE_LIMIT); \ + if test $$actual -gt $$limit; then \ + echo "$@ exceeds file size limit:"; \ + echo " limit: $$limit bytes"; \ + echo " actual: $$actual bytes"; \ + echo " excess: $$((actual - limit)) bytes"; \ + exit 1; \ + fi +else +BOARD_SIZE_CHECK = +endif + # Always append ALL so that arch config.mk's can add custom ones ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) @@ -317,10 +332,12 @@ $(obj)u-boot.srec: $(obj)u-boot $(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ + $(BOARD_SIZE_CHECK) $(obj)u-boot.ldr: $(obj)u-boot $(CREATE_LDR_ENV) $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) + $(BOARD_SIZE_CHECK) $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary -- cgit v1.3.1 From 2ea88b063e1547ff013b00e74a4656603be5ed5f Mon Sep 17 00:00:00 2001 From: Eric Cooper Date: Tue, 19 Oct 2010 13:31:11 -0400 Subject: Makefile: rename TEXT_BASE to CONFIG_SYS_TEXT_BASE --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9dcd59ddb90..04ee143e449 100644 --- a/Makefile +++ b/Makefile @@ -341,7 +341,7 @@ $(obj)u-boot.imx: $(obj)u-boot.bin $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \ - -a $(CONFIG_SYS_TEXT_BASE) -e $(TEXT_BASE) -d $< $@ + -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin -- cgit v1.3.1