Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#4433 closed enhancement (fixed)

[PATCH] Support for Davolink routers

Reported by: LinuxInside Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: Davolink bcm63xx Cc:

Description

This will add support for Davolink routers

see also http://forum.openwrt.org/viewtopic.php?pid=79139#p79139

Have fun!!

Attachments (4)

patch (17.1 KB) - added by LinuxInside 9 years ago.
Patch
Davolink.patch (17.6 KB) - added by LinuxInside 9 years ago.
Create DV201AMR image out-of-the-box, reverted changes to struct bcm_tag
fix_alignment.patch (17.7 KB) - added by LinuxInside 9 years ago.
This will align the rootfs partition and wil hopefully fix Florians issue
fix_alignment2.patch (17.7 KB) - added by LinuxInside 9 years ago.
This will align the rootfs partition and wil hopefully fix Florians issue

Download all attachments as: .zip

Change History (23)

Changed 9 years ago by LinuxInside

Patch

comment:1 Changed 9 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

You did a lot of changes to get it working, are all the modifications to the flash map driver as well as the imagetag really necessary ?

comment:2 Changed 9 years ago by LinuxInside

Also the Davolink has 8MB of flash, of which only the 4MB is available. In future it would be nice to use this also.

Therefore I tried to make the flash map driver somewhat more flexible, it will now scan for CFE and BCM image. CFE can be 64 or 128 K it does not matter, the flash driver will find it.

Changes to bcmtag.h is a matter of taste, I can revert the conversion if you like.
The packed attribute is a safety against (future?) alignment strategies of the compiler. So it does not hurt to leave it in.

Can you live with the patches?

Changed 9 years ago by LinuxInside

Create DV201AMR image out-of-the-box, reverted changes to struct bcm_tag

comment:3 Changed 9 years ago by florian

Your modification breaks 4MB CFE devices :

bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
bcm963xx: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
bcm963xx_flash: CFE found at 0x0
bcm963xx: found firmware 96348GW for 6348.
Creating 4 MTD partitions on "bcm963xx":
0x00000000-0x00010000 : "CFE"
0x00010100-0x000cbac6 : "kernel"
mtd: partition "kernel" doesn't start on an erase block boundary -- force read-only
0x000cbac6-0x0021bac6 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "bcm963xx"
0x00010000-0x00400000 : "Linux"
TCP bic registered
NET: Registered protocol family 17
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000453c: 0x7368 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004540: 0x01cd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004544: 0x7eb0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004548: 0x2ad5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000454c: 0x5358 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004550: 0x2ad5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004554: 0xf540 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000455c: 0x0010 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004560: 0x0049 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004564: 0x4b00 instead
Further such events for this erase block will not be printed
Empty flash at 0x000045ac ends at 0x000045b0
Old JFFS2 bitmask found at 0x000056fc
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x30b9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0xaf15 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0xa6bc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x8c6b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0xc563 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0xf444 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010018: 0xf853 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001001c: 0x5773 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010020: 0x2e66 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010024: 0xfe47 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0x899d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0xf123 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0xc8c2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0xbc14 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0xfd2d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0x2642 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0xf696 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0x1422 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0xded4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x8cb8 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030000: 0x18e0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030004: 0xc7ea instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030008: 0xc257 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003000c: 0x75a5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030010: 0x5c15 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030014: 0x7f7a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030018: 0x55f6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003001c: 0x5c48 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030020: 0xaeb3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030024: 0x6832 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00030a4c
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0xbf54 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0x2350 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0x23b6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0x2517 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x1f97 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0x71d5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0x6de2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0x4927 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0x1d34 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0x9557 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050000: 0x6fbe instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050004: 0x45ca instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050008: 0xef07 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005000c: 0xf325 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050010: 0x27c0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050014: 0xa731 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050018: 0xefdf instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005001c: 0x6ac6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050020: 0x257f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050024: 0xc2d7 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060000: 0xe1b9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060004: 0xc3cd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060008: 0xdf11 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006000c: 0x3a06 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060010: 0x886c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060014: 0x8b99 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060018: 0x2230 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006001c: 0xc1e5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060020: 0xd82c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060024: 0x42b8 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070000: 0x96e4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070004: 0x2f95 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070008: 0x4661 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007000c: 0x9d0e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070010: 0xbb3f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070014: 0x5456 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070018: 0xe59e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007001c: 0xedfd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070020: 0xc995 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070024: 0xf33e instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x0007e244
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080000: 0xf52a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004: 0xe479 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008: 0xb740 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008000c: 0x9dd0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080010: 0xa701 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080014: 0xfc15 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080018: 0xdcf7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008001c: 0xf9e4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080020: 0x6816 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080024: 0xf9e6 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090000: 0x25e5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090004: 0xd7d7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090008: 0x7d37 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009000c: 0xe361 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090010: 0x2868 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090014: 0xa216 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090018: 0x2f6b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009001c: 0xbee8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090020: 0x9217 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090024: 0x2ba6 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0000: 0xc936 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0004: 0x7c37 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0008: 0xe833 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a000c: 0x7d91 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0010: 0xfe6a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0014: 0xf7d7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0018: 0x8ceb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a001c: 0x3c9b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0020: 0x0d82 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0024: 0x5df7 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0000: 0x3861 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0004: 0xdfd8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0008: 0x822f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b000c: 0x1a38 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0010: 0x2ea0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0014: 0x212e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0018: 0x8058 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b001c: 0x7ee5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0020: 0x0f3f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0024: 0x292e instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0000: 0x8529 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0004: 0x20ff instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0008: 0x2f11 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c000c: 0x986e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0010: 0xb479 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0014: 0x8a4b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0018: 0xdcbb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c001c: 0x8e03 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0020: 0xf7be instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0024: 0xcef1 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0000: 0x7fdc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0004: 0x6320 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0008: 0x46d4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d000c: 0x4d3f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0010: 0x93ff instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0014: 0xbc1f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0018: 0x8819 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d001c: 0x79b3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0020: 0xfc2b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0024: 0x0492 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0000: 0x7dc4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0004: 0x6a30 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0008: 0xaee9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e000c: 0xce0d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0010: 0x6f2f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0014: 0xf988 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0018: 0x008e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e001c: 0xe065 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0020: 0x7492 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0024: 0x3cfc instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0000: 0xbcfa instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0004: 0x9583 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0008: 0x7424 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f000c: 0x95ea instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0010: 0x8afe instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0014: 0x0fd8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0018: 0x49c0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f001c: 0x075a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0020: 0xe3e3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0024: 0x2276 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100000: 0x6dc9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100004: 0xe6dc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100008: 0xcd5a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0010000c: 0x72d8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100010: 0xf70e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100014: 0x033f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100018: 0xa924 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0010001c: 0x0171 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100020: 0x494c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100024: 0x2a24 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110000: 0x8f64 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110004: 0x5f3f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110008: 0x6668 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0011000c: 0xc3d1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110010: 0x3fbf instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110014: 0x5db8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110018: 0xf6ae instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0011001c: 0x2611 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110020: 0x4eab instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110024: 0xdffc instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00119ae0
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120000: 0x53ed instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120004: 0x5d2e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120008: 0xa11f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0012000c: 0x6405 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120010: 0x3433 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120014: 0x7e78 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120018: 0xb8cc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0012001c: 0xc6b7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120020: 0x1a35 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120024: 0x09a7 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130000: 0x1ea6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130004: 0xbd29 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130008: 0xb711 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013000c: 0x29d2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130010: 0xb43e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130014: 0xdc73 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130018: 0x542b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013001c: 0x2fe6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130020: 0x2a8e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130024: 0x1f6d instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140000: 0x5c5a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140004: 0xd863 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140008: 0x6d3a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0014000c: 0x4b28 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140010: 0x49ac instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140014: 0xe3b2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140018: 0x558d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0014001c: 0xcd6f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140020: 0x6492 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140024: 0x78de instead
Further such events for this erase block will not be printed
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 21
VFS: Cannot open root device "mtdblock2" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00         64 mtdblock0 (driver?)
1f01        750 mtdblock1 (driver?)
1f02       1344 mtdblock2 (driver?)
1f03       4032 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

