Hi, I had a similar problem on the BT Home Hub 2B, which also has nand flash. The problem as you say seems to be that mount_root assume that the deadc0de will be at the start of the block where it would be for nor flash. I expect others will have a better idea of the right way to solve this (perhaps avoiding using squashfs on nand completely) but for the moment I have I got round the problem by patching ubox mount_root.c as follows.
I have also had to add to modify include/image.mk, adding 16K (which is the erase block size on the HH2B) to the call to padjffs2. Ben --- a/mount_root.c 2014-01-18 10:19:12.319136947 +0100 +++ b/mount_root.c 2014-01-18 10:18:21.149945597 +0100 @@ -381,6 +381,13 @@ return FS_JFFS2; } + if (type == MTD_TYPE_NAND && + deadc0de == 0xffffffff) { + + LOG("jffs2 is ready\n"); + return FS_JFFS2; + } + ERROR("No jffs2 marker was found\n"); return FS_NONE; On Fri, 2014-02-07 at 03:00 +0100, Marco Antonio Mauro wrote: > Hi, > > the router I'm working on at the moment, the DGN3500 lantiq platform, > has a strange issue: it won't create or save the configuration. I see > this in the logs: > > [ 0.000000] Linux version 3.10.26 (marcus905@experiment) (gcc > version 4.6.4 (OpenWrt/Linaro GCC 4.6-2013.05 r39286) ) #39 Thu Feb 6 > 19:19:14 CET 2014 > [ 0.000000] SoC: AR9 rev 1.1 > [ 0.000000] bootconsole [early0] enabled > [ 0.000000] CPU revision is: 0001954c (MIPS 34Kc) > [ 0.000000] MIPS: machine is DGN3500 - Netgear DGN3500 > [ 0.000000] Determined physical RAM map: > [ 0.000000] memory: 04000000 @ 00000000 (usable) > [ 0.000000] Initrd not found or empty - disabling initrd > [ 0.000000] Zone ranges: > [ 0.000000] Normal [mem 0x00000000-0x03ffffff] > [ 0.000000] Movable zone start for each node > [ 0.000000] Early memory node ranges > [ 0.000000] node 0: [mem 0x00000000-0x03ffffff] > [ 0.000000] On node 0 totalpages: 16384 > [ 0.000000] free_area_init_node: node 0, pgdat 8034e9d0, > node_mem_map 81002a80 > [ 0.000000] Normal zone: 128 pages used for memmap > [ 0.000000] Normal zone: 0 pages reserved > [ 0.000000] Normal zone: 16384 pages, LIFO batch:3 > [ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes. > [ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, > linesize 32 bytes > [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 > [ 0.000000] pcpu-alloc: [0] 0 > [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. > Total pages: 16256 > [ 0.000000] Kernel command line: console=ttyLTQ0,115200 init=/etc/preinit > ... > [ 0.248000] squashfs: version 4.0 (2009/01/31) Phillip Lougher > [ 0.256000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) > (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. > ... > [ 0.304000] spi_gpio spi.4: master is unqueued, this is deprecated > [ 0.312000] m25p80 spi32766.0: found mx25l12805d, expected s25fl129p0 > [ 0.316000] m25p80 spi32766.0: mx25l12805d (16384 Kbytes) > [ 0.320000] 4 ofpart partitions found on MTD device spi32766.0 > [ 0.328000] Creating 4 MTD partitions on "spi32766.0": > [ 0.332000] 0x000000000000-0x000000010000 : "uboot" > [ 0.340000] 0x000000010000-0x000000020000 : "uboot-env" > [ 0.348000] 0x000000020000-0x000000030000 : "calibration" > [ 0.352000] 0x000000050000-0x000000ff0000 : "firmware" > [ 0.360000] 0x00000017c7c8-0x000000ff0000 : "rootfs" > [ 0.364000] mtd: partition "rootfs" must either start or end on > erase block boundary or be smaller than an erase block -- forcing > read-only > [ 0.380000] mtd: device 4 (rootfs) set to be root filesystem > [ 0.384000] mtd: partition "rootfs_data" created automatically, > ofs=0x730000, len=0x8c0000 > [ 0.392000] 0x000000730000-0x000000ff0000 : "rootfs_data" > ... > [ 160.680000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000000: 0x7345 instead > [ 160.696000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000004: 0x6f4d instead > [ 160.712000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x0000000c: 0x5035 instead > [ 160.728000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000010: 0x3600 instead > [ 160.744000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x0000002c: 0x0041 instead > [ 160.760000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000030: 0x3200 instead > [ 160.776000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000038: 0x0011 instead > [ 160.792000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000040: 0x4572 instead > [ 160.808000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000044: 0x4d6d instead > [ 160.824000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 > not found at 0x00000048: 0x3845 instead > [ 160.832000] jffs2: Further such events for this erase block will > not be printed > [ 160.948000] jffs2: Empty flash at 0x00000050 ends at 0x00001000 > [ 161.072000] jffs2: Empty flash at 0x00001004 ends at 0x00002000 > [ 163.168000] jffs2_scan_eraseblock(): End of filesystem marker found > at 0x10000 > [ 163.176000] jffs2: Cowardly refusing to erase blocks on filesystem > with no valid JFFS2 nodes > [ 163.180000] jffs2: empty_blocks 139, bad_blocks 0, c->nr_blocks 140 > > What could the problem be? What should I check? > > I think that it's creating rootfs_data in the correct place, but then > the jffs2 filesystem starts looking for the end marker (deadc0de if i > recall correctly) in the wrong place and therefore leaving the > partition unformatted and leaving the config in the ramdisk. > > Any idea? _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel