Can't save u-boot environment variable to NAND on imx28 platform.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't save u-boot environment variable to NAND on imx28 platform.

3,356 Views
yongkimin
Contributor III

I could change the path form MMC to NAND when save the u-boot variable for help.

Re: how to change the u-boot environment to NAND when saveenv on i.MX28 coustom board

And I add NAND parameters to u-boot source code so I got the below result as log.

U-Boot 2009.08 (Oct 31 2013 - 20:23:53)

Freescale i.MX28 family

CPU:   454 MHz

BUS:   151 MHz

EMI:   205 MHz

GPMI:   24 MHz

DRAM:  64 MB

NAND:  Manufacturer      : Esmt (0x92)

Device Code       : 0xf1

Cell Technology   : SLC

Chip Size         : 128 MiB

Pages per Block   : 64

Page Geometry     : 2048+64

ECC Strength      : 4 bits

ECC Size          : 512 B

Data Setup Time   : 20 ns

Data Hold Time    : 10 ns

Address Setup Time: 20 ns

GPMI Sample Delay : 6 ns

tREA              : Unknown

tRLOH             : Unknown

tRHOH             : Unknown

Description       : F59L1G81A

128 MiB

function nand_init

address of nand_info[0] = 0x41031f48

In:    serial

Out:   serial

Err:   serial

Net:   got MAC address from IIM: 00:04:00:00:00:00

FEC0

Hit any key to stop autoboot:  0

But I can't save the variable when saveenv. The log is

MX28 U-Boot > saveenv

Saving Environment to NAND...

Erasing Nand...

Erasing at 0x140000000020000 --   0% complete.

Writing to Nand... done

MX28 U-Boot >

I don't understand the eraseing address. (0x140000000020000)

When do saveenv command the function saveenv in u-boot/common/env_nand.c calls nand_erase_opts function in u-boot/drivers/mtd/nand/nand_util.c

I did the check the address erase.addr value in nand_erase_opts function.

The address erase.addr value is diffeent when call it.

Can help me?

0 Kudos
4 Replies

1,098 Views
fabio_estevam
NXP Employee
NXP Employee

I see you use U-boot 2009.08 , but I would recommend you to use 2013.10 instead.,

Then you build it like:

make mx28evk_nand_config

make

The 'mx28evk_nand' target stores the environment variables into the NAND flash.

You can follow these guidelines:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.mxs;h=2919bbfee13fdd12096a611c26664a4a6cb7b91a;...

and

git.denx.de Git - u-boot.git/blob - board/freescale/mx28evk/README

Regards,

Fabio Estevam

0 Kudos

1,098 Views
yongkimin
Contributor III

I don't understand the erasing address.. But anyway the saveenv operation is done.

Logh shows "Writing to Nand... done". If can't write the log will show "FAILED!".

1,098 Views
raymondwang
Senior Contributor I

Are you sure your ENV nand config setting right? There is one example in mx6q_arm2.h.

#define CONFIG_ENV_IS_IN_NAND 1

#define CONFIG_ENV_OFFSET 0x100000

0 Kudos

1,098 Views
yongkimin
Contributor III

Thanks raymond!

As you see the log my question. I don't understand the erasing address (address is too long) and 0% complete.

But the saveenv operaton is done. The variable after saveenv and reset was saved.

Thank you.

0 Kudos