1 (edited by axishero 2010-12-06 06:55:57)

Topic: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

I just bought a MR3420 router and here are my unboxing pics.
http://www.right.com.cn/forum/thread-42835-1-1.html
I flashed it with a 4M trunk fireware and it works fine.But 4MB is really not enough for installing apps.So I decide to replace 4MB flash with a 8MB one.Then questions arise:
1?Can I use a original 4MB u-boot to flash the new 8M flash in order to get the router bootup,or I must compile a u-boot for 8MB and how to?
2?I know that 4MB firmware can be written directly into 8MB one?but in this case?it can only recognize half of 8MB.To get fully use of 8M space?I must modify the 4MB firmware to support 8MB space.I've heard that just change the offset of art  from 0x3f0000 to 0x7f0000 then the firmware should recognize all 8MB space.(source below)
https://dev.openwrt.org/browser/trunk/t … l-mr3420.c
Is there any quick solution to do this tiny change and compile a suitable .bin for 8M flash?
I am waiting someone wise to enlight me!

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

Usb extroot isn't enought ?

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

th0m4s wrote:

Usb extroot isn't enought ?

After installing Luci and usb drivers,it left me no space to install ext-fs support,so usb external can't use.

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

So instal Luci on extroot...

5 (edited by axishero 2010-12-06 11:02:08)

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

th0m4s wrote:

So instal Luci on extroot...

In this case I should first remove luci.But I don't know the commands line to install luci into extroot,pls give some hints.
I am dying to see usb transfer rate of MR3420.

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

th0m4s wrote:

So instal Luci on extroot...

I notice that block-extroot must be included in the image and cannot be installed later on with opkg.It's a bit complicated.Is there any other way to install big apps(like luci) into external storage?
http://wiki.openwrt.org/doc/howto/extroot

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

how can openwrt be installed on MR3420 ?
can we just update it via the origincal tp-link web interface ?

what about if i have a problem? how to attach a serial console ?

would the same firmware image work with MR3220?

questins over questions -  but any hints are welcome!

roland

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

axishero wrote:
th0m4s wrote:

So instal Luci on extroot...

I notice that block-extroot must be included in the image and cannot be installed later on with opkg.It's a bit complicated.Is there any other way to install big apps(like luci) into external storage?
http://wiki.openwrt.org/doc/howto/extroot

i think it should be possible. did you try symlinking or bind-mount ( mount -o bind)  the dir(s) where luci installs to?

9 (edited by DerMicha 2010-12-12 00:06:14)

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

I use an 2Gb Usb Stick for Swap and Extroot on this Device.
Just formating a 96mb Swap Partion (1) and a ext3 Partion (2) for extroot.

Flash the router with the http://downloads.openwrt.org/snapshots/ … actory.bin file via gui in original firmware.

opkg update
opkg install kmod-usb-core kmod-usb-uhci kmod-usb-storage  kmod-usb2  kmod-fs-ext3 e2fsprogs

reboot

put the formatet stick into the router then,