comment:4 Changed 9 years ago by LinuxInside

Eh well. As you can see the partitions are correctly detected. So it is not a problem in the flash-map driver per se.

The problem arises because in your image the rootfs is not erase block aligned. (I am assuming you are using a jffs2 only image). This will cause all sorts of trouble.

If you can provide me a link to your firmware I think I can fix it.

Also I have noticed that it is completely unpredictable when and how the mtd driver creates a seperate rootfs_data partition. May need to check what assumptions are made here.

comment:5 Changed 9 years ago by florian

I am using squashfs images, and the partitions are not linked with a particular driver. Anyway, I am not going to merge your patch atm.

comment:6 Changed 9 years ago by LinuxInside

Please can you help me to fix openwrt for my router. What can I do to get patches in?

Regards

comment:7 Changed 9 years ago by florian

Just fix your driver not to cause regression on 4MB / imagetag routers, which are the majority of devices out there, then I will test again on my devices and merge your patch in case I see no regression.

comment:8 Changed 9 years ago by LinuxInside

What kind of equipment are you testing on?

Please send me a link to the firmware image you used in this example, and a link to the complete dmesg.

I am pretty sure the problem is related to an alignment issue. How does the dmesg look like when unpatched?

Regards LI

Changed 9 years ago by LinuxInside

This will align the rootfs partition and wil hopefully fix Florians issue

Changed 9 years ago by LinuxInside

This will align the rootfs partition and wil hopefully fix Florians issue

comment:9 Changed 9 years ago by anonymous

I have created "fix_alignment2.patch" this will align the rootfs partition but only if rootfs is after the kernel image.

Please test this. Hopefully no more regressions.

Regards LI

comment:10 Changed 9 years ago by LinuxInside

Florian, any news on this?

comment:11 Changed 9 years ago by florian

Had not had much time to test this, will do next week, stay tuned.

comment:12 Changed 9 years ago by florian

That's way better now:

bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
bcm963xx: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE boot tag found with version 6 and board type 96348GW.
bcm963xx_flash: Partition 0 is CFE offset 0 and length 10000
bcm963xx_flash: Partition 1 is kernel offset 10100 and length bba56
bcm963xx_flash: Partition 2 is rootfs offset d0000 and length 320000
bcm963xx_flash: Partition 3 is nvram offset 3f0000 and length 10000
Creating 4 MTD partitions on "bcm963xx":
0x00000000-0x00010000 : "CFE"
0x00010100-0x000cbb56 : "kernel"
mtd: partition "kernel" doesn't start on an erase block boundary -- force read-only
0x000d0000-0x003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=250000, len=1A0000
0x00250000-0x003f0000 : "rootfs_data"
0x003f0000-0x00400000 : "nvram"

I will review thoroughly your patch and merge it. Thanks !

comment:13 Changed 9 years ago by florian

Errm, here is the corrected output with all of your patches applied:

