On Wed, Jan 25, 2012 at 4:43 AM, Christian Riesch <christian.rie...@omicron.at> wrote: > Hi, > > On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad > <prabhakar.cse...@gmail.com> wrote: >> On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch < >> christian.rie...@omicron.at> wrote: >> >>> Hi, >>> >>> On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad >>> <prabhakar.cse...@gmail.com> wrote: >>> > *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is >>> > enabled for example for da850evm in spl frame work how can i do that * >>> >>> Why do you want to do that? A command in an SPL? >>> >> For davinci soc I wanted to add "clocks" command not particularly for >> SPL only >> when I move some piece of code from arc/arm/cpu/arm926ejs/cpu.c to say >> arc/arm/cpu/arm926ejs/speed.c and implement the command I get following >> errors, >> >> arm-none-linux-gnueabi-ld: error: no memory region specified for >> loadable section `.u_boot_cmd' >> make[2]: *** >> [/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl/u-boot-spl] Error 1 >> make[2]: Leaving directory >> `/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl' >> I get these errors for SPL enabled > > As Wolfgang wrote, commands cannot be run in SPL and therefore you > should not compile them into SPL. > > How about something like this: > > #ifndef CONFIG_SPL_BUILD > U_BOOT_CMD( > ... > ); > #endif > > If you don't use Sughosh's patches I think you need #ifndef > CONFIG_NAND_SPL instead of #ifndef CONFIG_SPL_BUILD. > Regards, Christian
Maybe we should poke <command.h> to nop out U_BOOT_CMD for CONFIG_SPL_BUILD? OTOH, #ifndef'ing U_BOOT_CMD and the code itself gets us a space savings we wouldn't get otherwise (I suspect giving the MTD/NAND issue I've mentioned before)... -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot