Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Revive NetBSD/luna68k.
details: https://anonhg.NetBSD.org/src/rev/fbd0151287f9
branches: trunk
changeset: 767348:fbd0151287f9
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Jul 16 15:52:20 2011 +0000
description:
Revive NetBSD/luna68k.
Even after almost a lost decade since NetBSD/luna68k was
switched to using ELF format by default back in 2001,
actually only one fix (bus.h) is required for a GENERIC kernel itself
to get multiuser login: prompt on a real hardware. Hurrahhh!!!
Demonstrated with a working Xorg mono server on the NetBSD booth
at Open Source Conference 2011 Kansai @ Kyoto:
http://www.ospn.jp/osc2011-kyoto/
"Very impressed," commented by Tomoko YOSHIDA,
Program Committee Chair of the Conference,
and some other OMRON guys.
Special Thanks to Tadashi Okamura, for providing
a working SX-9100/DT "LUNA" for this mission.
Changes details:
sys/arch/luna68k/include/bus.h
- handle stride properly even on multi and region ops for MI spc(4)
- also fix stride handling of (currently unused) 2 and 4 byte ops
sys/arch/luna68k/conf/Makefile.luna68k
sys/arch/luna68k/conf/kern.ldscript.head
sys/arch/luna68k/conf/kern.ldscript.tail
- build a faked a.out kernel using elf2aout(8) tool
and a linker script derived from cats and shark
for the LUNA firmware that loads a.out binary directly
via network or from a UNIOS partition on a local disk
sys/arch/luna68k/dev/omrasops.c
sys/arch/luna68k/dev/omron_rfont.h
- use the original OMRON font derived from 4.4BSD-Lite/luna68k
rather than gallant19 which is used on Sun workstations
(XXX omrasops.c should be rewritten to use generic wsfont(4))
distrib/luna68k/*
distrib/utils/sysinst/arch/luna68k/*
etc/etc.luna68k/MAKEDEV.conf
etc/etc.luna68k/Makefile.inc
sys/arch/luna68k/conf/INSTALL
- build a ramdisk based INSTALL kernel with sysinst(8) for luna68k
- also build an installation iso image for luna68k
sys/arch/luna68k/conf/GENERIC
- enable SYSVSHM (and other SYSV*) options for Xorg server
More Xorg changes (which need some more cleanup) and
isiboot.c fixes will come soon.
diffstat:
distrib/luna68k/Makefile | 9 +
distrib/luna68k/cdroms/Makefile | 6 +
distrib/luna68k/cdroms/installcd/Makefile | 5 +
distrib/luna68k/instkernel/Makefile | 17 +
distrib/luna68k/ramdisk/Makefile | 36 +
distrib/luna68k/ramdisk/dot.profile | 87 ++
distrib/luna68k/ramdisk/list | 78 +
distrib/utils/sysinst/arch/luna68k/Makefile | 10 +
distrib/utils/sysinst/arch/luna68k/md.c | 198 ++++
distrib/utils/sysinst/arch/luna68k/md.h | 68 +
distrib/utils/sysinst/arch/luna68k/menus.md.en | 37 +
distrib/utils/sysinst/arch/luna68k/msg.md.en | 55 +
etc/etc.luna68k/MAKEDEV.conf | 9 +-
etc/etc.luna68k/Makefile.inc | 4 +-
sys/arch/luna68k/conf/GENERIC | 10 +-
sys/arch/luna68k/conf/INSTALL | 209 ++++
sys/arch/luna68k/conf/Makefile.luna68k | 18 +-
sys/arch/luna68k/conf/kern.ldscript.head | 15 +
sys/arch/luna68k/conf/kern.ldscript.tail | 34 +
sys/arch/luna68k/dev/omrasops.c | 14 +-
sys/arch/luna68k/dev/omron_rfont.h | 1039 ++++++++++++++++++++++++
sys/arch/luna68k/include/bus.h | 56 +-
22 files changed, 1977 insertions(+), 37 deletions(-)
diffs (truncated from 2303 to 300 lines):
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:20 tsutsui Exp $
+
+SUBDIR= ramdisk .WAIT instkernel .WAIT cdroms
+TARGETS+= release
+
+iso_image:
+ ${MAKEDIRTARGET} cdroms iso_image
+
+.include <bsd.subdir.mk>
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/cdroms/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/cdroms/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,6 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+
+SUBDIR= installcd
+TARGETS+= release iso_image
+
+.include <bsd.subdir.mk>
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/cdroms/installcd/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/cdroms/installcd/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+CDBASE= luna68kcd # gives ${CDBASE}.iso
+CDRELEASE= true # include $RELEASEDIR/$MACHINE
+
+.include "${.CURDIR}/../../../common/Makefile.bootcd"
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/instkernel/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/instkernel/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+
+.include <bsd.own.mk>
+.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
+
+RAMDISKDIR!= cd ${.CURDIR}/../ramdisk && ${PRINTOBJDIR}
+RAMDISK= ${RAMDISKDIR}/ramdisk.fs
+
+MDSETTARGETS= INSTALL ${RAMDISK} -
+MDSET_RELEASEDIR= binary/kernel
+
+MDSET_SUFFIXES.-= aout create-aout
+create-aout= ${ELF2AOUT} ${.TARGET:R} ${.TARGET}
+
+.include "${DISTRIBDIR}/common/Makefile.mdset"
+
+.include <bsd.prog.mk>
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/ramdisk/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/ramdisk/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+
+.include <bsd.own.mk>
+.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
+
+IMAGE= ramdisk.fs
+IMAGESIZE= 1600k
+MAKEFS_FLAGS= -f 15
+
+WARNS= 1
+DBG= -Os
+
+CRUNCHBIN= ramdiskbin
+LISTS= ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst.en
+MTREECONF= ${DISTRIBDIR}/common/mtree.common
+IMAGEENDIAN= be
+MAKEDEVTARGETS= ramdisk
+IMAGEDEPENDS= ${CRUNCHBIN} \
+ dot.profile \
+ ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
+ ${NETBSDSRCDIR}/etc/netconfig \
+ ${DISTRIBDIR}/common/protocols \
+ ${DISTRIBDIR}/common/services
+
+# Use stubs to eliminate some large stuff from libc
+HACKSRC= ${DISTRIBDIR}/utils/libhack
+.include "${HACKSRC}/Makefile.inc"
+${CRUNCHBIN}: libhack.o
+
+.include "${DISTRIBDIR}/common/Makefile.crunch"
+.include "${DISTRIBDIR}/common/Makefile.makedev"
+.include "${DISTRIBDIR}/common/Makefile.image"
+
+release:
+
+.include <bsd.prog.mk>
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/ramdisk/dot.profile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/ramdisk/dot.profile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,87 @@
+# $NetBSD: dot.profile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+#
+# Copyright (c) 1995 Jason R. Thorpe
+# Copyright (c) 1994 Christopher G. Demetriou
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed for the
+# NetBSD Project. See http://www.NetBSD.org/ for
+# information about NetBSD.
+# 4. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+ DONEPROFILE=YES
+
+ # set up some sane defaults
+ echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T'
+ stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 9600
+
+ # mount root read-write
+ mount -u /dev/md0a /
+
+ # get the terminal type
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ eval `tset -s -m ":?$TERM"`
+ if [ "X${TERM}" != X"unknown" ]; then
+ _forceloop="done"
+ fi
+ done
+
+ # Installing or upgrading?
+ _forceloop=""
+ while [ "X${_forceloop}" = X"" ]; do
+ echo -n '(I)nstall, (S)hell or (H)alt ? '
+ read _forceloop
+ case "$_forceloop" in
+ i*|I*)
+ /sysinst
+ ;;
+
+ s*|S*)
+ /bin/sh
+ ;;
+
+ h*|H*)
+ /sbin/halt
+ ;;
+
+ *)
+ _forceloop=""
+ ;;
+ esac
+ done
+fi
diff -r fe32f34bf476 -r fbd0151287f9 distrib/luna68k/ramdisk/list
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/luna68k/ramdisk/list Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,78 @@
+# $NetBSD: list,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+
+SRCDIRS bin sbin usr.bin usr.sbin
+
+PROG bin/cat
+PROG bin/chmod
+PROG bin/cp
+PROG bin/dd
+PROG bin/df
+PROG bin/ed
+PROG bin/ln
+PROG bin/ls
+PROG bin/mkdir
+PROG bin/mt
+PROG bin/mv
+PROG bin/pax usr/bin/tar
+PROG bin/pwd
+PROG bin/rcmd
+PROG bin/rcp
+PROG bin/rm
+PROG bin/sh
+PROG bin/stty
+PROG bin/sync
+
+PROG sbin/chown bin/chgrp
+PROG sbin/disklabel
+PROG sbin/dmesg
+PROG sbin/fsck
+PROG sbin/fsck_ffs
+PROG sbin/ifconfig
+PROG sbin/init
+PROG sbin/mknod
+PROG sbin/mount
+PROG sbin/mount_cd9660
+PROG sbin/mount_ffs
+PROG sbin/mount_msdos
+PROG sbin/mount_nfs
+PROG sbin/newfs sbin/mount_mfs
+PROG sbin/ping
+PROG sbin/reboot sbin/halt
+PROG sbin/restore sbin/rrestore
+PROG sbin/route
+PROG sbin/shutdown
+PROG sbin/slattach
+PROG sbin/swapctl sbin/swapon
+PROG sbin/umount
+
+PROG usr/bin/ftp
+PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
+PROG usr/bin/more
+PROG usr/bin/sed
+PROG usr/bin/tset
+
+PROG usr/sbin/chroot
+
+# init invokes the shell as -sh
+ARGVLN sh -sh
+
+SPECIAL ed srcdir distrib/utils/x_ed
+SPECIAL gzip srcdir distrib/utils/x_gzip
+SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
+SPECIAL more srcdir distrib/utils/more
+SPECIAL ping srcdir distrib/utils/x_ping
+SPECIAL route srcdir distrib/utils/x_route
+SPECIAL umount srcdir distrib/utils/x_umount
+
+LIBS libhack.o -ledit -lutil -lcurses -lterminfo -lrmt -ll -lm -lz -lprop
+
+# various files that we need in /etc for the install
+COPY ${NETBSDSRCDIR}/etc/group etc/group
+COPY ${NETBSDSRCDIR}/etc/master.passwd etc/master.passwd
+COPY ${NETBSDSRCDIR}/etc/netconfig etc/netconfig
+COPY ${DISTRIBDIR}/common/protocols etc/protocols
+COPY ${DISTRIBDIR}/common/services etc/services
+
+# and the boot script
+COPY ${CURDIR}/dot.profile .profile
+MTREE ./.profile type=file uname=root gname=wheel mode=0644
diff -r fe32f34bf476 -r fbd0151287f9 distrib/utils/sysinst/arch/luna68k/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/luna68k/Makefile Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+#
+# Makefile for luna68k
+#
+
+MD_OPTIONS= AOUT2ELF # Who will update from NetBSD/luna68k 1.5!?
+
+LANGUAGES= # won't bother to prepare translations
+
+.include "../../Makefile.inc"
diff -r fe32f34bf476 -r fbd0151287f9 distrib/utils/sysinst/arch/luna68k/md.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/utils/sysinst/arch/luna68k/md.c Sat Jul 16 15:52:20 2011 +0000
@@ -0,0 +1,198 @@
+/* $NetBSD: md.c,v 1.1 2011/07/16 15:52:21 tsutsui Exp $ */
+
+/*
+ * Copyright 1997 Piermont Information Systems Inc.
+ * All rights reserved.
+ *
+ * Based on code written by Philip A. Nelson for Piermont Information
+ * Systems Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
Home |
Main Index |
Thread Index |
Old Index