I understand about scripting. I am trying to implement some somewhat involved logic that walks a table of valid images. I am not convinced that the u-boot scripting is sufficient for it. This table is an array of structs. I need a loop that looks at a struct and determine if it is valid and then do a couple of setenv. Nand is working fine. I can execute the nand commands from the command line without problems. If you have any insights please let me know. David
On Fri, Feb 18, 2011 at 1:54 PM, Scott Wood <scottw...@freescale.com> wrote: > On Fri, 18 Feb 2011 08:29:45 -0500 > D Kesselring <kesselri...@gmail.com> wrote: > >> Hello, >> I am trying to add some code to U-Boot that will read a NAND location >> to determine how to setup some environment variables. I am using a >> LogicPD SOM board with an OMAP3503 (very similar to Zoom). I have >> found the code that handles the user nand commands and am trying to >> use ‘nand_read_skip_bad’. This needs a ‘nand_info_t*’ which I was >> trying to get from the global ‘nand_info[]’ but it does not seem to be >> initialized. My questions are (1) is the the best way to do this and >> (2) if so, how do I get ‘nand_info[]’ initialized. > > As Wolfgang pointed out, the best way is probably using scripting (and > certainly not by hacking up main_loop()), and thus you won't be calling > nand_raed_skip_bad() directly. But that still requires NAND to have been > initialized. > > You need a NAND controller driver. This driver supplies board_nand_init(), > or in some cases may be called by board_nand_init() that platform code > supplies. > > I'm not familiar with OMAP chips, but perhaps drivers/mtd/nand/omap_gpmc.c > is the driver you want? In which case your board config file needs to > define CONFIG_NAND_OMAP_GPMC, as well as any driver-specific defines there > may be. > > -Scott > > -- W. David Kesselring 919-349-1079 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot