Modify

Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#6580 closed task (fixed)

ASUS RT-N16 Support

Reported by: Coool Owned by: hauke
Priority: low Milestone: Features Paradise
Component: kernel Version: Trunk
Keywords: ASUS RT-N16, ASUS, RT-N16 Cc:

Description

I would like to see ASUS RT-N16 support. I can be a tester.

Attachments (5)

asus.diff (36.7 KB) - added by bernhardloos@… 7 years ago.
booting kernel
n16_1.diff (1.5 KB) - added by rtz2 7 years ago.
fixes an illegal backplane access in the cache managment code
2.6.37-bootlog.txt (10.5 KB) - added by GKashperko 6 years ago.
bootlog
cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch (977 bytes) - added by gkashperko 6 years ago.
2011-11-02_TARGET_brcm4716_patches.tar.gz (158.2 KB) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (473)

comment:1 Changed 7 years ago by anonymous

Would be nice. I have not seen any info if bcm4718 is supported by b43, and I don't know if the proprietary Broadcom driver works with newer 2.6 kernels. Currently the 2.6 builds available (dd-wrt, Tomato, stock) use kernel versions around 2.6.22-24 and the proprietary Broadcom driver. OpenWrt trunk currently uses 2.6.3x kernels.

wiki:
http://wiki.openwrt.org/inbox/asusrt-n16

Relevant discussions:
https://forum.openwrt.org/viewtopic.php?id=22567
https://forum.openwrt.org/viewtopic.php?id=22016
https://forum.openwrt.org/viewtopic.php?id=23330 <-- reports some progress (almost bootable?)

