OpenWrt Forum Archive

Topic: Update on Linksys WRT1900AC support

The content of this topic has been archived between 16 Sep 2014 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

I get these errors in my syslog every once in a while, build (45222), searching I didn't find anything.  Is the rx status from another device, or from the router itself?

Tue Apr 14 23:37:35 2015 kern.err kernel: [   51.648696] mvneta f1070000.ethernet eth0: bad rx status 0f850000 (max frame length error), size=1536
Tue Apr 14 23:37:35 2015 kern.err kernel: [   52.157976] mvneta f1070000.ethernet eth0: bad rx status 0f850000 (max frame length error), size=1536

Speaking of syslog, I tried to setup openwrt using a remote syslogd server, and the settings for logd and logreader looked right, but the syslog server never got the messages/logged messages, does this work?  There are some syslog packages, do I need them?

(Last edited by IvanRaide on 15 Apr 2015, 15:38)

bmork wrote:

Looking at /lib/upgrade/linksys.sh this is called to find the flash target:

linksys_get_target_firmware() {
        cur_boot_part=`/usr/sbin/fw_printenv -n boot_part`
        target_firmware=""
        if [ "$cur_boot_part" = "1" ]
        then
                # current primary boot - update alt boot
                target_firmware="kernel2"
                fw_setenv boot_part 2
                fw_setenv bootcmd "run altnandboot"
        elif [ "$cur_boot_part" = "2" ]
        then
                # current alt boot - update primary boot
                target_firmware="kernel1"
                fw_setenv boot_part 1
                fw_setenv bootcmd "run nandboot"
        fi

        echo "$target_firmware"
}

So if you booted from primary, then the next sysupgrade will flash to secondary and vice versa.  The currently booted system will be left intact, but the bootloader is set up to boot to the other one.  This can become a problem if the flash fails, because the bootloader is then set up to boot the failed installation. Easy to fix if you have serial console: Just press a key and type e.g. "run nandboot" to boot the other, working, installation.

But IMHO it would be much better if sysupgrade somehow could delay changing the bootloader variables until *after* a successful flash.

I've also modified that to detect the actual boot partition, not the boot partition set in the firmware. Booting and flashing from serial and I'm often not booting from the partition set in the firmware.

try to upgrade the lastest trunk version vi ssh.it show upgrade success,but it failed.now only the power led lights.
try to boot from the second firmware,also failed.It seems that i need to buy a USB-TTL cable.
which one i need to buy ? pl2303 or pl2303hx ?

leitec wrote:

Right now OpenWrt isn't doing anything with the actual "auto recovery" process, by which I mean it doesn't update the other variables that I think are necessary for that to work properly. I believe the factory firmware updates badcount, boot_part_ready and probably more variables that the "auto_recovery" process then uses to determine if it should boot from the other partition instead. As far as I know Linksys never released the WRT1900AC's u-boot source, so I can't tell what it actually is doing.

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

So it seems that when I tried to flash "Kaloz's" build it made my router bricked or something? All it shows is an index screen and it wont load an interface... Is there anything I can do to get out of that?

jklap wrote:
leitec wrote:

Right now OpenWrt isn't doing anything with the actual "auto recovery" process, by which I mean it doesn't update the other variables that I think are necessary for that to work properly. I believe the factory firmware updates badcount, boot_part_ready and probably more variables that the "auto_recovery" process then uses to determine if it should boot from the other partition instead. As far as I know Linksys never released the WRT1900AC's u-boot source, so I can't tell what it actually is doing.

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

Is this the source code you are looking for?
https://github.com/Chadster766/McWRT/wi … r-recovery

(Last edited by Chadster766 on 15 Apr 2015, 16:14)

Chadster766 wrote:
jklap wrote:
leitec wrote:

Right now OpenWrt isn't doing anything with the actual "auto recovery" process, by which I mean it doesn't update the other variables that I think are necessary for that to work properly. I believe the factory firmware updates badcount, boot_part_ready and probably more variables that the "auto_recovery" process then uses to determine if it should boot from the other partition instead. As far as I know Linksys never released the WRT1900AC's u-boot source, so I can't tell what it actually is doing.

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

Is this the source code you are looking for?
https://github.com/Chadster766/McWRT/wi … r-recovery

