booting from half of NAND, and mounting jffs on other half of NAND
Using uboot 2013.01, booting from NAND, I am having difficulty understanding how partitions (areas of NAND) work.
I have written to NAND in the following layout:0x0000000 at91bootstrap10x0020000 uboot10x0060000 uboot-env10x0200000 kernel10x0400000 rootfs10x8000000 at91bootstrap20x8020000 uboot20x8060000 uboot-env20x8200000 kernel0x8400000 rootfs2
I hacked at91bootstrap to load into ram a uboot and an environment, and I can stop uboot and 'env print' to see that the proper environment was loaded.
While booted into linux on one rootfs I would like to access the other rootfs.
I try tried to use the mtdparts parameter that describes the partitions of NAND, but this isn't working, and I don't think I understand what it should be.
First problem, or signs that I'm doing something wrong is my mtdparts
parameter. If I try to edit on the interactive uboot shell, the line is
too long to change, so I have to write flash for each test. That can't
be correct? Regardless of which uboot environemnt I use, this is what I
am trying to use to describe my NAND layout:
mtdparts=at91_nand:128k(bootstrap1)ro,256k(uboot1)ro,128k(env1)ro,1536K(unused),2M(linux1),124M(rootfs1),128k(bootstrap2)ro,256k(uboot2)ro,128k(env2)ro,1536k(unused2),2M(linux2),124M(rootfs2) What should I use here?
Second problem is what to use for root=/dev/mtdblock*. I have tried many things, but most lead to an inability to find the file system, and since each test requires re-writing NAND flash it takes a really long time to debug. What should I use here?
Quoted 34 lines · John Stile
Using uboot 2013.01, booting from NAND, I am having difficulty understanding how partitions (areas of NAND) work.
I have written to NAND in the following layout:
0x0000000at91bootstrap10x0020000uboot10x0060000uboot-env10x0200000kernel10x0400000rootfs10x8000000at91bootstrap20x8020000uboot20x8060000uboot-env20x8200000kernel0x8400000rootfs2I hacked at91bootstrap to load into ram a uboot and an environment, and I can stop uboot and 'env print' to see that the proper environment was loaded.
While booted into linux on one rootfs I would like to access the other rootfs.
I try tried to use the mtdparts parameter that describes the partitions of NAND, but this isn't working, and I don't think I understand what it should be.
First problem, or signs that I'm doing something wrong is my mtdparts
parameter. If I try to edit on the interactive uboot shell, the line is
too long to change, so I have to write flash for each test. That can't
be correct? Regardless of which uboot environemnt I use, this is what I
am trying to use to describe my NAND layout:
mtdparts=at91_nand:128k(bootstrap1)ro,256k(uboot1)ro,128k(env1)ro,1536K(unused),2M(linux1),124M(rootfs1),128k(bootstrap2)ro,256k(uboot2)ro,128k(env2)ro,1536k(unused2),2M(linux2),124M(rootfs2) What should I use here?
Quoted 4 lines
Second problem is what to use for root=/dev/mtdblock*. I have tried many things, but most lead to an inability to find the file system, and since each test requires re-writing NAND flash it takes a really long time to debug. What should I use here?
I solved my own problem.
bootargs mtdparts= addressed the wrong name for nand.
I had at91_nand.
The kernel messages said, "Creating 3 MTD partitions on "atmel_nand":". Changing at91_nand to atmel_nand, my partitions are visible.