bcm963xx_flash: 0x00400000 at 0x1fc00000
bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
bcm963xx: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
bcm963xx_flash: CFE found at 0x0
bcm963xx: found firmware 96348GW for 6348.
Creating 4 MTD partitions on "bcm963xx":
0x00000000-0x00010000 : "CFE"
0x00010100-0x000cbb70 : "kernel"
mtd: partition "kernel" doesn't start on an erase block boundary -- force read-only
0x000cbb70-0x00250000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "bcm963xx"
0x00010000-0x00400000 : "Linux"
TCP bic registered
NET: Registered protocol family 17
jffs2: Flash size not aligned to erasesize, reducing to 1536KiB
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004490: 0x7371 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00004498: 0x0815 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044a0: 0x0815 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044a8: 0xa297 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044ac: 0x0003 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044b4: 0x4001 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044b8: 0x7c7b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044c0: 0x0c1a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044c4: 0x0100 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000044d4: 0x170d instead
Further such events for this erase block will not be printed
Empty flash at 0x00004500 ends at 0x00004504
Old JFFS2 bitmask found at 0x0000e39c
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x7fe1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x2a35 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x6b7a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x0639 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0x4ee4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0x2812 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010018: 0xff52 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001001c: 0x4f1a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010020: 0x10f8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010024: 0xe478 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0xc539 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0x9bd0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0x13bd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0x4d95 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0x1171 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0x8c08 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x4ebf instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0x8151 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0x5d05 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x1f37 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030000: 0x3085 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030004: 0xe5ad instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030008: 0x13e5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003000c: 0xa67c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030010: 0x49d7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030014: 0x4c17 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030018: 0x0589 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003001c: 0x018c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030020: 0x9be3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030024: 0xd9aa instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x0003cf40
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0xc3fc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0x1f85 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0x90cd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0x611f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x193d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0xf699 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0x477a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0x9733 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0x12ee instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0xd868 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050000: 0x78ac instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050004: 0x174f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050008: 0xb5e1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005000c: 0x4b62 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050010: 0x345f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050014: 0xad74 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050018: 0x60ec instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005001c: 0xfbb6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050020: 0x663d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050024: 0xd4c7 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060000: 0x83a6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060004: 0x71a5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060008: 0x2e70 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006000c: 0x6594 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060010: 0xb45a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060014: 0xb779 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060018: 0x8f80 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006001c: 0x3137 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060020: 0xce08 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060024: 0x58c2 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070000: 0x5d40 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070004: 0x2ef6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070008: 0xf088 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007000c: 0x5589 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070010: 0x82da instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070014: 0xa2b4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070018: 0xcf16 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007001c: 0x8ecd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070020: 0xae0e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070024: 0x796d instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080000: 0x7e7c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004: 0xa0c8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008: 0xc748 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008000c: 0x6db7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080010: 0xde71 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080014: 0x203a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080018: 0x9123 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008001c: 0x171d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080020: 0xccb6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080024: 0x3ef6 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00089e68
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090000: 0x6e10 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090004: 0x5de9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090008: 0xd955 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009000c: 0x47ef instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090010: 0x3326 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090014: 0x0b7b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090018: 0x1f24 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009001c: 0x201a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090020: 0xfe40 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090024: 0x8b9a instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0000: 0xe2b0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0004: 0x917f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0008: 0xbc8e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a000c: 0x0329 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0010: 0x1483 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0014: 0x4cf3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0018: 0x4261 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a001c: 0x55d2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0020: 0xbd63 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0024: 0x840f instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0000: 0xcd51 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0004: 0xbfea instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0008: 0x29c7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b000c: 0x81d0 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0010: 0x7de5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0014: 0x2656 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0018: 0xbccc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b001c: 0xa6c4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0020: 0xec52 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0024: 0x8909 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0000: 0x05b8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0004: 0xf274 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0008: 0xf15e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c000c: 0x5070 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0010: 0x9c05 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0014: 0x0b5e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0018: 0xec67 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c001c: 0xa0f8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0020: 0x492f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0024: 0xd2a1 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0000: 0x0ce8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0004: 0x5654 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0008: 0x20e2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d000c: 0x93f3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0010: 0x85f1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0014: 0x2062 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0018: 0x2ba1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d001c: 0x733d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0020: 0xa065 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000d0024: 0x1413 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0000: 0x3123 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0004: 0x4c4f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0008: 0xec42 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e000c: 0x51dc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0010: 0x3d0f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0014: 0x13ec instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0018: 0xa355 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e001c: 0xced4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0020: 0xa2ae instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000e0024: 0xf5bb instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x000e6258
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0000: 0x9384 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0004: 0x4b27 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0008: 0x8e30 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f000c: 0x0bd5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0010: 0xfefc instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0014: 0x8288 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0018: 0xb719 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f001c: 0x7fae instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0020: 0xb263 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000f0024: 0x6162 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100000: 0x455a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100004: 0xf35e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100008: 0x8dad instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0010000c: 0x0281 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100010: 0x2169 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100014: 0x713a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100018: 0xf959 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0010001c: 0x1e77 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100020: 0x61a9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00100024: 0x1232 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110000: 0xc1ad instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110004: 0xfcd8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110008: 0xe114 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0011000c: 0x03b3 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110010: 0xed0a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110014: 0xfbce instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110018: 0xc451 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0011001c: 0x8868 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110020: 0x675c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00110024: 0xf72a instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x001122ac
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120000: 0xa42f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120004: 0x054c instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120008: 0x4580 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0012000c: 0x8c7f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120010: 0xed7b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120014: 0x028d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120018: 0x644f instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0012001c: 0xb629 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120020: 0x39fe instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120024: 0xe039 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130000: 0x75d1 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130004: 0xaaf5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130008: 0x5dfb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013000c: 0xb87e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130010: 0x605b instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130014: 0x75e5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130018: 0xab76 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013001c: 0x9f49 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130020: 0xe2c9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00130024: 0x1207 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140000: 0x2469 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140004: 0x27e9 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140008: 0x12aa instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0014000c: 0x1662 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140010: 0x309a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140014: 0xb1d8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140018: 0xc2d5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0014001c: 0x875e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140020: 0x65ed instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00140024: 0xc326 instead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150000: 0x28d2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150004: 0x32fb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150008: 0xd51a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0015000c: 0x2a60 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150010: 0x9e3d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150014: 0x0e3e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150018: 0xcb9d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0015001c: 0x95fd instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150020: 0xb277 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00150024: 0x531d instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00155be0
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160000: 0xc76d instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160004: 0xe5b4 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160008: 0x3bc6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0016000c: 0x14a8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160010: 0xc9a5 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160014: 0x2998 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160018: 0x5eb8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0016001c: 0x9a7a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160020: 0x7eec instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00160024: 0xa933 instead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00162104
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170000: 0x323a instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170004: 0x5c26 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170008: 0x5519 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0017000c: 0xc799 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170010: 0x0f95 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170014: 0xa5fb instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170018: 0x7c21 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0017001c: 0x1128 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170020: 0xb0f8 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00170024: 0x877b instead
Further such events for this erase block will not be printed
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 0, bad_blocks 0, c->nr_blocks 24
VFS: Cannot open root device "mtdblock2" or unknown-block(31,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00         64 mtdblock0 (driver?)
1f01        750 mtdblock1 (driver?)
1f02       1553 mtdblock2 (driver?)
1f03       4032 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

That still does not work and I have no time to change the flash map driver just for one device like yours, so please do not break the existing bcm963xx-maps driver.

comment:14 Changed 9 years ago by LinuxInside

Hi Florian I am sorry, I would have tested myself if I had a similar rig like yours.

I will attach an updated patch later. Again many thanks for testing and excuses for the inconvenience it may have caused you.

You are wrong about that it only concerns one device. Probably allot regular adsl routers with an 634x have CFE versions that have trouble supporting firmware with kernel-rootfs order. If we succeed in making flash partitioning more flexible there's allot to gain here....

One day people will say: You know, they said this day would never come.
They said our sights were set too high. They said this flash driver was too complicated, too tight up in assumptions to ever come together around a common purpose.

But tonight, at this defining moment in history, we have done what the cynics said we couldn't do.

comment:15 Changed 9 years ago by florian

  • Version set to 1.0

Such patch (untested) should help "old" routers :

Index: tools/firmware-utils/src/imagetag.c
===================================================================
--- tools/firmware-utils/src/imagetag.c (revision 15145)
+++ tools/firmware-utils/src/imagetag.c (working copy)
@@ -155,42 +155,42 @@
                return 1;
        }

-       /* Build the kernel address and length (doesn't need to be aligned, read only) */
-       kerneloff = fwaddr + sizeof(tag);
-       kernellen = getlen(kernelfile);
+       /* Build the rootfs address and length (doesn't need to be aligned, read only) */
+       rootfsoff = fwaddr + sizeof(tag);
+       rootfslen = getlen(rootfsfile);

        /* Build the kernel header */
        khdr.loadaddr   = htonl(loadaddr);
        khdr.entry      = htonl(entry);
-       khdr.lzmalen    = htonl(kernellen);
+       khdr.lzmalen    = htonl(getlen(kernelfile));

        /* Increase the kernel size by the header size */
-       kernellen += sizeof(khdr);
+       rootfslen += sizeof(khdr);

        /* Build the rootfs address and length (start and end do need to be aligned on flash erase block boundaries */
-       rootfsoff = kerneloff + kernellen;
-       rootfsoff = (rootfsoff % flash_bs) > 0 ? (((rootfsoff / flash_bs) + 1) * flash_bs) : rootfsoff;
-       rootfslen = getlen(rootfsfile);
-       rootfslen = (rootfslen % flash_bs) > 0 ? (((rootfslen / flash_bs) + 1) * flash_bs) : rootfslen;
+       kerneloff = rootfsoff + rootfslen;
+       kerneloff = (kerneloff % flash_bs) > 0 ? (((kerneloff / flash_bs) + 1) * flash_bs) : kerneloff;
+       kernellen = getlen(kernelfile);
+       kernellen = (kernellen % flash_bs) > 0 ? (((kernellen / flash_bs) + 1) * flash_bs) : kernellen;

