Tuesday, October 26, 2010

OpenBSD/OCTEON (partially) boots up from Compact Flash

We don't have complete kernel base software FPU emulation code, therefore userland is very unstable for now, but multi user mode booted from Compact Flash anyway.
I had tried to implement CF driver as wdc(4), looks like there's the way to do that if it's acceptable to patch few codes on the generic wdc(4) code, but I had got unknown hangs, and I gave up it.
Then I implemented simple block device "octcf", just like FreeBSD/cavium's CF driver.
http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/octeon/dev/octcf.c?rev=1.1;content-type=text/plain

U-Boot 1.1.1  (Build time: Oct 23 2009 - 14:48:20)


CAPK-0100ND-CN50XX_1.8.1_294_V1.1.1


Hardware Monitor: W83792D initialized
CN3010_EVB_HS5 board revision major:0, minor:0, serial #: CAPK-0100ND
OCTEON CN5020-SCP pass 1.1, Core clock: 500 MHz, DDR clock: 265 MHz (530 Mhz data rate)
PAL rev: 0.00, MCU rev: 0.00, CPU voltage: 0.00
DRAM:  1024 MB
Flash:  8 MB
Clearing DRAM........ done
BIST check passed.
Starting PCI
PCI Status: PCI 32-bit
PCI BAR 0: 0x00000000, PCI BAR 1: Memory 0x00000000  PCI 0xf8000000
Net:   octeth0, octeth1, octeth2
 Bus 0 (CF Card): OK 


  ide 0: Model: CF 1GB Firm: 20060911 Ser#: TSS25013070129021908
            Type: Removable Hard Disk
            Capacity: 991.2 MB = 0.9 GB (2030112 x 512)
Octeon capk-0100nd# tftpboot
Interface 0 has 3 ports (RGMII)
*** Warning: no boot file name; using '0200A8C0.img'
Using octeth0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.2
Filename '0200A8C0.img'.
Load address: 0x20000000
Loading: octeth0: Up 1000 Mbps Full duplex (port  0)
#####################
done
Bytes transferred = 2991844 (2da6e4 hex), 3264 Kbytes/sec
Octeon capk-0100nd# bootoctlinux
ELF file is 64 bit
Attempting to allocate memory for ELF segment: addr: 0xffffffff81000000 (adjusted to: 0x0000000001000000), size 0x3224b0
Allocated memory for ELF segment: addr: 0xffffffff81000000, size 0x3224b0
Processing PHDR 0
  Loading 2888e0 bytes at ffffffff81000000
  Clearing 99bd0 bytes at ffffffff812888e0
## Loading Linux kernel with entry point: 0xffffffff81000000 ...
Bootloader: Done loading app on coremask: 0x1
Bank 0 = 0x0000000001324000   ->  0x0000000006000000
mem_layout[0] page 0x00000000000004C9 -> 0x0000000000001800
Initial setup done, switching console.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2010 OpenBSD. All rights reserved.  http://www.OpenBSD.org


OpenBSD 4.8-current (GENERIC) #61: Thu Oct 21 04:01:43 JST 2010
    root@openbsd.dokukino.com:/usr/src/sys/arch/octeon/compile/GENERIC
real mem = 80592896 (76MB)
avail mem = 79593472 (75MB)
mainbus0 at rootcpu0 at mainbus0: Cavium OCTEON CPU rev 0.1 500 MHz, Software FP emulation
cpu0: cache L1-I 32KB D 16KB 4 way, L2 128KB direct
clock0 at mainbus0: ticker on int5 using count register
obio0 at mainbus0
octcf0 at obio0 base 0x1d000800 irq 0:
octcf0: 1-sector PIO, CHS, 991MB, 2014 cyl, 16 head, 63 sec, 2030112 sectors
c: ns16550, no working fifo
com0: console
com1 at combus0 base 0x1180000000c00 irq 35: ns16550, no working fifo
/dev/ksyms: Symbol table not valid.
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
root device: octcf0c
swap device (default octcf0b): 
root on octcf0c swap on octcf0b dump on octcf0b
filesystem type 0 not known.. assuming ffs
WARNING: / was not properly unmounted
WARNING: No TOD clock, believing file system.
WARNING: CHECK AND RESET THE DATE!
Automatic boot in progress: starting file system checks.
/dev/roctcf0c: 16369 files, 229182 used, 270137 free (25 frags, 33764 blocks, 0.0% fragmentation)
/dev/roctcf0c: MARKING FILE SYSTEM CLEAN
setting tty flags
Illegal instruction (core dumped) 
pf enabled
starting network
Illegal instruction (core dumped) 
starting system logger
starting initial daemons:.
Illegal instruction (core dumped) 
checking quotas: done.
building ps databases: kvmkvm_mkdb: can't open /dev/ksyms
kvm_mkdb: can't open /bsd: No such file or directory
 dev.
clearing /tmp
starting pre-securelevel daemons:.
setting kernel security level: kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
Illegal instruction (core dumped) 
ssh-keygen: generating new DSA host key... Illegal instruction (core dumped) 
failed.
ssh-keygen: generating new ECDSA host key... Illegal instruction (core dumped) 
failed.
ssh-keygen: generating new RSA host key... Illegal instruction (core dumped) 
failed.
ssh-keygen: generating new RSA1 host key... Illegal instruction (core dumped) 
failed.
starting network daemons: sshdCould not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
 sendmail inetd.
starting local daemons:.
standard daemons: cron.
Illegal instruction (core dumped) 

No comments:

Post a Comment