OpenWrt Forum Archive

Topic: New Broadcom BCM63xx codebase with GPL'd Ethernet and USB support

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

misteroX wrote:

Did you modify the file board_bcm963xx.c with the data of your board ?

Yes I did, the kernel boot normally if i load it from tftp until it try to load the root fs:

Trying to boot from FIRST image copy (0x80010000) ...
 latest imageSequence found: ... 1
 - Flash Kernel Address: 0x80800000
 - Tag->kernelLen: 0x0070BB38
 - Flash Kernel Address: 0xBE020100
 - Tag Kernel crc : 0x228FC3B4 - calculated: 0x228FC3B4
Decompression OK! - starting 0
Entry at 0x80014450

Distribution: AGPF
Version: AGPF_4.3.2

Build Date: 2008/07/04-15:59

Closing network.
Starting program at 0x80014450
SGP START PARTITION: 0
Linux version 2.6.27.8 (anselmo@io) (gcc version 4.1.2) #6 Sun Dec 14 22:12:31 CET 2008
Detected Broadcom 0x6358 CPU revision a1
CPU frequency is 300000000 MHz
32MB of RAM installed
board_bcm963xx: CFE version: unknown
console [early0] enabled
CPU revision is: 0002a010 (Broadcom BCM6358)
board_bcm963xx: board name: AGPF-S0
....
....
....
bcm963xx_flash: Read Signature value of CFE1CFE1
bcm963xx_flash: CFE bootloader detected
bcm963xx_flash: CFE boot tag found with version 8 and board type AGPF-S0.
bcm963xx_flash: Partition 0 is CFE offset 0 and length 20000
bcm963xx_flash: Partition 1 is kernel offset 20100 and length 70bb38
bcm963xx_flash: Partition 2 is nvram offset fe0000 and length 20000
Creating 3 MTD partitions on "bcm963xx":
0x00000000-0x00020000 : "CFE"
0x00020100-0x0072bc38 : "kernel"
mtd: partition "kernel" doesn't start on an erase block boundary -- force read-only
0x00fe0000-0x01000000 : "nvram"
TCP bic registered
NET: Registered protocol family 17
jffs2: Too few erase blocks (1)
List of all partitions:
1f00        128 mtdblock0 (driver?)
1f01       7214 mtdblock1 (driver?)
1f02        128 mtdblock2 (driver?)
No filesystem could mount root, tried:  squashfs jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)

But that should be fine as in the flash there is the original firmware.

The problem is i've not found the way to build an image to load in the flash that CFE appreciate.
I always get the message on my previous post.

@fw_crocodile, you must load firmware whit "f" command, not with "flashimage", somethink like this:
f 192.168.1.100:firmware.bin

salut

@florian_, thnx for your work.

I see in trunk something about to make images for inventel livebox.
Could you explain if openwrt runs on it and how to load images to it?.

greatings

Thank's,

that works, but now i've a brick on my desktop, some problem with the generated image i suppose.

Will be back as soon as i can use the jtag interface.

The image generated by openwrt was not accepted by the f command on CFE.

I've used the command included in the source of the firmware by pirelli broadband to generate the image.

But it need the CFE binary and the one i've used (from the source) seems to have the wrong dimension as the flashing start at the wrong address.

I've a copy of the flash but it's a single image, how can i found the end of the CFE and extract it to have a bin of only the CFE?

Yes thank's. I brought back to live the brick and sectioned my flash in at least four sectors. 128KB boot, ~8MB first flash image, ~8MB second flash image, 128KB factory settings.

Now i can flash the original image with flashimage command, and some others with f command, but no openwrt generated image works.

CFE> f 192.168.1.100:openwrt-AGPF-S0-squashfs-cfe.bin
Loading 192.168.1.100:openwrt-AGPF-S0-squashfs-cfe.bin ...
Finished loading 2228228 bytes                            
SGP  tagVersion : 6                                       
 Illegal image ! Image crc failed.                        
*** command status = -1

Any idea?

Another question: when i flash the image the flash start at address 0xBE020000.
The boot process print:

Trying to boot from FIRST image copy (0x80010000) ...
 latest imageSequence found: ... 1                   
 - Flash Kernel Address: 0xBE020100                  
 - Tag->kernelLen: 0x0070BB38                        
 - Flash Kernel Address: 0xBE020100

What 0x80010000 mean? It's an identifier of the image?

Thank's for the help.

(Last edited by fw_crocodile on 16 Dec 2008, 18:26)

0x80010000 is the entry point of the kernel, CFE will load it in ram, then jumps to 0x80010000.

