[U-Boot] How to start U-Boot for i.MX31 NAND out of RedBoot (out of RAM)

Magnus Lilja lilja.magnus at gmail.com
Tue Jul 14 16:03:33 CEST 2009


Hi

2009/7/14 Ulrich Gerster <gersteru at dhbw-loerrach.de>:
> Hello again,
>
>>>> Magnus Lilja <lilja.magnus at gmail.com> 14.07.09 13.08 Uhr >>>
>> Hi
>
>>> Another strange thing is the nand driver. I build my u-boot with:
>>> #define CONFIG_MX31_NAND   1
>>> #define CONFIG_CMD_NAND
>>> #define CONFIG_SYS_NO_FLASH   1
>>> #define CONFIG_ENV_IS_IN_NAND   1
>>> #define CONFIG_SYS_NAND_BASE   CS0_BASE
>>> #define CONFIG_SYS_MAX_NAND_DEVICE      1
>>> #define CONFIG_SYS_NAND_MAX_CHIPS       1
>>>
>>> If I then try to get "flinfo" information u-boot jumps to the next command line and prints nothing.
>>> If I try "nand info" I get information about nand device 0.
>>> Another strange thing is that I can't read from nand flash but I can write.
>>>
>>> Do you have any suggestions?
>
>> The only i.MX31 NAND driver I've used in U-boot is the one I submitted
>> to the list last year but it was rejected. Other people have sent
>> updated drivers (I think there was a i.MX27 driver posted not long
>> ago), but I haven't tried these.
>> Even so, the CONFIG_SYS_NAND_BASE looks incorrect but I don't know if
>> that's the only problem.
>
> CONFIG_SYS_NAND_BASE   CS0_BASE should be correct because the Flash is located at 0xA0000000 which should be CS0_BASE. Why do you think it is wrong?

Because the NAND flash is not connected to any of the standard memory
mapped chip selects of the i.MX31. The i.MX31 has a dedicated NAND
interface. But I don't think CONFIG_SYS_NAND_BASE matters for the
i.MX31, the rest of U-boot needs it to be defined to something.

>
> I used the patch from you out of this posting:
> [U-Boot-Users] [PATCH RFC 3/5] i.MX31: Add i.MX31 NAND Flash Controller driver.
> http://lists.denx.de/pipermail/u-boot/2008-August/038239.html
>
> They should work, or not? Do they require something else?

I haven't tried that driver on a recent U-boot so I don't know if (or
how) it will work when applied to a recent U-Boot.

Did you define the following two as well (they might have been renamed
since last year).
#define CFG_ENV_OFFSET		0x40000
/* CFG_ENV_SIZE has to be a multiple of the NAND block size */
#define CFG_ENV_SIZE		(128 * 1024)

If CFG_ENV_OFFSET (or perhaps it's called CONFIG_ENV_OFFSET nowadays)
is zero, then 'saveenv' will overwrite your existing redboot.

/Magnus


More information about the U-Boot mailing list