Port-dreamcast archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

joy! ...but with some annoyances.

I just got my DC to boot a NetBSD kernel of my own compiling, with
serial console.

The "serial console" part is because I don't have a keyboard, so wscons
console doesn't work very well.

I had to hack the hardware a bit, though.  I also don't have a cable
with the special dreamcast connector, so I opened my DC up and soldered
wires to the serial port connector pins running to an 8P8C ("RJ45")
jack; I then removed a tiny amount of plastic to make a hole for the
wires to run through, thus getting the serial port out of the machine
on a connector I can actually do something with.  I then threw together
level shifters with an ICL232 (to convert between standard serial-port
levels and 0-and-+5V) and some discrete transistors and resistors (to
convert between the ICL232's 0-and-+5V and the DC's 0-and-+3.3V).

There are still problems.  Lots of things fail, usually with "Abort
trap", for no obvious reason.  It started with my first attempts, which
had /dev in the ISO image populated with only the four or five things
the build process left there:

root device: gdrom0a
dump device (default gdrom0b): 
file system (default generic): 
root on gdrom0a dumps on gdrom0b
root file system type: cd9660
warning: no /dev/console
init path (default /sbin/init): 
init: trying /sbin/init
init: Creating mfs /dev (479 blocks, 1280 inodes)
[1]   Abort trap              ${MKNOD} -m ${5:...
[1]   Abort trap              ${MKNOD} -m ${5:...
[1]   Abort trap              ${MKNOD} -m ${5:...
[1]   Abort trap              ${MKNOD} -m ${5:...
[1]   Abort trap              ${MKNOD} -m ${5:...

This repeated for as long as I had the patience to wait (meaning maybe
another hundred lines or so).

Then I burnt another disc whose image had a populated /dev; that one
failed too, but slightly less catastrophically.  Here's a transcript of
my investigation, cleaned up to remove things like ^Ms and error

root on gdrom0a dumps on gdrom0b
root file system type: cd9660
init path (default /sbin/init): 
init: trying /sbin/init
/etc/rc.subr: 627: Syntax error: Unterminated quoted string
Enter pathname of shell or RETURN for /bin/sh: 
-sh: hostname: error 14
Terminal type? [unknown] dumb
Terminal type is dumb.
We recommend creating a non-root account and using su(1) for root access.
# sed -n -e 627p < /etc/rc.subr
                                if [ -n "$pidfile" ]; then
sed: stdin: Bad address
# sed -n -e 620,635p < /etc/rc.subr
                                        # and run postcmd.
                        wait_for_pids $rc_pid
                        eval $_postcmd

                        if [ -z "$rc_pid" ]; then
                                if [ -n "$pidfile" ]; then
                                        echo 1>&2 \
                                    "${name} not running? (check $pidfile)."
                                        echo 1>&2 "${name} not running?"
                                exit 1
                        echo "Reloading ${name} config files."
sed: stdin: Bad address
# mount_mfs -s 8192 swap /mnt
# cd /mnt
# df
[1]   Abort trap              df
# mount
root_device on / type cd9660 (read-only, local)
mfs:22 on /mnt type mfs (synchronous, local)
# cd /mnt
# df .
[1]   Abort trap              df .
# sysctl -a | grep core
sysctl: warning: /var/run/dev.db: No such file or directory
kern.defcorename = %n.core
kern.coredump.setid.dump = 0
kern.coredump.setid.path = /var/crash/%n.core
kern.coredump.setid.owner = 0
kern.coredump.setid.group = 0
kern.coredump.setid.mode = 0600 (rw------- )
proc.curproc.corename = %n.core
proc.curproc.rlimit.coredumpsize.soft = unlimited
proc.curproc.rlimit.coredumpsize.hard = unlimited
# sysctl -w kern.coredump.setid.path=/mnt/%n.core
kern.coredump.setid.path: /var/crash/%n.core -> /mnt/%n.core
# df
[1]   Abort trap              df
# ls
# dmesg
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.0.1 (MOUSE) #1: Sun Oct 10 14:38:14 EDT 2010
SEGA Dreamcast
total memory = 16384 KB
avail memory = 14196 KB
timecounter: Timecounters tick every 10.000 msec
mainbus0 (root)
cpu0 at mainbus0: HITACHI SH4 199.599 MHz PCLOCK 49.900 MHz
cpu0: 8KB/32B direct-mapped Instruction cache.
cpu0: 16KB/32B direct-mapped Data cache.
cpu0: P0, U0, P3 write-through; P1 write-through
cpu0: full-associative 4 ITLB, 64 UTLB entries
cpu0: multiple virtual storage mode, SQ access: kernel, wired 61
shb0 at mainbus0
scif0 at shb0
scif0: console
maple0 at shb0: SH4 IRL 9
mapleA at maple0 port 0: Dreamcast Controller
mapleA1 at maple0 port 0 subunit 1: Visual Memory
mmem0 at mapleA1 function 1: Memory card
mmem0: 1 part, 512 bytes/block, 4 acc/write, 1 acc/read
mlcd0 at mapleA1 function 2: LCD display
mlcd0: 1 LCD, 192 bytes/block, 1 acc/write, horiz, norm white, upside-down
mmem0.0: 128 KB, blk 255 0, inf 255, fat 254 1, dir 253 13, icon 0, data 200
mlcd0.0: 48x32 display, 192 bytes
pvr0 at shb0: 640 x 480, 16bpp, NTSC, composite
wsdisplay0 at pvr0 kbdmux 1
wsmux1: connecting to wsdisplay0
gdrom0 at shb0: SH4 IRL 9
g2bus0 at shb0
g2rtc0 at g2bus0: time-of-day clock
aica0 at g2bus0: ARM7 Sound Processing Unit
aica0: interrupting at SH4 IRL 9
audio0 at aica0: half duplex
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "tmu_pclock_4" frequency 12475000 Hz quality 0
root device: gdrom0a
dump device (default gdrom0b): 
file system (default generic): 
root on gdrom0a dumps on gdrom0b
root file system type: cd9660
init path (default /sbin/init): 
init: trying /sbin/init

Any thoughts what could be going wrong?  I'm inclined to doubt it's
hardware; the machine runs games without apparent problem.

This was cross-compiled from i386; might it be better to cross-compile
from some other arch, such as alpha or sparc?  I'd expect i386 to be
the best-tested cross-build host, but that doesn't necessarily mean all
that much.

At this point I'm thinking my next step will be to kludge something
together so I can get both the OS's console and IP packets over the
same serial line; then I can give it some writable storage via NFS.
It'll be painfully slow, but should be good enough for the sort of
experiments I'm likely to be doing at this point.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index