OpenWrt Forum Archive

Topic: TL-MR3420 flash modification

The content of this topic has been archived between 15 Apr 2018 and 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

To avoid any confusion I must clarify, between the "Internal CS" option and the "GPIO as CS" - almost no difference. ~ Use a GPIO easier than something disable.

MBS wrote:

So, do I understand it right, that with this solution, you will loose the serial port on AR933x SoCs? And what is it about CS1 and CS2?

There simply shows "factory" method of using Int. CS. UART is disabled just before the driver initialization m25p80. I.e. you have a chance to get a working serial console in safemode.

MBS wrote:

Would that mean, that even a second spi device could easily be accessed this way?

Yes.

MBS wrote:

But, what I finally got in mind is: What about completely replacing the flash with a SD card?

Theoretically it is probably possible. But why this way of "matryoshka doll"?
After all, it will affect the system performance.
There are also extroot finally...

MBS wrote:

Or another scenario: go with your solution, but unsolder and lift the CS of the flash. Have a circuit that by default pulls down CS to GND, and at some point during bootup switch it using any free GPIO and thus switch over to the SD card. What do you think?

In the search process, I found a software solution mach-rb750.c one of the platforms where CS0 is used for NAND flash memory (functions: rb750_nand_enable_pins, rb750_nand_disable_pins). By the way I would like to clarify that this modding example is taken from the platforms with ready solutions mach-alfa-ap96.c (by the way there is still a way to hot-plug mmc) and mach-rb4xx.c

This mode is useful because does not need to search free 4 GPIOs pin for the mod mmc_over_gpio. Need only one known pin QSS LED or Rx or one free GPIO - for this was written by this modification.

P.S.
I just feel sorry for the people who get up here this and this with your device.
The more cheaply and easier - the better.

(Last edited by Dioptimizer on 18 Jan 2013, 15:21)

Dioptimizer wrote:

Theoretically it is probably possible. But why this way of "matryoshka doll"?
After all, it will affect the system performance.
There are also extroot finally...

I have been using an extroot using a USB flash drive for more than half a year now, and I'm pretty sick of it (at least the usb part of it). After some days (somewhere around 10) I just get a usb disconnect for no apparent reason, meaning that my filesystem just gets ripped out instead of a clean unmount. In most cases, the journal can handle that, but I've also had a completely messed up filesystem. Anyway, a few seconds after that disconnect, it reconnects and (due to uuid) gets automatically mounted to the right place. But since the filesystem has not been unmounted properly during the disconnect, there are now 2 or even more devices (say sda1, sdb1, sdc1...) mounted to the same mountpoint. And at that point I would be very concerned about data integrity. So that is mainly the reason, why I want to get rid of hotplug devices.

Worked link on Google translate:
http://translate.google.com/translate?l … c%2525hack
(in link  dots "."  changed on unicode format "%2525")

Faced with the problem mounting rootfs EXT4 kernel.

