common/env_common: Add CONFIG_SILENT_CONSOLE_AT_BOOT env option
PATCH 1/4 common/env_common: Add CONFIG_SILENT_CONSOLE_AT_BOOT env option
Just setting CONFIG_SILENT_CONSOLE does not make the CONSOLE silent without the silent env variable set. This adds a new define to add this to the default environment easily
--- README | 4 ++++ common/env_common.c | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)
README +4 -0
@@ -546,6 +546,10 @@ The following options need to be configured: the "silent" environment variable. See doc/README.silent for more information. + When CONFIG_SILENT_CONSOLE_AT_BOOT is set u-boot + will be built with silent defined in the default + environment for a completly silent console at boot + - Console Baudrate: CONFIG_BAUDRATE - in bps Select one of the baudrates listed in
common/env_common.c +3 -0
@@ -123,6 +123,9 @@ uchar default_environment[] = {#if defined(CONFIG_PCI_BOOTDELAY ) && (CONFIG_PCI_BOOTDELAY >0 ) "pcidelay=" MK_STR(CONFIG_PCI_BOOTDELAY) "\0"#endif +#ifdef CONFIG_SILENT_CONSOLE_AT_BOOT + "silent=1\0" +#endif #ifdef CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_SETTINGS#endif
Signature · 1 line
1.7.5
PATCH 2/4 build/mkconfig: Add EXTRA_OPTS argument to make to modify build
Allow users to pass in extra defines via make so they can modify the build. Example
make P1022DS EXTRA_OPTS=NAND
is equivalent to
make P1022DS_NAND
--- mkconfig | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
mkconfig +7 -1
@@ -81,6 +81,12 @@ if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then exit 1 fi +if [ -z "${options}" ] ; then +options+=$EXTRA_OPTS +else +options+=,$EXTRA_OPTS +fi + if [ "$options" ] ; then echo "Configuring for ${BOARD_NAME} - Board: ${CONFIG_NAME}, Options: ${options}" else
@@ -146,7 +152,7 @@ else > config.h # Create new config file fi echo "/* Automatically generated - do not edit */" >>config.h - +TARGETS+=`echo $EXTRA_OPTS | tr ',' ' '` for i in ${TARGETS} ; do i="`echo ${i} | sed '/=/ {s/=/\t/;q } ; { s/$/\t1/ }'`" echo "#define CONFIG_${i}" >>config.h ;
Signature · 1 line
1.7.5
PATCH 2/4 build/mkconfig: Add EXTRA_OPTS argument to make to modify build
mkconfig if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then · line 88
Quoted 11 lines · On Thursday, June 02, 2011 15:34:58 Matthew McClintock wrote:
mkconfig +5
-0@@ -81,6 +81,12 @@ if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then exit 1 fi +if [ -z "${options}" ] ; then +options+=$EXTRA_OPTS +else +options+=,$EXTRA_OPTS +fi
style is broken (lacking indentation), and the "+=" operator is not in the POSIX shell spec
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110603/60a6fbc1/attachment.pgp
PATCH 3/4 nand_spl/spiboot/sdboot: Add ability to have smaller middle loader
In reply to Matthew McClintockThis patch allows some boards do define CONFIG_BOOTSTRAP to let them build a MPL or middle program loader to setup the board before booting to the full u-boot build. The advantage is that we are using the same build system and linker scripts that would be used in a normal u-boot build.
This is used on powerpc/85xx parts that only have 256kB of cache and also need to perform DDR SPD. So, the nand_spl will load the MPL to L2 SRAM and there DDR will be configured. Afterwards the MPL uses the CONFIG_BOOTCOMMAND environment variable to boot to the appropriate media. This also works with SD and SPI via the on chip rom but instead it goes from on-chip-rom to MPL to full version of u-boot.
Depends on previous icache/dcache command changes and various build fixes for add cases that occur when trying to build an extremely minimal image
--- Makefile | 38 +++++++++++++++++++++++++++++++++++++- mkconfig | 1 + 2 files changed, 38 insertions(+), 1 deletions(-)
Makefile +37 -1
@@ -317,6 +317,16 @@ ifeq ($(CONFIG_NAND_U_BOOT),y) ALL += $(obj)u-boot-nand.bin endif +ifndef CONFIG_IN_BOOTSTRAP +ifeq ($(CONFIG_SPIFLASH), y) +ALL += $(obj)u-boot-spi.bin +endif + +ifeq ($(CONFIG_SDCARD), y) +ALL += $(obj)u-boot-sd.bin +endif +endif + ifeq ($(CONFIG_ONENAND_U_BOOT),y) ALL += $(obj)u-boot-onenand.bin ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin
@@ -404,8 +414,16 @@ $(obj)u-boot.lds: $(LDSCRIPT) nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend $(MAKE) -C nand_spl/board/$(BOARDDIR) all +NAND_SPL_OBJS-y += $(obj)nand_spl/u-boot-spl-16k.bin +NAND_SPL_OBJS-$(CONFIG_BOOTSTRAP) += $(obj)u-boot-bootstrap.bin +NAND_SPL_OBJS-y += $(obj)u-boot.bin + +ifeq ($(CONFIG_BOOTSTRAP),y) +$(obj)u-boot-nand.bin: nand_spl $(obj)u-boot-bootstrap.bin $(obj)u-boot.bin +else $(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin - cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin +endif + cat $(NAND_SPL_OBJS-y) > $(obj)u-boot-nand.bin onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
@@ -413,6 +431,23 @@ onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk $(obj)u-boot-onenand.bin: onenand_ipl $(obj)u-boot.bin cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin +ifdef CONFIG_BOOTSTRAP +$(obj)u-boot-spi.bin: $(obj)u-boot.bin $(obj)u-boot-bootstrap.bin + cat $(obj)u-boot-bootstrap.bin $(obj)u-boot.bin > $(obj)u-boot-spi.bin +$(obj)u-boot-sd.bin: $(obj)u-boot.bin $(obj)u-boot-bootstrap.bin + cat $(obj)u-boot-bootstrap.bin $(obj)u-boot.bin > $(obj)u-boot-sd.bin +else +$(obj)u-boot-spi.bin: $(obj)u-boot.bin + ln -s u-boot.bin u-boot-spi.bin +$(obj)u-boot-sd.bin: $(obj)u-boot.bin + ln -s u-boot.bin u-boot-sd.bin +endif + +$(obj)u-boot-bootstrap.bin: + rm -rf $(BUILD_DIR)bootstrap + $(MAKE) $(CONFIG_BOARD_NAME) O=bootstrap/ EXTRA_OPTS=IN_BOOTSTRAP + cp $(BUILD_DIR)bootstrap/u-boot.bin u-boot-bootstrap.bin + $(VERSION_FILE): @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \ printf '#define PLAIN_VERSION "%s%s"\n' \
@@ -1130,6 +1165,7 @@ clean: \( -name 'core' -o -name '*.bak' -o -name '*~' \ -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \ | xargs rm -f + @rm -fr $(BUILD_DIR)bootstrap/ clobber: clean @find $(OBJTREE) -type f \( -name '*.depend' \
mkconfig +1 -0
@@ -159,6 +159,7 @@ for i in ${TARGETS} ; do done cat << EOF >> config.h +#define CONFIG_BOARD_NAME $BOARD_NAME #define CONFIG_BOARDDIR board/$BOARDDIR #include <config_cmd_defaults.h> #include <config_defaults.h>
Signature · 1 line
1.7.5
PATCH 4/4 Add P1021MDS board support
In reply to Matthew McClintockFrom: Haiying Wang <[email protected]>
This patch supports P1021MDS board to boot from NAND flash (No NOR flash on this board). And because P1021 only has 256K L2 SRAM, which can not used for final uboot image it makes use of the MPL.
---
This patch requires some previously sent patches to build correctly. They deal build fixes for building the <256k middle u-boot image:
http://patchwork.ozlabs.org/patch/97219/
http://patchwork.ozlabs.org/patch/97177/
http://patchwork.ozlabs.org/patch/97174/
http://patchwork.ozlabs.org/patch/97026/
and one from Mike Frysinger
http://patchwork.ozlabs.org/patch/98422/
I'm skipping the following checkpatch warnings since they don't seem to apply:
WARNING: Use #include <linux/io.h> instead of <asm/io.h> +#include <asm/io.h>
WARNING: Use #include <linux/io.h> instead of <asm/io.h> +#include <asm/io.h>
WARNING: suspect code indent for conditional statements (8, 8)
if (uec->the_first_run == 0) {[...]
+ /* P1021MDS board needs to reset micrel phy for each UEC */
ERROR: Macros with multiple statements should be enclosed in a do - while loop
+#define CONFIG_SYS_I2C_NOPROBES { {0, 0x69} } /* Don't probe these addrs */
ERROR: need consistent spacing around '/' (ctx:WxV)
+#define CONFIG_ROOTPATH /nfsroot
^
ERROR: Macros with complex values should be enclosed in parenthesis
+#define CONFIG_ROOTPATH /nfsroot
WARNING: Use #include <linux/io.h> instead of <asm/io.h> +#include <asm/io.h>
MAINTAINERS | 4 + README | 13 + board/freescale/p1021mds/Makefile | 52 ++ board/freescale/p1021mds/ddr.c | 81 ++++ board/freescale/p1021mds/law.c | 32 ++ board/freescale/p1021mds/p1021mds.c | 181 +++++++ board/freescale/p1021mds/tlb.c | 100 ++++ boards.cfg | 1 + drivers/qe/uec.c | 9 + include/configs/P1021MDS.h | 629 +++++++++++++++++++++++++ nand_spl/board/freescale/p1021mds/Makefile | 137 ++++++ nand_spl/board/freescale/p1021mds/nand_boot.c | 69 +++ 12 files changed, 1308 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p1021mds/Makefile create mode 100644 board/freescale/p1021mds/ddr.c create mode 100644 board/freescale/p1021mds/law.c create mode 100644 board/freescale/p1021mds/p1021mds.c create mode 100644 board/freescale/p1021mds/tlb.c create mode 100644 include/configs/P1021MDS.h create mode 100644 nand_spl/board/freescale/p1021mds/Makefile create mode 100644 nand_spl/board/freescale/p1021mds/nand_boot.c
MAINTAINERS +4 -0
@@ -17,6 +17,10 @@ # Board CPU # ######################################################################### +Haiying Wang <[email protected]> + + P1021MDS P1021 + Poonam Aggrwal <[email protected]> P2020RDB P2020
README +13 -0
@@ -2225,6 +2225,19 @@ FIT uImage format: Adds the MTD partitioning infrastructure from the Linux kernel. Needed for UBI support. +- NAND Boot Support + CONFIG_NAND_U_BOOT + + Builds a U-Boot image that boots from NAND, prefixed by a small + loader stub (secondary program loader -- SPL) that loads the + rest of U-Boot into RAM. This symbol will be set in all build + phases. + + CONFIG_NAND_SPL + + This is set by the build system when compiling code to go into + the SPL. It is not set when building the code that the SPL + loads. Modem Support: --------------
board/freescale/p1021mds/Makefile new file +52 -0
52 lines not on this page · raw message
board/freescale/p1021mds/ddr.c new file +81 -0
81 lines not on this page · raw message
board/freescale/p1021mds/law.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2010-2011 Freescale Semiconductor, Inc. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the Free +* Software Foundation; either version 2 of the License, or (at your option) +* any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_BCSR_BASE_PHYS ,LAW_SIZE_256K ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/p1021mds/p1021mds.c new file +181 -0
181 lines not on this page · raw message
board/freescale/p1021mds/tlb.c new file +100 -0
100 lines not on this page · raw message
boards.cfg +1 -0
@@ -550,6 +550,7 @@ P1020RDB_36BIT_SPIFLASH powerpc mpc85xx p1_p2_rdb freesca P1020RDB_NAND powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P1020RDB,NAND P1020RDB_SDCARD powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P1020RDB,SDCARD P1020RDB_SPIFLASH powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P1020RDB,SPIFLASH +P1021MDS_NAND powerpc mpc85xx p1021mds freescale - P1021MDS:NAND P1022DS powerpc mpc85xx p1022ds freescale P1022DS_36BIT powerpc mpc85xx p1022ds freescale - P1022DS:36BIT P2010RDB powerpc mpc85xx p1_p2_rdb freescale - P1_P2_RDB:P2010RDB
drivers/qe/uec.c +9 -0
@@ -31,6 +31,9 @@#include "uec_phy.h" #include "miiphy.h" #include <phy.h> +#ifdef CONFIG_P1021MDS +#define BCSR11_ENET_MICRST 0x20 +#endif /* Default UTBIPAR SMI address */ #ifndef CONFIG_UTBIPAR_INIT_TBIPA
@@ -1225,6 +1228,12 @@ static int uec_init(struct eth_device* dev, bd_t *bd)if (uec->the_first_run ==0 ) {#if defined(CONFIG_P1012 ) || defined(CONFIG_P1016 ) || \ defined(CONFIG_P1021 ) || defined(CONFIG_P1025 ) +#ifdef CONFIG_P1021MDS +/* P1021MDS board needs to reset micrel phy for each UEC */ +clrbits_8 ((u8 *)(CONFIG_SYS_BCSR_BASE +11 ),BCSR11_ENET_MICRST ); +udelay (200 ); +setbits_8 ((u8 *)(CONFIG_SYS_BCSR_BASE +11 ),BCSR11_ENET_MICRST ); +#endif /* QE9 and QE12 need to be set for enabling QE MII managment signals */ setbits_be32 (&gur->pmuxcr, MPC85xx_PMUXCR_QE9);setbits_be32 (&gur->pmuxcr, MPC85xx_PMUXCR_QE12);
include/configs/P1021MDS.h new file +629 -0
629 lines not on this page · raw message
nand_spl/board/freescale/p1021mds/Makefile new file +137 -0
137 lines not on this page · raw message
nand_spl/board/freescale/p1021mds/nand_boot.c new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
1.7.5
PATCH 1/4 common/env_common: Add CONFIG_SILENT_CONSOLE_AT_BOOT env option
In reply to Matthew McClintockQuoted 3 lines · On Thursday, June 02, 2011 15:34:57 Matthew McClintock wrote:
Just setting
CONFIG_SILENT_CONSOLEdoes not make the CONSOLE silent without the silent env variable set. This adds a new define to add this to the default environment easily
any reason you couldnt add silent=0 to CONFIG_EXTRA_ENV_SETTINGS ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110603/94f7450b/attachment.pgp