+ Reply to Thread
Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 21 to 30 of 45

Thread: Open WRT OR DD WRT for Home Hub 2.0?

  1. #21

  2. #22
    Junior Member
    Join Date
    Mar 2011
    Posts
    15
    I got openwrt on the Hub 2.0A
    The build had to be jtagged in, a variant of btsimonh's method should work, but I haven't tried yet.
    Access by serial only, No ethernet, wifi untested, USB working.
    No redboot, I am compressing the kernel as required by the BT/Thomson CFE. The mtd partitions are fixed similar to the original v1 firmware. (IP is set to 192.168.1.20 - not that it matters yet!)

    There are 5 leds, each is tri-colour (RGB) so that's 15 outputs needed in total. They are not directly connected to gpio's, but via a shift register made of two 74HC594's These are positioned back to back near the led's. A total of 3 gpio's is used to control the shift register.
    The two reset pins on the 74HC594's are NOT connected to any gpio and are presumably tied high.
    I can set the led's with a crude driver I have written via a /dev node.
    I don't know how to interface this driver to the rest of the led stuff in the kernel, I have found an early version of the 74x164 module which looks promising.
    Some relevent links:-
    http://www-s.ti.com/sc/ds/sn74ahct594.pdf
    http://www.nxp.com/documents/data_sheet/74HC_HCT594.pdf
    http://robots.freehostia.com/Softwar...tRegister.html
    http://www.protostack.com/blog/2010/...lling-16-leds/

    Code:
    DDR2 test..
    VCDL test.
    
    Decompressing Bootloader................................
    
    Version BL: 1.0.3
    Reading cpu info...........bcm96358 tp0 revision 1
    MIPS is in Big endian mode 
    Icache : 32Kb         Icachelinesize : 16 bytes 
    Dcache : 16Kb          Dcachelinesize : 16 bytes 
    BCM config reg CP0 : e30e1006 
            Instruction cache enabled
            Data cache enabled
            Data cache is nonblocking
    C0_CONFIG reg = 80008083
            standard TLB config
            Cacheable, write-back
    
    Multicore enable; Booting Linux kernel
    
    pfuncjmp = A0001840
    Reading cpu info...........bcm96358 tp0 revision 1
    MIPS is in Big endian mode 
    Icache : 16Kb         Icachelinesize : 16 bytes 
    Dcache : 16Kb          Dcachelinesize : 16 bytes 
    BCM config reg CP0 : 230e1006 
            Data cache is nonblocking
    C0_CONFIG reg = 80008082
            standard TLB config
            Noncacheable
    
    JTAG select tp0
    BOOTING THE THOMSON LINUX KERNEL
    
    Starting the kernel @ 0x801ebfb0 
    memsize=0x3F7D000[    0.000000] Linux version 2.6.39.4 (user1@debian) (gcc version 4.5.4 20110808 (prerelease) (Linaro GCC 4.5-2011.08) ) #1 Sun Dec 18 18:06:47 GMT 2011
    [    0.000000] Detected Broadcom 0x6358 CPU revision a1
    [    0.000000] CPU frequency is 300 MHz
    [    0.000000] 128MB of RAM installed
    [    0.000000] registering 40 GPIOs
    [    0.000000] enabling icache and dcache
    [    0.000000] bootconsole [early0] enabled
    [    0.000000] CPU revision is: 0002a010 (Broadcom BMIPS4350)
    [    0.000000] Determined physical RAM map:
    [    0.000000]  memory: 08000000 @ 00000000 (usable)
    [    0.000000] Zone PFN ranges:
    [    0.000000]   Normal   0x00000000 -> 0x00008000
    [    0.000000] Movable zone start PFN for each node
    [    0.000000] early_node_map[1] active PFN ranges
    [    0.000000]     0: 0x00000000 -> 0x00008000
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    [    0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
    [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
    [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
    [    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
    [    0.000000] Memory: 127372k/131072k available (1933k kernel code, 3700k reserved, 318k data, 132k init, 0k highmem)
    [    0.000000] NR_IRQS:128
    [    0.000000] Calibrating delay loop... 298.32 BogoMIPS (lpj=1167360)
    [    0.054687] pid_max: default: 32768 minimum: 301
    [    0.054687] Mount-cache hash table entries: 512
    [    0.070312] NET: Registered protocol family 16
    [    0.085937] registering PCI controller with io_map_base unset
    [    0.109375] bio: create slab <bio-0> at 0
    [    0.132812] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
    [    0.140625] pci 0000:00:01.0: BAR 0: set to [mem 0x30000000-0x30003fff] (PCI address [0x30000000-0x30003fff])
    [    0.148437] Switching to clocksource MIPS
    [    0.156250] Switched to NOHz mode on CPU #0
    [    0.164062] NET: Registered protocol family 2
    [    0.164062] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.171875] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    [    0.179687] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.187500] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.195312] TCP reno registered
    [    0.195312] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.203125] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.210937] NET: Registered protocol family 1
    [    0.218750] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.226562] JFFS2 version 2.2 (NAND) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [    0.234375] msgmni has been set to 248
    [    0.242187] io scheduler noop registered (default)
    �[    0.257812] console [ttyS0] enabled, bootconsole disabled= 10) is a bcm63xx_uart
    [    0.257812] console [ttyS0] enabled, bootconsole disabled
    [    0.273437] gpiodev: gpio device registered with major 254
    [    0.281250] bcm963xx-flash bcm963xx-flash.0: 0x02000000 at 0x1e000000
    [    0.289062] bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000020 Chip ID 0x00227e
    [    0.296875] Amd/Fujitsu Extended Query Table at 0x0040
    [    0.304687]   Amd/Fujitsu Extended Query version 1.3.
    [    0.304687] number of CFI chips: 1
    [    0.312500] bcm963xx_flash: Provisional static mtd partitions for Hub v2.0A
    [    0.320312] bcm963xx_flash: Partition 0 is cfe offset 0 and length 20000
    [    0.328125] bcm963xx_flash: Partition 1 is kernel offset 20000 and length 100000
    [    0.335937] bcm963xx_flash: Partition 2 is rootfs offset 120000 and length ee0000
    [    0.343750] bcm963xx_flash: Partition 3 is linux offset 20000 and length fe0000
    [    0.351562] bcm963xx_flash: Spare partition is 520000 offset and length ae0000
    [    0.359375] Creating 4 MTD partitions on "bcm963xx":
    [    0.359375] 0x000000000000-0x000000020000 : "cfe"
    [    0.375000] 0x000000020000-0x000000120000 : "kernel"
    [    0.382812] 0x000000120000-0x000001000000 : "rootfs"
    [    0.390625] mtd: partition "rootfs" set to be root filesystem
    [    0.398437] mtd: partition "rootfs_data" created automatically, ofs=340000, len=CC0000 
    [    0.406250] 0x000000340000-0x000001000000 : "rootfs_data"
    [    0.421875] 0x000000020000-0x000001000000 : "linux"
    [    0.429687] bcm63xx-spi bcm63xx-spi.0: at 0xfffe0800 (irq 9, FIFOs size 542) v0.1.2
    [    0.445312] bcm63xx_enet MII bus: probed
    [    0.460937] bcm63xx_enet MII bus: probed
    [    0.468750] input: gpio-buttons as /devices/platform/gpio-buttons.0/input/input0
    [    0.476562] bcm63xx-wdt bcm63xx-wdt.0:  started, timer margin: 30 sec
    [    0.484375] TCP cubic registered
    [    0.492187] NET: Registered protocol family 17
    [    0.492187] lib80211: common routines for IEEE802.11 drivers
    [    0.507812] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
    [    0.523437] Freeing unused kernel memory: 132k freed
    awk: /proc/cpuinfo: No such file or directory
    [    3.515625] bcm63xx_enet bcm63xx_enet.1: attached PHY at address 31 [Generic PHY]
    [    5.515625] eth1: link UP - 10/half - flow control off
    - preinit -
    Press the [f] key and hit [enter] to enter failsafe mode
    - regular preinit -
    [    9.367187] JFFS2 notice: (331) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 4 of xref (0 dead, 2 orphan) found.
    switching to jffs2
    - init -
    
    Please press Enter to activate this console. [   11.460937] Compat-wireless backport release: compat-wireless-2011-11-29
    [   11.468750] Backport based on wireless-testing.git master-2011-12-01
    [   11.679687] cfg80211: Calling CRDA to update world regulatory domain
    [   12.460937] cfg80211: World regulatory domain updated:
    [   12.460937] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [   12.476562] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   12.484375] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [   12.492187] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [   12.500000] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   12.507812] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   13.132812] SCSI subsystem initialized
    [   13.546875] usbcore: registered new interface driver usbfs
    [   13.554687] usbcore: registered new interface driver hub
    [   13.570312] usbcore: registered new device driver usb
    [   14.656250] Broadcom 43xx driver loaded [ Features: PL ]
    [   14.820312] Button Hotplug driver version 0.4.1
    [   15.945312] NTFS driver 2.1.30 [Flags: R/O MODULE].
    [   16.671875] ip_tables: (C) 2000-2006 Netfilter Core Team
    [   17.492187] nf_conntrack version 0.5.0 (1992 buckets, 7968 max)
    [   18.929687] xt_time: kernel timezone is -0000
    [   19.546875] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [   19.554687] bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
    [   19.562500] bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 1
    [   19.570312] bcm63xx_ohci bcm63xx_ohci.0: irq 13, io mem 0xfffe1400
    [   19.640625] hub 1-0:1.0: USB hub found
    [   19.648437] hub 1-0:1.0: 1 port detected
    [   19.929687] Initializing USB Mass Storage driver...
    [   19.937500] usbcore: registered new interface driver usb-storage
    [   19.945312] USB Mass Storage support registered.
    [   20.562500] hub 1-0:1.0: over-current condition
    [   21.992187] bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (2)]
    [   23.101562] bcm63xx_enet bcm63xx_enet.1: attached PHY at address 31 [Generic PHY]
    [   23.687500] device eth1 entered promiscuous mode
    [   23.843750] br-lan: port 1(eth1) entering forwarding state
    [   23.851562] br-lan: port 1(eth1) entering forwarding state
    [   25.101562] eth1: link UP - 10/half - flow control off
    
    
    
    BusyBox v1.19.3 (2011-12-18 17:21:18 GMT) 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
     ATTITUDE ADJUSTMENT (bleeding edge, r29561) ----------
      * 1/4 oz Vodka      Pour all ingredients into mixing
      * 1/4 oz Gin        tin with ice, strain into glass.
      * 1/4 oz Amaretto
      * 1/4 oz Triple sec
      * 1/4 oz Peach schnapps
      * 1/4 oz Sour mix
      * 1 splash Cranberry juice
     -----------------------------------------------------
    root@OpenWrt:/#
    Problems
    1) Amount of RAM is wrong, should be 64M not 128, there are lots of knock on effects because of this. I didn't set anything, just let it autodetect.
    2) It thinks there is 32M of flash (I moved the start address, and didn't force the size)
    3) No ethernet -- won't respond to pings on any of the 4 sockets (either way)
    4) ehci-hcd.ko gives endless "hub 2-0:1.0: over-current condition on port 2" warnings
    looks like it will work if I can supress these warnings, which bung up the console.
    I assume this is because of the 2nd port, with the component positions unpopulated.
    The Answer: "insmod ehci-hcd.ko ignore_oc" --- now, mounting a fat16 "FAT: codepage cp437 not found" An ext2 mounts ok though!
    5) Structures in kernel won't accept 3 buttons (fix needed)
    6) mtd partitions are still a bit tatty, but these are only temporary anyway. A better solution I have just thought of, is to provide a false redboot partition table, hopefully this will minimise changes to the mtd stuff, and provide a seamless changeover when the v2.0 redboot is ready. Ant?

    GPIO's identified so far
    Code:
    gpio  0 -- OUT -- clickiness
    gpio  1 -- IN --- button 3 LOW=Pressed "Find Handset"
    gpio  5 -- OUT -- LED shift register; output latch clock
    gpio  6 -- OUT -- LED shift register; shift clock
    gpio  7 -- OUT -- LED shift register; data input TO shift register
    gpio  9 -- IN --- button 1 LOW=Pressed "Reset to Defaults" Red pinhole
    gpio 11 -- IN --- button 2 LOW=Pressed "Wireless Association"
    gpio 12 -- dirout or clear caused reboot. Is this an intended connection to a reset pin, or a horrible bus contention pulling down the supply?
    gpio 40 -- caused kernel page fault (max=39?)
    
     Initial states BEFORE setting all to dirin:
     0 LOW    1 HIGH   2 LOW    3 LOW    4 LOW    5 HIGH   6 HIGH   7 LOW    8 HIGH   9 HIGH
    10 LOW   11 HIGH  12 HIGH  13 LOW   14 LOW   15 HIGH  16 HIGH  17 HIGH  18 HIGH  19 HIGH
    20 HIGH  21 HIGH  22 HIGH  23 HIGH  24 HIGH  25 HIGH  26 LOW   27 LOW   28 HIGH  29 LOW
    30 LOW   31 LOW   32 HIGH  33 HIGH  34 HIGH  35 HIGH  36 HIGH  37 HIGH  38 LOW   39 LOW
    
     States AFTER setting all to dirin:
     0 LOW    1 HIGH   2 LOW    3 HIGH   4 HIGH   5 HIGH   6 HIGH   7 HIGH   8 HIGH   9 HIGH
    10 LOW   11 HIGH  12 HIGH  13 LOW   14 LOW   15 LOW   16 HIGH  17 HIGH  18 HIGH  19 HIGH
    20 HIGH  21 HIGH  22 HIGH  23 HIGH  24 HIGH  25 HIGH  26 HIGH  27 HIGH  28 HIGH  29 HIGH
    30 HIGH  31 HIGH  32 HIGH  33 HIGH  34 HIGH  35 HIGH  36 LOW   37 HIGH  38 LOW   39 LOW
    To Build it
    First of all, I think my patch will break the build for v1.5 and possibly others, so for now, it's wise to have a separate trunk directory for this.
    Get my patches: http://www.mediafire.com/file/zah1kb...penwrt-for-hh2
    Code:
    svn co svn://svn.openwrt.org/openwrt/trunk/
    mv trunk/ trunk-hh2
    cd trunk-hh2/
    # Put Ant's 979-support-bthomehub.patch in target/linux/brcm63xx/patches-2.6.39/
    # Put 980-support-bthomehubV2A.patch in target/linux/brcm63xx/patches-2.6.39/
    # Put config-2.6.39 in target/linux/brcm63xx/
    # Put .config in the base (trunk-hh2) directory
    ./scripts/feeds update
    make menuconfig ## Don't be too greedy, we need the root.squashfs < 0x400000
    make V=99 2>&1 | tee hub2.log
    
    #while that's building, in another shell :-
        mkdir ~/bin ## I keep lots of useful bits & bobs in here!
        check that your ~/.profile contains the following, or somesuch:-
            # set PATH so it includes user's private bin if it exists
            if [ -d "$HOME/bin" ] ; then
                PATH="$HOME/bin:$PATH"
            fi
        mv kpack1.sh ~/bin/
        mv serio ~/bin/
        wget http://prdownloads.sourceforge.net/sevenzip/lzma427.tar.bz2?download
        mkdir lzma427
        bzcat lzma427.tar.bz2 | tar -C lzma427 -x
        make -C lzma427/SRC/7zip/Compress/LZMA_Alone -f makefile.gcc all
        cp lzma427/SRC/7zip/Compress/LZMA_Alone/lzma ~/bin/lzma427
        # Get some tea!
    
    # When the build is finished:-
    cd build_dir/linux-brcm63xx/
    file vmlinux.elf ## make sure that it's stripped
    kpack1.sh vmlinux.elf vmlinux.thom 0x100000
    cat vmlinux.thom >| openwrt.img
    ls -l root.squashfs ## make sure that it's less than 0x400000 else it will get stomped on by the jffs2
    cat root.squashfs >> openwrt.img
    ln -s openwrt.img CUSTOM.BIN
    # NB. /fc:89 is needed on my box which contains an ST M29W128GL
    brjtag -flash:custom /window:1E000000 /start:1E020000 /length:0FE0000 /fc:89 /bypass /forcealign
    # This will clear all the flash beyond 0x1E020000, if on a successive build, you want to keep the jffs2, take the length of openwrt.img and round up to the next multiple of 0x20000 This will only work while we have static partitions.
    How to use the module led_serial.ko
    The module gets built, but not installed in the image for some reason, to get (small) files onto the hub, google: 'serio'
    Code:
    mknod /dev/led_serial c 60 0
    insmod led_serial.ko
    hexdump -C /dev/led_serial 
    # Ooo.. funky!
    echo -n "0110011011100101" > /dev/led_serial
    Further work
    1) script or c.prog to create false redboot partiton block
    2) remove my mtd stuff from patch & go back to parse_redboot_partitions
    3) build, flash, test & debug
    4) Adapt Miguel's 74x164 shift register driver
    5) update board file for led's as in nb4 patch
    6) build, flash, test & debug
    7) apply bcm5325 patch set
    8) where now?

  3. #23
    Junior Member
    Join Date
    Feb 2011
    Posts
    15
    1) Amount of RAM is wrong, should be 64M not 128, there are lots of knock on effects because of this. I didn't set anything, just let it autodetect.
    You may force the amount of memory used, adding this kernel parameter :
    (make kernel_menuconfig: Kernel hacking ---> Built-in kernel command line)
    Code:
    mem=0x4000000
    0x4000000 = 64 MiB

    I never tried but it should work..

  4. #24
    Junior Member
    Join Date
    Feb 2011
    Posts
    27
    Any work being done on this?

  5. #25
    Junior Member
    Join Date
    Mar 2011
    Posts
    15
    Some more progress
    1) Still No redboot, I am compressing the kernel as required by the BT/Thomson CFE.
    Now have a false redboot partiton table, so there is no need to change the mtd stuff in the kernel.
    flash image is built by the program 'redtable' provided. I am still jtagging the image into place.
    2) The LED's are now correctly registered with the kernel's LED infrastructure.
    3) BCM5325 ethernet switch is now detected, and configurable, so ethernet is working.
    IP is set to 192.168.1.20
    WARNING: default switch config puts all 4 ports together which (I think) means no firewall LAN-WAN
    4) USB works fine now: ignoring false overcurrent messages
    cp437, fat and ext2,3,4 now included.

    Problems Outstanding
    1) wifi chip/card is not detected.
    2) "registering PCI controller with io_map_base unset" this sounds like a biggie, and may be the cause of (1)
    Googleing for this was hopeless of course, It seems like anyone who ever posted a bootlog has this message.

    3) The ram size detect problem reported last time, is still present, but I have found the cause:-
    The kernel works out the RAM size from a cpu register called 'MEMC_CFG_REG' this contains the number of rows, columns, banks, and the buswidth. This is done by 'detect_memory_size' in arch/mips/bcm63xx/cpu.c I initially suspected this was wrong, but am now satisfied that it is correct.
    It is the value in 'MEMC_CFG_REG' which is wrong, this is put there by the thomson bootloader -- why?
    Here's an interesting thought: Perhaps there are a few early HH2A's out there with 128MB RAM??
    As noted, I can override the detected size via the kernel command line. ( Thanks Danitool )

    4) The way the flash start address and size are currently defined, works, but is not a very elegant solution.
    5) Many gpio's remain unidentified.
    6) On the first boot it seems to be running very busy, when it should be idle. There is a huge delay doing anything, even echoing typed charactars back. I'm sure this didn't happen last time.
    According to 'top' [rcu_kthread] is hogging the cpu. Still the same after 2 hours.
    Re-booted and all is ok - weird!

    Code:
    Starting the kernel @ 0x801f20b0 
    memsize=0x3F7D000[    0.000000] Linux version 3.0.18 (user1@debian) (gcc version 4.5.4 20120201 (prerelease) (Linaro GCC 4.5-2012.02) ) #1 Sat Mar 24 09:57:43 GMT 2012
    [    0.000000] Detected Broadcom 0x6358 CPU revision a1
    [    0.000000] CPU frequency is 300 MHz
    [    0.000000] 128MB of RAM installed
    [    0.000000] registering 40 GPIOs
    [    0.000000] enabling icache and dcache
    [    0.000000] bootconsole [early0] enabled
    [    0.000000] CPU revision is: 0002a010 (Broadcom BMIPS4350)
    [    0.000000] Determined physical RAM map:
    [    0.000000]  memory: 08000000 @ 00000000 (usable)
    [    0.000000] User-defined physical RAM map:
    [    0.000000]  memory: 04000000 @ 00000000 (usable)
    [    0.000000] Zone PFN ranges:
    [    0.000000]   Normal   0x00000000 -> 0x00004000
    [    0.000000] Movable zone start PFN for each node
    [    0.000000] early_node_map[1] active PFN ranges
    [    0.000000]     0: 0x00000000 -> 0x00004000
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    [    0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 mem=64M
    [    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
    [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Primary instruction cache 32kB, VIPT, 2-way, linesize 16 bytes.
    [    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
    [    0.000000] Memory: 62360k/65536k available (1957k kernel code, 3176k reserved, 327k data, 136k init, 0k highmem)
    [    0.000000] NR_IRQS:128
    [    0.000000] Calibrating delay loop... 298.32 BogoMIPS (lpj=1167360)
    [    0.054687] pid_max: default: 32768 minimum: 301
    [    0.054687] Mount-cache hash table entries: 512
    [    0.070312] NET: Registered protocol family 16
    [    0.093750] registering PCI controller with io_map_base unset
    [    0.117187] bio: create slab <bio-0> at 0
    [    0.140625] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30003fff]
    [    0.148437] pci 0000:00:01.0: BAR 0: set to [mem 0x30000000-0x30003fff] (PCI address [0x30000000-0x30003fff])
    [    0.156250] Switching to clocksource MIPS
    [    0.164062] Switched to NOHz mode on CPU #0
    [    0.171875] NET: Registered protocol family 2
    [    0.171875] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.179687] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    [    0.187500] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.195312] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.203125] TCP reno registered
    [    0.203125] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.210937] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.218750] NET: Registered protocol family 1
    [    0.234375] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.234375] JFFS2 version 2.2 (NAND) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [    0.250000] msgmni has been set to 121
    [    0.250000] io scheduler noop registered (default)
    [    0.257812] bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0100 (irq = 10) is a bcm63xx_uart
    [    0.265625] console [ttyS0] enabled, bootconsole disabled
    [    0.265625] console [ttyS0] enabled, bootconsole disabled
    [    0.281250] gpiodev: gpio device registered with major 254
    [    0.289062] bcm963xx-flash bcm963xx-flash.0: 0x01000000 at 0x1e000000
    [    0.296875] bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000020 Chip ID 0x00227e
    [    0.312500] Amd/Fujitsu Extended Query Table at 0x0040
    [    0.312500]   Amd/Fujitsu Extended Query version 1.3.
    [    0.320312] number of CFI chips: 1
    [    0.320312] bcm963xx_flash: Read Signature value of 
    [    0.328125] bcm963xx_flash: assuming RedBoot bootloader
    [    0.335937] bcm963xx_flash: Support extended flash 0x01000000 at 0xbe000000
    [    0.343750] Searching for RedBoot partition table in bcm963xx at offset 0xfe0000
    [    0.382812] Creating 5 MTD partitions on "bcm963xx":
    [    0.390625] 0x000000000000-0x000000020000 : "RedBoot"
    [    0.398437] 0x000000020000-0x000000100000 : "kernel_fs"
    [    0.414062] 0x000000100000-0x000000320000 : "root_fs"
    [    0.421875] 0x000000320000-0x000000fe0000 : "rootfs_data"
    [    0.429687] 0x000000fe0000-0x000000fef000 : "FIS directory"
    [    0.445312] bcm63xx-spi bcm63xx-spi.0: at 0xfffe0800 (irq 9, FIFOs size 542) v0.1.2
    [    0.460937] bcm63xx_enet MII bus: probed
    [    0.476562] input: gpio-buttons as /devices/platform/gpio-buttons.0/input/input0
    [    0.484375] bcm63xx-wdt bcm63xx-wdt.0:  started, timer margin: 30 sec
    [    0.515625] TCP cubic registered
    [    0.515625] NET: Registered protocol family 17
    [    0.523437] lib80211: common routines for IEEE802.11 drivers
    [    0.539062] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
    [    0.546875] Freeing unused kernel memory: 136k freed
    awk: /proc/cpuinfo: No such file or directory
    [    3.703125] eth1: link forced UP - 100/full - flow control off/off
    [    3.945312] roboswitch: Probing device eth0: 
    [    3.945312] roboswitch: [/media/scratch/trunk-31059/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:121] SIOCGETCPHYRD failed!
    [    3.960937] roboswitch: [/media/scratch/trunk-31059/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:121] SIOCGETCPHYRD failed!
    [    3.968750] No Robo switch in managed mode found, phy_id = 0xffffffff
    [    3.976562] roboswitch: Probing device eth1: found a 5325! It's a 5350.
    - preinit -
    Press the [f] key and hit [enter] to enter failsafe mode
    - regular preinit -
    [    9.984375] JFFS2 notice: (396) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    switching to jffs2
    - init -
    
    Please press Enter to activate this console. [   13.156250] Compat-wireless backport release: compat-wireless-2012-02-27-1-r31059
    [   13.164062] Backport based on wireless-testing.git master-2012-02-27
    [   13.250000] cfg80211: Calling CRDA to update world regulatory domain
    [   14.281250] SCSI subsystem initialized
    [   14.437500] cfg80211: World regulatory domain updated:
    [   14.437500] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [   14.453125] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   14.460937] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [   14.468750] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    [   14.476562] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   14.484375] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    [   14.789062] usbcore: registered new interface driver usbfs
    [   14.796875] usbcore: registered new interface driver hub
    [   14.804687] usbcore: registered new device driver usb
    [   15.593750] Broadcom 43xx driver loaded [ Features: PL ]
    [   15.804687] Button Hotplug driver version 0.4.1
    [   16.742187] NTFS driver 2.1.30 [Flags: R/O MODULE].
    [   17.132812] loop: module loaded
    [   17.804687] ip_tables: (C) 2000-2006 Netfilter Core Team
    [   18.601562] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [   18.609375] bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
    [   18.617187] bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
    [   18.656250] bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
    [   18.671875] bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00, overcurrent ignored
    [   18.679687] hub 1-0:1.0: USB hub found
    [   18.687500] hub 1-0:1.0: 2 ports detected
    [   18.882812] nf_conntrack version 0.5.0 (976 buckets, 3904 max)
    [   20.664062] xt_time: kernel timezone is -0000
    [   21.375000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [   21.382812] bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
    [   21.390625] bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 2
    [   21.398437] bcm63xx_ohci bcm63xx_ohci.0: irq 13, io mem 0xfffe1400
    [   21.476562] hub 2-0:1.0: USB hub found
    [   21.484375] hub 2-0:1.0: 1 port detected
    [   21.539062] Initializing USB Mass Storage driver...
    [   21.539062] usbcore: registered new interface driver usb-storage
    [   21.546875] USB Mass Storage support registered.
    [   32.507812] bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (2)]
    
    
    BusyBox v1.19.4 (2012-03-23 20:38:41 GMT) 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
     ATTITUDE ADJUSTMENT (bleeding edge, r31059) ----------
      * 1/4 oz Vodka      Pour all ingredients into mixing
      * 1/4 oz Gin        tin with ice, strain into glass.
      * 1/4 oz Amaretto
      * 1/4 oz Triple sec
      * 1/4 oz Peach schnapps
      * 1/4 oz Sour mix
      * 1 splash Cranberry juice
     -----------------------------------------------------
    root@OpenWrt:/#
    To Build it
    Get my patches: see below
    Code:
    svn co svn://svn.openwrt.org/openwrt/trunk/
    mv trunk/ trunk-hh2a
    cd trunk-hh2a/
    # Don't use anything from my earlier release
    # Put Ant's 979-support-bthomehub.patch in target/linux/brcm63xx/patches-3.0/
    #	I had to update this to apply successfully to the latest trunk
    #	This is needed because my patches build on it. I haven't tested this on a v1.x
    # Put 980-74x594.patch in target/linux/brcm63xx/patches-3.0/
    # Put 981-support-bthomehubV2A.patch in target/linux/brcm63xx/patches-3.0/
    # Put config-3.0 in target/linux/brcm63xx/
    # Put .config in the base (trunk-hh2a) directory
    ./scripts/feeds update
    make menuconfig
    make V=99 2>&1 | tee hub2.log
    
    #while that's building, in another shell :-
    	mkdir ~/bin ## I keep lots of useful bits & bobs in here!
    	check that your ~/.profile contains the following, or somesuch:-
    		*****************************************************************
    		*  # set PATH so it includes user's private bin if it exists	*
    		*  if [ -d "$HOME/bin" ] ; then					*
    		*      PATH="$HOME/bin:$PATH"					*
    		*  fi								*
    		*****************************************************************
    
    	wget http://prdownloads.sourceforge.net/sevenzip/lzma427.tar.bz2?download
    	mkdir lzma427
    	bzcat lzma427.tar.bz2 | tar -C lzma427 -x
    	make -C lzma427/SRC/7zip/Compress/LZMA_Alone -f makefile.gcc all
    	mv lzma427/SRC/7zip/Compress/LZMA_Alone/lzma ~/bin/lzma427
    	cd tools # where ever that you unpacked it
    	make all
    	mv redtable ~/bin/
    	chmod 755 ~/bin/redtable ~/bin/lzma427
    	# Get some tea!
    
    # When the build is finished:-
    cd build_dir/linux-brcm63xx/
    file vmlinux.elf ## make sure that it's stripped
    redtable vmlinux.elf root.squashfs openwrt.img | tee flash.map
    ln -s openwrt.img CUSTOM.BIN
    # NB. /fc:89 is needed on my box which contains an ST M29W128GL
    brjtag -flash:custom /window:1E000000 /start:1E020000 /length:0FE0000 /fc:89 /bypass /forcealign
    Fiddling around with the ethernet switch
    Code:
    root@OpenWrt:/# 
    root@OpenWrt:/# robocfg show
    probing eth1
    Switch: enabled
    Port 0(W):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 1(4): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 2(3):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 4(1):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    VLANs: BCM5325/535x enabled mac_check mac_hash
    vlan0: 0 1 2 3 4 5u
    root@OpenWrt:/# robocfg switch disable vlans enable reset vlan 0 ports "1 2 3 4 
    5u" vlan 1 ports "0 5t" port 0 state enabled stp none switch enable
    probing eth1
    root@OpenWrt:/#
    To exclude the port labelled 1 on back of hub (=0 on switch) from the lan:-
    Code:
    root@OpenWrt:/# robocfg switch disable vlans enable reset vlan 0 ports "1 2 3 4 5u" vlan 1 ports "0 5t" port 0 state enabled stp none switch enable
    root@OpenWrt:/# 
    root@OpenWrt:/# robocfg show
    probing eth1
    Switch: enabled
    Port 0(W):  DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
    Port 1(4): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 2(3):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 3(2):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 4(1):  DOWN enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    Port 5(C): 100FD enabled stp: none vlan: 0 mac: 00:00:00:00:00:00
    VLANs: BCM5325/535x enabled mac_check mac_hash
    vlan0: 1 2 3 4 5u
    vlan1: 0 5t
    root@OpenWrt:/#
    PsiDoc does this qualify for it's own section yet?
    Attached Files

  6. #26
    Super Moderator Ant's Avatar
    Join Date
    Dec 2010
    Location
    Stoke on Trent
    Posts
    137
    Great work John. I havn't had time to play yet. I was going to get it out later to do some work but it seems you have already made quite some progress. I have a couple of questions,

    Have you tried flashing the openwrt kernel and fs from the factory firmware, using the non jtag unlock driver?

    have you tried using physmap_compat with commandline partitions flash map driver. It means you have to define the flash areas on the commandline but you wouldnt have the false redboot partition or the search for cfe on boot.

    Do you know how it's handling the dual cpu? I dont think it would be sane to schedule tasks accross both cpu's as one has less cache and probably other slight differences. I think the design is supposed to use a cpu for voice/dsp applications and the other for the system. But it would be nice if the second cpu could be used for a bit of a boost when needed.

    Has anyone had a fiddle with the second usb port yet? I can see a small inductor for blocking noise. probably of insignificant size that can just be bridged. There is a small chip on the other side from the usb ports, probably for the over current protection and the pads that are unpopulated underneath it are for a different chip that handles the detection on both ports. Ill unsolder it (when some solder arrives) and take a look at the other pads to see if i can find the right chip. That extra port will make a nice addition.

    Happy hub hacking.

  7. #27
    Super Moderator Ant's Avatar
    Join Date
    Dec 2010
    Location
    Stoke on Trent
    Posts
    137
    @John

    Do you know how to bring the ethernet switch out of reset?

    I messing with bootloader source but i can't get the chip to enable, the reset pin is being pulled low but if i pull the pin off the board and apply a bit of voltage it will kick in. The v1 was like this with its external phy and could be enabled by seting gpio 6 high out. It doesnt seem to be the same gpio this time.

    Cheers

  8. #28
    Junior Member
    Join Date
    Mar 2011
    Posts
    15
    [quote]
    Have you tried flashing the openwrt kernel and fs from the factory firmware, using the non jtag unlock driver?
    [quote/]
    I'm sure it will work, but I haven't tried it yet, also before recomending people to do this its neccessary to provide a route back to original firmware, or to upgrade to a newer openwrt.
    I was holding off doing this to avoid drawing newbies in too soon. It dosen't help with this thread being in a tutorial section.

    [quote]
    have you tried using physmap_compat with commandline partitions flash map driver. It means you have to define the flash areas on the commandline but you wouldnt have the false redboot partition or the search for cfe on boot.
    [quote/]
    Before the kernel and rootfs are built, we don't know their sizes, so either we would have to fix the partitions, with the sizes heavily sandbagged, wasting space in the flash, or the build would have to be an iterative process. I had fixed sizes in my first attempt, this was what I was trying to get away from.


    [quote]
    Do you know how it's handling the dual cpu? I dont think it would be sane to schedule tasks accross both cpu's as one has less cache and probably other slight differences. I think the design is supposed to use a cpu for voice/dsp applications and the other for the system. But it would be nice if the second cpu could be used for a bit of a boost when needed.
    [quote/]
    Most likely, just sitting there with its clock stopped. I don't think it can act as a 2nd cpu for the kernel, because it only shares a small window of RAM, and not the whole space -- I can't remember where I read this though. A cpu intensive task would have to be chosen, separated frome the rest of the kernel and re-written to use the 2nd cpu. Sounds like a big job.

    [quote]
    Has anyone had a fiddle with the second usb port yet? I can see a small inductor for blocking noise. probably of insignificant size that can just be bridged. There is a small chip on the other side from the usb ports, probably for the over current protection and the pads that are unpopulated underneath it are for a different chip that handles the detection on both ports. Ill unsolder it (when some solder arrives) and take a look at the other pads to see if i can find the right chip. That extra port will make a nice addition.
    [quote/]
    The chip on my board is 2051B in SO-8, without removing it I can see no pads underneath it.
    I think it's this:- http://www.ti.com/product/tps2051b

    [quote]
    Do you know how to bring the ethernet switch out of reset?
    ......
    [quote/]
    Yes it's not gpio 6, that's controlling the led shift reg.
    I'm using kmod-switch provided in openwrt, without any mods, whatever defaults it is using, must be correct, because I am not setting any.
    How were you able to identify the reset pin, I couldn't find any info on the 5325.
    If you've got the pin lifted, and you're sure it's a gpio, you can do what I did to identify it. I wrote a script that set all gpio's to inputs, and then continiously polled them, printing the states to the console.

    connect an external switch, as shown in my horrible diagram below
    gpio.gif
    [code]
    #!/bin/sh
    # Script to poll gpio's on BThomehub 2.0A for pin identification
    # The idea is to set them all to inputs, then wire a switch to the external line to be identified.
    #
    if [ $# -ne 2 ]; then
    echo "usage: $0 [2nd digit of count range] [iterations]"
    exit
    fi
    #
    GPIOMAX=40
    gpio=0
    while [ $gpio -lt $GPIOMAX ]
    do
    # echo $gpio
    gpioctl dirin $gpio > /dev/null
    gpio=$(($gpio+1))
    done
    #exit
    #
    COUNTS="0 1 2 3 4 5 6 7 8 9"
    iterations=$2
    while [ $iterations -gt 0 ]
    do
    for count in $COUNTS
    do
    pin=$1$count
    echo -n `gpioctl get $pin| awk '{print $4}'`" "
    done
    echo
    iterations=$(($iterations-1))
    done
    [code/]

  9. #29
    Super Moderator Ant's Avatar
    Join Date
    Dec 2010
    Location
    Stoke on Trent
    Posts
    137
    Yeah, i think i will have to do the polling thing. I just have one problem, i have misplaced the backup i made of the original bt/thomson loader. Does anyone have a spare backup they made of the v2a loader?

    I found the 5325 pinout here http://pudeev.livejournal.com/26318.html its not a physical pin for pin diagram but the pin numbers are there.
    This guy also has pinouts to both package types of the 6348. These helped a lot in the v1 dev. I just pulled the chip from one bricked board to follow the traces. Would be handy if we could do the same with our chip.


    I can get the bootloader to talk to the 5325 as it autonegotiates and displays the speed when a cable is plugged to port 1(?) im not sure of the numbering, its the one next to the phone ports. But, i cannot seem to send any data down or up the cable. This bootloader source has next to no debbugging code whatsoever, so im adding my own as i trace to where the data is getting stuck.

  10. #30
    Super Moderator
    Join Date
    Dec 2010
    Location
    Suffolk, uk
    Posts
    124
    sort of out of time tonight, but it's built, so if i have time tomorrow, I will blow the openwrt.img file in via the existing hacked firmware, and write a procedure. John; from your description, this must go at 0x20000, correct? previously we've been writing from 0x40000 - after some unique config data. There is no wireless calibration data here is there (like ath9k eeprom in v2b?)?
    simon

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts