After restoring my camera firmware using these steps I got this error:
Starting kernel ... Uncompressing Linux.......................................................................................... [ 0.620000] cramfs: wrong magic [ 0.630000] FAT: bogus number of reserved sectors [ 0.640000] FAT: bogus number of reserved sectors [ 0.650000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
Then I setup the bootargs to show the kernel boot log:
$ set bootargs 'mem=20M console=ttyS0,115200n8 init=/sbin/init root=/dev/mtdblock3' $ saveenv $ bootm Uncompressing Linux.......................................................................................... [ 0.000000] Linux version 2.6.24ssl (root@localhost.localdomain) (gcc version 3.4.6) #200 PREEMPT Tue Apr3 [ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 [ 0.000000] Machine: object h264 ipcam [ 0.000000] Memory policy: ECC disabled, Data cache writeback [ 0.000000] CPU0: D VIVT write-back cache [ 0.000000] CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets [ 0.000000] CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets [ 0.000000] Built 1 zonelists in Zone order, mobility grouping off. Total pages: 5080 [ 0.000000] Kernel command line: mem=20M console=ttyS0,115200n8 init=/sbin/init root=/dev/mtdblock3 [ 0.000000] intc: init info - ver=1,0 [ 0.000000] clock: init info - ver=1,0 [ 0.000000] MAGUS Clocks : ARM-240.000 MHz, HCLK-120.000 MHz, PCLK-60.000 MHz, PERCLK1-60.000 MHz, PERCLKz [ 0.000000] PID hash table entries: 128 (order: 7, 512 bytes) [ 0.000000] Console: colour dummy device 80x30 [ 0.000000] console [ttyS0] enabled [ 0.010000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.020000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.030000] Memory: 20MB = 20MB total [ 0.030000] Memory: 17248KB available (2688K code, 213K data, 96K init) [ 0.270000] Mount-cache hash table entries: 512 [ 0.270000] CPU: Testing write buffer coherency: ok [ 0.290000] net_namespace: 64 bytes [ 0.300000] NET: Registered protocol family 16 [ 0.310000] dma: init info - ver 1.0 fifosize=128, 8 channels [ 0.320000] MAGUS cpu freq change driver v1.0 [ 0.330000] [ 0.330000] cpufreq: magus_set_target: request for target_freq = 240000 KHz [ 0.340000] cpufreq: magus_set_target: cur_pll_out = 240000 KHz, cur_arm_freq = 240000 KHz [ 0.380000] SCSI subsystem initialized [ 0.390000] usbcore: registered new interface driver usbfs [ 0.400000] usbcore: registered new interface driver hub [ 0.400000] usbcore: registered new device driver usb [ 0.500000] NET: Registered protocol family 2 [ 0.600000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.610000] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.620000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.620000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.630000] TCP reno registered [ 0.660000] Power Management for MAGUS. V0.1.1 [ 0.660000] NetWinder Floating Point Emulator V0.97 (extended precision) [ 0.680000] JFFS2 version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc. [ 0.690000] io scheduler noop registered [ 0.690000] io scheduler deadline registered (default) [ 0.720000] Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled [ 0.730000] ttyS0: autoconf (0x0000, 0xf000300c): uart: id=7000041 [ 0.740000] type=16550A [ 0.740000] serial8250: ttyS0 at MMIO 0x0 (irq = 16) is a 16550A [ 0.750000] ttyS1: autoconf (0x0000, 0xf000400c): uart: id=7000041 [ 0.750000] type=16550A [ 0.750000] serial8250: ttyS1 at MMIO 0x0 (irq = 17) is a 16550A [ 0.760000] PPP generic driver version 2.4.2 [ 0.770000] PPP Deflate Compression module registered [ 0.780000] PPP BSD Compression module registered [ 0.780000] PPP MPPE Compression module registered [ 0.790000] NET: Registered protocol family 24 [ 0.790000] PPPoL2TP kernel driver, V1.0 [ 0.800000] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256). [ 0.800000] tun: Universal TUN/TAP device driver, 1.6 [ 0.810000] tun: (C) 1999-2004 Max Krasnyansky [ 0.820000] Driver 'sd' needs updating - please use bus_type methods [ 0.830000] SPAN-NOR:0x00800000 at 0x10000000 [ 0.830000] nor flash cfi probe [ 0.830000] NOR flash on ipcam: Found 1 x16 devices at 0x0 in 16-bit bank [ 0.840000] Amd/Fujitsu Extended Query Table at 0x0040 [ 0.850000] number of CFI chips: 1 [ 0.850000] cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. [ 0.860000] using static partition definition [ 0.870000] Creating 5 MTD partitions on "NOR flash on ipcam": [ 0.870000] 0x000000000000-0x000000030000 : "ARMboot" [ 0.880000] 0x000000030000-0x0000001a0000 : "Kernel" [ 0.890000] 0x0000001a0000-0x0000005a0000 : "RootFS" [ 0.900000] 0x0000005a0000-0x0000007f0000 : "IpcamFS" [ 0.910000] 0x0000007f0000-0x000000800000 : "param" [ 0.920000] spi: init info - ver=1.0 fifo=16 slaves=5 master=1 [ 0.930000] spi: init info - ver=1.0 fifo=16 slaves=5 master=1 [ 0.940000] i2c /dev entries driver [ 0.950000] i2c: init info - ver=1,0 [ 0.950000] MAGUS Watchdog Timer, (c) 2008 Solomon Systech [ 0.960000] wdog wdog: watchdog inactive, reset disabled. [ 0.970000] [ 0.970000] cpufreq: magus_set_target: request for target_freq = 240000 KHz [ 0.980000] cpufreq: magus_set_target: cur_pll_out = 240000 KHz, cur_arm_freq = 240000 KHz [ 0.990000] Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20 19:16:42 2007 UTC). [ 1.000000] ASoC version 0.13.1 [ 1.010000] ALSA device list: [ 1.010000] No soundcards found. [ 1.010000] TCP cubic registered [ 1.020000] NET: Registered protocol family 1 [ 1.020000] NET: Registered protocol family 17 [ 1.030000] ieee80211: 802.11 data/management/control stack, git-1.1.13 [ 1.030000] ieee80211: Copyright (C) 2004-2005 Intel Corporation [ 1.060000] cramfs: wrong magic [ 1.060000] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device mtdblock3. [ 1.070000] FAT: bogus number of reserved sectors [ 1.080000] VFS: Can't find a valid FAT filesystem on dev mtdblock3. [ 1.090000] FAT: bogus number of reserved sectors [ 1.090000] VFS: Can't find a valid FAT filesystem on dev mtdblock3. [ 1.100000] List of all partitions: [ 1.100000] 1f00 8192 mtdblock0 (driver?) [ 1.110000] 1f01 192 mtdblock1 (driver?) [ 1.110000] 1f02 1472 mtdblock2 (driver?) [ 1.120000] 1f03 4096 mtdblock3 (driver?) [ 1.120000] 1f04 2368 mtdblock4 (driver?) [ 1.130000] 1f05 64 mtdblock5 (driver?) [ 1.130000] No filesystem could mount root, tried: cramfs minix msdos vfat [ 1.140000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
Then I suspect the issue happened because I flash the rootfs using the Nick single step suggestion.
Let us to divide the image:
$ dd if=mtd3_RootFS.img of=mtd3_rootfs_part1.img bs=1k count=2k $ dd if=mtd3_RootFS.img of=mtd3_rootfs_part2.img bs=1k skip=2k $ cat mtd3_rootfs_part1.img mtd3_rootfs_part2.img > mtd3_full.img $ cmp mtd3_RootFS.img mtd3_full.img
After the concatenation I compared and confirm it is fine.
I flashed the two RootFS part as explained in the above link and everything worked fine!