FreeBSD MIPS and RB133c

Erik Moe ehmoeok at gmail.com
Tue May 10 14:58:47 UTC 2011


On May 9, 2011, at 9:43 AM, Luiz Otavio O Souza wrote:

> 
> On May 8, 2011, at 12:28 PM, Erik Moe wrote:
> 
>> Hello,
>> 
>> I'd like to get FreeBSD running on my Router Board 133c.  I'm new to MIPS and I'm running into a little problem and I was hoping that somebody could point me in the right direction.  I pulled the latest sources from head and I can get the kernel to boot, but after it boots FreeBSD is unable to acquire an IP address.
>> 
>> RouterBOOT booter 2.18
>> 
>> RouterBoard 133C3
>> 
>> CPU frequency: 175 MHz
>> Memory size:  16 MB
>> 
>> Press any key within 6 seconds to enter setup......
>> trying dhcp protocol... OK
>> resolved mac address 00:0C:29:29:27:66
>> Gateway: 192.168.11.1
>> transfer started ........................ transfer ok, time=4.94s
>> setting up elf image... OK
>> jumping to kernel code
>> entry: mips_init()
>> Cache info:
>> picache_stride    = 4096
>> picache_loopcount = 2
>> pdcache_stride    = 4096
>> pdcache_loopcount = 2
>> cpu0: MIPS Technologies processor v11.128
>> MMU: Standard TLB, 16 entries
>> L1 i-cache: 2 ways of 256 sets, 16 bytes per line
>> L1 d-cache: 2 ways of 256 sets, 16 bytes per line
>> Config1=0x1e994c8a<WatchRegs,EJTAG>
>> Physical memory chunk(s):
>> 0x29a000 - 0xffffff, 14049280 bytes (3430 pages)
>> Maxmem is 0x1000000
>> KDB: debugger backends: ddb
>> KDB: current backend: ddb
>> Copyright (c) 1992-2011 The FreeBSD Project.
>> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
>>       The Regents of the University of California. All rights reserved.
>> FreeBSD is a registered trademark of The FreeBSD Foundation.
>> FreeBSD 9.0-CURRENT #7 r221418M: Sat May  7 15:16:10 CDT 2011
>>   root at freebsd.localdomain:/usr/home/emoe/obj/mips/mips.mipsel/usr/home/emoe/svn/mips/sys/ADM5120 mips
>> real memory  = 16777216 (16384K bytes)
>> Physical memory chunk(s):
>> 0x00326000 - 0x00f8dfff, 13008896 bytes (3176 pages)
>> avail memory = 12754944 (12MB)
>> null: <null device, zero device>
>> nfslock: pseudo-device
>> mem: <memory>
>> nexus0: <MIPS32 root nexus>
>> clock0: <Generic MIPS32 ticker> on nexus0
>> Timecounter "MIPS32" frequency 175000000 Hz quality 800
>> Event timer "MIPS32" frequency 175000000 Hz quality 800
>> obio0 at mem 0-0x1ffffffe on nexus0
>> admsw0: <ADM5120 Switch Engine> on obio0
>> admsw0: ADM5120 Switch Engine, 6 ports
>> admsw0: base Ethernet address 00:0c:42:07:b2:4e
>> admsw0: Ethernet address: 00:0c:42:07:b2:4e
>> admsw1: Ethernet address: 00:0c:42:07:b2:4f
>> admsw2: Ethernet address: 00:0c:42:07:b2:50
>> admsw3: Ethernet address: 00:0c:42:07:b2:51
>> admsw4: Ethernet address: 00:0c:42:07:b2:52
>> admsw5: Ethernet address: 00:0c:42:07:b2:53
>> uart0: <adm5120_uart, channel A> on obio0
>> uart0: fast interrupt
>> uart0: console (115200,n,8,1)
>> Device configuration finished.
>> Timecounters tick every 10.000 msec
>> bootpc_init: wired to interface 'admsw0'
>> Sending DHCP Discover packet from interface admsw0 (00:0c:42:07:b2:4e)
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> DHCP/BOOTP timeout for server 255.255.255.255
>> 
>> The RB133c has only one ethernet port, which I assume is admsw0, though the mac address that is specified (00:0c:42:07:b2:4e) doesn't match the mac address that shows up in RouterBoot (which is the same one that I used to load the kernel).
>> 
>> your choice: i - board info
>> 
>> Board Info:
>> 
>>       Board type: 133C3
>>    Serial number: 16EC01C3C23F
>> Firmware version: 2.18
>>    CPU frequency: 175 MHz
>>      Memory size: 16 MB
>> eth1 MAC address: 00:0C:42:1E:9A:88
>> 
>> Using tcpdump, after RouterBoot finishes loading the kernel, I see one DHCP request coming from the RouterBoard using mac 00:0c:42:1e:9a:88 and then there is nothing after that.  I don't see any packets at all.
>> 
>>   192.168.11.2.23224 > 192.168.11.15.61904: [udp sum ok] UDP, length 21
>> 09:24:05.839921 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 32)
>>   192.168.11.15.61904 > 192.168.11.2.23224: [udp sum ok] UDP, length 4
>> 09:24:05.840980 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 328)
>>   0.0.0.0.bootpc > broadcasthost.bootps: [udp sum ok] BOOTP/DHCP, Request from 00:0c:42:1e:9a:88 (oui Unknown), length 300, xid 0xd8aaeeff, Flags [none] (0x0000)
>> 	  Client-Ethernet-Address 00:0c:42:1e:9a:88 (oui Unknown)
>> 	  Vendor-rfc1048 Extensions
>> 	    Magic Cookie 0x63825363
>> 	    DHCP-Message Option 53, length 1: Release
>> 	    Client-ID Option 61, length 7: ether 00:0c:42:1e:9a:88
>> 	    Vendor-Class Option 60, length 9: "Mikroboot"
>> 	    Parameter-Request Option 55, length 2: 
>> 	      Subnet-Mask, Default-Gateway
>> 	    END Option 255, length 0
>> 	    PAD Option 0, length 0, occurs 32
>> 
>> Thanks,
>> Erik
>> 
> Unfortunately the mac address is hardcoded for this driver (in sys/mips/adm5120/if_admsw.c):
> 
> 389         /* XXXMIPS: fix it */
> 390         enaddr[0] = 0x00;
> 391         enaddr[1] = 0x0C;
> 392         enaddr[2] = 0x42;
> 393         enaddr[3] = 0x07;
> 394         enaddr[4] = 0xB2;
> 395         enaddr[5] = 0x4E;
> 
> 
> Luiz
> 


That's not the main issue I have, the fact that the mac address is hardcoded.  The issue is once the RouterBoot loads and boots the kernel, I'm not seeing the kernel sending any DHCP/BOOTB requests down the wire, even though from the console log it is acting like it is.


More information about the freebsd-mips mailing list