Source-Changes-HG archive

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

[src/trunk]: src The results of my cats NWDO hacking.



details:   https://anonhg.NetBSD.org/src/rev/afd49259af82
branches:  trunk
changeset: 525448:afd49259af82
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Apr 11 16:33:58 2002 +0000

description:
The results of my cats NWDO hacking.

This was tested using a custom INSTALL kernel. The current one is >4Mb
which the cats firmware can't currently boot. We need to decide what
needs to be removed from INSTALL.

diffstat:

 distrib/cats/Makefile                     |  15 +++++
 distrib/cats/instkernel/Makefile          |  48 ++++++++++++++++++
 distrib/cats/ramdisk/Makefile             |  39 ++++++++++++++
 distrib/cats/ramdisk/disktab.preinstall   |  31 +++++++++++
 distrib/cats/ramdisk/dot.hdprofile        |  62 +++++++++++++++++++++++
 distrib/cats/ramdisk/dot.profile          |  64 ++++++++++++++++++++++++
 distrib/cats/ramdisk/list                 |  81 +++++++++++++++++++++++++++++++
 distrib/cats/ramdisk/termcap.mini         |  61 +++++++++++++++++++++++
 distrib/utils/sysinst/arch/cats/Makefile  |   3 +-
 distrib/utils/sysinst/arch/cats/md.c      |   3 +-
 distrib/utils/sysinst/arch/cats/md.h      |   5 +-
 distrib/utils/sysinst/arch/cats/msg.md.en |  10 +++-
 distrib/utils/sysinst/arch/cats/msg.md.fr |  10 +++-
 etc/etc.cats/Makefile.inc                 |   6 +-
 sys/arch/cats/conf/Makefile.cats.inc      |   8 +-
 15 files changed, 434 insertions(+), 12 deletions(-)

diffs (truncated from 570 to 300 lines):

diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/Makefile     Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1 2002/04/11 16:33:58 skrll Exp $
+
+.include <bsd.own.mk>
+
+ITARGET=       ${RELEASEDIR}/installation
+IINST=         ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE}
+
+SUBDIR=                ramdisk .WAIT instkernel
+
+.include <bsd.subdir.mk>
+
+INSTOBJ!=      cd ${.CURDIR}/instkernel && ${PRINTOBJDIR}
+
+release: check_RELEASEDIR
+       ${IINST} ${INSTOBJ}/netbsd.${kern}.gz ${ITARGET}/
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/instkernel/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/instkernel/Makefile  Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,48 @@
+#      $NetBSD: Makefile,v 1.1 2002/04/11 16:33:59 skrll Exp $
+
+.include <bsd.own.mk>
+.include "${_SRC_TOP_}/distrib/Makefile.inc"
+
+.include <bsd.kernobj.mk>
+
+CLEANFILES=    netbsd.tmp netbsd.tmp.gz
+
+RAMDISKS=      RAMDISK ramdisk
+
+.for V F in ${RAMDISKS}
+${V}DIR!=      cd ${.CURDIR}/../${F} && ${PRINTOBJDIR}
+${V}=          ${${V}DIR}/${F}.fs
+.endfor
+
+#      create netbsd.*.gz targets
+#
+#      TARGETS is a list of:
+#              KERNEL_name     fs-image
+#
+TARGETS=       INSTALL         ${RAMDISK}
+
+.for K R in ${TARGETS}
+KERNELS+=      netbsd.${K}.gz
+KERNELSYMS+=   netbsd.${K}.symbols
+CLEANFILES+=   netbsd.${K}.gz netbsd.${K}.symbols
+netbsd.${K}.gz: .NOTMAIN ${KERNOBJDIR}/${K}/netbsd ${R}
+       @echo "Populating ${.TARGET} with ${R}"
+       cp ${KERNOBJDIR}/${K}/netbsd netbsd.tmp
+       ${MDSETIMAGE} -v netbsd.tmp ${R}
+       ${NM} netbsd.tmp > netbsd.${K}.symbols
+       ${STRIP} netbsd.tmp
+       OBJCOPY=${OBJCOPY:Q} SIZE=${SIZE:Q} \
+           ${_SRC_TOP_}/sys/arch/arm/conf/elf2aout.sh netbsd.tmp netbsd.tmp
+       gzip -9 netbsd.tmp
+       mv netbsd.tmp.gz ${.TARGET}
+.endfor
+
+#      do the work
+#
+realall: ${KERNELS}
+
+release:
+       -mkdir -p ${RELEASEDIR}/binary/kernel
+       cp -p ${KERNELS} ${KERNELSYMS} ${RELEASEDIR}/binary/kernel
+
+.include <bsd.prog.mk>
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/ramdisk/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/ramdisk/Makefile     Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,39 @@
+#      $NetBSD: Makefile,v 1.1 2002/04/11 16:33:59 skrll Exp $
+
+.include <bsd.own.mk>
+.include "${_SRC_TOP_}/distrib/Makefile.inc"
+
+IMAGE=         ramdisk.fs
+IMAGESIZE=     1900k
+MAKEFS_FLAGS=  -f 10
+
+WARNS=         1
+
+CRUNCHBIN=     ramdiskbin
+LISTS=         ${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
+MTREECONF=     ${DISTRIBDIR}/common/mtree.common
+IMAGEENDIAN=   le
+MAKEDEVTARGETS=        ramdisk
+PARSELISTENV=  PWD_MKDB=${PWD_MKDB:Q}
+IMAGEDEPENDS=  ${CRUNCHBIN} \
+               disktab.preinstall dot.hdprofile dot.profile termcap.vt100 \
+               ${_SRC_TOP_}/etc/group ${_SRC_TOP_}/etc/master.passwd \
+               ${_SRC_TOP_}/etc/netconfig ${_SRC_TOP_}/etc/protocols \
+               ${_SRC_TOP_}/etc/services
+
+# Use stubs to eliminate some large stuff from libc
+HACKSRC=       ${DISTRIBDIR}/utils/libhack
+.include       "${HACKSRC}/Makefile.inc"
+${CRUNCHBIN}:  libhack.o
+
+
+realall: ${IMAGE}
+
+release:
+
+
+.include "${DISTRIBDIR}/common/Makefile.crunch"
+.include "${DISTRIBDIR}/common/Makefile.makedev"
+.include "${DISTRIBDIR}/common/Makefile.image"
+
+.include <bsd.prog.mk>
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/ramdisk/disktab.preinstall
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/ramdisk/disktab.preinstall   Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,31 @@
+#      $NetBSD: disktab.preinstall,v 1.1 2002/04/11 16:33:59 skrll Exp $
+#
+# Disk geometry and partition layout tables. 
+# Key:
+#      dt      controller type
+#      ty      type of disk (fixed, removeable, simulated)
+#      d[0-4]  drive-type-dependent parameters
+#      ns      #sectors/track
+#      nt      #tracks/cylinder
+#      nc      #cylinders/disk
+#      sc      #sectors/cylinder, nc*nt default
+#      su      #sectors/unit, sc*nc default
+#      se      sector size, DEV_BSIZE default
+#      rm      rpm, 3600 default
+#      sf      supports bad144-style bad sector forwarding
+#      sk      sector skew per track, default 0
+#      cs      sector skew per cylinder, default 0
+#      hs      headswitch time, default 0
+#      ts      one-cylinder seek time, default 0
+#      il      sector interleave (n:1), 1 default
+#      bs      boot block size, default BBSIZE
+#      sb      superblock size, default SBSIZE
+#      o[a-h]  partition offsets in sectors
+#      p[a-h]  partition sizes in sectors
+#      b[a-h]  partition block sizes in bytes
+#      f[a-h]  partition fragment sizes in bytes
+#      t[a-h]  partition types (filesystem, swap, etc)
+#
+# All partition sizes reserve space for bad sector tables.
+# (5 cylinders needed for maintenance + replacement sectors)
+#
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/ramdisk/dot.hdprofile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/ramdisk/dot.hdprofile        Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,62 @@
+# $NetBSD: dot.hdprofile,v 1.1 2002/04/11 16:33:59 skrll Exp $
+#
+# 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=pc3
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+       export DONEPROFILE
+
+       echo "Checking filesystems..."
+       fsck -y
+
+       echo "Mounting root..."
+       mount -u /
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+       echo ''
+
+       TERMCAP=/.termcap ; export TERMCAP
+
+       [ -x /sysinst ] && /sysinst
+fi
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/ramdisk/dot.profile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/ramdisk/dot.profile  Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,64 @@
+# $NetBSD: dot.profile,v 1.1 2002/04/11 16:33:59 skrll Exp $
+#
+# Copyright (c) 1997 Perry E. Metzger
+# 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=pc3
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+ROOTDEV=/dev/md0a
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+       export DONEPROFILE
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
+       echo ''
+
+       # mount the ramdisk read write
+       mount -u $ROOTDEV /
+
+       # mount the kern_fs so that we can examine the dmesg state
+       mount -t kernfs /kern /kern
+
+       # run the installation or upgrade script.
+       sysinst
+fi
diff -r fd6f0de7c1ec -r afd49259af82 distrib/cats/ramdisk/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/cats/ramdisk/list Thu Apr 11 16:33:58 2002 +0000
@@ -0,0 +1,81 @@
+#      $NetBSD: list,v 1.1 2002/04/11 16:33:59 skrll Exp $
+
+SRCDIRS        bin sbin usr.bin/less usr.bin usr.sbin gnu/usr.bin
+
+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



Home | Main Index | Thread Index | Old Index