Hi everyone.

FInally the "Alice Gate VoIP 2 Plus Wi-Fi Business" got OpenWrt.

So:

1) -- You have to patch board_bcm963xx.c to get your board recognised see post #58.
2) -- You have to change some parameters on imagetag.c to get the image with the right tag and appropriately aligned for the roofs_data.

These are the necessary settings.

#define IMAGETAG_MAGIC2                 "IMAGE"
#define IMAGETAG_VER                    "8"
#define FLASH_CFE_SIZE                  0x20000                 /* TODO: Make this a command line option */
#define FLASH_BS                        (128 * 1024)            /* TODO: Make this a command line option */

3) -- Avoid the use of the f command.

SOME NOTES

For some reason when using the f command the images were accepted only if the the tag were built using the imagetag.c patched with the diff from Zven (different CRC), see post #79, and will not complain about wrong version.
But lately when the router will load the kernel it will complain about a wrong kernel CRC.

Differently the flashimage command seems to accept any image but you have to use the right tag.

If you want just to load the kernel from tftp using the r command you need to load the elf (vmlinux.elf) or the bin (vmlinux), if you want to use a compressend version you need to use cmplzma from broadcom.


TO HELP IN SOME WAYS

How can i help to get these "information" included in OpenWrt?

(Last edited by fw_crocodile on 17 Dec 2008, 12:22)

As in the original firmware all the modules (ADSL too) are compiled in the kernel and i don't find trace of binary part outside the modules, i'm searching for the source of the firmware.

The sources have to be published if they use a linux kernel right?

So have you any advice about whic is the better way to ask for them?

Should I ask the producer (Pirelli) or the distributor (Telecom Italia) ?

If they actually compiled-in all the modules, then yes, this becomes part of the kernel and they have to release the sources. You should ask both Alice and Pirelli to comply with the GPL on that part. See http://www.fsfeurope.org/projects/ftf/r … ns.en.html

I will merge the needed changes to get the Alice Box working with OpenWrt, thanks !

Could you submit your diff against arch/mips/bcm63xx/boards/board_bcm963xx.c ? So that we can the Alice board supported directly.

florian_ wrote:

Could you submit your diff against arch/mips/bcm63xx/boards/board_bcm963xx.c ? So that we can the Alice board supported directly.

Naturally, i create a new Ticket #4366

florian_ wrote:

If they actually compiled-in all the modules, then yes, this becomes part of the kernel and they have to release the sources. You should ask both Alice and Pirelli to comply with the GPL on that part. See http://www.fsfeurope.org/projects/ftf/r … ns.en.html

I made an error in the previous post, the drivers were compiled as modules, that means they could be closed source right?

Hi, I have Belkin F5D7633 which is based on 6348 and board id 96348GW-10. Block size is 128k. With modified imagetag I have successfully  installed  latest trunk of OpenWRT. This router has BCM5325EKCM switch. I tried to configure vlans on it with robocfg, but it tells "No suitable module found for eth0 (managed by bcm63xx_enet)". May be this is limitation of bcm63xx ethernet driver or i should config it with swconfig?
Also somfing wrong with jffs:
bcm963xx: block unlock error: (status timeout)
Full dmesg:

