write linux to NAND via u-boot on i.mx6

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

write linux to NAND via u-boot on i.mx6

1,520 Views
andreykononov
Contributor III

I may be blind, but I can't find info how to manual write firmware (u-boot, kernel, rootfs ... other) to Nand flash through u-boot

now i'm using prebuild versions from L3.14.52_1.1.0-ga_images_MX6QDLSOLO

Labels (4)
0 Kudos
6 Replies

1,017 Views
andreykononov
Contributor III

strange situation.I am trying flash dfb from u-boot loaded from SD

=> mmc rescan

=> fatload mmc 1 0x12000000 imx6q-sabreauto-gpmi-weim.dtb

reading imx6q-sabreauto-gpmi-weim.dtb

45007 bytes read in 59 ms (744.1 KiB/s)

=> nand erase 0x5000000 0x100000

NAND erase: device 0 offset 0x5000000, size 0x100000

Erasing at 0x5080000 -- 100% complete.

OK

=> nand write.i 0x12000000 0x5000000 0x100000

NAND write: device 0 offset 0x5000000, size 0x100000

1048576 bytes written: OK

=> nand dump 0x5000000               

Page 05000000 dump:

        00 ff ff ff ff ff ff ff  ff ff d0 0d fe ed 00 00

        af cf 00 00 00 38 00 00  a5 50 00 00 00 28 00 00

...............................................

but real data start from "d0 0d fe ed 00 00"

why I see this offset "00 ff ff ff ff ff ff ff  ff ff"

0 Kudos

1,017 Views
art
NXP Employee
NXP Employee

Unfortunately, there seems to be no way of doing that. Only the cases, described in the Section 4.4 of attached document, are possible.


Have a great day,
Artur

0 Kudos

1,017 Views
andreykononov
Contributor III

something like this

U-boot flashing

mmc init

fatload mmc 0 0x81600000 u-boot.bin

nand erase 0x80000 0x100000

nandecc sw

nand write.i 0x81600000 0x80000 0x100000

Kernel flashing

mmc init

fatload mmc 0 0x81600000 uImage

nand erase 280000 200000

nandecc sw

nand write.i 0x81600000 280000 200000

0 Kudos

1,017 Views
andreykononov
Contributor III

Very strange, when I worked with TI AM3517, u-boot has been able to record NAND, and if you know address for writing, you can flash u-boot/x-load/kernel/rootfs and everything works good

0 Kudos

1,017 Views
daiane_angolini
NXP Employee
NXP Employee

take a look if this is what you've looking for. The pdf file is i.MX_Linux_User's_Guide.pdf and it's under the Doc Bundle, in this case it's for fsl-yocto-3.14.38_6ul-ga.

user-guide.png

I prefer you download the doc from the same version you're using, and from website.

0 Kudos

1,017 Views
daiane_angolini
NXP Employee
NXP Employee

I'm sorry, just realized I got confused with another question I'm working with. You are targeting NAND
(not eMMC). I was not able to find an explicit how-to NAND (as we have for eMMC), but all the information needed (map) is in the same document.

0 Kudos