351 (edited by m4udit 2009-07-07 21:27:51)

Re: Support for Marvell 88F5xx81 based routers

Hi all,

I fear i broke my wrt350n after an kernel upgrade.  I probably damage uboot sequence
with an unprotect flash sad. In serial console, i see :

        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** MARVELL BOARD: RD-88F5181L-VOIP-GE LE

U-Boot 1.1.1 (Dec 12 2006 - 16:12:22) Marvell version: 1.7.3

DRAM CS[0] base 0x00000000   size  32MB
DRAM Total size  32MB
Flash: mvFlashInit base 0xff800000 devW 1 busW 1
Flash: flashStructGet manu 0xec id 0xe0
Flash: flashStructGet flash is supported.
FLASH: initFlashSecs TOP Sector Type
Flash: flashSecsInit main sector loop 0 - 127
[8192kB@ff800000] Flash:  8 MB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
*** Warning - bad CRC, using default environment


Soc: MV88F5181 Rev 9
CPU: ARM926 (Rev 0) running @ 500Mhz
SysClock = 166Mhz , TClock = 166Mhz


USB 0: host mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net:   mvEgigaLoad: egiga0 load ok
egiga0 [PRIME]

***************DRIVER INFO*****************

DRIVER BUILD DATA: Jan  9 2007 at 18:25:44
DRIVER VERSION 1.06

*******************************************
dbSign is:65:52:63:4f:6d:4d
mac address in flash is:00:1e:e5:93:ef:16
have eRcOmM
Firmware is damaged,enter download mode
mvEgigaLoad: egiga0 load ok
egiga0 [PRIME]

mvEgigaInit: egiga0 init - mvBoardPhyAddrGet()=0x0 , priv->port =0x0
ring full
mvEgigaInit: egiga0 complete ok
In download function
 mac address:00:1e:e5:93:ef:16
Pin:33.33.37.37.35.36.32.33

I have hope with download mode, but i don't know how to use it. Wireshark doesn't show frame
with mac == 00:1e:e5:93:ef:16. Maybe anyone knows this mode ?

EDIT : hmm, i don't see pawellos and motopompa had exactly the same problem.
Maybe you give me some details ?

EDIT2 : it works ! Thanks for thread documentation.


EDIT3 : Some details about the way i used to debrick:

Pawellos talks about sercomm-utility here
It allows to reflash a router if you "have eRcOmM" (see uboot logs).
You can find it : http://www.nslu2-linux.org/wiki/Main/SercommFirmwareUpdater (if you use windows).
Note: for vista, sercomm-utility (Upgrade utility is the name after install) MUST be run with XP-compatibility and superuser rights.
I used full-image that relghuar post here in order to recover uboot.

352 (edited by MoD 2009-06-29 07:06:56)

Re: Support for Marvell 88F5xx81 based routers