I've seen that before but no, that isn't the u-boot source. It looks like it's used to flash directly over serial-- ie to re-flash u-boot directly to the device, not to build the u-boot image.

(Last edited by jklap on 15 Apr 2015, 16:23)

oshrizak wrote:

So it seems that when I tried to flash "Kaloz's" build it made my router bricked or something? All it shows is an index screen and it wont load an interface... Is there anything I can do to get out of that?

its not bricked. You need to install "luci" via ssh or via telnet.

opkg update
opkg install luci

Gentlemen,
When are we going to see a public build?

I have been holding off since the McWRT 1.08 way back.

Reverted back to stock currently and contemplating on the newest build from Kaloz...

Thank you!
-JM

alirz wrote:
oshrizak wrote:

So it seems that when I tried to flash "Kaloz's" build it made my router bricked or something? All it shows is an index screen and it wont load an interface... Is there anything I can do to get out of that?

its not bricked. You need to install "luci" via ssh or via telnet.

opkg update
opkg install luci

How do i do so? sorry im pretty new to openwrt..

l3333 wrote:
oshrizak wrote:
alirz wrote:

its not bricked. You need to install "luci" via ssh or via telnet.

opkg update
opkg install luci

How do i do so? sorry im pretty new to openwrt..

Try to clear your browser's cache and reconnect. It shouldn't show index. Either it will load LuCI or 'the page cannot be opened/displayed' message.

it shows "Index of /

../
modified: Thu, 01 Jan 1970 00:00:10 GMT
directory - 0.22 kbyte"

(Last edited by oshrizak on 15 Apr 2015, 18:10)

update: i got it to work i believe.. I am going to flash another firmware to check and make sure! thanks for the help

l3333 wrote:

@nitroshift
@leitec

Is it really enough to set empty LINUX_VERSION-4.0 = in

/trunk/include/kernel-version.mk

and KERNEL_PATCHVER:=4.0

in /trunk/target/Linux/mvebu/Makefile

to compile the newest kernel version 4.0 or do we need to wait until @Kaloz pushes it to the trunk?

I did the above mentioned and it shows:

Model Linksys WRT1900AC
Firmware Version OpenWrt Chaos Calmer r45447 / LuCI (git-15.102.66001-622cfc6) 
Kernel Version 4.0.0
Local Time Wed Apr 15 18:06:24 2015
Uptime 6h 49m 38s
Load Average 0.00, 0.01, 0.05

P.S. Edited. It's not easy to write messages when driving. smile

That is enough smile

nitroshift

l3333 wrote:
taykiin06 wrote:

Good evening all, having been lurking around a bit trying to take all this information in as I just picked up a 1900ac about a month ago. Currently on CC r45277 and was wanting to sysupgrade but now notice two different build types: 

- openwrt-mvebu-armada-xp-db-squashfs-sysupgrade.tar
- openwrt-mvebu-armada-xp-gp-squashfs-sysupgrade.tar

Can someone explain the differences please and how often most everyone upgrades (ie each time a build is released, a few months etc...)? I'm still learning and got frustrated with the amount of research I was doing just to find an answer about the different sysupgrade options. I've upgraded a few times now, but this is the first time I've seen two different ones. TIA!

The right ones are

- openwrt-mvebu-armada-xp-linksys-mamba-squashfs-factory.img
- openwrt-mvebu-armada-xp-linksys-mamba-squashfs-sysupgrade.tar

Upgrade when you think it is relevant or interesting for you to try and investigate. This is a development project.

If you decide to upgrade please do it via Linksys stock firmware using

- openwrt-mvebu-armada-xp-linksys-mamba-squashfs-factory.img

This is due to some changes made after the build r45400.

nitroshift wrote:
Kaloz wrote:

Warning: changes in trunk will likely require flashing to factory and back, so hold tight.

I can confirm that this *IS* needed.

nitroshift

I have lost track of where all this stands. It would be good to update the wiki page at: http://wiki.openwrt.org/toh/linksys/wrt1900ac to document the steps:

a) Are the links to the firmware correct?
b) Are the installation instructions correct?
   - Do they detail whether you have to flash back to Linksys stock firmware between flashes?
   - Do they describe when to use the factory.img and when to use the sysupgrade.tar?
c) Are there other things that should be mentioned on the wiki page to ensure success for new people?

Thanks.

jklap wrote:

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

