OpenWrt Forum Archive

Topic: Openwrt Kamikaze on new hardware

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I've recently got my hands on a ADM5120 based router from Topex (a small manufacturer from Romania), and I would like to install Kamikaze (v7.09) on it.

Here are some specs from it :

cat /proc/cpuinfo 

system type             : BYTTON - TOPEX everything connects
processor               : 0
cpu model               : MIPS 4Kc V0.11
BogoMIPS                : 174.48
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes
VCED exceptions         : not available
VCEI exceptions         : not available
00:00.0 Host bridge: Linksys Unknown device 5120
        Flags: bus master, slow devsel, latency 128
        [virtual] Memory at f0000000 (32-bit, non-prefetchable) [size=256M]
        I/O ports at <unassigned>

00:02.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
        Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
        Flags: bus master, medium devsel, latency 128, IRQ 6
        I/O ports at 11500000 [size=32]
        Capabilities: [80] Power Management version 2

00:02.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 62) (prog-if 00 [UHCI])
        Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
        Flags: bus master, medium devsel, latency 128, IRQ 6
        I/O ports at 11500020 [size=32]
        Capabilities: [80] Power Management version 2


00:02.2 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 65) (prog-if 20 [EHCI])
        Subsystem: VIA Technologies, Inc. USB 2.0
        Flags: bus master, medium devsel, latency 128, IRQ 6
        Memory at 11400000 (32-bit, non-prefetchable) [size=256]
        Capabilities: [80] Power Management version 2

00:03.0 Ethernet controller: Atheros Communications, Inc. Unknown device 001a (rev 01)
        Subsystem: Atheros Communications, Inc. Unknown device 2052
        Flags: bus master, medium devsel, latency 128, IRQ 7
        Memory at 11410000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
 dmesg

CPU revision is: 0001800b
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Linux version 2.4.32 (infineon@localhost.localdomain) (gcc version 3.4.4) #649 Mon Nov 19 10:37:00 UTC 2007
System has PCI BIOS
Determined physical RAM map:
 memory: 01b1f000 @ 004e1000 (usable)