Linux version 2.6.27.8 (alex@tux) (gcc version 4.1.2) #8 Wed Dec 17 21:37:03 EET 2008
Detected Broadcom 0x6348 CPU revision a2                                             
CPU frequency is 256000000 MHz                                                       
16MB of RAM installed                                                                
board_bcm963xx: CFE version: 1.0.37-8.7                                              
console [early0] enabled                                                             
CPU revision is: 00029107 (Broadcom BCM6348)                                         
board_bcm963xx: board name: 96348GW-10                                               
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 80231a30, node_mem_map 80275000                   
  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
Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.                                                   
Primary data cache 8kB, 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: 13724k/16384k available (1868k kernel code, 2660k reserved, 316k data, 120k init, 0k highmem)             
Calibrating delay loop... 255.48 BogoMIPS (lpj=510976)                                                            
Mount-cache hash table entries: 512                                                                               
net_namespace: 592 bytes                                                                                          
NET: Registered protocol family 16                                                                                
registering 37 GPIOs                                                                                              
registering PCI controller with io_map_base unset                                                                 
PCI: 0000:00:01.0 reg 10 32bit mmio: [0, 1fff]                                                                    
bus: 00 index 0 io port: [8000000, 800ffff]                                                                       
bus: 00 index 1 mmio: [30000000, 37ffffff]                                                                        
Switched to high resolution mode on CPU 0                                                                         
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                                                                                 
audit: initializing netlink socket (disabled)                                                                     
type=2000 audit(0.276:1): initialized                                                                             
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 cfq registered (default)                                                                             
bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0300 (irq = 10) is a bcm63xx_uart                                             
console handover: boot [early0] -> real [ttyS0]                                                                   
bcm63xx_enet MII bus: probed                                                                                      
bcm963xx_flash: 0x00400000 at 0x1fc00000                                                                          
bcm963xx: 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                                                                   
erase region 0: offset=0x0,size=0x20000,blocks=32                                                                 
bcm963xx_flash: Read Signature value of CFE1CFE1                                                                  
bcm963xx_flash: CFE bootloader detected                                                                           
bcm963xx_flash: CFE boot tag found with version 6 and board type 96348GW-10.                                      
bcm963xx_flash: Partition 0 is CFE offset 0 and length 20000                                                      
bcm963xx_flash: Partition 1 is kernel offset 20100 and length bb8cd                                               
bcm963xx_flash: Partition 2 is rootfs offset e0000 and length 300000                                              
bcm963xx_flash: Partition 3 is nvram offset 3e0000 and length 20000                                               
Creating 4 MTD partitions on "bcm963xx":                                                                          
0x00000000-0x00020000 : "CFE"                                                                                     
0x00020100-0x000db9cd : "kernel"                                                                                  
mtd: partition "kernel" doesn't start on an erase block boundary -- force read-only                               
0x000e0000-0x003e0000 : "rootfs"                                                                                  
mtd: partition "rootfs" set to be root filesystem                                                                 
mtd: partition "rootfs_data" created automatically, ofs=300000, len=E0000                                         
0x00300000-0x003e0000 : "rootfs_data"                                                                             
0x003e0000-0x00400000 : "nvram"                                                                                   
TCP bic registered                                                                                                
NET: Registered protocol family 17                                                                                
VFS: Mounted root (squashfs filesystem) readonly.                                                                 
Freeing unused kernel memory: 120k freed                                                                          
Please be patient, while OpenWrt loads ...                                                                        
Algorithmics/MIPS FPU Emulator v1.5                                                                               
bcm963xx: block unlock error: (status timeout)                                                                    
mini_fo: using base directory: /                                                                                  
mini_fo: using storage directory: /jffs                                                                           
bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (1)]                                     
bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (1)]                                     
eth1: link forced UP - 100/full - flow control off/off                                                            
br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.                                                    
device eth1 entered promiscuous mode                                                                              
br-lan: topology change detected, propagating                                                                     
br-lan: port 1(eth1) entering forwarding state                                                                    
cfg80211: Using static regulatory domain info                                                                     
cfg80211: Regulatory domain: US                                                                                   
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
br-lan: port 1(eth1) entering disabled state
br-lan: topology change detected, propagating
br-lan: port 1(eth1) entering forwarding state
PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:01.0 to 64
b43-phy0: Broadcom 4306 WLAN found
phy0: Selected rate control algorithm 'minstrel'
Broadcom 43xx driver loaded [ Features: PL, Firmware-ID: FW13 ]
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Plase use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
IPP2P v0.8.1_rc1 loading
ipt_time loading
firmware: requesting b43/ucode5.fw
firmware: requesting b43/pcm5.fw
firmware: requesting b43/b0g0initvals5.fw
firmware: requesting b43/b0g0bsinitvals5.fw
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
b43-phy0: Radio turned on by software
device wlan0 entered promiscuous mode
wlan0: deauthenticating by local choice (reason=3)
br-lan: port 2(wlan0) entering disabled state
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
br-lan: topology change detected, propagating
br-lan: port 2(wlan0) entering forwarding state

The robocfg module does not work on the 6348 yet.

It will be soon.

Stay tuned.

marc.

Hi,

i've a problem with the usb port.

I always get the following message:

....over-current change on port 2

Any idea on how to resolv or why i got this message?

I've already tried to disable, as suggested on the neuf4box forum: CONFIG_USB_EHCI_ROOT_HUB_TT and nothing changed.

Hi.

I've been trying to put openwrt trunk on my Asus WL-600g but I can't manage to upload it with tftp! I'm following this instructions

tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
Packet tracing on.
tftp> put openwrt-xxx-x.x-xxx.bin

ant it produces several

sent DATA <block=2561, 0 bytes>
received ACK <block=2561>
Sent XXX bytes in X seconds

and the router restarts (at least I loose connection) but with the same firmware from Asus!

I'm trying with to upload "openwrt-96348GW-10-squashfs-cfe.bin"

What I'm doing wrong?

Mike

jmike72 wrote:

I'm trying with to upload "openwrt-96348GW-10-squashfs-cfe.bin"

What I'm doing wrong?

Use .trx instead of .bin when uploading by tftp. .bin is for web-based uploads and includes header with device model and version number to check if the firmware is compatible with device hardware.

S.Y. Roman

rvb wrote:

Use .trx instead of .bin when uploading by tftp. .bin is for web-based uploads and includes header with device model and version number to check if the firmware is compatible with device hardware.

Tryed with .trx, with .bin and nothing! Tested with tftp and atftp but nothing works with any of them! In atftp I've managed to see a error message as follows

source port mismatch, check bypassedtimeout: retrying...

Even checked this error and issued a "arp -d 192.168.1.1" and tested again but nothing! Looks impossible to put openwrt on this router!

Mike

@jmike72,
as other routers with bcm63xx plataform, firmware is loaded by CFE. To load firmware via tftp / web, it must complain with headers and CRC, at this moment firmwares generated by OpenWRT not complain this.
* You only can load firmware usign a serial console, stopping at CFE boot, and usign CFE command "flashimage ip_tftp_server:firmware.bin"
* Version, i think, you must load is openwrt-96348GW-10-squashfs-cfe.bin
* Your board also includes one extra VIA usb 2.0 controller. Support for this may be broken at this moment .

Salut

t3l3m4k0 wrote:

@jmike72,
as other routers with bcm63xx plataform, firmware is loaded by CFE. To load firmware via tftp / web, it must complain with headers and CRC, at this moment firmwares generated by OpenWRT not complain this.
* You only can load firmware usign a serial console, stopping at CFE boot, a

Thanks for info!

t3l3m4k0 wrote:

* Version, i think, you must load is openwrt-96348GW-10-squashfs-cfe.bin

That was the first verrsion I've tryed to upload as "96348GW-10" was something I've seen in the original firmware source code from Asus. Anyway, it's impossible for now to upload any of them as I don't have a serial console. I hope that the support for this router can advance a bit more and soon we can have a nice openwrt firmware on it.

Mike

Is it possible to use tools from ASUS GPL source tarball to make "loadable" firmware?

In makefile:

ifneq ($(strip $(BRCM_KERNEL_ROOTFS)),nfs)
    cd $(PROFILE_DIR); \
    cp $(KERNEL_DIR)/vmlinux . ; \
    $(STRIP) --remove-section=.note --remove-section=.comment vmlinux; \
    $(OBJCOPY) -O binary vmlinux vmlinux.bin; \
    $(HOSTTOOLS_DIR)/cmplzma -k -2 vmlinux vmlinux.bin vmlinux.lz;\
    $(HOSTTOOLS_DIR)/bcmImageBuilder --output $(FS_KERNEL_IMAGE_NAME) --chip $(BRCM_CHIP) --board $(BRCM_BOARD_ID) --blocksize $(BRCM_FLASHBLK_SIZE) --cfefile $(CFE_FILE) --rootfsfile rootfs.img --kernelfile vmlinux.lz; \
    $(HOSTTOOLS_DIR)/bcmImageBuilder --output $(CFE_FS_KERNEL_IMAGE_NAME) --chip $(BRCM_CHIP) --board $(BRCM_BOARD_ID) --blocksize $(BRCM_FLASHBLK_SIZE) --cfefile $(CFE_FILE) --rootfsfile rootfs.img --kernelfile vmlinux.lz --include-cfe; \
    $(HOSTTOOLS_DIR)/createimg -b $(BRCM_BOARD_ID) -n $(BRCM_NUM_MAC_ADDRESSES) -m $(BRCM_BASE_MAC_ADDRESS) -i $(CFE_FS_KERNEL_IMAGE_NAME) -o $(FLASH_IMAGE_NAME); \
    $(HOSTTOOLS_DIR)/addvtoken $(FLASH_IMAGE_NAME) $(FLASH_IMAGE_NAME).w
    @mkdir -p $(IMAGES_DIR)
    @cp $(PROFILE_DIR)/$(FS_KERNEL_IMAGE_NAME) $(IMAGES_DIR)/$(FS_KERNEL_IMAGE_NAME)_$(BRCM_RELEASETAG)-$(shell date '+%y%m%d_%H%M')
    @echo
    @echo -e "Done! Image $(PROFILE) has been built in $(IMAGES_DIR)."
else
......