Has anyone tried to change MAC address for wan port by setting it in /etc/config/network ? If I do that, wan port stops working:(

I'm affraid that Marvell driver doesnt support that. Could anyone check/confirm this?

Re: Support for Marvell 88F5xx81 based routers

OpenVPN works on WRT350Nv2, read this thread if you are going to use OpenVPN on it or already get crashes.

354 (edited by maddes.b 2009-07-04 13:59:50)

Re: Support for Marvell 88F5xx81 based routers

Change #16670 removed the kernel module ide-core for arm architecture.
This should lead to a full working repository on the OpenWrt ftp sever (e.g. kmod-tun) during the next weeks, as the compilation of the kernel modules is no more stopped due to errors from the ide module.

Re: Support for Marvell 88F5xx81 based routers

I've managed to flash a bad image to my router from inside the uboot console using instructions from a previous post made about half a year ago. I still have serial access, HOWEVER there no longer seems to be a boot wait time. I am using a USB to serial adapter and previously I could manage to catch the boot process in time to stop it, but for some reason, since the flash, no matter how fast I am, I cannot seem to catch the the uboot startup process fast enough to interrupt the boot process..

Is there any possibility that any of the instructions in previous posts could have removed an argument similar to the boot_wait argument in uboot? If so, can you think of any way to change it back??

356 (edited by maddes.b 2009-07-06 14:00:09)

Re: Support for Marvell 88F5xx81 based routers

Could you add the output of the serial console during a powerup to your previous post.
Tried hammering your enter key when restarting the router?

Re: Support for Marvell 88F5xx81 based routers

Change 16742 seems to add a functionality to get a flashable imgage with kernel and rootfs correctly padded to the kernel's mtd size, like in the previous posts #338 and #341.
Unfortunately have no time to investigate into this further.

358 (edited by maddes.b 2010-04-07 19:29:51)

Re: Support for Marvell 88F5xx81 based routers

Updated my repository to revision 16741

359 (edited by Mavy 2009-07-09 08:31:09)

Re: Support for Marvell 88F5xx81 based routers

Wireless appears to broken for me. But i am not sure if this is because of the usb rootfs or because of a driver issue.

I am baffled because its complaining about a stale NFS mount (file permissions???). Because of this it cant start the control interface.

Will investigate this and post my findings tonight.

360

Re: Support for Marvell 88F5xx81 based routers

Found the wifi problem was related to the usb rootfs not being unmounted on a reboot. This caused an issue in the /var/run directory. Solved it by making /var/run a symbolic link to /tmp.

I also added a fsck to the preinit script to fix problems on the usb rootfs before mounting

361 (edited by DaBigMac 2009-07-13 16:59:21)

Re: Support for Marvell 88F5xx81 based routers

DaBigMac wrote:

I've managed to flash a bad image to my router from inside the uboot console using instructions from a previous post made about half a year ago. I still have serial access, HOWEVER there no longer seems to be a boot wait time. I am using a USB to serial adapter and previously I could manage to catch the boot process in time to stop it, but for some reason, since the flash, no matter how fast I am, I cannot seem to catch the the uboot startup process fast enough to interrupt the boot process..

Is there any possibility that any of the instructions in previous posts could have removed an argument similar to the boot_wait argument in uboot? If so, can you think of any way to change it back??

Here's the log..

=~=~=~=~=~=~=~=~=~=~=~=
............................................................ done, booting the kernel.
Linux version 2.6.28.9 (emmanuel@debian) (gcc version 4.1.2) #2 Sat Apr 11 21:26:37 CST 2009
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Linksys WRT350N v2
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 30408KB available (1812K code, 136K data, 92K init)
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 476 bytes
NET: Registered protocol family 16
Orion ID: MV88F5181L-Rev-A1. TCLK=166666667.
Applying Orion-1/Orion-NAS PCIe config read transaction workaround
PCI: bus0: Fast back to back transfers disabled
pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:01:00.0: PME# disabled
PCI: bus1: Fast back to back transfers enabled
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 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 59
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:00:00:00:51:81
physmap platform flash device: 00800000 at f4000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7f0000
No RedBoot partition table detected in physmap-flash.0
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00100000 : "kernel"
0x00100000-0x00750000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=260000, len=4F0000 
0x00260000-0x00750000 : "rootfs_data"
0x007c0000-0x00800000 : "u-boot"
i2c /dev entries driver
TCP westwood registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0: detected a Marvell 88E6131 switch
dsa slave smi: probed
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
SQUASHFS error: lzma returned unexpected result 0x1
SQUASHFS error: Unable to read cache block [1563c8:316]
SQUASHFS error: Unable to read inode [1563c8:316]
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x7368 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x021e instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x13f7 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x13f2 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x13f6 instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0xf000 instead

etc etc etc ad nausem until it finally kernel panics several pages later..

I can assure you, boot wait is GONE sad, there is no way that any human being could be pressing the enter key more furiously than I already was..

I was wondering if you could give me more information on JTAG. I'm utterly without any previous experience in using JTAG, but hey, I can't brick it any worse than it already is, right?

If you can give me some suggestions for parts and software that would be great, I remember wiring diagrams in earlier posts as well as some (very confusing) instructions..

The soldering/wiring won't be an issue, but I fear the software side greatly..

Many thanks for the effort to date guys, for those following the path of flashing inside uboot, use the more recent posts rather than the older one, as, trust me, it WILL bring you grief, I followed the instructions very closely..

Cheers,

DaBigMac

P.S. The instructions I used were in post #298

362 (edited by maddes.b 2009-07-15 14:05:11)

Re: Support for Marvell 88F5xx81 based routers

I get similar errors after flashing from Linux (non-ramdisk), but fortunately my U-Boot is still working as before.

...
SQUASHFS error: lzma returned unexpected result 0x1
SQUASHFS error: Unable to read cache block [149528:194c]
SQUASHFS error: Unable to read directory block [149528:194c]
Please be patient, while OpenWrt loads ...
SQUASHFS error: lzma returned unexpected result 0x1
SQUASHFS error: Unable to read cache block [149528:194c]
SQUASHFS error: Unable to read directory block [149528:194c]
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

Here's how I flashed it:

(SSH to router plus SFTP to router for file transfer to /tmp)
(transfer kernel and rootfs to /tmp via SFTP)
cat /proc/mtd  # check mtd sizes
....
dd if=/tmp/openwrt-wrt350nv2-uImage of=/dev/mtdblock0
dd if=/tmp/root.squashfs of=/dev/mtdblock1
(do not do anything after this, immediately remove power from router, then re-power)

Any ideas what I'm doing wrong?
As flashing the same files in U-Boot via erase/unprotect/tfpboot/cp.b works fine.
Only difference I see is erase, but there's no special erase option for dd available.

Update:
Seems it was caused by not using a padded kernel image.

dd if=/tmp/openwrt-wrt350nv2-uImage.padded of=/dev/mtdblock0
dd if=/tmp/root.squashfs of=/dev/mtdblock1

Update #2:
No, other issue also happens with a padded kernel image. Will try with a rootfs.squashfs + 512bytes of zeros

363 (edited by mrk 2009-09-22 18:48:52)

Re: Support for Marvell 88F5xx81 based routers

@DaBigMac
Sorry, that I don't know a solution to bring back Your U-Boot,
but I think, that Your issue is caused by the mtd-boundaries.

You have:

Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00100000 : "kernel"
0x00100000-0x00750000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=260000, len=4F0000 
0x00260000-0x00750000 : "rootfs_data"
0x007c0000-0x00800000 : "u-boot"

As mentioned some posts before, the present kernel exceeds the 0x100000 filesize.
Your kernel partition is sized by that value, so the kernel tries to find the "magic number"
at 0x100000, but there seems to be still some kernel code and no rootfs.

@all
Be very, very careful with the mtd-partions.
They have to be corrected at wrt350n-setup.c before compiling.


@maddes
Well, Your issue is quiet mysterious.
When You inspect the root-squashfs - file, You will find the "magic number" (DE AD C0 DE) at every 0x10000 address.
In the present file at 0x110000 and 0x120000. So there is no need in giveing additional zero's.

Try to find out, if the linux-flashed rootfs starts at the correct memory address
or the magic number can be found at an n * 0x10000 memmory-address.
Inspect this via uboot command "md".
If there is something wrong, we have to inspect, why the mtd-partitions in linux-kernel are wrong.

364 (edited by maddes.b 2009-07-17 18:37:23)

Re: Support for Marvell 88F5xx81 based routers

@DaBigMac
For flashing different kernel sizes see post #301 (kernel mtd patch) and #341 (flashing images with different mtd sizes).
This only avoids the problem with your next flash.
Unfortunately I do not have any JTAG experience either.

@all
If I fill the mtd partitions with zeros then I couldn't reproduce my previous problem at all.
If I didn't do then sometimes it failed and sometimes it worked.
Right now I can only recommend to clear the mtd partions with dd beforehand.

I could reproduce the problem even when erasing,  if I was not powering off the router after flash (did a ls -la /jffs and just looked around)
The same with an immediate reboot worked (updated #341 for padded mtd images, sync and immediate reboot)

Creating 7 MTD partitions on "physmap-flash.0":
0x00000000-0x001a0000 : "kernel"
0x001a0000-0x00750000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "physmap-flash.0"
0x00760000-0x007a0000 : "lang"
0x007a0000-0x007c0000 : "nvram"
0x007c0000-0x00800000 : "u-boot"
0x00750000-0x00760000 : "eRcOmM_do_not_touch"
0x00000000-0x00760000 : "org_mtd0"
i2c /dev entries driver
TCP westwood registered
NET: Registered protocol family 17
Bridge firewalling registered
Distributed Switch Architecture driver version 0.1
eth0: detected a Marvell 88E6131 switch
dsa slave smi: probed
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x6a2a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x0c4d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x8c23 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0xe201 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xe6da in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0xc242 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x810f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x48f7 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x0f81 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x2d0e in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0xc348 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x397f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x9000 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x8e8f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0xfa1f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0x8833 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010018: 0x3f17 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001001c: 0xe59d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010020: 0x887a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010024: 0xc696 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0xf630 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0x8f4c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0x63ec in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0x5105 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0x25b9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0xa9cd in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0xfc08 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0xd9f5 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0xf33c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0xf0fb in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030000: 0x2cce in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030004: 0xa51d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030008: 0x60c7 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003000c: 0x1263 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030010: 0x74a9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030014: 0x197a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030018: 0x4446 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0003001c: 0xfed2 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030020: 0xcc6f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00030024: 0xf821 in                                                                              stead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x000398b0
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0x3b5d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0x1e6a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0xa949 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0x3b7c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x88f1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0x43dc in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0xb79c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0xb675 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0x432d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0xbc62 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050000: 0x6d30 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050004: 0x9981 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050008: 0x84c5 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005000c: 0x2421 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050010: 0xbc41 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050014: 0x440b in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050018: 0x3c8b in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0005001c: 0xb266 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050020: 0x61cf in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00050024: 0x218d in                                                                              stead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x0005e6bc
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060000: 0x2afd in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060004: 0xf1d3 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060008: 0x1ddd in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006000c: 0x7daf in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060010: 0x13f9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060014: 0x969d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060018: 0x366c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006001c: 0x143d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060020: 0xc86f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060024: 0x55b9 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070000: 0x073e in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070004: 0xe712 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070008: 0xc500 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007000c: 0x0f0b in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070010: 0xa9bf in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070014: 0x1a8a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070018: 0xa3b1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0007001c: 0x498c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070020: 0x6870 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00070024: 0xbb53 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080000: 0xe7bb in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004: 0x3e9c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008: 0xb434 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008000c: 0xd6c9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080010: 0x0a59 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080014: 0xfa1c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080018: 0x0e47 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008001c: 0xbb10 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080020: 0x6db0 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080024: 0x5155 in                                                                              stead
Further such events for this erase block will not be printed
Old JFFS2 bitmask found at 0x00086834
You cannot use older JFFS2 filesystems with newer kernels
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090000: 0xf192 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090004: 0xb51a in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090008: 0x0042 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009000c: 0x3554 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090010: 0xcffb in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090014: 0x455c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090018: 0xe347 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009001c: 0xc192 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090020: 0xb43c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00090024: 0x670d in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0000: 0x5ccc in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0004: 0xa3b9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0008: 0x1048 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a000c: 0xf491 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0010: 0xbb6c in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0014: 0x2050 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0018: 0x15cd in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a001c: 0x0f87 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0020: 0xa0f7 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0024: 0xd0c9 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0000: 0x03a1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0004: 0xf814 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0008: 0x90e5 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b000c: 0x6217 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0010: 0x0f55 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0014: 0x75c9 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0018: 0x32bd in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b001c: 0xccc5 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0020: 0x39d0 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000b0024: 0x23d6 in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0000: 0x43b1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0004: 0xbfc1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0008: 0x04d2 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c000c: 0x38c1 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0010: 0x27f2 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0014: 0x7b5d in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0018: 0xbb1f in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c001c: 0x23c2 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0020: 0x08b4 in                                                                              stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000c0024: 0x8f0d in                                                                              stead
Further such events for this erase block will not be printed
jffs2_scan_eraseblock(): End of filesystem marker found at 0xd0000
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 78, bad_blocks 0, c->nr_blocks 91
VFS: Cannot open root device "mtdblock1" or unknown-block(31,1)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1664 mtdblock0 (driver?)
1f01            5824 mtdblock1 (driver?)
1f02             256 mtdblock2 (driver?)
1f03             128 mtdblock3 (driver?)
1f04             256 mtdblock4 (driver?)
1f05              64 mtdblock5 (driver?)
1f06            7552 mtdblock6 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)

365 (edited by maddes.b 2010-04-07 19:30:19)

Re: Support for Marvell 88F5xx81 based routers

With sync and immediate reboot I never had any flashing issues again, even with an unpadded rootfs (which is much faster).
Updated #341 accordingly.

Btw my repository and kernel are currently at revision 16904.

366 (edited by maddes.b 2010-04-07 19:30:50)

Re: Support for Marvell 88F5xx81 based routers

Kernel 2.6.30.2 with LZMA is available for Marvell Orion starting with r16950. Thanks to Kaloz.
The compressed kernel is know at ~800KB (was ~1106KB before).
Precompiled kernels and packages for WRT350Nv2 are available here. Use at your own risk!!!

WARNING!!!
Had a flashing issue when upgrading to 2.6.30.2.
Several tests showed that you get boot issues when the kernel mtd is downsized and an unpadded image was used for flashing (hopefully you have serial access to U-Boot).
If a completely padded image (0x00750000) is used, then everything works fine.
Updated #341 accordingly.

Maddes

Re: Support for Marvell 88F5xx81 based routers

Hi there,

Just wondering if anyone's tried this precompiled image from Maddes.b

I'm keen to try it, but this is my main home access router.

It's pretty flakey with the standard Linksys firmware and often hangs while using USB access to NTFS filesystem..

Looking forward to trying this.  Cheers!

368 (edited by maddes.b 2009-08-02 22:38:05)

Re: Support for Marvell 88F5xx81 based routers

Just started to compile the current trunk (rev 17099) with NTFS RW support. Will take roughly 12 hours plus upload for all packages.

@stevellion:
Prepare yourself before flashing anything.
Try to get a replacement router from a friend, for some days, so you are not lost offline.
Read all the stuff written here and download also the original stock firmware from the thread.
If really something goes wrong then a serial access to the router is gold.
Btw I do not publish a webupgrade image for the Linksys stock firmware.

369 (edited by maddes.b 2009-08-05 00:32:02)

Re: Support for Marvell 88F5xx81 based routers

The OpenWrt snapshot repository for Orion at http://downloads.openwrt.org/snapshots/trunk/orion/packages/ seems to be fixed, as I could install all packages I needed from it without any checksum errors. Hence I will remove my own package repository soon.

370 (edited by maddes.b 2009-08-05 02:02:53)

Re: Support for Marvell 88F5xx81 based routers

I managed to split openwrt-orion-squashfs.img into uImage and root.squashfs.

# extract general uImage (padded to 1024k) from openwrt-orion-squashfs.img
dd if=openwrt-orion-squashfs.img of=uImage.padded bs=1024k count=1
# extract root.squashfs (padded to 128k) from openwrt-orion-squashfs.img
dd if=openwrt-orion-squashfs.img of=root.squashfs bs=128k skip=8

You can just ignore that extracted uImage and replace it with the uImage for your router.
The root.squashfs can be used as described in #341 (padding, flashing, etc.).
No need to compile it yourself anymore. Even creating a webupgrade image with them would be possible.

The solution was in target/linux/orion/image/Makefile:

define Image/Build/squashfs
    $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
    ( \
        dd if=$(KDIR)/uImage bs=1024k conv=sync; \
        dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \
    ) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
endef

Note that "conv=sync" is also a very fast way to pad something.

If you want to check on your own, then do a mini build and check as following:

# extract general uImage and root.squashfs from openwrt-orion-squashfs.img
dd if=bin/openwrt-orion-squashfs.img of=bin/uImage.padded bs=1024k count=1
dd if=bin/openwrt-orion-squashfs.img of=bin/root.squashfs.padded bs=128k skip=8

# check uImage
dd if=build_dir/linux-orion_generic/uImage of=bin/uImage.kdir.padded bs=1024k conv=sync
diff -s bin/uImage.padded bin/uImage.kdir.padded

# check root.squashfs
dd if=build_dir/linux-orion_generic/root.squashfs of=bin/root.squashfs.kdir.padded bs=128k conv=sync
diff -s bin/root.squashfs.padded bin/root.squashfs.kdir.padded

Re: Support for Marvell 88F5xx81 based routers

Hello,

i've tried to reproduce the build process as advertised in #301 plus some more details fetched from maddes ftp site and my build fails with the following error:

chmod +x /home/perro1o/packages/openwrt/kamikaze-trunk/build_dir/target-arm_uClibc-0.9.30.1/root-orion/etc/rc.d/S99reflash
/home/perro1o/packages/openwrt/kamikaze-trunk/staging_dir/host/bin/mksquashfs-lzma /home/perro1o/packages/openwrt/kamikaze-trunk/build_dir/target-arm_uClibc-0.9.30.1/root-orion /home/perro1o/packages/openwrt/kamikaze-trunk/tmp/rootfs.squash -nopad -noappend -root-owned -lzma
/home/perro1o/packages/openwrt/kamikaze-trunk/staging_dir/host/bin/mksquashfs-lzma: invalid option

Looks like mksquashfs-lzma does not understand the -lzma switch...

Any idea about what I could have made wrong ?

Re: Support for Marvell 88F5xx81 based routers

You are correct the "-lzma" parameter is unknown and comes from $(SQUASHFS_OPTS).
I assume the variable was not set before.
For a fast result just remove it in target/linux/orion/image/Makefile.

Re: Support for Marvell 88F5xx81 based routers

Yes, works better without $(SQUASHFS_OPTS), thanks for the tip!

374 (edited by capibar 2009-08-10 09:42:13)

Re: Support for Marvell 88F5xx81 based routers

Hi,

I have WRT350 v2.1

Is it possible to load openwrt image through the device's web interface?
If yes, which image can be loaded like this.

It seems there are a lot of information about WRT350 v2, but there are no any HOWTO guides.

375 (edited by maddes.b 2010-04-09 10:14:16)

Re: Support for Marvell 88F5xx81 based routers

Created sysupgrade support for WRT350Nv2. Patches are submitted as enhancement ticket #5719. These are already inside the official Backfire release.

It is recommended to flash new versions without keeping the config (e.g. via sysupgrade -n) and start from scratch.
This avoids any issues with tests and changes done to the previous versions.
If you are sure that you did not change anything special in the old version (e.g. patches), then keeping the config should be fine.

So when OpenWrt is installed, then upgrading to a new version is as simple as: ("-n" is used to start with a fresh default config)

sysupgrade -n [-v] http://downloads.openwrt.org/backfire/10.03/orion/openwrt-wrt350nv2-squashfs.img

Even going back to the original stock firmware (#377, #187 & #188) is easy:

sysupgrade -n [-v] /tmp/wrt350n.bin

For the stock firmware you'll get an erase error as the flash image (0x00800000) is bigger than the "image" mtd partition (0x00750000), but this is no issue.

With verbose output (-v) the following error messages can be ignored:
* mount: mounting mini_fo:/jffs on /mnt failed: Function not implemented

Next step is to get the webupgrade straight:
Does it really need to create a flash image with a clean root.squashfs inside? (=two reboots) - No, the size check can be passed also with a single reboot version.
Can "openwrt-wrt350nv2-squashfs.img" be used as a base for the webupgrade image? - Yes, it can.