cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
133 Views
Registered: ‎01-03-2018

petalinux nandflash rootfs

My hardware platform zynq7030 8G nandflash

petalinux version 2018.3

Device tree

&nand0 {
#address-cells = <1>;
#size-cells = <1>;
partition@0x00000000 {
label = "boot";
reg = <0x00000000 0x01000000>;
};
partition@0x01000000 {
label = "bootenv";
reg = <0x01000000 0x00020000>;
};
partition@0x01020000 {
label = "kernel";
reg = <0x01020000 0x02000000>;
};
partition@0x03020000 {
label = "ext4";
reg = <0x03020000 0x30000000>;
};
partition@0x33020000 {
label = "data";
reg = <0x33020000 0x40000000>;
};
};

uboot command

Zynq> nand erase 0x33020000 0x40000000

NAND erase: Size exceeds partition or device limit

linux command

cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00020000 "boot"
mtd1: 00020000 00020000 "bootenv"
mtd2: 02000000 00020000 "kernel"
mtd3: 30000000 00020000 "ext4"
mtd4: 0cfe0000 00020000 "data"

data partition different from Device tree set value?

and then

mtd_debug info /dev/mtd3
mtd.type = MTD_NANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 805306368 (768M)
mtd.erasesize = 131072 (128K)
mtd.writesize = 2048 (2K)
mtd.oobsize = 64
regions = 0

df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/root ext4 92541 71228 14329 83% /

Why is my rootfs ext4 so small?

Is u-boot or kernel setting reason?or nandflash drive problem?

add another point

petalinux 2019.1 or 2019.2 .Can't mount rootfs ext4 or jffs2 on the nandflash

0 Kudos
0 Replies