From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 25 Feb 2013 16:15:37 -0600 Subject: [U-Boot] [PATCH 1/4] common: imx: Implement generic u-boot.nand target In-Reply-To: <201302252210.35820.marex@denx.de> (from marex@denx.de on Mon Feb 25 15:10:35 2013) References: <1361823013.27903.8@snotra> <201302252210.35820.marex@denx.de> Message-ID: <1361830537.27903.11@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/25/2013 03:10:35 PM, Marek Vasut wrote: > Dear Scott Wood, > > > On 02/25/2013 12:19:54 PM, Marek Vasut wrote: > > > +$(obj)u-boot.nand: $(obj)u-boot.bin depend > > > + if [ "X$(CONFIG_NAND_TRG_PATH)X" = "XX" ] ; > > > then \ > > > + echo "This CPU does not support u-boot.nand > > > target!" ; \ > > > + exit 1 > > > ; \ > > > + fi > > > + $(MAKE) -C $(CONFIG_NAND_TRG_PATH) $(obj)u-boot.nand > > > > We already have CONFIG_SPL_TARGET. Why do we need a new mechanism > > specific to NAND, with ifdefs in the main Makefile? > > This board doesn't use SPL at all. So maybe we need a more general (but optional) CONFIG_BUILD_TARGET. > > If we do have something specific to NAND, it should be > u-boot-nand.bin > > to match what nand_spl produced, and it should just be a generic > rule > > that links to what CONFIG_SPL_TARGET produced, if the right CONFIG > > symbol is set by the board config to say that this is a NAND SPL. > Or > > is someone going to say that they want to generate multiple > different > > SPL images from the same build? :-P > > I'd like to generate a bootable NAND image on mx53 and on mx23/28, From the same build, or just in general? > thus I need generic target. And I need it flexible enough, since on > mx23/28 it munges u- > boot.sb into the resulting image while on mx53 it munges u-boot.imx > into the > resulting image. So each one would set the appropriate CONFIG_BUILD_TARGET for whatever needs to get built, and then something like CONFIG_NAND_IMAGE could hold the image name that should be linked to produce a standard u-boot-nand.bin output. -Scott