Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#4395 closed enhancement (fixed)

Add kernel 2.6.28 support for brcm47xx

Reported by: Hauke <hauke@…> Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: Cc:

Description

This patch adds initial support for kernel 2.6.28 to the brcm47xx target.
The patch is based on the work in #4262 and #4169 .

I have tested it on my Asus WL-500GP and it boots, network and wireless works for me.
Wireless is working better as with kernel 2.6.27, but I think it is because of #4394 and #4374 .

To build openwrt without problems you also need the patch from #4391 to fix some problems with kernel 2.6.28 support.

The USB connections seems not to work and the roboswitch throws some error messages to the log:

roboswitch: Probing device eth0: <3>roboswitch: [/home/hauke/kamikaze/openwrt5/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:117] SIOCGETCPHYRD failed!
roboswitch: [/home/hauke/kamikaze/openwrt5/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:117] SIOCGETCPHYRD failed!
No Robo switch in managed mode found
roboswitch: Probing device eth1: <3>roboswitch: [/home/hauke/kamikaze/openwrt5/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:117] SIOCGETCPHYRD failed!
roboswitch: [/home/hauke/kamikaze/openwrt5/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:117] SIOCGETCPHYRD failed!
No Robo switch in managed mode found
roboswitch: Probing device eth2: No such device
roboswitch: Probing device eth3: No such device

I think some of the patches applied to the kernel are useless. The 2.6.28 support is not final, but it is working and this is a good base to work further on it.

I will be nice to see some of these patches in trunk so everyone can work on this base.

Attachments (2)

0011-add-initial-2.6.28-support-for-brcm47xx-target.patch (107.0 KB) - added by Hauke <hauke@…> 9 years ago.
[PATCH] add initial 2.6.28 support for brcm47xx target
0017-change-default-kernel-on-brcm47xx-target-to-2.6.28-k.patch (790 bytes) - added by Hauke <hauke@…> 9 years ago.
[PATCH] change default kernel on brcm47xx target to 2.6.28 kernel

Download all attachments as: .zip

Change History (17)

Changed 9 years ago by Hauke <hauke@…>

[PATCH] add initial 2.6.28 support for brcm47xx target

Changed 9 years ago by Hauke <hauke@…>

[PATCH] change default kernel on brcm47xx target to 2.6.28 kernel

comment:1 Changed 9 years ago by loswillios

Thanks for your effort Hauke. It compiled fine but doesn't boot to the end on my WGT634U (#4402 and #4391 applied):

pci 0000:00:02.1: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.1: PME# disabled
pci 0000:00:02.2: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.2: PME# disabled
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
detected lzma initramfs
initramfs: LZMA lc=1,lp=2,pb=2,origSize=512
WGT634U machine detected.
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 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 3) is a 16550A
serial8250 serial8250.0: unable to register port at index 0 (IO0 MEMb8000400 IRQ3): -28
serial8250 serial8250.0: unable to register port at index 1 (IO0 MEMb8000300 IRQ3): -28
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:0f:b5:97:1c:6d
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Flash device: 0x800000 at 0x1fc00000
bootloader size: 655360
Creating 4 MTD partitions on "Physically mapped flash":
0x00000000-0x000a0000 : "cfe"
0x000a0000-0x007e0000 : "linux"
0x0016e800-0x007e0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2C0000, len=520000
0x002c0000-0x007e0000 : "rootfs_data"
0x007e0000-0x00800000 : "nvram"
Registered led device: power
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 128k freed
Please be patient, while OpenWrt loads ...
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
Press CTRL-C for failsafe
diag: Detected 'Netgear WGT634U'

comment:2 Changed 9 years ago by nbd

2.6.28 support patch merged in r13909

comment:3 Changed 9 years ago by amain

Thanks for the patches. Works well for Asus WL-500GD. USB-storage compiled into kernel works as-well - only with the following changes to target/linux/brcm47xx/config-2.6.28:

< CONFIG_BROADCOM_PHY=m
< CONFIG_HARDWARE_WATCHPOINTS=y
< CONFIG_KALLSYMS=y
< CONFIG_KMOD=y
< CONFIG_NF_CT_ACCT=y
< CONFIG_NF_DEFRAG_IPV4=m
< CONFIG_PAGEFLAGS_EXTENDED=y
< CONFIG_PHYLIB=y
< CONFIG_SND_MIPS=y
< CONFIG_SOUND_OSS_CORE=y
< CONFIG_SSB_DRIVER_GIGE=y

CONFIG_SSB_DRIVER_GIGE=n

< CONFIG_SSB_SPROM=y
< CONFIG_USB_EHCI_HCD_SSB=y
< CONFIG_USB_NET_SMSC95XX=m
< CONFIG_USB_OHCI_HCD_SSB=y