Is u-boot gpl? If it is then shouldn't we "kindly" ask them for the source? Shouldn't they have released the source already?

Juni0rM1nt wrote:

Gentlemen,
When are we going to see a public build?

I have been holding off since the McWRT 1.08 way back.

Reverted back to stock currently and contemplating on the newest build from Kaloz...

Thank you!
-JM


I'm also interested in knowing this. I'd like to take the dive, but only if openWRT is ready.

jklap wrote:
leitec wrote:

Right now OpenWrt isn't doing anything with the actual "auto recovery" process, by which I mean it doesn't update the other variables that I think are necessary for that to work properly. I believe the factory firmware updates badcount, boot_part_ready and probably more variables that the "auto_recovery" process then uses to determine if it should boot from the other partition instead. As far as I know Linksys never released the WRT1900AC's u-boot source, so I can't tell what it actually is doing.

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

Kaloz said a while back he was trying to get them to release the source.

If I'm not mistaking it with another device you can already boot from USB. I don't recall the exact steps but you can use the 'usb' command to start it and the various fat/ext2 commands to load whatever file you want to boot from.

Edit: I forgot to add before that the Linksys EA4500 does have published u-boot source, including both Linksys and Marvell's changes. Linksys also uses the dual firmware thing there so you might get some mileage out of reading that source code.

That said, last time I talked to Kaloz about this (months ago) he wasn't too keen on spending time trying to work in a system that isn't all that great at preventing bricking. Getting actual source for u-boot would mean we'd have the ability to chainload a custom u-boot, where you could add real recovery and do away with the dual firmware thing altogether. Such is done on some other targets (kirkwood, for example).

Other boards with u-boot have real recovery mechanisms, like a TFTP or web server you can connect to and upload a working image, rather than banking on the possibility that the second image is working.

(Last edited by leitec on 15 Apr 2015, 22:17)

I'm in trunk r45383 and I have been fighting to install asterisk13 to bridge my SIP phones with my external SIP provider until I've hit a roadblock.

The asterisk13 package that is available doesn't have the bridge modules (like: simple_bridge.so in /usr/lib/asterisk/modules), without them I cannot do anything.

Are the packages for our WRT1900AC compiled differently than the ones for the other OpenWRT devices? should I ask this question in the general forum regardless of using the WRT1900AC? and... is it just me?

lifehacksback wrote:
jklap wrote:

Anyone got a contact with LinkSys that can put some pressure on them to release the u-boot source? It would be nice if we could back-port some of the more recent changes to support flashing from a usb drive (for example).

Is u-boot gpl? If it is then shouldn't we "kindly" ask them for the source? Shouldn't they have released the source already?

It is indeed. Version 2 of the GNU GPL.

http://www.denx.de/wiki/U-Boot/Licensing

JimWright wrote:
gufus wrote:
gufus wrote:

Ah

Ya... 4000+ messages in this thread. I don't read every thing smile

Heh, the thread I mentioned was on a different site entirely.  Found it once I got home, it was on a discussion list for the Linux ARM kernel, thread starts here:

http://lists.infradead.org/pipermail/li … 17765.html

Thanks, I'll have a look ...

Cheers!

bmork wrote:

So what this did was simply adding another record with boot count(?)=0. Which matches the pattern I see at the start of /dev/mtd2, when I only booted stock firmware.  The boot count there is 1,0,1,0,1,0 etc.

This should be pretty easy to replicate, assuming that the magic number is fixed? And that the assumption that the last number is simply a sum of the first two holds.

OK, so I hacked up a small program that does this.  Works for me at least.  The source is here: http://openwrt.mork.no/src/covery-001.tar.gz  if anyone is feeling courageous...  And there is a prebuilt package too: http://openwrt.mork.no/mvebu/packages/c … _mvebu.ipk

One note: u-boot will erase only the first eraseblock (i.e. half the partition) when the partition is full.  This works fine until we've written 64 new records.  Then all of a sudden, the 64 records still left in the last eraseblock are revived....  My program will erase both blocks on rollover.

IvanRaide wrote:

I get these errors in my syslog every once in a while, build (45222), searching I didn't find anything.  Is the rx status from another device, or from the router itself?