-       /* Seek to the start of the kernel */
-       fseek(binfile, kerneloff - fwaddr, SEEK_SET);
+       /* Seek to the start of the rootfs */
+       fseek(binfile, rootfsoff - fwaddr, SEEK_SET);

        /* Write the kernel header */
        crc = crc32(IMAGETAG_CRC_START, (uint8_t*)&khdr, sizeof(khdr));
        fwrite(&khdr, sizeof(khdr), 1, binfile);

-       /* Write the kernel */
-       while (kernelfile && !feof(kernelfile) && !ferror(kernelfile)) {
-               read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), kernelfile);
+       /* Write the rootfs */
+       while (rootfsfile && !feof(rootfsfile) && !ferror(rootfsfile)) {
+               read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), rootfsfile);
                crc = crc32(crc, readbuf, read);
                fwrite(readbuf, sizeof(uint8_t), read, binfile);
        }

-       /* Write the RootFS */
-       fseek(binfile, rootfsoff - fwaddr, SEEK_SET);
-       while (rootfsfile && !feof(rootfsfile) && !ferror(rootfsfile)) {
-               read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), rootfsfile);
+       /* Write the kernel */
+       fseek(binfile, kerneloff - fwaddr, SEEK_SET);
+       while (kernelfile && !feof(kernelfile) && !ferror(kernelfile)) {
+               read = fread(readbuf, sizeof(uint8_t), sizeof(readbuf), kernelfile);
                //crc = crc32(crc, readbuf, read);
                fwrite(readbuf, sizeof(uint8_t), read, binfile);
        }
Index: target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c
===================================================================
--- target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c       (revision 15145)
+++ target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c       (working copy)
@@ -103,13 +103,6 @@
        parts[curpart].size = master->erasesize;
        curpart++;

-       if (kernellen > 0) {
-               parts[curpart].name = "kernel";
-               parts[curpart].offset = kerneladdr;
-               parts[curpart].size = kernellen;
-               curpart++;
-       };
-
        if (rootfslen > 0) {
                parts[curpart].name = "rootfs";
                parts[curpart].offset = rootfsaddr;
@@ -118,6 +111,12 @@
                        parts[curpart].size += sparelen;
                curpart++;
        };
+       if (kernellen > 0) {
+               parts[curpart].name = "kernel";
+               parts[curpart].offset = kerneladdr;
+               parts[curpart].size = kernellen;
+               curpart++;
+       };
        parts[curpart].name = "nvram";
        parts[curpart].offset = master->size - master->erasesize;
        parts[curpart].size = master->erasesize;

comment:16 Changed 9 years ago by nico

  • Version changed from 1.0 to Trunk

comment:17 Changed 9 years ago by florian

Can you try an image created with [15232] applied to your tree ? I think it should fix your issue.

comment:18 Changed 9 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

I assume it works.

comment:19 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.