Initial ramdisk at: 0x80188000 (3293184 bytes)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: 
CPU clock: 175MHz
Using 87.500 MHz high precision timer.
Calibrating delay loop... 174.48 BogoMIPS
Memory: 27408k/27772k available (1362k kernel code, 364k reserved, 3308k data, 84k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction...  available.
POSIX conformance testing by UNIFIX
Autoconfig PCI channel 0x80187990
Scanning bus 00, I/O 0x11500000:0x115ffff0, Mem 0x11400000:0x11500000
00:00.0 Class 0600: 1317:5120
        Mem unavailable -- skipping
        I/O unavailable -- skipping
00:02.0 Class 0c03: 1106:3038 (rev 62)
        I/O at 0x11500000 [size=0x20]
00:02.1 Class 0c03: 1106:3038 (rev 62)
        I/O at 0x11500020 [size=0x20]
00:02.2 Class 0c03: 1106:3104 (rev 65)
        Mem at 0x11400000 [size=0x100]
00:03.0 Class 0200: 168c:001a (rev 01)
        Mem at 0x11410000 [size=0x10000]
fixup resource
fixup host controller
am5120 fix up
fixup resource
fixup resource
fixup resource
fixup resource
pcibios_fixup
fixup IRQ
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
pty: 256 Unix98 ptys configured
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ADM5120 LAN MAC: 00:50:C2:XX:XX:XX
ADM5120 WAN MAC: 00:50:C2:YY:YY:YY
ADM5120 ETH0 wt0=50000041 wt1=E63E40C2
ADM5120 ETH0 wt0=50000041 wt1=E63E40C2
ADM5120 ETH1 wt0=50000049 wt1=E73E40C2
adm5120sw: initialized with 2 ports.
MX29LV320B flash device: 400000 at 1fc00000
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Creating 3 MTD partitions on "MX29LV320B flash device":
0x00000000-0x00010000 : "boot"
0x00010000-0x00020000 : "conf"
0x00020000-0x00400000 : "root"
MX29LV320B flash device initialized
MX29LV320BS flash device: 400000 at 10000000
MX29LV320BS pass ioremap
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
MX29LV320BS:-2128665504
Creating 1 MTD partitions on "MX29LV320BS flash device":
0x00000000-0x00400000 : "apps"
MX29LV320BS flash device initialized
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (5953 buckets, 5953 max) - 360 bytes per conntrack
ip_tables: (C) 2000-2002 Netfilter core team
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
RAMDISK: cramfs filesystem found at block 0
RAMDISK: Loading 3216 blocks [1 disk] into ram disk... done.
Freeing initrd memory: 3216k freed
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing prom memory: 0kb freed
Freeing unused kernel memory: 84k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
Watchdog: INIT
Watchdog:WDTIME 1
ADM5120 MAC0 st0=50000041 st1=XXXXXXC2
ADM5120 MAC1 st0=50000049 st1=YYYYYYC2
ADM5120 MAC2 st0=00000002 st1=FF010000
ADM5120 VALN GI=0000504F GII=00000000
ADM5120 Gl_St=00000400 PHY_St=12325232 Port_St=00000000
ADM5120 SW_conf=422A1010 CPUp_conf=003F7E02 Empty_reg=0000016B
ADM5120 Port_conf0=003F3F3F Port_conf1_St=03F00000 Port_conf2=0000010C
ADM5120 ETH0 wt0=50000041 wt1=XXXXXXC2
ADM5120 ETH0 wt0=50000041 wt1=XXXXXXC2
ADM5120 ETH1 wt0=50000049 wt1=YYYYYYC2
device eth0 entered promiscuous mode
br0: port 1(eth0) entering learning state
Watchdog:Open
Init
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
ehci_hcd 00:02.2: PCI device 1106:3104
ehci_hcd 00:02.2: irq 6, pci mem b1400000
usb.c: new USB bus registered, assigned bus number 1
ehci_hcd 00:02.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
uhci.c: USB Universal Host Controller Interface driver v1.1
uhci.c: USB UHCI at I/O 0x11500000, IRQ 6
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
uhci.c: USB UHCI at I/O 0x11500020, IRQ 6
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 2 ports detected
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
GRE over IPv4 tunneling driver
br0: port 1(eth0) entering forwarding state
br0: topology change detected, propagating
hub.c: new USB device 00:02.0-1, assigned address 2
usbserial.c: Generic converter detected
usbserial.c: Generic converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: Generic converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
usbserial.c: Generic converter now attached to ttyUSB2 (or usb/tts/2 for devfs)
CSLIP: code copyright 1989 Regents of the University of California
PPP generic driver version 2.4.2
MPPE/MPPC encryption/compression module registered

you can check this howto to see if you can netboot the device and then try to install openwrt on it

This implies having a RS232 port. But this board doesn't have one, and I don't know where to find the pins on the board.
I have access to the shell on this router (root). Is there a way to reflash from command line ?

yes you can, but you may brick the device in case the upgrade does not work.  you can issue a:

cat /proc/mtd

and see if you can mount the kernel partition ... it's better to find a way for a serial or a jtag access in case things go wrong ...

Correct me if i'm wrong, but from the dmesg it seems this board has 2 flash devices :

MX29LV320B flash device: 400000 at 1fc00000
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Creating 3 MTD partitions on "MX29LV320B flash device":
0x00000000-0x00010000 : "boot"
0x00010000-0x00020000 : "conf"
0x00020000-0x00400000 : "root"
MX29LV320B flash device initialized
MX29LV320BS flash device: 400000 at 10000000
MX29LV320BS pass ioremap
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
MX29LV320BS:-2128665504
Creating 1 MTD partitions on "MX29LV320BS flash device":
0x00000000-0x00400000 : "apps"
MX29LV320BS flash device initialized

How can I access the "boot" partition from the first flash ?

The discussion might have continued from here.