Dear Wolfgang, On Mon, 2010-11-08 at 16:36 -0700, Wolfgang Denk wrote: > Dear Haiying Wang, > > Why it looks broken? I do need CONFIG_NAND defined for 8536DS nand > > build. For building nand uboot, 2 images are needed, one is 4K > nand_spl > > Yes. But there is also MPC8536DS and MPC8536DS_36BIT and > MPC8536DS_SDCARD and MPC8536DS_SPIFLASH which do NOT define > CONFIG_NAND, but they too need a definition of CONFIG_SYS_TEXT_BASE. MPC8536DS/_36BIT/_SDCARD/_SPIFLASH are in parallel with _NAND. I understand they all need their CONFIG_SYS_TEXT_BASE.
But here we talk about the MPC8536DS_NAND_config which need two uboot images, each should have its own CONFIG_SYS_TEXT_BASE. e.g. in u-boot/Makefile " $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin " u-boot-spl-16k.bin needs 0xfff00000 as CONFIG_SYS_TEXT_BASE u-boot.bin needs 0xf8f82000 as CONFIG_SYS_TEXT_BASE > > > Well, I guess it also showed where the previous definition came > from?. > > Yes, it showed the first definition of CONFIG_SYS_TEXT_BASE in my > > example code which is 0xfff00000 in MPC8536DS.h was redefined. But > in > > fact, I need that value instead of 0xf8f82000 for nand spl. > > You did not answer my question. The error message shows _where_ the > previous definition came from. Please check this. OK, the error message is: "In file included from /home/haiying/Opensource/Kumar/u-boot-mpc85xx/include/config.h:5, from ns16550.c:7: /home/haiying/Opensource/Kumar/u-boot-mpc85xx/include/configs/MPC8536DS.h:40:1: warning: "CONFIG_SYS_TEXT_BASE" redefined " Here are the lines in MPC8536DS.h(using git diff result, so that the changes I made can be seen clearly) diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h index 8b8f467..0eb3072 100644 --- a/include/configs/MPC8536DS.h +++ b/include/configs/MPC8536DS.h @@ -36,8 +36,12 @@ 36: #ifdef CONFIG_NAND 37: #define CONFIG_NAND_U_BOOT 1 38: #define CONFIG_RAMBOOT_NAND 1 39:+#ifdef CONFIG_NAND_SPL 40:+#define CONFIG_SYS_TEXT_BASE 0xfff00000 41:+#else 42: #define CONFIG_SYS_TEXT_BASE 0xf8f82000 43: #endif 44: +#endif > > CONFIG_NAND was used for the final uboot image, and CONFIG_NAND_SPL > was > > used for nand_spl image. However, after that commit, the CONFIG_NAND > > combined the usage of CONFIG_MK_NAND and CONFIG_NAND. > > Right. Why would we need two different defines for the same thing? I need two different defines for generating the different image, which are under the same CONFIG_NAND defines now. > > > Try to find out where that redefine is coming from, and fix that. > And > > > fix the ",NAND" flag in boards.cfg if this is not what you want. > > The redefine came from the define of CONFIG_SYS_TEXT_BASE for > nand_spl. > > Sorry, but this makes no sense. If the code looks as above, there is > always at most one define of CONFIG_SYS_TEXT_BASE in the board config > file (actually it's missing for boards that don't define CONFIG_NAND). Yes, now the problem is only one define of CONFIG_SYS_TEXT_BASE is allowed for one board config,i.e CONFIG_NAND, but two images need to be generated for nand boot, one is u-boot-spl.bin, the other is u-boot.bin. They need different CONFIG_SYS_TEXT_BASE. Haiying _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot