sodnpoo.com

dg834v4 uart

The DG834v4 is unlike the v1/v2/v3 in that they are TI AR7 based and the v4 is another Broadcom BCM6348 board, clocked at 240MHz and with 16MB RAM. Initially I thought getting to the uart would just be a case of soldering headers, but after reading the openwrt wiki page it became apparent that there were unpopulated resistors on the underside of the board, on the rx/tx lines coming from the CPU (R521 and R522 in the image below).

Using a hot air station, I removed some 1K Ohm resistors from a dead laptop motherboard. Then using a toothpick, I put a little flux on the empty resistor pads to hopefully give the them something to stick to. A little flux on the end of the toothpick made it pretty easy to pick them up and drag them into position too. Placement accuracy is not that critical; once the solder melts the surface tension will pull the tiny resistors into line.

Above, the R521 and R522 pads have been populated - using the hot air station on a low speed and a high temperature. Once the board cooled, my Bus Pirate was connected to the rx, tx and ground pins and configure as a uart bridge.

Here's the stock boot:

CFE version 1.0.37-6.8 for BCM96348 (32bit,SP,BE)
Build Date: Fri Feb  6 03:12:58 UTC 2009 (root@localhost.localdomain)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbfc00000

Initializing Arena.
Initializing Devices.
Parallel flash device: name MX29LV320AB, id 0x22a8, size 4096KB
CPU type 0x29107: 240MHz, Bus: 133MHz, Ref: 26MHz
Total memory: 16777216 bytes (16MB)

Total memory used by CFE:  0x80401000 - 0x80527770 (1206128)
Initialized Data:          0x8041EF50 - 0x80420350 (5120)
BSS Area:                  0x80420350 - 0x80425770 (21536)
Local Heap:                0x80425770 - 0x80525770 (1048576)
Stack Area:                0x80525770 - 0x80527770 (8192)
Text (code) segment:       0x80401000 - 0x8041EF48 (122696)
Boot area (physical):      0x00528000 - 0x00568000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.0.1
Host IP address                   : 192.168.0.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : 96348W3
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 2
Base MAC Address                  : 00:24:b2:2e:73:10
Ethernet PHY Type                 : Internal
Memory size in MB                 : 16
CMT Thread Number                 : 0

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 0
pTag1!=NULL
Code Address: 0x80010000, Entry Address: 0x801f6018
Decompression OK!
Entry at 0x801f6018
Closing network.
Starting program at 0x801f6018
Linux version 2.6.8.1 (root@BUILD_SERVER) (gcc version 3.4.2) #2 Fri Feb 29 17:52:52 CST 2008
Parallel flash device: name MX29LV320AB, id 0x22a8, size 4096KB
Total Flash size: 4096K with 71 sectors
96348W3 prom init
CPU revision is: 00029107
Determined physical RAM map:
 memory: 00fa0000 @ 00000000 (usable)
On node 0 totalpages: 4000
  DMA zone: 4000 pages, LIFO batch:1
  Normal zone: 0 pages, LIFO batch:1
  HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: root=31:0 ro noinitrd
brcm mips: enabling icache and dcache...
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB 2-way, linesize 16 bytes.
PID hash table entries: 64 (order 6: 512 bytes)
Using 120.000 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 13468k/16000k available (1639k kernel code, 2512k reserved, 300k data, 80k init, 0k highmem)
Calibrating delay loop... 239.20 BogoMIPS
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking for 'wait' instruction...  unavailable.
NET: Registered protocol family 16
MPI: No Card is in the PCMCIA slot
Can't analyze prologue code at 801a8894
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Initializing Cryptographic API
PPP generic driver version 2.4.2
NET: Registered protocol family 24
Using noop io scheduler
bcm963xx_mtd driver v1.0
kernel_addr == 0xbff39100 rootfs_addr == 0xbfc10100
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.
Creating 6 MTD partitions on "Physically mapped flash":
0x00010100-0x00339100 : "fs"
mtd: partition "fs" doesn't start on an erase block boundary -- force read-only
0x00010000-0x003e0000 : "tag+fs+kernel"
0x00000000-0x00010000 : "bootloader"
0x003f0000-0x00400000 : "nvram"
0x00000000-0x00010000 : "bootloader"
0x003e0000-0x003f0000 : "DPF_file"
brcmboard: brcm_board_init entry
SES: Button GPIO 0x8023 is enabled
SES: Button Interrupt 0x3 is enabled
SES: LED GPIO 0x8023 is enabled
bcm963xx_serial driver v2.0
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 1024)
klips_info:ipsec_init: KLIPS startup, Openswan KLIPS IPsec stack version: 2.4.6rc3
NET: Registered protocol family 15
klips_info:ipsec_alg_init: KLIPS alg v=0.8.1-0 (EALG_MAX=255, AALG_MAX=251)
klips_info:ipsec_alg_init: calling ipsec_alg_static_init()
ipsec_3des_init(alg_type=15 alg_id=3 name=3des): ret=0
KLIPS cryptoapi interface: alg_type=15 alg_id=12 name=aes keyminbits=128 keymaxbits=256, found(0)
KLIPS: lookup for ciphername=twofish: not found
KLIPS: lookup for ciphername=serpent: not found
KLIPS: lookup for ciphername=cast5: not found
KLIPS: lookup for ciphername=blowfish: not found
KLIPS cryptoapi interface: alg_type=15 alg_id=3 name=des3_ede keyminbits=192 keymaxbits=192, found(0)
KLIPS cryptoapi interface: alg_type=15 alg_id=2 name=des keyminbits=64 keymaxbits=64, found(0)
ip esp init: can't add protocol
ip_conntrack version 2.1 (125 buckets, 0 max) - 376 bytes per conntrack
ip_conntrack_h323: init
ip_nat_h323: initialize the module!
ip_tables: (C) 2000-2002 Netfilter core team
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
NET: Registered protocol family 8
NET: Registered protocol family 20
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 80k freed
init started:  BusyBox v1.00 (2007.12.20-13:11+0000) multi-call binary
init started:  BusyBox v1.00 (2007.12.20-13:11+0000) multi-call binary
Starting pid 48, console /dev/tts/0: '/usr/etc/rcS'
Algorithmics/MIPS FPU Emulator v1.5
bcm_enet: module license 'Proprietary' taints kernel.
Broadcom BCM6348B0 Ethernet Network Device v0.3 Jan 11 2008 17:18:52
Config Ethernet Switch Through SPI Slave Select 0
dgasp: kerSysRegisterDyingGaspHandler: eth0 registered
eth0: MAC Address: 00:24:B2:2E:73:10
insmod: cannot insert `/lib/modules/vnet.ko': Success (6): Success
blaadd: blaa_detect entry
adsl: adsl_init entry
netfilter PSD loaded - (c) astaro AG
ipt_random match loaded
device eth0 entered promiscuous mode
ap_name=wlan action=stop
SIOCGIFFLAGS: No such device
interface wl0 does not exist!
/usr/sbin/wlctl: wl driver adapter not found
/usr/sbin/wlctl: wl driver adapter not found
killall: wlctl: no process killed
killall: nas: no process killed
BcmAdsl_Initialize=0xC0080478, g_pFnNotifyCallback=0xC00992A4
AnnexCParam=0x7FFF7E68 AnnexAParam=0x00003987 adsl2=0x00000003
pSdramPHY=0xA0FFFFF8, 0x90001100 0xA0011901
AdslCoreHwReset: AdslOemDataAddr = 0xA0FFA4D4
AnnexCParam=0x7FFF7E68 AnnexAParam=0x00003987 adsl2=0x00000003
dgasp: kerSysRegisterDyingGaspHandler: dsl0 registered
ap_name=(null) action=start
br0: port 1(eth0) entering learning state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
/bin/echo GMT+0 > /etc/TZ
killall: udhcpd: no process killed
killall: upnpd: no process killed
killall: upnpd: no process killed
killall: dnrd: no process killed
Notice: caching turned off
Warning: Using /etc/hosts will be removed in a future version. Please use only the /etc/dnrd/master file or use -m off.
dnrd -a 192.168.0.1 -m hosts -c off --timeout=0 -b
Setting SSID "recipes4vegans"
Setting SSID "Guest"
Setting country code using abbreviation: "GB"
Receive: good packet 0, bad packet 0
Transmit: good packet 0, bad packet 0

Please press Enter to activate this console.
Starting pid 341, console /dev/tts/0: '/bin/sh'


BusyBox v1.00 (2007.12.20-13:11+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
  

And the bootloader (CFE):

CFE version 1.0.37-6.8 for BCM96348 (32bit,SP,BE)
Build Date: Fri Feb  6 03:12:58 UTC 2009 (root@localhost.localdomain)
Copyright (C) 2000-2005 Broadcom Corporation.

Boot Address 0xbfc00000

Initializing Arena.
Initializing Devices.
Parallel flash device: name MX29LV320AB, id 0x22a8, size 4096KB
CPU type 0x29107: 240MHz, Bus: 133MHz, Ref: 26MHz
Total memory: 16777216 bytes (16MB)

Total memory used by CFE:  0x80401000 - 0x80527770 (1206128)
Initialized Data:          0x8041EF50 - 0x80420350 (5120)
BSS Area:                  0x80420350 - 0x80425770 (21536)
Local Heap:                0x80425770 - 0x80525770 (1048576)
Stack Area:                0x80525770 - 0x80527770 (8192)
Text (code) segment:       0x80401000 - 0x8041EF48 (122696)
Boot area (physical):      0x00528000 - 0x00568000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                  : 192.168.0.1
Host IP address                   : 192.168.0.100
Gateway IP address                :
Run from flash/host (f/h)         : f
Default host run file name        : vmlinux
Default host flash file name      : bcm963xx_fs_kernel
Boot delay (0-9 seconds)          : 1
Board Id Name                     : 96348W3
Psi size in KB                    : 24
Number of MAC Addresses (1-32)    : 2
Base MAC Address                  : 00:24:b2:2e:73:10
Ethernet PHY Type                 : Internal
Memory size in MB                 : 16
CMT Thread Number                 : 0

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 1
CFE>
CFE> help
Available commands:

h                   Http Download
d                   Download
a                   Asmod
c                   Change booline parameters
b                   Change board parameters
reset               Reset the board
help                Obtain help for CFE commands

For more information about a command, enter 'help command-name'
*** command status = 0