Re: [U-Boot] [PATCH v5] SPL: Makefile: Build a separate autoconf.mk for SPL
>-Original Message- >From: sun york-R58495 >Sent: Tuesday, August 20, 2013 5:20 AM >To: Tom Rini >Cc: Wood Scott-B07421; Zhang Ying-B40530; Joel A Fernandes; u- >b...@lists.denx.de; sun york-R58495; Xie Xiaobo-R63061; Zhang Ying-B40530 >Subject: Re: [U-Boot] [PATCH v5] SPL: Makefile: Build a separate >autoconf.mk for SPL > >On 08/19/2013 12:54 PM, Tom Rini wrote: >> On Mon, Aug 19, 2013 at 02:47:53PM -0500, Scott Wood wrote: >>> On Mon, 2013-08-19 at 16:14 +0800, ying.zh...@freescale.com wrote: >>>> From: Ying Zhang >>> >>> No. You added one line AFAICT. Preserve the original author here. >> >> Indeed. >> > >Do we need Ying to send a new version? We can reset the author to Joe when >applying this patch. > Whether we according to what York said, reset the author to Joe when applying? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] SPL: Makefile: Build a separate autoconf.mk for SPL
Need I resend a patch? -Original Message- From: sun york-R58495 Sent: Friday, August 16, 2013 1:27 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; Wood Scott-B07421; Xie Xiaobo-R63061 Subject: Re: [PATCH v3] SPL: Makefile: Build a separate autoconf.mk for SPL On 08/13/2013 11:01 PM, ying.zh...@freescale.com wrote: > From: Zhang Ying > > SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk > Makefile. > As a result the build breaks when CONFIG_SPL_BUILD is used in the > board-specific include header file. With this, there is a possibility > of having a CONFIG option defined in the header file but not defined in the > Makefile causing all kinds of build failure and problems. > > It also messes things for up, for example, when one might want to > undefine options to keep the SPL small and doesn't want to be stuck with the > CONFIG options used for U-boot. > Lastly, this also avoids defining special CONFIG_SPL_ variables for > cases where some options are required in U-boot but not in SPL. > > We add a spl-autoconf.mk rule that is generated for SPL with the > CONFIG_SPL_BUILD flag and conditionally include it for SPL builds. > > Signed-off-by: Zhang Ying > Please use a valid email address to sign off. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
Hi, York, I see. I am sure there isn't newer version. -Original Message- From: sun york-R58495 Sent: Thursday, August 15, 2013 10:42 AM To: Zhang Ying-B40530 Cc: Tom Rini; Wood Scott-B07421; u-boot@lists.denx.de; Andy Fleming; Xie Xiaobo-R63061 Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import On Aug 14, 2013, at 7:25 PM, Zhang Ying-B40530 wrote: > York, > I had checked all the patch and I am sure there is only this patch > almost forgotten. > I don't know how to do. Need I send the patch again or other way? > Thanks. > No need to resend. I can mark it. Just want to be sure there isn't a newer version hiding somewhere. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
York, I had checked all the patch and I am sure there is only this patch almost forgotten. I don't know how to do. Need I send the patch again or other way? Thanks. -Original Message- From: sun york-R58495 Sent: Wednesday, August 14, 2013 11:42 PM To: Zhang Ying-B40530 Cc: Tom Rini; Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import On 08/14/2013 06:48 AM, Tom Rini wrote: > On 08/13/2013 10:31 PM, Zhang Ying-B40530 wrote: >> Hi, Tom, This patch hasn't been applied? I think it should be applied >> early and it is needed by other patches of this set. >> Thanks. > > > I expect that as part of the overall series, once ready, York will > take this and include it in his pull request, which is why I've given > it my acked-by. > > Ying, This patch fell through the crack. I didn't see it because it was marked as "superseded". Please check your other patches. You can delegate them to me. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
Hi, Tom, This patch hasn't been applied? I think it should be applied early and it is needed by other patches of this set. Thanks. -Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Friday, June 28, 2013 5:57 AM To: Wood Scott-B07421 Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote: > On 06/27/2013 07:17:48 AM, Tom Rini wrote: > >On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote: > > > >> -Original Message- > >> From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini > >[snip] > >> Building for am335x_evm and am335x_evm_usbspl should tell you if > >it is, > >> or is not. Whacking network support into SPL required more than > >> --gc-sections alone could give us and we needed to drop a few > >> couldn't-ever-reach calls and functionality out. > >> [Zhang Ying] > >> Yes, I tried to build for am335x_evm without this ifdef, no problem. > >> Whether it can be removed? > > > >Did you also build am335x_evm_usbspl? > > It builds OK for me with the ifdef removed. It adds 81 bytes to the > SPL. I think we can live with that. Acked-by: Tom Rini -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, July 17, 2013 2:07 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061 Subject: Re: [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL On 07/16/2013 05:04:55 AM, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, July 16, 2013 7:56 AM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; > Zhang Ying-B40530 > Subject: Re: [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on > the SPL > > How about something like: > > # $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, > $(4) is pad-to > SPL_PAD_APPEND = \ > $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O > binary \ > $(1) $(obj)$(3); \ > cat $(obj)$(3) $(obj)$(2) > $@; \ > rm $(obj)$(3) > > $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin > $(obj)tpl/u-boot-with-tpl.bin > $(call > SPL_PAD_APPEND,$<,u-boot-with-tpl.bin,spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) > > $(obj)u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin > $(call > SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) > [Zhang Ying] > According to your advice, how to do for those don't have TPL? They would use the rule for u-boot-with-spl.bin, and the TPL rule would be ignored. No ifdef needed. [Zhang Ying] But, Don't u-boot-with-spl.bin contain tpl/u-boot-with-tpl.bin in the following rule? $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)tpl/u-boot-with-tpl.bin $(call SPL_PAD_APPEND,$<,u-boot-with-tpl.bin,spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) > > diff --git a/include/nand.h b/include/nand.h index 228d871..2aa7238 > > 100644 > > --- a/include/nand.h > > +++ b/include/nand.h > > @@ -153,6 +153,9 @@ int nand_unlock(nand_info_t *meminfo, loff_t > > start, size_t length, int nand_get_lock_status(nand_info_t > *meminfo, > > loff_t offset); > > > > int nand_spl_load_image(uint32_t offs, unsigned int size, void > *dst); > > +#ifdef CONFIG_TPL_BUILD > > +int nand_load_image(uint32_t offs, unsigned int uboot_size, void > > *vdst); > > +#endif > > void nand_deselect(void); > > > > Don't ifdef prototypes. Plus, some other platforms may want this in > other configurations. > [Zhang Ying] > Remove ifdef? If remove, there was error: > cmd_nand.c:889:12: error: conflicting types for 'nand_load_image'. Hmm... In that case, please rename the function when built static. > The function nand_load_image is defined in two files: > 1. /common/cmd_nand.c: > static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, >ulong offset, ulong addr, char *cmd) > 2. drivers/mtd/nand/fsl_elbc_spl.c > #ifndef CONFIG_TPL_BUILD > static > #endif > int nand_load_image(uint32_t offs, unsigned int uboot_size, void > *vdst) > > This function only is called by outside in TPL. So, there should > ifdef. You're defining a function called "nand_load_image" ind include/nand.h. There's nothing eLBC-specific about that. It is entirely possible that another implementation will want to export that function in an ordinary SPL -- or even possibly in the main U-Boot image. In fact, there's already a common definition for this, which is nand_spl_load_image(). Use that. [Zhang Ying] There has a prolem: nand_spl_simple.c: In function 'nand_init': nand_spl_simple.c:265:2: error: too many arguments to function 'board_nand_init' This because the functionality "board_nand_init" is called and parameter is not null, but board_nand_init prototype is declared to "void board_nand_init(void)". In "include/nand.h": #ifdef CONFIG_SYS_NAND_SELF_INIT void board_nand_init(void); int nand_register(int devnum); #else extern int board_nand_init(struct nand_chip *nand); #endif There need ifdef CONFIG_SYS_NAND_SELF_INIT in nand_init(), it's ok? #ifdef CONFIG_SYS_NAND_SELF_INIT board_nand_init(); #else board_nand_init(&nand_chip); #endif ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 16, 2013 7:56 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL On 07/15/2013 04:36:29 AM, ying.zh...@freescale.com wrote: > +ifdef CONFIG_TPL > +$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin > $(obj)spl/u-boot-tpl.bin \ > + $(obj)u-boot.bin > + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ > + -I binary -O binary \ > + $(obj)spl/u-boot-spl.bin > $(obj)spl/u-boot-spl-pad.bin > + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ > + -I binary -O binary \ > + $(obj)spl/u-boot-tpl.bin > $(obj)spl/u-boot-tpl-pad.bin > + cat $(obj)spl/u-boot-spl-pad.bin > $(obj)spl/u-boot-tpl-pad.bin \ > + $(obj)u-boot.bin > $@ > + rm $(obj)spl/u-boot-spl-pad.bin > $(obj)spl/u-boot-tpl-pad.bin > +else > $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin > $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ > -I binary -O binary $< > $(obj)spl/u-boot-spl-pad.bin > cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ > rm $(obj)spl/u-boot-spl-pad.bin > +endif Are you sure CONFIG_SPL_PAD_TO will always be the same for both stages? [Zhang Ying] It is not necessarily the same. Same here, because the nand block size is 128K. It doesn't matter that is not the same because CONFIG_SPL_PAD_TO is defined based on the CONFIG_TPL_BUILD. How about something like: # $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, $(4) is pad-to SPL_PAD_APPEND = \ $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \ $(1) $(obj)$(3); \ cat $(obj)$(3) $(obj)$(2) > $@; \ rm $(obj)$(3) $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)tpl/u-boot-with-tpl.bin $(call SPL_PAD_APPEND,$<,u-boot-with-tpl.bin,spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) $(obj)u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin $(call SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) [Zhang Ying] According to your advice, how to do for those don't have TPL? > @@ -621,7 +635,12 @@ $(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 > > $(obj)spl/u-boot-spl.bin:$(SUBDIR_TOOLS) depend > - $(MAKE) -C spl all > + $(MAKE) -C spl clean > + $(MAKE) -C spl all CONFIG_SPL_BUILD=y > + > +$(obj)spl/u-boot-tpl.bin:$(SUBDIR_TOOLS) depend > + $(MAKE) -C spl clean > + $(MAKE) -C spl all CONFIG_TPL_BUILD=y CONFIG_SPL_BUILD=y This will break in a parallel build, among other problems. Please use a separate tpl directory. [Zhang Ying] Ok. > +ifeq ($(CONFIG_TPL_BUILD),y) > +LDFLAGS_u-boot-tpl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) ifneq > +($(CONFIG_SPL_TEXT_BASE),) LDFLAGS_u-boot-tpl += -Ttext > +$(CONFIG_SPL_TEXT_BASE) endif else ifeq ($(CONFIG_SPL_BUILD),y) > LDFLAGS_u-boot-spl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) ifneq > ($(CONFIG_SPL_TEXT_BASE),) LDFLAGS_u-boot-spl += -Ttext > $(CONFIG_SPL_TEXT_BASE) endif > +endif > +endif > Why do we need separate LDFLAGS for SPL and TPL? It doesn't look like you define them any differently. Can you use $(SPL_BIN) (a.k.a. $(FILENAME)) here? Making sure to ifdef CONFIG_SPL_BUILD so that we don't define $(LDFLAGS_) in other contexts. [Zhang Ying] I think best to separate, even if they are the same. I can use $(SPL_BIN) or $(SPL_NAME) to rename it. > # Linus' kernel sanity checking tool > CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ > diff --git a/doc/README.TPL b/doc/README.TPL new file mode 100644 > index 000..3056696 > --- /dev/null > +++ b/doc/README.TPL > @@ -0,0 +1,71 @@ > +Generic TPL framework > += > + > +Overview > + > + > +TPL---Third Program Loader. > + > +Due to the SPL on some boards(powerpc mpc85xx) has a size limit and > cannot > +be compatible with all the external device(e.g. DDR). So add a > tertiary > +program loader (TPL) to enable a loader stub loaded by the code from > the > +SPL. It loads the final uboot image into DDR, then jump to it to > begin > +execution. Now, only the powerpc mpc85xx has this requirement and > will > +implemente it. > + > +Keep c
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
Excuse me, this patch has not been merged? Thanks. -Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Friday, June 28, 2013 5:57 AM To: Wood Scott-B07421 Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import On Thu, Jun 27, 2013 at 03:16:34PM -0500, Scott Wood wrote: > On 06/27/2013 07:17:48 AM, Tom Rini wrote: > >On Thu, Jun 27, 2013 at 02:35:34AM +0000, Zhang Ying-B40530 wrote: > > > >> -Original Message- > >> From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini > >[snip] > >> Building for am335x_evm and am335x_evm_usbspl should tell you if > >it is, > >> or is not. Whacking network support into SPL required more than > >> --gc-sections alone could give us and we needed to drop a few > >> couldn't-ever-reach calls and functionality out. > >> [Zhang Ying] > >> Yes, I tried to build for am335x_evm without this ifdef, no problem. > >> Whether it can be removed? > > > >Did you also build am335x_evm_usbspl? > > It builds OK for me with the ifdef removed. It adds 81 bytes to the > SPL. I think we can live with that. Acked-by: Tom Rini -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7 v6] nand: tpl : introduce the TPL based on the SPL
I haven't subscribe the mail list and I didn't find the patch "creates a separate autoconf.mk". Can you tell me where I can find it? Thanks. -Original Message- From: Wood Scott-B07421 Sent: Saturday, June 29, 2013 3:40 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061 Subject: Re: [PATCH 6/7 v6] nand: tpl : introduce the TPL based on the SPL On 06/28/2013 02:57:55 AM, Zhang Ying-B40530 wrote: > You don't need to mention a dependency on an earlier patch in the same > patchset (and when you do need to mention a dependency, it should be > below the --- line so it doesn't go into the git history). OTOH, you > do need to mention the dependency on the patch to have a separate > autoconf.mk. > [Zhang Ying] > I want to know when the patch that creates a separate autoconf.mk can > be merged? > My patch need to be verified on the basis of it. You could include it as the first patch in your series (be sure to leave the authorship intact). -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7 v6] nand: tpl : introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Thursday, June 27, 2013 6:33 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH 6/7 v6] nand: tpl : introduce the TPL based on the SPL On 06/26/2013 02:18:31 AM, ying.zh...@freescale.com wrote: > From: Ying Zhang > > Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it > can > not be more than 4K. So, the SPL cannot initialize the DDR with the > SPD > code. This patch introduces TPL to enable a loader stub that runs in > the > L2 SRAM, after being loaded by the code from the SPL. It initializes > the > DDR with the SPD or other operations. > > The TPL's size is sizeable, the maximum size must not exceed the size > of L2 > SRAM. Using L2 SRAM for this is an implementation detail, and not appropriate for a description of the generic TPL infrastructure. For example, on newer QorIQ chips you'd be using CPC (L3) SRAM. > It initializes the DDR through SPD code, and copys final uboot image > to DDR. So there are three stage uboot images: > * spl_boot, * tpl_boot, * final uboot image, > > This patch is on top of the patch: > SPL : spi flash : support to start from eSPI with SPL You don't need to mention a dependency on an earlier patch in the same patchset (and when you do need to mention a dependency, it should be below the --- line so it doesn't go into the git history). OTOH, you do need to mention the dependency on the patch to have a separate autoconf.mk. [Zhang Ying] I want to know when the patch that creates a separate autoconf.mk can be merged? My patch need to be verified on the basis of it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
-Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Thursday, June 27, 2013 1:35 AM To: Wood Scott-B07421 Cc: Zhang Ying-B40530; u-boot@lists.denx.de; aflem...@gmail.com; Wood Scott-B07421 Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import On Wed, Jun 26, 2013 at 11:12:01AM -0500, Scott Wood wrote: > On 06/25/2013 09:29:37 PM, Zhang Ying-B40530 wrote: > > > > > >-Original Message- > >From: Wolfgang Denk [mailto:w...@denx.de] > >Sent: Friday, June 21, 2013 1:38 PM > >To: Zhang Ying-B40530 > >Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; > >Xie Xiaobo-R63061; Zhang Ying-B40530 > >Subject: Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make > >CONFIG_SPL_BUILD contain function env_import > > > >Dear ying.zh...@freescale.com, > > > >In message > ><1371715468-21120-6-git-send-email-ying.zh...@freescale.com> you > >wrote: > >> > >> The functionality env_import will be used in the SPL. They > >> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > >> into the SPL. > >> > >> Signed-off-by: Ying Zhang > >> --- > >> Compared with the original version, Changed as below: > >> 1. Split from "boot from SD card/SPI flash with SPL". > >> 2. Split from "spl: Make CONFIG_SPL_BUILD contain more > >functionality" > >> 3. No change. > >> 4. No change. > >> > >> common/env_common.c |2 -- > >> 1 files changed, 0 insertions(+), 2 deletions(-) > > > >This affects all boards, all architectures? How well has this been > >tested? > >[Zhang Ying] > >May I suggest we define a new symbol CONFIG_SPL_ENV_IMPORT to contain > >the functionality "env_import"? > >So, "#ifndef CONFIG_SPL_BUILD" will be changed to > >"#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_ENV_IMPORT)" > > Can we figure out if the ifdef is really needed first? Building for am335x_evm and am335x_evm_usbspl should tell you if it is, or is not. Whacking network support into SPL required more than --gc-sections alone could give us and we needed to drop a few couldn't-ever-reach calls and functionality out. [Zhang Ying] Yes, I tried to build for am335x_evm without this ifdef, no problem. Whether it can be removed? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 8/8] powerpc/p1022ds: boot from spi flash with SPL
From: Andy Fleming [mailto:aflem...@gmail.com] Sent: Thursday, June 20, 2013 12:37 AM To: Zhang Ying-B40530; jagannadha.sutradharudu-t...@xilinx.com Cc: U-Boot list; Wood Scott-B07421; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH 8/8] powerpc/p1022ds: boot from spi flash with SPL On Fri, Jun 7, 2013 at 4:25 AM, mailto:ying.zh...@freescale.com>> wrote: From: Ying Zhang mailto:b40...@freescale.com>> Support to boot from spi flash. This patch is on top of the patch: powerpc/p1022ds: boot from SD Card with SPL Signed-off-by: Ying Zhang mailto:b40...@freescale.com>> --- board/freescale/p1022ds/spl.c | 12 +- drivers/mtd/spi/Makefile |1 + drivers/mtd/spi/fsl_espi_spl.c | 79 drivers/mtd/spi/spi_flash.c|2 + include/configs/P1022DS.h | 36 +++ These should probably be divided into two patches. One to add the capability (in drivers/mtd), and one to enable the capability (in the p1022-specific files). I'd like jagan's ack before applying this, but if you split this patch, and he agrees, I'd be happy to take this in through my tree. [Zhang Ying] This should be no problem. It will be modified with other review comment in the next version(v6). Now the most important is the patch "[PATCH 07/10 v5] powerpc/p1022ds: boot from SD Card with SPL", Please review as soon as possible, I had waiting long. Thanks. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 06/10 v5] spl: env_common.c: make CONFIG_SPL_BUILD contain function env_import
> > The functionality env_import will be used in the SPL. They > had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > into the SPL. > > Signed-off-by: Ying Zhang mailto:b40...@freescale.com>> > --- > Compared with the original version, Changed as below: > 1. Split from "boot from SD card/SPI flash with SPL". > 2. Split from "spl: Make CONFIG_SPL_BUILD contain more functionality" > 3. No change. > 4. No change. > > common/env_common.c |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) This affects all boards, all architectures? How well has this been tested? [Zhang Ying] We could not verify all the boards. This ifndef was introduced by Ilya Yanok in commit 7ac2fe2da21d292aeaf3af74e5c80de9ce9dab56. So, we have already asked Ilya: What are the consequences of removing this? Is there some other symbol we can use here? We have not received any response. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Saturday, June 15, 2013 12:37 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061 Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL On 06/14/2013 05:08:49 AM, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Wood Scott-B07421 > Sent: Friday, June 14, 2013 5:50 AM > To: Zhang Ying-B40530 > Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie > Xiaobo-R63061 > Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based > on the SPL > > On 06/13/2013 02:27:44 AM, Zhang Ying-B40530 wrote: > > > > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Thursday, June 13, 2013 6:29 AM > > To: Zhang Ying-B40530 > > Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; > > Zhang Ying-B40530 > > Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based > > on the SPL > > > > On 06/09/2013 12:54:43 AM, ying.zh...@freescale.com wrote: > > > From: Ying Zhang > > > > > > Due to the nand SPL on the board P1022DS has a size limit, it can > > not > > > be > > > more than 4K. So, the SPL cannot initialize the DDR with the SPD > > code. > > > This patch introduces TPL to enable a loader stub that runs in the > > L2 > > > SRAM, > > > after being loaded by the code from the SPL. It initializes the > DDR > > > with > > > the SPD. > > > > > > The TPL's size is sizeable, the maximum size must not exceed the > > size > > > of L2 > > > SRAM. It initializes the DDR through SPD code, and copys final > uboot > > > image > > > to DDR. So there are three stage uboot images: > > > * spl_boot, 4KB size, pad to 128K byte. > > > * tpl_boot, 88K size, pad to 128K size. The env variables are > > > copied to L2 SRAM, so that ddr SPD code can get the interleaving > > > mode setting in env. It loads final uboot image from offset > > > 256KB. > > > * final uboot image, size is variable depends on the functions > > > enabled. > > > > > > This patch is on top of the patch: > > > powerpc/p1022ds: boot from SD Card with SPL > > > > > > Signed-off-by: Ying Zhang > > > --- > > > Makefile | 25 +++- > > > README | 55 ++- > > > arch/powerpc/config.mk |2 + > > > arch/powerpc/cpu/mpc85xx/spl_minimal.c | 16 ++ > > > arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds| 80 > + > > > .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 +- > > > arch/powerpc/lib/Makefile |2 + > > > board/freescale/p1022ds/Makefile |3 + > > > board/freescale/p1022ds/spl_minimal.c | 56 +-- > > > board/freescale/p1022ds/tlb.c |4 +- > > > board/freescale/p1022ds/tpl.c | 101 > > > > > > common/Makefile|9 + > > > common/cmd_nvedit.c|8 +- > > > config.mk | 32 > > > doc/README.TPL | 93 > > +++ > > > drivers/mtd/nand/Makefile |8 + > > > drivers/mtd/nand/fsl_elbc_tpl.c| 168 > > > > > > drivers/serial/serial.c|2 +- > > > include/bootstage.h|3 +- > > > include/configs/P1022DS.h | 75 > +++-- > > > tpl/Makefile | 161 > > > +++ > > > 21 files changed, 824 insertions(+), 83 deletions(-) > > > create mode 100644 arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds > > > create mode 100644 board/freescale/p1022ds/tpl.c > > > create mode 100644 doc/README.TPL > > > create mode 100644 drivers/mtd/nand/fsl_elbc_tpl.c > > > create mode 100644 tpl/Makefile > > > > > > diff --git a/README b/README > > > index 7add6d4..04f9aa5 100644 > > > --- a/README > > > +++ b/README > > > @@ -2985,9 +2985,10 @@ FIT uImage format: > > >
Re: [U-Boot] [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Friday, June 14, 2013 5:50 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061 Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL On 06/13/2013 02:27:44 AM, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Wood Scott-B07421 > Sent: Thursday, June 13, 2013 6:29 AM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; > Zhang Ying-B40530 > Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based > on the SPL > > On 06/09/2013 12:54:43 AM, ying.zh...@freescale.com wrote: > > From: Ying Zhang > > > > Due to the nand SPL on the board P1022DS has a size limit, it can > not > > be > > more than 4K. So, the SPL cannot initialize the DDR with the SPD > code. > > This patch introduces TPL to enable a loader stub that runs in the > L2 > > SRAM, > > after being loaded by the code from the SPL. It initializes the DDR > > with > > the SPD. > > > > The TPL's size is sizeable, the maximum size must not exceed the > size > > of L2 > > SRAM. It initializes the DDR through SPD code, and copys final uboot > > image > > to DDR. So there are three stage uboot images: > > * spl_boot, 4KB size, pad to 128K byte. > > * tpl_boot, 88K size, pad to 128K size. The env variables are > > copied to L2 SRAM, so that ddr SPD code can get the interleaving > > mode setting in env. It loads final uboot image from offset > > 256KB. > > * final uboot image, size is variable depends on the functions > > enabled. > > > > This patch is on top of the patch: > > powerpc/p1022ds: boot from SD Card with SPL > > > > Signed-off-by: Ying Zhang > > --- > > Makefile | 25 +++- > > README | 55 ++- > > arch/powerpc/config.mk |2 + > > arch/powerpc/cpu/mpc85xx/spl_minimal.c | 16 ++ > > arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds| 80 + > > .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 +- > > arch/powerpc/lib/Makefile |2 + > > board/freescale/p1022ds/Makefile |3 + > > board/freescale/p1022ds/spl_minimal.c | 56 +-- > > board/freescale/p1022ds/tlb.c |4 +- > > board/freescale/p1022ds/tpl.c | 101 > > > > common/Makefile|9 + > > common/cmd_nvedit.c|8 +- > > config.mk | 32 > > doc/README.TPL | 93 > +++ > > drivers/mtd/nand/Makefile |8 + > > drivers/mtd/nand/fsl_elbc_tpl.c| 168 > > > > drivers/serial/serial.c|2 +- > > include/bootstage.h|3 +- > > include/configs/P1022DS.h | 75 +++-- > > tpl/Makefile | 161 > > +++ > > 21 files changed, 824 insertions(+), 83 deletions(-) > > create mode 100644 arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds > > create mode 100644 board/freescale/p1022ds/tpl.c > > create mode 100644 doc/README.TPL > > create mode 100644 drivers/mtd/nand/fsl_elbc_tpl.c > > create mode 100644 tpl/Makefile > > > > diff --git a/README b/README > > index 7add6d4..04f9aa5 100644 > > --- a/README > > +++ b/README > > @@ -2985,9 +2985,10 @@ FIT uImage format: > > Set for the SPL on PPC mpc8xxx targets, support for > > arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary. > > > > - CONFIG_SPL_COMMON_INIT_DDR > > + CONFIG_COMMON_INIT_DDR > > Set for common ddr init with serial presence detect in > > - SPL binary. > > + SPL binary or TPL binary. > > + > > CONFIG_SYS_NAND_5_ADDR_CYCLE, > > CONFIG_SYS_NAND_PAGE_COUNT, > > CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, > > CONFIG_SYS_NAND_BLOCK_SIZE, > > CONFIG_SYS_NAND_BAD_BLOCK_POS, > > @@ -3058,6 +3059,56 @@ FIT uImage format: > > option to re-enable it. This will affect the ou
Re: [U-Boot] [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL
-Original Message- From: Wood Scott-B07421 Sent: Thursday, June 13, 2013 6:29 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH] powerpc/p1022ds: nand: introduce the TPL based on the SPL On 06/09/2013 12:54:43 AM, ying.zh...@freescale.com wrote: > From: Ying Zhang > > Due to the nand SPL on the board P1022DS has a size limit, it can not > be > more than 4K. So, the SPL cannot initialize the DDR with the SPD code. > This patch introduces TPL to enable a loader stub that runs in the L2 > SRAM, > after being loaded by the code from the SPL. It initializes the DDR > with > the SPD. > > The TPL's size is sizeable, the maximum size must not exceed the size > of L2 > SRAM. It initializes the DDR through SPD code, and copys final uboot > image > to DDR. So there are three stage uboot images: > * spl_boot, 4KB size, pad to 128K byte. > * tpl_boot, 88K size, pad to 128K size. The env variables are > copied to L2 SRAM, so that ddr SPD code can get the interleaving > mode setting in env. It loads final uboot image from offset > 256KB. > * final uboot image, size is variable depends on the functions > enabled. > > This patch is on top of the patch: > powerpc/p1022ds: boot from SD Card with SPL > > Signed-off-by: Ying Zhang > --- > Makefile | 25 +++- > README | 55 ++- > arch/powerpc/config.mk |2 + > arch/powerpc/cpu/mpc85xx/spl_minimal.c | 16 ++ > arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds| 80 + > .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 +- > arch/powerpc/lib/Makefile |2 + > board/freescale/p1022ds/Makefile |3 + > board/freescale/p1022ds/spl_minimal.c | 56 +-- > board/freescale/p1022ds/tlb.c |4 +- > board/freescale/p1022ds/tpl.c | 101 > > common/Makefile|9 + > common/cmd_nvedit.c|8 +- > config.mk | 32 > doc/README.TPL | 93 +++ > drivers/mtd/nand/Makefile |8 + > drivers/mtd/nand/fsl_elbc_tpl.c| 168 > > drivers/serial/serial.c|2 +- > include/bootstage.h|3 +- > include/configs/P1022DS.h | 75 +++-- > tpl/Makefile | 161 > +++ > 21 files changed, 824 insertions(+), 83 deletions(-) > create mode 100644 arch/powerpc/cpu/mpc85xx/u-boot-tpl.lds > create mode 100644 board/freescale/p1022ds/tpl.c > create mode 100644 doc/README.TPL > create mode 100644 drivers/mtd/nand/fsl_elbc_tpl.c > create mode 100644 tpl/Makefile > > diff --git a/README b/README > index 7add6d4..04f9aa5 100644 > --- a/README > +++ b/README > @@ -2985,9 +2985,10 @@ FIT uImage format: > Set for the SPL on PPC mpc8xxx targets, support for > arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary. > > - CONFIG_SPL_COMMON_INIT_DDR > + CONFIG_COMMON_INIT_DDR > Set for common ddr init with serial presence detect in > - SPL binary. > + SPL binary or TPL binary. > + > CONFIG_SYS_NAND_5_ADDR_CYCLE, > CONFIG_SYS_NAND_PAGE_COUNT, > CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, > CONFIG_SYS_NAND_BLOCK_SIZE, > CONFIG_SYS_NAND_BAD_BLOCK_POS, > @@ -3058,6 +3059,56 @@ FIT uImage format: > option to re-enable it. This will affect the output of > the > bootm command when booting a FIT image. > > +- TPL framework > + CONFIG_TPL > + Enable building of TPL globally. > + > + CONFIG_TPL_LDSCRIPT > + LDSCRIPT for linking the TPL binary. > + > + CONFIG_TPL_MAX_SIZE > + Maximum size of the TPL image (text, data, rodata, and > + linker lists sections), BSS excluded. > + When defined, the linker checks that the actual size > does > + not exceed it. > + > + CONFIG_SPL_TEXT_BASE > + TEXT_BASE for linking the TPL binary. > + > + CONFIG_TPL_LIBCOMMON_SUPPORT > + Support for common/libcommon.o in T
Re: [U-Boot] [PATCH 5/8] powerpc: spl: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and introduced new symbol CONFIG_SPL_MINIMAL
From: Wood Scott-B07421 Sent: Monday, June 10, 2013 6:32 PM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061 Subject: Re: [PATCH 5/8] powerpc: spl: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and introduced new symbol CONFIG_SPL_MINIMAL On 06/07/2013 09:14:56 PM, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Wood Scott-B07421 > Sent: Saturday, June 08, 2013 1:21 AM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; > Zhang Ying-B40530 > Subject: Re: [PATCH 5/8] powerpc: spl: deleted unused symbol > CONFIG_SPL_NAND_MINIMAL and introduced new symbol CONFIG_SPL_MINIMAL > > On 06/07/2013 04:25:17 AM, ying.zh...@freescale.com wrote: > > diff --git a/README b/README > > index e30e787..fbb50fb 100644 > > --- a/README > > +++ b/README > > @@ -2911,6 +2911,11 @@ FIT uImage format: > > CONFIG_SPL_INIT_MINIMAL > > Arch init code should be built for a very small image > > > > + CONFIG_SPL_MINIMAL > > + It is different from common SPL. if set, the SPL image > > + as small as possible, only a tiny part of the SPL code > > + is built. > > How is this different from CONFIG_SPL_INIT_MINIMAL? > [Zhang Ying] > > It is really some confusion. So, we have two options: > > 1. CONFIG_SPL_INIT_MINIMAL coexist with CONFIG_SPL_MINIMAL, I can > increase the description for the difference > between both: > CONFIG_SPL_INIT_MINIMAL expressed support for minimal SPL. But it > cannot be used independently, it must be > applied with CONFIG_SPL_BUILD. It mainly used in Makefiles. > > CONFIG_SPL_MINIMAL equals to CONFIG_SPL_BUILD && > CONFIG_SPL_INIT_MINIMAL. It is applied to C files. For now just use #if !defined(CONFIG_SPL_INIT_MINIMAL) || !defined(CONFIG_SPL_BUILD) ...and once the patch for the separate SPL autoconf.mk gets merged, we can change all the SPL symbols to be only defined with CONFIG_SPL_BUILD (unless there's a specific reason not to for a particular symbol), and clean up the ifdefs. OK. -ZhangYing ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/8] powerpc: spl: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and introduced new symbol CONFIG_SPL_MINIMAL
-Original Message- From: Wood Scott-B07421 Sent: Saturday, June 08, 2013 1:21 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH 5/8] powerpc: spl: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and introduced new symbol CONFIG_SPL_MINIMAL On 06/07/2013 04:25:17 AM, ying.zh...@freescale.com wrote: > diff --git a/README b/README > index e30e787..fbb50fb 100644 > --- a/README > +++ b/README > @@ -2911,6 +2911,11 @@ FIT uImage format: > CONFIG_SPL_INIT_MINIMAL > Arch init code should be built for a very small image > > + CONFIG_SPL_MINIMAL > + It is different from common SPL. if set, the SPL image > + as small as possible, only a tiny part of the SPL code > + is built. How is this different from CONFIG_SPL_INIT_MINIMAL? [Zhang Ying] It is really some confusion. So, we have two options: 1. CONFIG_SPL_INIT_MINIMAL coexist with CONFIG_SPL_MINIMAL, I can increase the description for the difference between both: CONFIG_SPL_INIT_MINIMAL expressed support for minimal SPL. But it cannot be used independently, it must be applied with CONFIG_SPL_BUILD. It mainly used in Makefiles. CONFIG_SPL_MINIMAL equals to CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL. It is applied to C files. Just as you said: it would be nice to limit SPL symbols to only be defined for the SPL part of the build, so we don't have to add checks for CONFIG_SPL_BUILD all over the place. Currently this won't work for symbols that makefiles look at, if "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just define CONFIG_SPL_MINIMAL in the SPL build case. 2. No longer adds the new symbol CONFIG_SPL_MINIMAL: We can use CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL to replace it in the C files. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/6] Makefile: move the common makefile line to public area
Hi, Tom, this patch has not merged to upstream? -Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Saturday, May 25, 2013 12:05 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH 4/6] Makefile: move the common makefile line to public area On Mon, May 20, 2013 at 02:07:26PM +0800, ying.zh...@freescale.com wrote: > From: Ying Zhang > > Move the common makefile line shared by the SPL and non-SPL to the > public area, so that we can avoid excessive SPL symbols. Some of them > will be used by the SPL later. > > This patch is on top of the patch "common/Makefile: Add new symbol > CONFIG_SPL_ENV_SUPPORT for environment in SPL". > > Signed-off-by: Ying Zhang Provided that you've at least build-tested MAKEALL -a arm: Acked-by: Tom Rini -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 29, 2013 6:34 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Ilya Yanok Subject: Re: [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality On 05/22/2013 08:26:31 PM, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, May 22, 2013 11:46 PM > To: Zhang Ying-B40530 > Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie > Xiaobo-R63061; Ilya Yanok > Subject: Re: [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more > functionality > > On 05/21/2013 09:15:08 PM, Zhang Ying-B40530 wrote: > > > diff --git a/include/configs/MPC8313ERDB.h > > > b/include/configs/MPC8313ERDB.h > > > index c28dfe0..a2bdcff 100644 > > > --- a/include/configs/MPC8313ERDB.h > > > +++ b/include/configs/MPC8313ERDB.h > > > @@ -40,7 +40,9 @@ > > > #define CONFIG_SPL_INIT_MINIMAL > > > #define CONFIG_SPL_SERIAL_SUPPORT > > > #define CONFIG_SPL_NAND_SUPPORT > > > +#ifdef CONFIG_SPL_BUILD > > > #define CONFIG_SPL_NAND_MINIMAL > > > +#endif > > > #define CONFIG_SPL_FLUSH_IMAGE > > > #define CONFIG_SPL_TARGET"u-boot-with-spl.bin" > > > #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND > > > diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h > > > index 8b13b10..5bdd44a 100644 > > > --- a/include/configs/P1022DS.h > > > +++ b/include/configs/P1022DS.h > > > @@ -41,7 +41,9 @@ > > > #define CONFIG_SPL_INIT_MINIMAL > > > #define CONFIG_SPL_SERIAL_SUPPORT > > > #define CONFIG_SPL_NAND_SUPPORT > > > +#ifdef CONFIG_SPL_BUILD > > > #define CONFIG_SPL_NAND_MINIMAL > > > +#endif > > > #define CONFIG_SPL_FLUSH_IMAGE > > > #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" > > > > > > diff --git a/include/configs/p1_p2_rdb_pc.h > > > b/include/configs/p1_p2_rdb_pc.h > > > index 7ed634b..bc48d62 100644 > > > --- a/include/configs/p1_p2_rdb_pc.h > > > +++ b/include/configs/p1_p2_rdb_pc.h > > > @@ -159,7 +159,9 @@ > > > #define CONFIG_SPL_INIT_MINIMAL > > > #define CONFIG_SPL_SERIAL_SUPPORT > > > #define CONFIG_SPL_NAND_SUPPORT > > > +#ifdef CONFIG_SPL_BUILD > > > #define CONFIG_SPL_NAND_MINIMAL > > > +#endif > > > #define CONFIG_SPL_FLUSH_IMAGE > > > #define CONFIG_SPL_TARGET"u-boot-with-spl.bin" > > > > Are you sure this belongs in this patch? > > [Zhang Ying] > > Yes, it is necessary. Because CONFIG_SPL_NAND_MINIMAL has been used > > in the file law.c and tlb.c in this patch. > > What I mean is that it should probably have been done earlier, when > you > introduced CONFIG_SPL_NAND_MINIMAL. > [Zhang Ying] > I can understand you mean. Because the symbol > "CONFIG_SPL_NAND_MINIMAL" has been useless, I think no need to split > out a separate patch. OK, it looks like CONFIG_SPL_NAND_MINIMAL was there before your patchset. I think that was an accidental left-over and should have been removed (it was replaced with CONFIG_SPL_NAND_DRIVERS, _BASE, and _ECC). Could you describe what specifically you're using it to mean here? [Zhang Ying] CONFIG_SPL_NAND_MINIMAL is effective only for mpc85xx NAND SPL. If it is set, said the SPL as small as possible and the size is not more than 4K. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality
So, about this patch, what need I do? -Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Saturday, May 25, 2013 3:18 AM To: Wood Scott-B07421 Cc: u-boot@lists.denx.de; Zhang Ying-B40530; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality On Fri, May 24, 2013 at 02:08:07PM -0500, Scott Wood wrote: > On 05/24/2013 11:11:01 AM, Tom Rini wrote: > >On Mon, May 20, 2013 at 02:07:27PM +0800, ying.zh...@freescale.com > >wrote: > > > >> From: Ying Zhang > >> > >> There was some functionality will be used in the SPL. They > >> had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > >> into the SPL. > >> > >> Signed-off-by: Ying Zhang > >> --- > >> arch/powerpc/cpu/mpc85xx/tlb.c |2 +- > >> arch/powerpc/cpu/mpc8xxx/law.c |4 ++-- > > > >In these cases can we not just always build them, aside from when > >CONFIG_NAND_SPL is set and rely on link-time discard here? Otherwise: > > > > > >> -#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD) > >> +#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_NAND_MINIMAL) > > > >Should become, I believe (and this isn't whitespaced properly): > >#if !defined(CONFIG_NAND_SPL) && !(defined(CONFIG_SPL_BUILD) && > >defined(CONFIG_SPL_NAND_MINIMAL)) > > > >So that: > > > >> diff --git a/include/configs/MPC8313ERDB.h > >b/include/configs/MPC8313ERDB.h > >[snip] > >> diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h > >[snip] > >> diff --git a/include/configs/p1_p2_rdb_pc.h > >b/include/configs/p1_p2_rdb_pc.h > > > >Can then all be dropped. > > Possibly, but it would be nice to limit SPL symbols to only be > defined for the SPL part of the build, so we don't have to add > checks for CONFIG_SPL_BUILD all over the place. Currently this > won't work for symbols that makefiles look at, though there was a > patch to fix that, which I referred to elsewhere in the these > threads. At the high level, yes, I agree it would be good to clean up everyones configs around CONFIG_SPL/CONFIG_SPL_BUILD. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] FW: [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 3:42 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530; Ilya Yanok Subject: Re: [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality Please change the title and the rest of the changelog to describe what functionality you're adding and why. On 05/20/2013 01:07:27 AM, ying.zh...@freescale.com wrote: > diff --git a/common/env_common.c b/common/env_common.c > index 906b41f..8cb81e9 100644 > --- a/common/env_common.c > +++ b/common/env_common.c > @@ -156,7 +156,6 @@ int set_default_vars(int nvars, char * const > vars[]) > H_NOCLEAR | H_INTERACTIVE, nvars, vars); > } > > -#ifndef CONFIG_SPL_BUILD > /* > * Check if CRC is valid and (if yes) import the environment. > * Note that "buf" may or may not be aligned. > @@ -188,7 +187,6 @@ int env_import(const char *buf, int check) > > return 0; > } > -#endif This ifndef was introduced by Ilya Yanok in commit 7ac2fe2da21d292aeaf3af74e5c80de9ce9dab56. Ilya, what are the consequences of removing this? Is there some other symbol we can use here? -Scott [Zhang Ying] Ilya, Can you answer this question? Thanks. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] powerpc/p1022ds: boot from SD Card with SPL
Hi, everybody. Do you have any comments? -Original Message- From: Zhang Ying-B40530 Sent: Monday, May 20, 2013 2:07 PM To: u-boot@lists.denx.de Cc: Wood Scott-B07421; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: [PATCH 6/6] powerpc/p1022ds: boot from SD Card with SPL From: Ying Zhang This patch introduces SPL to enable a loader stub that runs in the L2 SRAM, after being loaded by the code from the internal on-chip ROM. It loads the final uboot image into DDR, then jump to it to begin execution. The SPL's size is sizeable, the maximum size must not exceed the size of L2 SRAM. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are two stage uboot images: * spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that ddr spd code can get the interleaving mode setting in env. It loads final uboot image from offset 96KB. * final uboot image, size is variable depends on the functions enabled. This patch is on top of the following patch: 1. common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL. 2. Makefile: move the common makefile line to public area 3. powerpc/mpc85xx: support application without resetvec segment in the linker script. 4. powerpc/mpc85xx: modify the function clear_bss and the end address of the BSS 5. spl: Make CONFIG_SPL_BUILD contain more functionality Signed-off-by: Ying Zhang --- README |8 ++ arch/powerpc/cpu/mpc85xx/u-boot-spl.lds|5 + .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 + board/freescale/common/Makefile|2 - board/freescale/p1022ds/Makefile |3 + board/freescale/p1022ds/spl.c | 112 + board/freescale/p1022ds/tlb.c |9 ++- doc/README.mpc85xx-sd-spi-boot | 82 drivers/mmc/Makefile |3 + drivers/mmc/fsl_esdhc_spl.c| 132 drivers/mmc/mmc.c |4 +- include/configs/P1022DS.h | 54 +++- include/fsl_esdhc.h|1 + spl/Makefile |3 + 14 files changed, 410 insertions(+), 12 deletions(-) create mode 100644 board/freescale/p1022ds/spl.c create mode 100644 doc/README.mpc85xx-sd-spi-boot create mode 100644 drivers/mmc/fsl_esdhc_spl.c diff --git a/README b/README index d66e5b0..0ab7b4c 100644 --- a/README +++ b/README @@ -2941,6 +2941,14 @@ FIT uImage format: Support for NAND boot using simple NAND drivers that expose the cmd_ctrl() interface. + CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT + Set for the SPL on PPC mpc8xxx targets, support for + arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary. + + CONFIG_SPL_COMMON_INIT_DDR + Set for common ddr init with serial presence detect in + SPL binary. + CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT, CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE, CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS, diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds index 55ff5e8..751feaa 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds @@ -57,6 +57,11 @@ SECTIONS } _edata = .; + . = .; + __start___ex_table = .; + __ex_table : { *(__ex_table) } + __stop___ex_table = .; + . = ALIGN(8); __init_begin = .; __init_end = .; diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c index 9adde31..aa32454 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c @@ -220,12 +220,16 @@ compute_lowest_common_dimm_parameters(const dimm_params_t *dimm_params, if (dimm_params[i].n_ranks) { if (dimm_params[i].registered_dimm) { temp1 = 1; +#ifndef CONFIG_SPL_BUILD printf("Detected RDIMM %s\n", dimm_params[i].mpart); +#endif } else { temp2 = 1; +#ifndef CONFIG_SPL_BUILD printf("Detected UDIMM %s\n", dimm_params[i].mpart); +#endif } } } diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile index 72bb56c..c334797 100644 --- a/board/freescale/common/Makefile +++
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 11:45 PM To: Stefan Roese Cc: Zhang Ying-B40530; Wood Scott-B07421; x...@theia.denx.de; u-boot@lists.denx.de; aflem...@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On 05/22/2013 01:09:07 AM, Stefan Roese wrote: > (sorry for jumping in so late in this discussion) > > On 05/21/2013 09:14 PM, Scott Wood wrote: > >> This is Tom's words: > >> > >> a3m071 relies on SPL always building cmd_nvedit.o and env_common.o > and > >> duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. > >> > >> CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds > >> env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... > >> > >> section is in the non-SPL-only area. > > > > If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets > merged, > > we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL > build > > case. > > But the a3m071 SPL U-Boot version also uses the env from NOR flash. So > defining CONFIG_ENV_IS_NOWHERE here would be really confusing! Why is it including env_nowhere.o then? When you say "the a3m071 SPL U-Boot version", do you mean the SPL itself, or the entire configuration that happens to include an SPL? [Zhang Ying] The a3m071 SPL has not included env_nowhere.o, it only included env_flash.o and CONFIG_ENV_IS_IN_FLASH is set. The am335x and pcm051 SPL included env_nowhere.o and CONFIG_ENV_IS_NOWHERE is set. Meanwhile CONFIG_SPL_NET_SUPPORT is set. What this meant is CONFIG_SPL_NET_SUPPORT only co-exist with CONFIG_ENV_IS_NOWHERE in the SPL. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Thursday, May 23, 2013 5:23 AM To: Zhang Ying-B40530 Cc: Stefan Roese; Wood Scott-B07421; x...@theia.denx.de; aflem...@gmail.com; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On Wed, May 22, 2013 at 08:06:01AM +, Zhang Ying-B40530 wrote: > > > -Original Message- > From: Stefan Roese [mailto:s...@denx.de] > Sent: Wednesday, May 22, 2013 2:09 PM > To: Wood Scott-B07421 > Cc: Zhang Ying-B40530; Wood Scott-B07421; x...@theia.denx.de; > u-boot@lists.denx.de; aflem...@gmail.com > Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol > CONFIG_SPL_ENV_SUPPORT for environment in SPL > > (sorry for jumping in so late in this discussion) > > On 05/21/2013 09:14 PM, Scott Wood wrote: > >> This is Tom's words: > >> > >> a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and > >> duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. > >> > >> CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds > >> env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... > >> > >> section is in the non-SPL-only area. > > > > If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, > > we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build > > case. > > But the a3m071 SPL U-Boot version also uses the env from NOR flash. So > defining CONFIG_ENV_IS_NOWHERE here would be really confusing! > [Zhang Ying] > I think Scott means that the specific boards CONFIG_SPL_NET_SUPPORT > is set should define CONFIG_ENV_IS_NOWHERE in the SPL build case. For > example: am335x and pcm051. Correct. I need to see if I can reproduce the problem I had with Joel's patch however. [Zhang Ying] So, Can you accept this patch now? I hope to finish it early, have spent a long time. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 11:46 PM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Ilya Yanok Subject: Re: [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality On 05/21/2013 09:15:08 PM, Zhang Ying-B40530 wrote: > > diff --git a/include/configs/MPC8313ERDB.h > > b/include/configs/MPC8313ERDB.h > > index c28dfe0..a2bdcff 100644 > > --- a/include/configs/MPC8313ERDB.h > > +++ b/include/configs/MPC8313ERDB.h > > @@ -40,7 +40,9 @@ > > #define CONFIG_SPL_INIT_MINIMAL > > #define CONFIG_SPL_SERIAL_SUPPORT > > #define CONFIG_SPL_NAND_SUPPORT > > +#ifdef CONFIG_SPL_BUILD > > #define CONFIG_SPL_NAND_MINIMAL > > +#endif > > #define CONFIG_SPL_FLUSH_IMAGE > > #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" > > #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND > > diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h > > index 8b13b10..5bdd44a 100644 > > --- a/include/configs/P1022DS.h > > +++ b/include/configs/P1022DS.h > > @@ -41,7 +41,9 @@ > > #define CONFIG_SPL_INIT_MINIMAL > > #define CONFIG_SPL_SERIAL_SUPPORT > > #define CONFIG_SPL_NAND_SUPPORT > > +#ifdef CONFIG_SPL_BUILD > > #define CONFIG_SPL_NAND_MINIMAL > > +#endif > > #define CONFIG_SPL_FLUSH_IMAGE > > #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" > > > > diff --git a/include/configs/p1_p2_rdb_pc.h > > b/include/configs/p1_p2_rdb_pc.h > > index 7ed634b..bc48d62 100644 > > --- a/include/configs/p1_p2_rdb_pc.h > > +++ b/include/configs/p1_p2_rdb_pc.h > > @@ -159,7 +159,9 @@ > > #define CONFIG_SPL_INIT_MINIMAL > > #define CONFIG_SPL_SERIAL_SUPPORT > > #define CONFIG_SPL_NAND_SUPPORT > > +#ifdef CONFIG_SPL_BUILD > > #define CONFIG_SPL_NAND_MINIMAL > > +#endif > > #define CONFIG_SPL_FLUSH_IMAGE > > #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" > > Are you sure this belongs in this patch? > [Zhang Ying] > Yes, it is necessary. Because CONFIG_SPL_NAND_MINIMAL has been used > in the file law.c and tlb.c in this patch. What I mean is that it should probably have been done earlier, when you introduced CONFIG_SPL_NAND_MINIMAL. [Zhang Ying] I can understand you mean. Because the symbol "CONFIG_SPL_NAND_MINIMAL" has been useless, I think no need to split out a separate patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Stefan Roese [mailto:s...@denx.de] Sent: Wednesday, May 22, 2013 2:09 PM To: Wood Scott-B07421 Cc: Zhang Ying-B40530; Wood Scott-B07421; x...@theia.denx.de; u-boot@lists.denx.de; aflem...@gmail.com Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL (sorry for jumping in so late in this discussion) On 05/21/2013 09:14 PM, Scott Wood wrote: >> This is Tom's words: >> >> a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and >> duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. >> >> CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds >> env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... >> >> section is in the non-SPL-only area. > > If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, > we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build > case. But the a3m071 SPL U-Boot version also uses the env from NOR flash. So defining CONFIG_ENV_IS_NOWHERE here would be really confusing! [Zhang Ying] I think Scott means that the specific boards CONFIG_SPL_NET_SUPPORT is set should define CONFIG_ENV_IS_NOWHERE in the SPL build case. For example: am335x and pcm051. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/6] spl: Make CONFIG_SPL_BUILD contain more functionality
> diff --git a/include/configs/MPC8313ERDB.h > b/include/configs/MPC8313ERDB.h > index c28dfe0..a2bdcff 100644 > --- a/include/configs/MPC8313ERDB.h > +++ b/include/configs/MPC8313ERDB.h > @@ -40,7 +40,9 @@ > #define CONFIG_SPL_INIT_MINIMAL > #define CONFIG_SPL_SERIAL_SUPPORT > #define CONFIG_SPL_NAND_SUPPORT > +#ifdef CONFIG_SPL_BUILD > #define CONFIG_SPL_NAND_MINIMAL > +#endif > #define CONFIG_SPL_FLUSH_IMAGE > #define CONFIG_SPL_TARGET"u-boot-with-spl.bin" > #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND > diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h > index 8b13b10..5bdd44a 100644 > --- a/include/configs/P1022DS.h > +++ b/include/configs/P1022DS.h > @@ -41,7 +41,9 @@ > #define CONFIG_SPL_INIT_MINIMAL > #define CONFIG_SPL_SERIAL_SUPPORT > #define CONFIG_SPL_NAND_SUPPORT > +#ifdef CONFIG_SPL_BUILD > #define CONFIG_SPL_NAND_MINIMAL > +#endif > #define CONFIG_SPL_FLUSH_IMAGE > #define CONFIG_SPL_TARGET "u-boot-with-spl.bin" > > diff --git a/include/configs/p1_p2_rdb_pc.h > b/include/configs/p1_p2_rdb_pc.h > index 7ed634b..bc48d62 100644 > --- a/include/configs/p1_p2_rdb_pc.h > +++ b/include/configs/p1_p2_rdb_pc.h > @@ -159,7 +159,9 @@ > #define CONFIG_SPL_INIT_MINIMAL > #define CONFIG_SPL_SERIAL_SUPPORT > #define CONFIG_SPL_NAND_SUPPORT > +#ifdef CONFIG_SPL_BUILD > #define CONFIG_SPL_NAND_MINIMAL > +#endif > #define CONFIG_SPL_FLUSH_IMAGE > #define CONFIG_SPL_TARGET"u-boot-with-spl.bin" Are you sure this belongs in this patch? [Zhang Ying] Yes, it is necessary. Because CONFIG_SPL_NAND_MINIMAL has been used in the file law.c and tlb.c in this patch. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/6] powerpc/mpc85xx: modify the functionality clear_bss and the end address of the BSS
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 3:38 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH 2/6] powerpc/mpc85xx: modify the functionality clear_bss and the end address of the BSS On 05/20/2013 01:07:24 AM, ying.zh...@freescale.com wrote: > From: Ying Zhang > > There will clear the BSS in the function clear_bss(), the reset > address of > the BSS started from the __bss_start, and increased by four-byte > increments, > finally stoped depending on the address is equal to the _bss_end. If > the end > address __bss_end is not alignment to 4byte, it will be an infinite > loop. > > 1. The reset action stoped depending on the reset address is greater > than or equal the end address of the BSS. > 2. The end address of the BSS should be 4byte aligned. Because the > reset unit > is 4 Bytes. Should we add explicit alignment of the BSS start as well? [Zhang Ying] That is better. I can add. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Wood Scott-B07421 Sent: Wednesday, May 22, 2013 3:15 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; tom.r...@gmail.com Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On 05/20/2013 09:43:53 PM, Zhang Ying-B40530 wrote: > > > > > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, May 21, 2013 2:56 AM > To: Zhang Ying-B40530 > Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie > Xiaobo-R63061; Tom Rini > Subject: Re: [PATCH] common/Makefile: Add new symbol > CONFIG_SPL_ENV_SUPPORT for environment in SPL > > > I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like > it > > just enables the net/ directory in an SPL. How does that conflict > with > > env stuff? Perhaps there's some other symbol that better describes > the > > actual conflict. > > [Zhang Ying] > > This is Tom's words: > > a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and > duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. > > CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds > env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... > > section is in the non-SPL-only area. If "SPL: Makefile: Build a separate autoconf.mk for SPL" gets merged, we could just have a3m071 define CONFIG_ENV_IS_NOWHERE in the SPL build case. [Zhang Ying] So far I haven't seen it. What should I do? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, May 21, 2013 2:56 AM To: Zhang Ying-B40530 Cc: Wood Scott-B07421; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Tom Rini Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On 05/17/2013 07:58:15 PM, Zhang Ying-B40530 wrote: > > > From: Wood Scott-B07421 > Sent: Friday, May 17, 2013 10:41 PM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de<mailto:u-boot@lists.denx.de>; > aflem...@gmail.com<mailto:aflem...@gmail.com>; Xie Xiaobo-R63061; > Zhang Ying-B40530 > Subject: Re: [PATCH] common/Makefile: Add new symbol > CONFIG_SPL_ENV_SUPPORT for environment in SPL > > On 05/16/2013 10:05:17 PM, > ying.zh...@freescale.com<mailto:ying.zh...@freescale.com> wrote: > > diff --git a/common/Makefile b/common/Makefile > > index f50bf2e..26b8495 100644 > > --- a/common/Makefile > > +++ b/common/Makefile > > @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o > > COBJS-y += cmd_boot.o > > COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o > > COBJS-y += cmd_help.o > > -COBJS-y += cmd_nvedit.o > > COBJS-y += cmd_version.o > > > > # environment > > COBJS-y += env_attr.o > > COBJS-y += env_callback.o > > -COBJS-y += env_common.o > > COBJS-y += env_flags.o > > COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o > > COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o > > @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o > > endif > > > > ifdef CONFIG_SPL_BUILD > > -COBJS-y += cmd_nvedit.o > > -COBJS-y += env_common.o > > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > > COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > > +# environment > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o > > +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) > > +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > > +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o > > +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o > > +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o > > +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > > +else > > +COBJS-y += env_nowhere.o > > +endif > > Why do you include these files only if we *don't* have net support? > [Zhang Ying] > This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This > is comments from Tom . I'm not that familiar with CONFIG_SPL_NET_SUPPORT, but it looks like it just enables the net/ directory in an SPL. How does that conflict with env stuff? Perhaps there's some other symbol that better describes the actual conflict. [Zhang Ying] This is Tom's words: a3m071 relies on SPL always building cmd_nvedit.o and env_common.o and duplicated CONFIG_ENV_IS_IN_FLASH in the SPL section. CONFIG_SPL_NET_SUPPORT relies on the same always-built ins and adds env_nowhere.o which works because the regular CONFIG_ENV_IS_IN_... section is in the non-SPL-only area. Now, your end-goal is to have env from, I assume, NAND, also exist on SPL? I guess for now, lets go ahead and duplicate a few lines of ENV_IS.. inside the SPL area and when you add NAND env, add ifneq ($(CONFIG_SPL_NET_SUPPORT),y)...endif around it and add to the README that CONFIG_SPL_NET_SUPPORT conflicts with SPL env from nand. My understanding is that there are two kinds of methods: 1. In Tom's opinion: add CONFIG_ENV_IS_IN_... inside the SPL area and add ifneq ($(CONFIG_SPL_NET_SUPPORT),y)...endif around it. 2. Add new SPL env symbol(for example: CONFIG_SPL_ENV_IS_IN_MMC) for the SPL. This need to add excessive symbol for SPL env. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
From: Wood Scott-B07421 Sent: Friday, May 17, 2013 10:41 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On 05/16/2013 10:05:17 PM, ying.zh...@freescale.com wrote: > diff --git a/common/Makefile b/common/Makefile > index f50bf2e..26b8495 100644 > --- a/common/Makefile > +++ b/common/Makefile > @@ -44,13 +44,11 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o > COBJS-y += cmd_boot.o > COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o > COBJS-y += cmd_help.o > -COBJS-y += cmd_nvedit.o > COBJS-y += cmd_version.o > > # environment > COBJS-y += env_attr.o > COBJS-y += env_callback.o > -COBJS-y += env_common.o > COBJS-y += env_flags.o > COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o > COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o > @@ -215,18 +213,27 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o > endif > > ifdef CONFIG_SPL_BUILD > -COBJS-y += cmd_nvedit.o > -COBJS-y += env_common.o > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > +# environment > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o > +ifneq ($(CONFIG_SPL_NET_SUPPORT),y) > +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > +COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o > +COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o > +COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o > +COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > +else > +COBJS-y += env_nowhere.o > +endif Why do you include these files only if we *don't* have net support? [Zhang Ying] This because CONFIG_SPL_NET_SUPPORT is conflict with SPL ENV. This is comments from Tom . -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality
Oh, I understand. Thanks. From: Wood Scott-B07421 Sent: Friday, May 17, 2013 4:39 PM To: Zhang Ying-B40530 Cc: Tom Rini; u-boot@lists.denx.de; aflem...@gmail.com; Wood Scott-B07421; Xie Xiaobo-R63061 Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality On 05/17/2013 10:04:12 AM, Zhang Ying-B40530 wrote: > > > From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini > [tr...@ti.com] > Sent: Friday, May 17, 2013 2:54 PM > To: Zhang Ying-B40530 > Cc: x...@theia.denx.de; u-boot@lists.denx.de; aflem...@gmail.com; > w...@theia.denx.de; Wood Scott-B07421 > Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain > more functionality > > On Fri, May 17, 2013 at 02:26:04PM +, Zhang Ying-B40530 wrote: > > [Zhang Ying] > > So for this patch, are there any problem? > > > > Yes. It doesn't seem to do anything. Which is why I want to see the > series of patches that result in new functionality on some boards, so > we > can evaluate the changes in context. > [Zhang Ying] > It seems to be several patches were sent together. No, they weren't. They were sent separately. Use git format-patch to generate all the patches at once, so they're numbered, and use git send-email to send them all at once, so they're threaded properly. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality
From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] Sent: Friday, May 17, 2013 2:54 PM To: Zhang Ying-B40530 Cc: x...@theia.denx.de; u-boot@lists.denx.de; aflem...@gmail.com; w...@theia.denx.de; Wood Scott-B07421 Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality On Fri, May 17, 2013 at 02:26:04PM +, Zhang Ying-B40530 wrote: > > > From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] > Sent: Friday, May 17, 2013 2:20 PM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de; aflem...@gmail.com; x...@theia.denx.de; Wood > Scott-B07421 > Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more > functionality > > On Fri, May 17, 2013 at 02:10:49PM +, Zhang Ying-B40530 wrote: > > > > > From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] > > Sent: Friday, May 17, 2013 12:34 PM > > To: Zhang Ying-B40530 > > Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Xie > > Xiaobo-R63061; Zhang Ying-B40530 > > Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more > > functionality > > > > On Fri, May 17, 2013 at 05:12:19PM +0800, ying.zh...@freescale.com wrote: > > > > > From: Ying Zhang > > > > > > There was some functionality will be used in the SPL. They > > > had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > > > into the SPL. > > > > > > Signed-off-by: Ying Zhang > > > --- > > > Compared with the previous version, give up new symbol and delete the line > > > ifndef CONFIG_SPL_BUILD in common/env_common.c > > > > What the heck is going on? First, you seem to be changing a number of > > checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop > > defining CONFIG_SPL_NAND_MINIMAL always and only define it for > > CONFIG_SPL_BUILD. > > Next, powerpc uses > > -ffunction-sections/-fdata-sections/--gc-sections so outside of > > assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not > > build something that's a static function. > > [Zhang Ying] > > First, Your understanding is correct. > > CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a > > state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) > > So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for > > SD SPL but not for NAND SPL. > > > > Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is > > increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL > > for mpc85xx can't large than 4K, Now only a few bytes of free space. > > > > Can you please post the everything as a series, including adding the > > board(s) that need environment in SPL? > > [Zhang Ying] > > The patch is split into several in order to facilitate everyone to review. > > Right. So please post a 5 or 10 or whatever part series that shows us > the end goal as well as each step it takes to go from today to that > platform working. Thanks! > [Zhang Ying] > So for this patch, are there any problem? > Yes. It doesn't seem to do anything. Which is why I want to see the series of patches that result in new functionality on some boards, so we can evaluate the changes in context. [Zhang Ying] It seems to be several patches were sent together. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality
From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] Sent: Friday, May 17, 2013 2:20 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; aflem...@gmail.com; x...@theia.denx.de; Wood Scott-B07421 Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality On Fri, May 17, 2013 at 02:10:49PM +, Zhang Ying-B40530 wrote: > > From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] > Sent: Friday, May 17, 2013 12:34 PM > To: Zhang Ying-B40530 > Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Xie > Xiaobo-R63061; Zhang Ying-B40530 > Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more > functionality > > On Fri, May 17, 2013 at 05:12:19PM +0800, ying.zh...@freescale.com wrote: > > > From: Ying Zhang > > > > There was some functionality will be used in the SPL. They > > had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > > into the SPL. > > > > Signed-off-by: Ying Zhang > > --- > > Compared with the previous version, give up new symbol and delete the line > > ifndef CONFIG_SPL_BUILD in common/env_common.c > > What the heck is going on? First, you seem to be changing a number of > checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop > defining CONFIG_SPL_NAND_MINIMAL always and only define it for > CONFIG_SPL_BUILD. > Next, powerpc uses > -ffunction-sections/-fdata-sections/--gc-sections so outside of > assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not > build something that's a static function. > [Zhang Ying] > First, Your understanding is correct. > CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a > state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) > So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for > SD SPL but not for NAND SPL. > > Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is > increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL > for mpc85xx can't large than 4K, Now only a few bytes of free space. > > Can you please post the everything as a series, including adding the > board(s) that need environment in SPL? > [Zhang Ying] > The patch is split into several in order to facilitate everyone to review. Right. So please post a 5 or 10 or whatever part series that shows us the end goal as well as each step it takes to go from today to that platform working. Thanks! [Zhang Ying] So for this patch, are there any problem? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality
From: Tom Rini [tom.r...@gmail.com] on behalf of Tom Rini [tr...@ti.com] Sent: Friday, May 17, 2013 12:34 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH v2] spl: Make CONFIG_SPL_BUILD contain more functionality On Fri, May 17, 2013 at 05:12:19PM +0800, ying.zh...@freescale.com wrote: > From: Ying Zhang > > There was some functionality will be used in the SPL. They > had been excluded by ifndef CONFIG_SPL_BUILD. Now, put it > into the SPL. > > Signed-off-by: Ying Zhang > --- > Compared with the previous version, give up new symbol and delete the line > ifndef CONFIG_SPL_BUILD in common/env_common.c What the heck is going on? First, you seem to be changing a number of checks from !CONFIG_SPL_BUILD to !CONFIG_SPL_NAND_MINIMAL, and then stop defining CONFIG_SPL_NAND_MINIMAL always and only define it for CONFIG_SPL_BUILD. Next, powerpc uses -ffunction-sections/-fdata-sections/--gc-sections so outside of assembler files, we shouldn't need to be using CONFIG_SPL_BUILD to not build something that's a static function. [Zhang Ying] First, Your understanding is correct. CONFIG_SPL_NAND_MINIMAL has not been used and it suited to express a state(CONFIG_SPL_BUILD && CONFIG_SPL_INIT_MINIMAL && CONFIG_NAND) So, I used !CONFIG_SPL_NAND_MINIMAL to contain some functionality for SD SPL but not for NAND SPL. Second, I tried. If we don't use !CONFIG_SPL_BUILD to build, the SPL size is increased and the SPL size exceeds 4K Bytes. As you know, the NAND SPL for mpc85xx can't large than 4K, Now only a few bytes of free space. Can you please post the everything as a series, including adding the board(s) that need environment in SPL? [Zhang Ying] The patch is split into several in order to facilitate everyone to review. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Add the symbol for the minimal SPL used to eliminate unused code
-Original Message- From: Wood Scott-B07421 Sent: Thursday, May 16, 2013 8:01 AM To: Tom Rini Cc: Zhang Ying-B40530; u-boot@lists.denx.de; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH] Add the symbol for the minimal SPL used to eliminate unused code On 05/15/2013 06:58:44 PM, Tom Rini wrote: > On Wed, May 15, 2013 at 03:02:19PM +0800, ying.zh...@freescale.com > wrote: > > > From: Ying Zhang > > > > Add the symbol CONFIG_SPL_BUILD_MINIMAL for the minimal SPL. It > used to > > eliminate code unused in the minimal SPL but used in the SPL. > [snip] > > diff --git a/common/env_common.c b/common/env_common.c > > index 906b41f..5d82ea0 100644 > > --- a/common/env_common.c > > +++ b/common/env_common.c > > @@ -156,7 +156,7 @@ int set_default_vars(int nvars, char * const > vars[]) > > H_NOCLEAR | H_INTERACTIVE, nvars, vars); > > } > > > > -#ifndef CONFIG_SPL_BUILD > > +#ifndef CONFIG_SPL_BUILD_MINIMAL > > /* > > * Check if CRC is valid and (if yes) import the environment. > > * Note that "buf" may or may not be aligned. > > Hold up, this ignores the whole world of CONFIG_SPL_FRAMEWORK and > probably breaks the ARM targets. You need to instal an ARM toolchain > (either one of the Linaro ones or ELDK 5.x) and make sure that MAKEALL > -a arm is also fine after your SPL changes. Not to mention that the "minimal init" concept is currently only well-defined for mpc85xx, so this really doesn't belong in common/. Minimal 85xx SPLs don't even include libcommon, so why is this change needed at all? [Zhang Ying] Just because some functionality is necessary for SPL booting from SD. They were excluded from the SPL by CONFIG_SPL_BUILD now. Of course, including the function env_import() in common/env_common.c. Andy was right, the goal of this patch was to make CONFIG_SPL_BUILD contain more functionality. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL
-Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Wednesday, May 15, 2013 10:07 PM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; Wood Scott-B07421; aflem...@gmail.com; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH v3] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL On Wed, May 15, 2013 at 10:15:28AM +0800, ying.zh...@freescale.com wrote: > From: Ying Zhang > > There will need the environment in SPL for reasons other than network > support (in particular, hwconfig contains info for how to set up DDR). > > Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT > for environment in common/Makefile. > > Signed-off-by: Ying Zhang [snip] > # environment > @@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o > COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o > COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o > COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o > -COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o You need to move all of these options down so that adding them to SPL later, as needed, doesn't have further deltas, and to keep things organized still. > # command > COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o > @@ -215,18 +213,16 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o > endif > > ifdef CONFIG_SPL_BUILD > -COBJS-y += cmd_nvedit.o > -COBJS-y += env_common.o > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o This CONFIG_ENV_IS_IN_FLASH is now duplicated and needs to be removed, when you move all of the other CONFIG_ENV_IS_... down to the always part of the Makefile. [snip] > diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h > index ef00306..f47d3d1 100644 > --- a/include/configs/am335x_evm.h > +++ b/include/configs/am335x_evm.h > @@ -325,6 +325,7 @@ > #define CONFIG_SPL_GPIO_SUPPORT > #define CONFIG_SPL_YMODEM_SUPPORT > #define CONFIG_SPL_NET_SUPPORT > +#define CONFIG_SPL_ENV_SUPPORT > #define CONFIG_SPL_NET_VCI_STRING"AM335x U-Boot SPL" > #define CONFIG_SPL_ETH_SUPPORT > #define CONFIG_SPL_SPI_SUPPORT > diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h > index d0ea74e..926842f 100644 > --- a/include/configs/pcm051.h > +++ b/include/configs/pcm051.h > @@ -224,6 +224,7 @@ > #define CONFIG_SPL_GPIO_SUPPORT > #define CONFIG_SPL_YMODEM_SUPPORT > #define CONFIG_SPL_NET_SUPPORT > +#define CONFIG_SPL_ENV_SUPPORT > #define CONFIG_SPL_NET_VCI_STRING"pcm051 U-Boot SPL" > #define CONFIG_SPL_ETH_SUPPORT > #define CONFIG_SPL_SPI_SUPPORT Have you made sure these two boards still compile? I bet they don't as they aren't setting CONFIG_ENV_IS_NOWHERE for SPL and CONFIG_ENV_IS_...somewhere-else for non-SPL. [Zhang Ying] Oh, there are some confusion. I thought CONFIG_ENV_IS_xxx defined is consistent for both SPL and non-SPL. If you want to set CONFIG_ENV_IS_NOWHERE for SPL and CONFIG_ENV_IS_xxx somewhere-else for non-SPL, so all of lines CONFIG_ENV_IS_... cann't be moved to the public area, because CONFIG_ENV_IS_NOWHERE has always been not effective and CONFIG_ENV_IS_... has been effective in common/Makefile. Unless we define some new symbols that for SPL? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT
> > endif > > > > ifdef CONFIG_SPL_BUILD > > -COBJS-y += cmd_nvedit.o > > -COBJS-y += env_common.o > > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > > COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o > > endif > > +COBJS-y += cmd_nvedit.o > > +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > > COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o > > COBJS-y += console.o > > COBJS-y += dlmalloc.o > > Just move the whole CONFIG_ENV_IS_IN.. section down to where we always > build objects, and update the comments in the Makefile in both spots. > [Zhang Ying] > For common lines(for example: cmd_nvedit.o) that shared by the SPL and > non-SPL, > can we move it to public area? So, we can avoid excessive SPL symbols. Right. Re-order things so we're duplicating as little as possible. There's already a bit of needless duplication going on here. [Zhang Ying] Ok, we had moved CONFIG_ENV_IS_IN.. section to public area in another patch just submitted :"move the common makefile line out of the CONFIG_SPL_BUILD ifdef". Please review. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT
-Original Message- From: Tom Rini [mailto:tom.r...@gmail.com] On Behalf Of Tom Rini Sent: Tuesday, May 14, 2013 6:13 AM To: Zhang Ying-B40530 Cc: u-boot@lists.denx.de; Wood Scott-B07421; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH v2] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT On Mon, May 13, 2013 at 03:07:57PM +0800, ying.zh...@freescale.com wrote: > From: Ying Zhang > > There will need the environment in SPL for reasons other than network > support (in particular, hwconfig contains info for how to set up DDR). > > Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT in > common/Makefile. [snip] > --- a/common/Makefile > +++ b/common/Makefile > @@ -44,7 +44,6 @@ COBJS-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o > COBJS-y += cmd_boot.o > COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o > COBJS-y += cmd_help.o > -COBJS-y += cmd_nvedit.o > COBJS-y += cmd_version.o > > # environment > @@ -67,7 +66,6 @@ COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o > COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o > COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o > COBJS-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o > -COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > > # command > COBJS-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o > @@ -214,18 +212,16 @@ COBJS-$(CONFIG_CMD_GPT) += cmd_gpt.o > endif > > ifdef CONFIG_SPL_BUILD > -COBJS-y += cmd_nvedit.o > -COBJS-y += env_common.o > COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o > COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += cmd_nvedit.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_attr.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_callback.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > -COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_common.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o > endif > +COBJS-y += cmd_nvedit.o > +COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o > COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o > COBJS-y += console.o > COBJS-y += dlmalloc.o Just move the whole CONFIG_ENV_IS_IN.. section down to where we always build objects, and update the comments in the Makefile in both spots. [Zhang Ying] For common lines(for example: cmd_nvedit.o) that shared by the SPL and non-SPL, can we move it to public area? So, we can avoid excessive SPL symbols. And a3m071 needs to be updated for CONFIG_SPL_ENV_SUPPORT too. Thanks! [Zhang Ying] In include/configs/a3m071.h, there was no CONFIG_SPL_NET_SUPPORT to be defined. Are you sure to add CONFIG_SPL_ENV_SUPPORT for it? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/p1022ds: boot from SD card/SPI flash with SPL
> diff --git a/spl/Makefile b/spl/Makefile > index b5a8de7..3a3b868 100644 > --- a/spl/Makefile > +++ b/spl/Makefile > @@ -51,6 +51,9 @@ LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o > endif > ifeq ($(CPU),mpc85xx) > LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o > +ifdef CONFIG_SPL_INIT_DDR_SUPPORT > +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o > +endif Why isn't this handled as part of lib8xxx.o? We should avoid putting hardware-specific things in generic Makefiles. There ones that are already there should be fixed at some point. [Zhang Ying] Do you mean that all things of the directory " arch/powerpc/cpu/mpc8xxx/ddr " will be moved to the directory "arch/powerpc/cpu/mpc8xxx/"? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT
-Original Message- From: Wood Scott-B07421 Sent: Saturday, May 11, 2013 8:29 AM To: Wolfgang Denk Cc: Zhang Ying-B40530; u-boot@lists.denx.de; Xie Xiaobo-R63061; Zhang Ying-B40530 Subject: Re: [U-Boot] [PATCH] common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT On 05/10/2013 07:03:07 PM, Wolfgang Denk wrote: > Dear ying.zh...@freescale.com, > > In message <1368182421-859-1-git-send-email-ying.zh...@freescale.com> > you wrote: > > From: Ying Zhang > > > > Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace > CONFIG_SPL_NET_SUPPORT. > > Any CONFIG_* stuff must be documented in the README. Please add this > documentation. > > > In common/Makefile, the environment-related files in SPL is difined > by > > CONFIG_SPL_NET_SUPPORT, it is wrong. > > s/difined/defined/ > > Could you please also explain, what exactly is wrong, and how your new > code fixes this? We will need the environment in SPL for reasons other than network support (in particular, hwconfig contains info for how to set up DDR). Yes, this information should go in the changelog. [Zhang Ying] OK, I will update this patch and CONFIG_SPL_ENV_SUPPORT will be added in README. > --- a/include/configs/am335x_evm.h > +++ b/include/configs/am335x_evm.h > @@ -325,6 +325,7 @@ > #define CONFIG_SPL_GPIO_SUPPORT > #define CONFIG_SPL_YMODEM_SUPPORT > #define CONFIG_SPL_NET_SUPPORT > +#define CONFIG_SPL_ENV_SUPPORT > #define CONFIG_SPL_NET_VCI_STRING"AM335x U-Boot SPL" > #define CONFIG_SPL_ETH_SUPPORT > #define CONFIG_SPL_SPI_SUPPORT > diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h index > d0ea74e..926842f 100644 > --- a/include/configs/pcm051.h > +++ b/include/configs/pcm051.h > @@ -224,6 +224,7 @@ > #define CONFIG_SPL_GPIO_SUPPORT > #define CONFIG_SPL_YMODEM_SUPPORT > #define CONFIG_SPL_NET_SUPPORT > +#define CONFIG_SPL_ENV_SUPPORT > #define CONFIG_SPL_NET_VCI_STRING"pcm051 U-Boot SPL" > #define CONFIG_SPL_ETH_SUPPORT > #define CONFIG_SPL_SPI_SUPPORT Are you sure these are the only locations that need this? [Zhang Ying] I've searched for the symbol "CONFIG_SPL_NET_SUPPORT" all of the code, there is only the two files to define. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/p1022ds: boot from SD card/SPI flash with SPL
This patch needs to be broken into several patches that each take care of one logical problem; it's too hard to properly review (and have the right people pay attention to certain parts) in its current state. [Zhang Ying] It only can be broken to two patches, one for SD boot, another for SPI boot. > diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c > b/arch/powerpc/cpu/mpc85xx/tlb.c index 0dff37f..d21b324 100644 > --- a/arch/powerpc/cpu/mpc85xx/tlb.c > +++ b/arch/powerpc/cpu/mpc85xx/tlb.c > @@ -55,7 +55,7 @@ void init_tlbs(void) > return ; > } > > -#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD) > +#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD_MINIMAL) > void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long > *epn, > phys_addr_t *rpn) > { Aren't you breaking the existing minimal targets? CONFIG_SPL_BUILD_MINIMAL does not currently exist, and you add it only for P1022DS. [Zhang Ying] Yes, it needs to be added for other existing boards that defines CONFIG_SPL_INIT_MINIMAL. It should include p1_p2_rdb_pc. > @@ -83,5 +107,6 @@ SECTIONS > *(.sbss*) > *(.bss*) > } > + . = ALIGN(4); > __bss_end = .; > } This seems unrelated. [Zhang Ying] It is necessary. In the function clear_bss(), the address of bss is on the basis of the __bss_start, and then to four bytes of incremental growth, finally the last stop is based on the address and __bss_end is equal or not. > diff --git a/board/freescale/common/sdhc_boot.c > b/board/freescale/common/sdhc_boot.c > index e432318..96b0680 100644 > --- a/board/freescale/common/sdhc_boot.c > +++ b/board/freescale/common/sdhc_boot.c > + val = *(u16 *)(tmp_buf + ESDHC_BOOT_IMAGE_SIGN_ADDR); > + if ((u16)ESDHC_BOOT_IMAGE_SIGN != val) { > + free(tmp_buf); > + return; > + } Why do you need this cast? [Zhang Ying] The offset 0x1FE of the config data sector should contain the value 0x55AA. If the value in this location doesn't match 0x55AA, it means that the SD/MMC card doesn't contain a valid user code. > + offset = *(u32 *)(tmp_buf + ESDHC_BOOT_IMAGE_ADDR); > + offset += CONFIG_SYS_MMC_U_BOOT_OFFS; > + /* Get the code size from offset 0x48 */ > + code_len = *(u32 *)(tmp_buf + ESDHC_BOOT_IMAGE_SIZE); > + code_len -= CONFIG_SYS_MMC_U_BOOT_OFFS; > + /* > + * Load U-Boot image from mmc into RAM > + */ > + /* > + SDHC card: code offset and length is stored in block units > rather > + * than a single byte > + */ /* * U-Boot multiline * comment style is * like this. */ > + blk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len; > + blk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len; > + > + err = mmc->block_dev.block_read(0, blk_start, blk_cnt, > + (uchar > *)CONFIG_SYS_MMC_U_BOOT_DST); > + if (err != blk_cnt) { > + free(tmp_buf); > + return ; > + } > +} > +void mmc_boot(void) No space before ; That return is pointless since you're at the end of the function anyway. [Zhang Ying] Ok, I can hang the cpu and print the error information. > + * > + * 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 > + */ > + > +#ifndef __SDHC_BOOT_H_ > +#define __SDHC_BOOT_H_1 > + > + > +int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr); void > +mmc_get_env(void); void mmc_boot(void); > + > +#endif /* __SDHC_BOOT_H_ */ Does this stuff really belong in board/freescale? Should probably at least be in arch/powerpc/cpu/mpc85xx, if not more generic. [Zhang Ying] Ok, whether we can handle like this: sdhc_boot.c and spi_boot.c will be deleted. All this stuff in the sdhc_boot.c will be moved to drivers/mmc/fsl_esdhc.c, and the functions in the spi_boot.c will be moved to drivers/mmc/fsl_espi.c. > +void hang(void) > +{ > + puts("### ERROR ### Please RESET the board ###\n"); > + for (;;) > + ; > +} Whitespace [Zhang Ying] ? > diff --git a/common/Makefile b/common/Makefile index 0e0fff1..bc80414 > 100644 > --- a/common/Makefile > +++ b/common/Makefile > @@ -225,6 +225,11 @@ COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o > COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_flags.o > COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o > COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o > +COBJS-$(CONFIG_SPL_HWCONFIG_SUPPORT) += hwconfig.o > +COBJS-$(CONFIG_SPL_INIT_DDR_SUPPORT) += ddr_spd.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o > +COBJS-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o CONFIG_SPL_ENV_SUPPORT should replace CONFIG_SPL_NET_SUPPORT here (and add it to the boards that already have CONFIG_SPL_NET_SUPPORT).