[    6.100000] Waiting for root device /dev/mmcblk0p1...
[    6.250000] mmc0: SD Status: Invalid Allocation Unit size.
[    6.260000] mmc0: host does not support reading read-only switch. assuming write-enable.
[    6.270000] mmc0: new SD card on SPI
[    6.270000] mmcblk0: mmc0:0000 S016B 14.2 MiB
[    6.280000]  mmcblk0: p1
[    6.380000] EXT4-fs (mmcblk0p1): recovery complete
[    6.390000] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    6.400000] VFS: Mounted root (ext4 filesystem) on device 179:1.
[    6.410000] Freeing unused kernel memory: 244k freed
[    6.580000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
[    6.580000]

At the same time if in the rootfs copy to /dev/mmcblk0p1 in squashfs or jffs2 format - the kernel mounts it, but as usual, the problem is already there in the absence of scripts. All operations related to mount mtd'fs (like scripts in /rom/lib/preinit and /rom/lib/firstboot/ folder).
Something needs to come up with.

Someone has the firmware with ART writable for mr3420?

Dioptimizer : Thx for hack


ported it directly into 703n @ aa 12.09rc1 r36088
but pivot root and pivot overlay always results this in dmesg

mmcblk0: error -89 sending status command, retrying

...and block all IO operations on the mmc device
same error is when I use cfdisk /dev/mmcblk0

(possible openwrt scripts accessing  /dev/mmcblk0 in the "bad" way .Tested with badblock write test that  /dev/mmcblk0p1 is fully usable)
For now I use this for optware


mine bug report will be (without logs sorry)
on reboot /boot
-bootloader fail lzma unpack with status 1
-sometimes refuse to mount rootfs on spi0.0 device (kernel panic)

solution ... power disconnect for few seconds and re-try
there is no problem when mmc card is out from slot
ps.
PM me for 703n image/imagebuldier

Update. 18.04.2013
I used GPIO7 on removed R15 pad as CS-PIN .Also have mine 10k on the DO and DI according the schematic.
I don't know if It's important that I have super capacitor on +5V rail (USB +5V/GND) to pump more "juice" to USB 3G modem
Rebooting isn't issue for me as I have decent uptimes with this baby... only ext-root and ext-overlay is the issue

(Last edited by nicefile on 18 Apr 2013, 11:53)

I'm sorry, I just now saw this post.

nicefile wrote:

mine bug report will be (without logs sorry)
on reboot /boot
-bootloader fail lzma unpack with status 1
-sometimes refuse to mount rootfs on spi0.0 device (kernel panic)

It's simple enough is explained (in my experience) -
Most likely it is a conflict spi0.0 and spi0.1:

  • Or you forgot to put a 10k resistor between the DO=>3.3V & DI=>3.3V.
    These resistors need to amplify the signal as we use another device on the same SPI line.
    2.6V (GPIOs-line) = 10k chosen experimentally.

  • Or you connected the CS-pin (for SD card) to the failure GPIO-pin of the eternal active-low mode.
    Make sure that the CS = GPIO function properly during system boot. If the tester to check - it should change its value during the boot process.

Would also like to clarify what the operating voltage on the GPIOs line?

(Last edited by Dioptimizer on 13 Apr 2013, 10:00)

I finished deep mmc hack on my mr3420 ver1 and i can confirm that everythins is working ok.
I used GPIO 18 (r427).
Dioptimizer big thanks for your work.

otlabs wrote:

Could we use it to get even more flash memory?

No, 16M (128 Mbit) in single chip is max.

pepe2k wrote:
otlabs wrote:

Could we use it to get even more flash memory?

No, 16M (128 Mbit) in single chip is max.

Hi pepe2k,

Is this (128Mbit) limit also true for the WDR 3600 and 4300 with support for 16 pins flash type foot print?

I hope not, because I have already ordered two 32Mbytes Flash chips to try on.

Thanks in advance,
Best Regards,

fjorger.

fjorger wrote:

Is this (128Mbit) limit also true for the WDR 3600 and 4300 with support for 16 pins flash type foot print?

I hope not, because I have already ordered two 32Mbytes Flash chips to try on.

I don't know... you need to try and let us know! smile

pepe2k wrote:

I don't know... you need to try and let us know! smile

Thanks.

I will, and the results will follow to this "hardware hacking" forum.

Regards,

fjorger.

@fjorger: the wiki would also be an excellent place for such information.

Hello,

wr703n

I think I have a similar problem with wifi not working - but I can't figure out what am I doing incorrectly.

I bought an spi programmer ($5,5 weeks of waiting for it), took a copy of 4MB , copied it over to 8MB - wifi not working, reporting errors about athk9 :

[   38.770000] ath: phy0: Unable to initialize hardware; initialization status: -5
[   38.770000] ath9k ar933x_wmac: failed to initialize device
[   38.780000] ath9k: probe of ar933x_wmac failed with error -5

No other network devices then eth0 :-(

I found this post which suggests taking a snapshot of art partition - so I soldered 4MB one back in and took a snapshot with :

dd if=/dev/$(grep '"art"' /proc/mtd |cut -c 1-4) of=/tmp/art.backup

soldered back the 8MB one, flashed it with the image provided here that allows writing to this parition and recovered it with

mtd write art.backup art

Rebooted the router, I don't see the same errors BUT router is still not seeing wireless adapter. :

root@OpenWrt:~# wifi up
PHY for wifi device radio0 not found
'radio1' is disabled
PHY for wifi device radio0 not found
'radio1' is disabled
root@OpenWrt:~#

Full dmesg here : http://pastie.org/pastes/8040414/text

Any ideas / suggestions much appreciated.
Thanks in advance,

Marek

Aaaand as always, 5 minutes after posting a long question - you find out what the problem is.
Turns out /etc/config/wireless had two entries , one for radio0 one for radio1. Removed the duplicate
and it is all working correctly now :-) Hope it helps if someone has the same problem.

The discussion might have continued from here.