(Coool: I know you saw those threads, but maybe others didn't)

comment:2 Changed 7 years ago by anonymous

It seems that it has a (relevant part of lspci -vnn)
00:01.0 Network controller [0280]: Broadcom Corporation BCM43XG [14e4:4329] (rev 01)
If I am correct, this chipset (BCM43XG) is supported by b43 (perhaps w/o n)

comment:3 follow-up: Changed 7 years ago by Tony Butler <spudz76@…>

I added some bits to the wiki page for this model the other day. I don't have the hardware to do anything really useful, but I tossed in a few things gleaned from GPL and DD-WRT sources which target this model, I suspect the non-boot issue is a matter of understanding the boot process this model uses (which appears to be something different than the usual Broadcom stuff).

comment:4 in reply to: ↑ 3 Changed 7 years ago by anonymous

Replying to Tony Butler <spudz76@…>:

I suspect the non-boot issue is a matter of understanding the boot process this model uses (which appears to be something different than the usual Broadcom stuff).

Others also suggest that the cause could be the 128MB memory access problem. There is a discussion about this in the first thread (no solution yet)

comment:5 follow-up: Changed 7 years ago by Nistor Andrei <coder.tux@…>

I've tried a 2.4 build... it failed just as the other ones. Does this mean it's not a memory problem?
From what I understood on the forum, the 2.4 tree has the 128MB patch.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 7 years ago by anonymous

Replying to Nistor Andrei <coder.tux@…>:

I've tried a 2.4 build... it failed just as the other ones. Does this mean it's not a memory problem?
From what I understood on the forum, the 2.4 tree has the 128MB patch.

What you say makes sense to me. When trying the 2.4 build, did you try the advised NVRAM settings? (although the factory settings should be fine, since the stock 2.6 firmware works out of the box)

(Still, the others on the thread say, that there are still problems with the 128Mb support in the 2.6 tree (not many people use 128Mb modded Wl-500gP routers, so it is not easy to tell).)
Anyways the boot loader (or whatever stuff that is not working) could be adjusted based on the Tomato or DD-WRT firmwares. Only we need some who knows what to look for...

comment:7 in reply to: ↑ 6 Changed 7 years ago by Nistor Andrei <coder.tux@…>

Replying to anonymous:

What you say makes sense to me. When trying the 2.4 build, did you try the advised NVRAM settings? (although the factory settings should be fine, since the stock 2.6 firmware works out of the box)

(Still, the others on the thread say, that there are still problems with the 128Mb support in the 2.6 tree (not many people use 128Mb modded Wl-500gP routers, so it is not easy to tell).)
Anyways the boot loader (or whatever stuff that is not working) could be adjusted based on the Tomato or DD-WRT firmwares. Only we need some who knows what to look for...

I was using the stock NVRAM values... Right now I'm bugging rtz to take a look at the vendor's firmware, maybe he can find out why it's not booting... he suspects it's some kind of alignment issue in the trx file...

comment:8 follow-up: Changed 7 years ago by Nistor Andrei <coder.tux@…>

i tried to boot the kernel through tftp from the CFE, and it hangs... does anyone know a way to make it a little more verbose?

comment:9 follow-up: Changed 7 years ago by gregd72002

Could someone update us on the progress please?

comment:10 in reply to: ↑ 9 ; follow-up: Changed 7 years ago by gregd72002

Apparently, the issue with 128MB ram has been solved in:
https://dev.openwrt.org/ticket/3177

But as some testing, it did not solve the problem:
https://forum.openwrt.org/viewtopic.php?pid=104299#p104299

Anyone can confirm this?

comment:11 in reply to: ↑ 10 ; follow-up: Changed 7 years ago by tmg

Replying to gregd72002:
[...]

Anyone can confirm this?

still doesn't work for me, boot fails at

Closing network.
Starting program at 0x80001000

comment:12 in reply to: ↑ 11 Changed 7 years ago by tmd

err, rather

Entry at 0x80001000
Starting program at 0x80001000

comment:13 Changed 7 years ago by gregd72002

Some testing (conducted by 2 independent testers) pointed out that the reason for kernel dying while initialising is ssb initialisation (ssb scanning to be precise). This is just a suggestion as further testing has to be done.

Please note that this bug has nothing to do with TRX header and asus ADDVER. The bootloader loads the kernel without any fancy headers. Kernel gets initialised by discovering CPU, memory etc.. but ssb scanning seems to fail.

comment:14 in reply to: ↑ 8 Changed 7 years ago by gregd72002

Replying to Nistor Andrei <coder.tux@…>:

i tried to boot the kernel through tftp from the CFE, and it hangs... does anyone know a way to make it a little more verbose?

Look for setting up early console, in particular early printk. The trunk has a patch that disables early printk (patch id is somewhere around 900). Remove the patch, recompile, flash, plug serial cable and debug.

comment:15 Changed 7 years ago by Nistor Andrei <coder.tux@…>

rtz (from IRC) built a kernel with early printk enabled, but it didn't output any more info than the stock kernel.
Don't know how he built it, but I'll give it a shot again sometime at the beginning of april when I'll have more spare time.
I also tried the kernel form linux-mips with the same results...
About the ssb initialisation, I agree. I've looked at the asus sources, and the only thing that's radically different is just that. I don't have the knowledge to dig deeper into it, unfortunately.

comment:16 follow-up: Changed 7 years ago by anonymous

Hi,

Any update on this matter?

(I was wondering, that (as far as I kow) the newest working kernel being used is 2.6.23/24 in DD-wrt (which is newer than the stock/tomato 2.6.22). Maybe that would be a better starting point.)

comment:17 in reply to: ↑ 16 Changed 7 years ago by frosch6669

The next step should be discovering the dd-wrt kernel config/source/patches to find out if there is any difference to the openwrt-kernel in the ssb-scanning/ssb-initialisation.
I do not eaven have an idea of how to start on this discovering due to missing knowlege of kernel-structure.
Does anyone know something about ssb-scanning/ssb-initialisation?

Replying to anonymous:

Hi,

Any update on this matter?

(I was wondering, that (as far as I kow) the newest working kernel being used is 2.6.23/24 in DD-wrt (which is newer than the stock/tomato 2.6.22). Maybe that would be a better starting point.)

comment:18 follow-up: Changed 7 years ago by bernhardloos@…

The main problem is, that the SSB in the BRCM4716 used for this router is very different from the version used otherwise.
I did manage to produce a working kernel, but almost nothing works, not even wired network, so this isn' exactly ready for prime-time.

Changed 7 years ago by bernhardloos@…

booting kernel

comment:19 in reply to: ↑ 18 Changed 7 years ago by anonymous

Replying to bernhardloos@…:

The main problem is, that the SSB in the BRCM4716 used for this router is very different from the version used otherwise.
I did manage to produce a working kernel, but almost nothing works, not even wired network, so this isn' exactly ready for prime-time.

Maybe this is a stupid question, but: is there a working gigabit ethernet driver in trunk? Stock firmware seems to include its own driver:

eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.10.56.27

(Broadcom wireless driver is also 5.10.56.27)

((Also -march=74kc -mtune=74kc should be ok?))

comment:20 follow-up: Changed 7 years ago by gregd72002

I've done some testing and can confirm that it is booting correctly.
Please see the link for 'dmesg' and '/proc/interrupts':
http://openwrt.pastebin.com/knCq6hjn

Note the two things:

  • "Disabling SSB PCI-E host due to code brokeness"
  • there are no interrupts assigned to usb/ethernet/wireless

I believe that correcting the above would solve most of the problems.

Another problem might be missing drivers. However, USB should work out of box (but it does not). Once USB is done we can look into drivers for ethernet and wireless.

Thanks,

comment:21 in reply to: ↑ 20 ; follow-up: Changed 7 years ago by anonymous

Replying to gregd72002:

I've done some testing and can confirm that it is booting correctly.
Please see the link for 'dmesg' and '/proc/interrupts':
http://openwrt.pastebin.com/knCq6hjn

Note the two things:

  • "Disabling SSB PCI-E host due to code brokeness"
  • there are no interrupts assigned to usb/ethernet/wireless

I believe that correcting the above would solve most of the problems.

Another problem might be missing drivers. However, USB should work out of box (but it does not). Once USB is done we can look into drivers for ethernet and wireless.

Thanks,

Hi,
Thanks for the great work!
Is there any progress? Is it necessary to have PCIe working? I ask this, since the PCIe core is only included in the bcm4718. The other products of this series (the bcm4716 and the bcm4717) doesn't have PCIe, so maybe it is not essential to have the basic functions (USB, ethernet and wireless) working.
I took a look, at the ssb init codes of the two sources (Broadcom vs trunk). To me they look very different, it will take somebody with far more skills than me to make something out of that.

comment:22 in reply to: ↑ 21 ; follow-up: Changed 7 years ago by gregd72002

Replying to anonymous:

Hi,
Thanks for the great work!
Is there any progress? Is it necessary to have PCIe working? I ask this, since the PCIe core is only included in the bcm4718. The other products of this series (the bcm4716 and the bcm4717) doesn't have PCIe, so maybe it is not essential to have the basic functions (USB, ethernet and wireless) working.
I took a look, at the ssb init codes of the two sources (Broadcom vs trunk). To me they look very different, it will take somebody with far more skills than me to make something out of that.

Hi,

You are right, PCIe is not of any concern anymore. Just the drivers are missing. Indeed, the Broadcom code is very different from trunk and therefore it takes so much time. It looks like BCM4716/16/18 is a very new platform. But we have to do it. The broadcom code is very much influenced by kernel 2.4. In here we aim to provide to utilize fully kernel 2.6.
There is no other way than simply play (debug) and try with this stuff. USB and ethernet drivers are the things that should be looked at now.

comment:23 in reply to: ↑ 22 ; follow-up: Changed 7 years ago by anonymous

Replying to gregd72002:

Hi,

You are right, PCIe is not of any concern anymore. Just the drivers are missing. Indeed, the Broadcom code is very different from trunk and therefore it takes so much time. It looks like BCM4716/16/18 is a very new platform. But we have to do it. The broadcom code is very much influenced by kernel 2.4. In here we aim to provide to utilize fully kernel 2.6.
There is no other way than simply play (debug) and try with this stuff. USB and ethernet drivers are the things that should be looked at now.

Hi,

I am not a skilled programmer, but I would like to help, if there is some task, that I could do (with the drivers etc). I have an RT-N16 (currently running dd-wrt), but I have no access to the serial console.