mount /dev/sda2 /mnt
mkdir /tmp/root
mount -o bind / /tmp/root
cp /tmp/root/* /mnt -a
umount /tmp/root
umount /mnt

reboot

make /etc/config/fstab with this:

    config 'global' 'automount'
        option 'from_fstab' '1'
        option 'anon_mount' '1'

    config 'global' 'autoswap'
        option 'from_fstab' '1'
        option 'anon_swap' '0'

    config 'mount'
        option 'target' ''
        option 'fstype' 'ext3'
        option 'options' 'rw,sync'
        option 'enabled_fsck' '1'
        option 'device' '/dev/sda2'
        option 'enabled' '1'
        option 'is_rootfs' '1'

    config 'swap'
        option 'device' '/dev/sda1'
        option 'enabled' '1'

now:
opkg update
opkg install block-extroot

reboot

df -h shut be ~ 1.9Gb free on /overlay and free shows 96mb swap. :-)

10 (edited by shakle 2010-12-26 20:31:13)

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

has the tl-mr3420 v1.1 the same board of v1 ?? is it flashable or not?

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

ust installed openwrt in a tl-wr3420. After sucesfully doing this:

opkg update
opkg install kmod-usb-core kmod-usb-uhci kmod-usb-storage  kmod-usb2  kmod-fs-ext3 e2fsprogs

I am triyng to plug an external  usb drive but I am getting these error in the syslog and I can not see /dev/sda:

Dec 28 11:38:10 PakoCasa user.warn kernel: sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_platform_shutdown
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_pci_probe
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_unlink_urb_from_ep
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_disabled
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_check_unlink_urb
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcds_loaded
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_calc_bus_time
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_pci_shutdown
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_link_urb_to_ep
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_put_hcd
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_giveback_urb
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_poll_rh_status
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_create_hcd
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_hcd_pci_remove
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_remove_hcd
Dec 28 11:38:10 PakoCasa user.warn kernel: ohci_hcd: Unknown symbol usb_add_hcd


What can i do to detect the usb?

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

it looks that usbcore module is not loaded. afaik,  ohci-hcd depends on usbcore module

13 (edited by shakle 2010-12-28 19:46:34)

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

i formated my 16gb usb with sda1 ext3 and sda2 swap (100mb)..
configured fstab properly and
my df -h is

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.5M      1.5M         0 100% /rom
tmpfs                    14.4M     60.0K     14.4M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda1                14.7G    173.3M     13.8G   1% /overlay
mini_fo:/overlay          1.5M      1.5M         0 100% /

is it ok? overlay is 1,5M 100% seems to be wrong...

also uhttpd doesn't work properly when router starting but only with

root@OpenWrt:~# uhttpd -p 80 -h /www
socket(): Address family not supported by protocol

Can anyone help me?

re: solved enabling uhttpd in service >initscripts  LOL
it works but error remains and I don't know if partitions are ok...

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

Thnaks Roland I will try it. For now I am busy with another problem. I can not make any configuration change in any file. If I try to edit and save a file like /etc/config/dhcp I get a message saying that I can not save it because "No space left on device". I can see the same error in the kernel syslog during the boot up process
"Dec 28 21:05:57 PakoCasa user.info kernel: device wlan0 left promiscuous mode
Dec 28 21:05:57 PakoCasa user.info kernel: br-lan: port 2(wlan0) entering disabled state
Dec 28 21:05:57 PakoCasa user.info kernel: device wlan0 entered promiscuous mode
Dec 28 21:05:57 PakoCasa user.info kernel: br-lan: port 2(wlan0) entering forwarding state
Dec 28 21:05:58 PakoCasa user.info sysinit: Loading defaults
Dec 28 21:05:58 PakoCasa user.info sysinit: Loading synflood protection
Dec 28 21:05:58 PakoCasa user.info sysinit: Adding custom chains
Dec 28 21:05:59 PakoCasa user.info sysinit: Loading zones
Dec 28 21:06:00 PakoCasa user.info sysinit: Loading forwardings
Dec 28 21:06:00 PakoCasa user.info sysinit: Loading redirects
Dec 28 21:06:00 PakoCasa user.info sysinit: Loading rules
Dec 28 21:06:00 PakoCasa user.info sysinit: Loading includes
Dec 28 21:06:00 PakoCasa user.info sysinit: Optimizing conntrack
Dec 28 21:06:00 PakoCasa user.info sysinit: Loading interfaces
Dec 28 21:06:00 PakoCasa user.info firewall: adding lan (br-lan) to zone lan
Dec 28 21:06:00 PakoCasa user.info firewall: adding wan (eth1) to zone wan
Dec 28 21:06:01 PakoCasa user.info sysinit: /etc/rc.common: line 78: can't create /etc/crontabs/root: No space left on device
Dec 28 21:06:01 PakoCasa user.info sysinit: # this file is generated from /etc/config/crontabs
"
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.8M      1.8M         0 100% /rom
tmpfs                    14.4M     68.0K     14.4M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3          896.0K    864.0K     32.0K  96% /overlay
mini_fo:/overlay          1.8M      1.8M         0 100% /

I have tried to install again the factory.bin or the sysupgrade.bin but it does not work

"sysupgrade http://downloads.openwrt.org/snapshots/ … pgrade.bin
Saving config files...
Switching to ramdisk...
Segmentation fault
Segmentation fault
/sbin/sysupgrade: line 134: busybox: not found
/sbin/sysupgrade: line 134: busybox: not found
/sbin/sysupgrade: line 134: busybox: not found
/sbin/sysupgrade: line 134: umount: not found
/sbin/sysupgrade: line 134: grep: not found
/sbin/sysupgrade: exec: line 134: /bin/busybox: not found"



Any idea?

15 (edited by DerMicha 2010-12-29 00:20:00)

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

@ shakle
....and I don't know if partitions are ok...
/dev/sda1                14.7G    173.3M     13.8G   1% /overlay

Yes. It`s right. The entry  /dev/mtdblock3 "root part"  is changed to /dev/sda1.

############

KAMIKAZE (bleeding edge, r24810) ------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
              * Bootet from USB*

root@router2:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.5M      1.5M         0 100% /rom
tmpfs                    14.4M    312.0K     14.1M   2% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda2                 1.7G     51.8M      1.6G   3% /overlay
mini_fo:/overlay          1.5M      1.5M         0 100% /
root@router2:~# free
              total         used         free       shared      buffers
  Mem:        29528        26696         2832            0         1416
Swap:        96348            0        96348
Total:       125876        26696        99180
root@router2:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda2 on /overlay type ext3 (rw,sync,relatime,errors=continue,data=writeback)
mini_fo:/overlay on / type mini_fo (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
root@router2:~#

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

I have problem with my new autopowered hd usb2.0. When I plugin it in the router it doesn't start... I tryed with an powered hub but is the same thing..
How can i do?

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

Power source should be greater than power sink.
Check power requirements of your HD and thermodynamics 1.0.1.

Netgear WNR854T (ARM Marvell Orion CPU 500MHz, Marvell 88W8361P mini-PCI STA only, 8/32MB) - trunk r17427 since 09/09/09 to 06-06-12 GLOD
TP-LINK TL-WR741ND v1.9 (Atheros AR7240 CPU 350MHz, Atheros AR9285 Chipset, 4/32MB) - trunk r23281 since 10/10/10
TP-LINK TL-MR3420 v1.1, TL-MR3220 v1.2 - trunk r25302 since 11/11/11
TP-LINK TL-WR842ND v1.0, TL-WR1043ND v1.8 - 12.09-rc1 since 12/12/12

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

Following DerMicha on #9 I managed to do btrfs with compress on a 512 MiB stick:

Using Gparted on /dev/sdc2 partition and format a 128 MiB swap and left the rest partitioned but unformatted. Then:

sudo apt-get install btrfs-tools
sudo mkfs.btrfs -L btrfs /dev/sdc2
telnet 192.168.1.1

Now connected to the router (at first making some room removing LuCI):

opkg update
opkg remove luci luci-theme-openwrt luci-theme-base luci-app-initmgr luci-app-firewall luci-mod-admin-full luci-mod-admin-core luci-lib-web luci-lib-nixio luci-lib-sys luci-lib-core luci-sgi-cgi luci-lib-lmo luci-i18n-english luci-lib-ipkg libiwinfo
opkg install kmod-scsi-core kmod-usb-storage kmod-crypto-misc kmod-libcrc32c kmod-fs-btrfs
mount /dev/sda2 /mnt
cp /tmp/root/* /mnt -a
opkg install block-mount block-extroot

At this point there is a default fstab config file. Note the disabled state.

uci show fstab wrote:

fstab.automount=global
fstab.automount.from_fstab=1
fstab.automount.anon_mount=1
fstab.autoswap=global
fstab.autoswap.from_fstab=1
fstab.autoswap.anon_swap=0
fstab.@mount[0]=mount
fstab.@mount[0].target=/home
fstab.@mount[0].device=/dev/sda1
fstab.@mount[0].fstype=ext3
fstab.@mount[0].options=rw,sync
fstab.@mount[0].enabled=0
fstab.@mount[0].enabled_fsck=0
fstab.@swap[0]=swap
fstab.@swap[0].device=/dev/sda2
fstab.@swap[0].enabled=0

This disabled state will be useful later, so I made a copy.

cp /etc/config/fstab /etc/config/fstab-off
uci delete fstab.@mount[0].target
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=btrfs
uci set fstab.@mount[0].options=rw,sync,compress,ssd
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].is_rootfs=1
uci set fstab.@swap[0].device=/dev/sda1
uci set fstab.@swap[0].enabled=1
uci commit fstab
reboot

Will lost conection, so connect again!

telnet 192.168.1.1

Now in the router is all done:

df wrote:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1920      1920         0 100% /rom
tmpfs                    14764        76     14688   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda2               369492      7416    362076   2% /overlay
mini_fo:/overlay          1920      1920         0 100% /

To revert

mount /dev/mtdblock3 /mnt -t jffs2
mv /mnt/etc/config/fstab /mnt/etc/config/fstab-on
mv /mnt/etc/config/fstab-off /mnt/etc/config/fstab
reboot

If you didn't have fstab-off, there is still hope if you know how to use vi editor

cp /mnt/etc/config/fstab /mnt/etc/config/fstab-on
vi /mnt/etc/config/fstab
reboot

But, I have no swap. Someone know why?

free wrote:

total         used         free       shared      buffers
  Mem:        29528        22972         6556            0          688
Swap:            0            0            0
Total:        29528        22972         6556

cat /etc/fstab wrote:

/dev/sda2       /overlay        btrfs   rw,sync,compress,ssd    0       0

mount wrote:

rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda2 on /overlay type btrfs (rw,sync,relatime,compress,ssd,noacl)
mini_fo:/overlay on / type mini_fo (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)

Netgear WNR854T (ARM Marvell Orion CPU 500MHz, Marvell 88W8361P mini-PCI STA only, 8/32MB) - trunk r17427 since 09/09/09 to 06-06-12 GLOD
TP-LINK TL-WR741ND v1.9 (Atheros AR7240 CPU 350MHz, Atheros AR9285 Chipset, 4/32MB) - trunk r23281 since 10/10/10
TP-LINK TL-MR3420 v1.1, TL-MR3220 v1.2 - trunk r25302 since 11/11/11
TP-LINK TL-WR842ND v1.0, TL-WR1043ND v1.8 - 12.09-rc1 since 12/12/12

19

Re: Unboxing of my new TL-MR3420.How to compile a 8M fireware from 4M?

OpenWrt / TL-MR3420 flash modification