Is suspect CONFIG_USB_EHCI_HCD_SSB and CONFIG_USB_OHCI_HCD_SSB are causing trouble.

comment:4 follow-up: Changed 9 years ago by jeroen@…

This does NOT solve #4262. As that one is closed I can't report it there anymore.

This crash STILL occurs even with 2.6.28. Maybe re-opening there and updating the subject and description would be better (as it implies now that upgrading helps, which it doesn't), or should I open a new bug and cut&paste all from there?

Any hints on what to check / provide.
netconsole seems to not be available, thus can't generate the outputs easily, just was pure luck that it got through to syslog in the above case (comment 2).

Replication is simple on my WRT54GS which is NATting from a DSL modem in bridge mode connected to the ethernet port to another ethernet port (100mbit ports, but 20mbit DSL):

  • either download at ~20mbits/sec, will cause it to stop
  • quickly open several connections.

Default firewall rules of openwrt, nothing funky running on it, only aiccu, radvd and luci-*. AICCU running proto-41/heartbeat, but even with a clean install (reset config etc, no extra packages, just the default trunk build) it still crashes by just triggering an apt-get update with mirror.switch.ch as HTTP sources and/or doing a single wget from a fast host.

Also happens over IPv6 connections btw. The box just seems to run out of memory and either completely freeze or sometimes nicely reboot.

comment:5 Changed 9 years ago by anonymous

Conections (http, ssh, samba, etc) through wifi to the router are not stable.

Couriously, if I ssh to my desktop computer first from my laptop (through the router's wifi, the desktop computer is connected to the router's LAN port), and then ssh from there to the router, than the connection is stable. If I ssh to the router from my laptop directly (router's wifi again!) than it drops after a few seconds to minutes.

If I saw it correctly in the packet captures, than something is wrong with package retransmits; this could cause the connection to drop after a few seconds to minutes, as the packet loss is about 2-3% for me.

comment:6 Changed 9 years ago by anonymous

Will this patch work on ASUS WLGP 500 V2 version?

comment:7 follow-up: Changed 9 years ago by yaad.giri@…

Since ASUS WLGP 500 V2 version uses brcm47xx, it appears that this patch will solve V2 wifi issues. I will let Hauke answer.

comment:8 in reply to: ↑ 7 Changed 9 years ago by anonymous

Replying to yaad.giri@yahoo.co.in:

Since ASUS WLGP 500 V2 version uses brcm47xx, it appears that this patch will solve V2 wifi issues. I will let Hauke answer.

To my knowledge, V1 has MiniPCI Broadcom 802.11b/g BCM4318 802.11 Wireless LAN Controller, while V2 has Onboard BCM5354 802.11b/g. Both of them use the B43 driver, but the LP-PHY of V2 is not yet supported, and so the WLAN part of V2 does not work under 2.6.

Other than that it should be OK.

comment:9 Changed 9 years ago by KanjiMonster

This ticket can be closed as 2.6.28(.5) is already the default for brcm47xx in trunk.

comment:10 in reply to: ↑ 4 ; follow-up: Changed 9 years ago by jeroen@…

Can't be closed, see jeroen@unfix.org.

comment:11 in reply to: ↑ 10 Changed 9 years ago by KanjiMonster

Replying to jeroen@unfix.org:

Can't be closed, see jeroen@unfix.org.

It looks to me as this should be a separate ticket. Currently your problem is a bit hidden and easily overlooked (as I just did).
So please open a separate ticket for it; makes it easier to track, and you won't have to copy your info again if the problem persists with 2.6.29, and there is a separate "update brcm47xx to 2.6.29" ticket, and this one gets closed. :)

comment:12 Changed 9 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

Yes, please open a separate ticket for stability issues

comment:13 Changed 8 years ago by acoul <alex at ozo.com>

apparently there is a memory leak on current trunk using either 2.6.28.x or 2.6.30.x kernel which drives the router to a near halt after 48 hours of idle operation. I've test this and can verify it using slab, slub & slob.

I am compiling as of now a 2.6.27.29 brcm47xx image to test based on this patch on latest trunk r17269

there are some patches around that may address this issue and that I may test in the future against 2.6.30.x such as this one.

comment:14 Changed 8 years ago by acoul <alex at ozo.com>

Sorry for appending to this closed ticket, I will open a new one as soon as I collect some solid info for this issue. linux-2.6.27.29 boots fine. will see how it does after 48 hours ...

BusyBox v1.13.4 (2009-08-15 17:17:30 EEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.                  

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M     
 KAMIKAZE (bleeding edge, r17269) -------------------
  * 10 oz Vodka       Shake well with ice and strain 
  * 10 oz Triple sec  mixture into 10 shot glasses.  
  * 10 oz lime juice  Salute!                        
 --------------------------------------------------- 
root@OpenWrt:/# dmesg 
Linux version 2.6.27.29 (alex@motard) (gcc version 4.3.4 (GCC) ) #1 Sat Aug 15 17:29:42 EEST 2009
console [early0] enabled                                                                         
CPU revision is: 00024000 (Broadcom BCM4710)                                                     
ssb: Core 0 found: SDRAM (cc 0x803, rev 0x00, vendor 0x4243)                                     
ssb: Core 1 found: ILine 20 (cc 0x801, rev 0x00, vendor 0x4243)                                  
ssb: Core 2 found: Fast Ethernet (cc 0x806, rev 0x00, vendor 0x4243)                             
ssb: Core 3 found: V90 (cc 0x807, rev 0x00, vendor 0x4243)                                       
ssb: Core 4 found: USB 1.1 Hostdev (cc 0x808, rev 0x00, vendor 0x4243)                           
ssb: Core 5 found: PCI (cc 0x804, rev 0x00, vendor 0x4243)                                       
ssb: Core 6 found: MIPS (cc 0x805, rev 0x00, vendor 0x4243)                                      
ssb: Core 7 found: EXTIF (cc 0x811, rev 0x00, vendor 0x4243)                                     
ssb: Core 8 found: Fast Ethernet (cc 0x806, rev 0x00, vendor 0x4243)                             
ssb: Initializing MIPS core...                                                                   
ssb: set_irq: core 0x0806, irq 2 => 2                                                            
ssb: set_irq: core 0x0804, irq 4 => 3                                                            
ssb: set_irq: core 0x0806, irq 0 => 4                                                            
ssb: Sonics Silicon Backplane found at address 0x18000000                                        
Serial init done.                                                                                
Determined physical RAM map:                                                                     
 memory: 01000000 @ 00000000 (usable)                                                            
Initrd not found or empty - disabling initrd                                                     
Zone PFN ranges:                                                                                 
  Normal   0x00000000 -> 0x00001000                                                              
Movable zone start PFN for each node                                                             
early_node_map[1] active PFN ranges                                                              
    0: 0x00000000 -> 0x00001000                                                                  
On node 0 totalpages: 4096                                                                       
free_area_init_node: node 0, pgdat 8021dfc0, node_mem_map 80262000                               
  Normal zone: 4064 pages, LIFO batch:0                                                          
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064                       
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
Enabling BCM4710A0 cache workarounds.                                                                             
Primary instruction cache 8kB, VIPT, 2-way, linesize 16 bytes.                                                    
Primary data cache 4kB, 2-way, VIPT, no aliases, linesize 16 bytes                                                
PID hash table entries: 64 (order: 6, 256 bytes)                                                                  
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)                                                      
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)                                                       
Memory: 13800k/16384k available (1874k kernel code, 2584k reserved, 294k data, 124k init, 0k highmem)             
Calibrating delay loop... 82.43 BogoMIPS (lpj=164864)                                                             
Mount-cache hash table entries: 512                                                                               
net_namespace: 588 bytes                                                                                          
NET: Registered protocol family 16
Switched to high resolution mode on CPU 0
ssb: PCIcore in host mode found
Registering a PCI bus after boot
PCI: Fixing up bridge 0000:00:00.0
PCI: Setting latency timer of device 0000:00:00.0 to 64
PCI: Fixing up device 0000:00:00.0
PCI: Fixing latency timer of device 0000:00:00.0 to 168
PCI: 0000:00:00.0 reg 10 32bit mmio: [0, 1fff]
PCI: 0000:00:00.0 reg 14 32bit mmio: [0, 7ffffff]
PCI: 0000:00:01.0 reg 10 32bit mmio: [0, ffff]
bus: 00 index 0 io port: [100, 7ff]
bus: 00 index 1 mmio: [40000000, 7fffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
detected lzma initramfs
initramfs: LZMA lc=1,lp=2,pb=2,origSize=512
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 26
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing enabled
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:58:a0
eth1: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:01:e3:04:58:a1
flash init: 0x1fc00000 0x00400000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Creating 4 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x003f0000 : "linux"
0x00100000-0x003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
split_squashfs: no squashfs found in "Physically mapped flash"
0x003f0000-0x00400000 : "nvram"
TCP cubic registered
NET: Registered protocol family 17
turn off boot console early0
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 124k freed
Please be patient, while OpenWrt loads ...
b44: eth0: powering down PHY
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.

comment:15 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.