Tue Apr 14 23:37:35 2015 kern.err kernel: [   51.648696] mvneta f1070000.ethernet eth0: bad rx status 0f850000 (max frame length error), size=1536
Tue Apr 14 23:37:35 2015 kern.err kernel: [   52.157976] mvneta f1070000.ethernet eth0: bad rx status 0f850000 (max frame length error), size=1536

Speaking of syslog, I tried to setup openwrt using a remote syslogd server, and the settings for logd and logreader looked right, but the syslog server never got the messages/logged messages, does this work?  There are some syslog packages, do I need them?

I have syslog working with the stock system (no extra logging sw)
Setting  System->Logging
External system log server 192.168.200.25
External log server port 514
Output log level debug
cron log level normal

On my logging system (FreeBSD)
my syslogd command line looks like this:    /usr/sbin/syslogd -4 -a 192.168.200.0/24:514

My syslog.conf file  look like this:

# log my server stuff
+myservername
all of its logging setups

# following is for the linksys
+myroutername
*.*             /var/log/wincrtr.log

I use newsyslog to create a new log file at midnight and compress the older ones keeping a weeks worth
Here's a couple of entries

Apr 15 20:27:33 wincrtr hostapd: wlan0: STA 48:9d:24:80:08:8b WPA: group key handshake completed (RSN)
Apr 15 20:30:00 wincrtr crond[1075]: USER root pid 2632 cmd /sbin/fan_ctrl.sh
Apr 15 20:30:37 wincrtr ddns-scripts[1621]: Winc_ipv4: Rerun IP check at 2015-04-15 20:30

Hope this helps abit.

doxidad wrote:

I have syslog working with the stock system (no extra logging sw)
Setting  System->Logging
External system log server 192.168.200.25
External log server port 514
Output log level debug
cron log level normal


I don't see those options in stock.

doxidad wrote:

I have syslog working with the stock system (no extra logging sw)
....
Hope this helps abit.


Thanks; it does in that it tells me it can work and something on my side is not working.  I am writing to a NAS4Free server which is a variant of FreeBSD so not sure why it doesn't work.  Ironically my old DLink DIR615 router could write to a syslog server and it wrote to the NAS no problem, so not sure whats wrong with OpenWRT.  I have the settings the same as yours, (and every variant I could try).  I confirmed via `sockstat -4 -l` that the NAS has 514 open.  Did you have to make a firewall exception to let the router talked to the NAS for UDP 514 (I wont believe so) but I cant figure out why it doesn't work?  What build are you running?

(Last edited by IvanRaide on 16 Apr 2015, 03:10)

leitec wrote:

Edit: I forgot to add before that the Linksys EA4500 does have published u-boot source, including both Linksys and Marvell's changes. Linksys also uses the dual firmware thing there so you might get some mileage out of reading that source code.

Thanks, found it. Specifically the files:

-r--r--r-- 1 bjorn bjorn 15393 Nov 14  2012 EA4500_v2.1.39.145204/src/uboot/patches/u-boot-1.1.4-candyhouse_021_auto_recovery.patch
-r--r--r-- 1 bjorn bjorn   595 Nov 14  2012 EA4500_v2.1.39.145204/src/uboot/patches/u-boot-1.1.4-candyhouse_027_128MB_auto_recovery_NAND_WORKAROUND.patch
-r--r--r-- 1 bjorn bjorn 10719 Nov 14  2012 EA4500_v2.1.39.145204/src/uboot/patches/u-boot-1.1.4-candyhouse_032_auto_recovery_page_write.patch

This confirms my assumptions, with the exception that the signature magic is slightly different:

+#define BOOT_COUNT_HEADER_CODE      0x20100802

vs the 0x20110811 observed on the WRT1900AC.

But I don't think that it matters.  The important part is that this confirmes that it is a static signature and not some flags or other stuff.

That said, last time I talked to Kaloz about this (months ago) he wasn't too keen on spending time trying to work in a system that isn't all that great at preventing bricking. Getting actual source for u-boot would mean we'd have the ability to chainload a custom u-boot, where you could add real recovery and do away with the dual firmware thing altogether. Such is done on some other targets (kirkwood, for example).

Other boards with u-boot have real recovery mechanisms, like a TFTP or web server you can connect to and upload a working image, rather than banking on the possibility that the second image is working.

Does this mean that tftp is disabled in the WRT1900AC uboot?  I haven't tried... Only assumed it would be there.