Modify

Opened 8 years ago

Closed 3 years ago

#7336 closed defect (not_a_bug)

RB411U split_squashfs issue

Reported by: digit Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: Cc:

Description

On r21426 I get split_squashfs error

Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "booter"
0x000000040000-0x000000400000 : "kernel"
0x000000400000-0x000004000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: error occured while reading from "NAND 64MiB 3,3V 8-bit"

Got a fix to split_squashfs error by using fixed value instead of MTDPART_OFS_NXTBLK and MTDPART_OFS_NXTBLK for rootfs.

rb4xx_nand.c

/*
        {
                .name   = "rootfs",
                .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
*/
        {
                .name   = "rootfs",
                .offset = (4 * 1024 * 1024),
                .size   = (60 * 1024 * 1024),
        },
};

Now rootfs split properly but still have issue with jffs2 on rootfs_data.

Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "booter"
0x000000040000-0x000000400000 : "kernel"
0x000000400000-0x000004000000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=504000, len=3AFC000
0x000000504000-0x000004000000 : "rootfs_data"
Atheros AR71xx SPI Controller driver version 0.2.4
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 152k freed
Please be patient, while OpenWrt loads ...
gpio-buttons driver version 0.1.2
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
Button Hotplug driver version 0.4.0
- preinit -
Registered led device: rb4xx:yellow:user
Press the [f] key and hit [enter] to enter failsafe mode
eth0: link up (100Mbps/Full duplex)
- regular preinit -
jffs2_scan_eraseblock(): End of filesystem marker found at 0xc000
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 3772, bad_blocks 0, c->nr_blocks 3775
jffs2 not ready yet; using ramdisk
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
- init -

Please press Enter to activate this console. eth0: link down
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
eth0: link up (100Mbps/Full duplex)
br-lan: port 1(eth0) entering forwarding state
nf_conntrack version 0.5.0 (462 buckets, 1848 max)
jffs2_scan_eraseblock(): End of filesystem marker found at 0xc000
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 3772, bad_blocks 0, c->nr_blocks 3775

Attachments (0)

Change History (5)

comment:1 Changed 8 years ago by anonymous

arch is ar71xx_nand / RB411U

comment:2 Changed 8 years ago by digit

jffs2 issue was related to mtd2 not being erased.

need to flash_eraseall -j /dev/mtd2 first.

So,

  • fix rb4xx_nand.c then build
  • flash_eraseall rootfs partition
  • cat squashfs rootfs to rootfs partition

Someone can check rb4xx_nand.c issue and commit patch.

Thanks,

RouterBOOT booter 2.23

RouterBoard 411U

CPU frequency: 300 MHz
  Memory size:  32 MB

Press any key within 2 seconds to enter setup..
loading kernel from nand... OK
setting up elf image... OK
jumping to kernel code
Linux version 2.6.32.12 (digit@OpenWRT-build) (gcc version 4.3.3 (GCC) ) #17 Wed May 12 20:24:03 EDT 2010
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7130 rev 2, CPU:300.000 MHz, AHB:150.000 MHz, DDR:300.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 console=ttyS0,115200 gpio=1983 HZ=150000000 mem=32M kmac=00:0C:42:4D:1B:D1 board=411U boot=1 mlc=2
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=0000a000
Readback ErrCtl register=0000a000
Memory: 29440k/32768k available (2005k kernel code, 3328k reserved, 387k data, 152k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:56
Calibrating delay loop... 199.88 BogoMIPS (lpj=999424)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is MikroTik RouterBOARD 411U
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:00.0: PME# disabled
PCI: mapping irq 48 to pin1@0000:00:12.0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs May 11 2010 19:05:03 Installing.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
NAND flash driver for RouterBoard 4xx series version 0.1.10
NAND SPI clock 25000 kHz (AHB 150000 kHz / 6)
FLASH SPI clock 25000 kHz (AHB 150000 kHz / 6)
NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1171 at 0x00000124c000
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "booter"
0x000000040000-0x000000400000 : "kernel"
0x000000400000-0x000001400000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=544000, len=EBC000
0x000000544000-0x000001400000 : "rootfs_data"
Atheros AR71xx SPI Controller driver version 0.2.4
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 152k freed
Please be patient, while OpenWrt loads ...
gpio-buttons driver version 0.1.2
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0
Button Hotplug driver version 0.4.0
- preinit -
Registered led device: rb4xx:yellow:user
Press the [f] key and hit [enter] to enter failsafe mode
eth0: link up (100Mbps/Full duplex)
- regular preinit -
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
- init -

Please press Enter to activate this console. eth0: link down
eth0: link up (100Mbps/Full duplex)
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (462 buckets, 1848 max)



BusyBox v1.16.1 (2010-05-11 18:51:23 EDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r21426) ------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/#

comment:3 Changed 8 years ago by digit

--- target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c.orig        2010-05-26 18:46:46.000000000 -0400
+++ target/linux/ar71xx/files/drivers/mtd/nand/rb4xx_nand.c     2010-05-26 18:47:27.000000000 -0400
@@ -96,8 +96,8 @@
        },
        {
                .name   = "rootfs",
-               .offset = MTDPART_OFS_NXTBLK,
-               .size   = MTDPART_SIZ_FULL,
+               .offset = (4 * 1024 * 1024),
+               .size   = (60 * 1024 * 1024),
        },
 };

comment:4 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:5 Changed 3 years ago by jogo

  • Resolution set to not_a_bug
  • Status changed from new to closed

squashfs should not be used on NAND flash anyway, so it is fine not being able to split the rootfs partition.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.