Source-Changes-HG archive

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

[src/trunk]: src/distrib/sun2/ramdisk convert to be closer to the other distr...



details:   https://anonhg.NetBSD.org/src/rev/6d9fe180285a
branches:  trunk
changeset: 526141:6d9fe180285a
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Apr 26 03:15:15 2002 +0000

description:
convert to be closer to the other distrib dirs:
- take advantage of Makefile.mdset
- use list instead of ramdisk.list, and remove special srcdirs for init
  and dd since they understand -DSMALLPROG
- use full-path style specfile mtree.conf instead of
  old-style specfile ../common/ramdisk.tree
- ensure IMAGEDEPENDS is in sync with list
(xxx; untested :)

diffstat:

 distrib/sun2/ramdisk/Makefile     |   47 ++++-----------
 distrib/sun2/ramdisk/list         |  107 ++++++++++++++++++++++++++++++++++++
 distrib/sun2/ramdisk/mtree.conf   |   14 ++++
 distrib/sun2/ramdisk/ramdisk.list |  110 --------------------------------------
 4 files changed, 135 insertions(+), 143 deletions(-)

diffs (truncated from 322 to 300 lines):

diff -r 58a44a7bceee -r 6d9fe180285a distrib/sun2/ramdisk/Makefile
--- a/distrib/sun2/ramdisk/Makefile     Fri Apr 26 02:56:45 2002 +0000
+++ b/distrib/sun2/ramdisk/Makefile     Fri Apr 26 03:15:15 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2002/04/22 21:17:58 fredette Exp $
+#      $NetBSD: Makefile,v 1.11 2002/04/26 03:15:15 lukem Exp $
 
 TOP=           ${.CURDIR}/..
 
@@ -6,8 +6,7 @@
 .include <bsd.kernobj.mk>
 .include "${_SRC_TOP_}/distrib/Makefile.inc"
 
-IMG=           ramdisk
-IMAGE=         ${IMG}.fs
+IMAGE=         ramdisk.fs
 IMAGESIZE=     400k
 MAKEFS_FLAGS=  -f 15 -o minfree=0,optimization=space,density=4096,cpg=20
 
@@ -15,47 +14,29 @@
 DBG=           -Os
 
 CRUNCHBIN=     rd_bin
-LISTS=         ${.CURDIR}/${IMG}.list
+LISTS=         ${.CURDIR}/list
+MTREECONF=     ${.CURDIR}/mtree.conf
+IMAGEENDIAN=   be
 PARSELISTENV=  TOPDIR=${TOP}
-MTREECONF=     ${TOP}/common/${IMG}.tree
-IMAGEENDIAN=   be
 MAKEDEVTARGETS=        __ramdisk std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0
 IMAGEDEPENDS=  ${CRUNCHBIN} \
-               ${_SRC_TOP_}/etc/group ${_SRC_TOP_}/etc/master.passwd \
-               ${_SRC_TOP_}/etc/netconfig ${_SRC_TOP_}/etc/protocols \
-               ${_SRC_TOP_}/etc/services
+               ${TOPDIR}/common/rd.disktab ${TOPDIR}/common/rd.fstab \
+               ${TOPDIR}/common/rd.passwd ${TOPDIR}/common/rd.protocols \
+               ${TOPDIR}/common/rd.services ${TOPDIR}/common/rd.sshrc \
+               ${TOPDIR}/common/rd.welcome \
+               ${_SRC_TOP_}/etc/netconfig
+
+MDSETTARGETS=  RAMDISK ramdisk.fs -
+MDSETDIR=      binary/kernel
 
 # Use stubs to eliminate some large stuff from libc
 HACKSRC=       ${DISTRIBDIR}/utils/libhack
 .include       "${HACKSRC}/Makefile.inc"
 ${CRUNCHBIN}:  libhack.o
 
-MDSETIMAGE?=   mdsetimage
-KERNEL=                ${KERNOBJDIR}/RAMDISK/netbsd
-KERNELS=       netbsd.RAMDISK
-CLEANFILES+=   ${KERNELS}
-
-netbsd.RAMDISK : ${IMAGE} ${KERNEL}
-       cp ${KERNEL} netbsd-tmp
-       ${MDSETIMAGE} -v netbsd-tmp ${IMAGE}
-       -mv -f netbsd-tmp $@
-
-realall: ${IMAGE} ${KERNELS}
-
-.if !defined(RELEASEDIR)
-release:
-       @echo setenv RELEASEDIR before doing that!
-       @false
-.else  # RELEASEDIR
-release: $(KERNELS)
-.for x in ${KERNELS}
-       gzip -c -9 < ${x} > \
-        ${RELEASEDIR}/binary/kernel/${x}.gz
-.endfor # KERNELS
-.endif # RELEASEDIR
-
 .include "${DISTRIBDIR}/common/Makefile.crunch"
 .include "${DISTRIBDIR}/common/Makefile.makedev"
 .include "${DISTRIBDIR}/common/Makefile.image"
+.include "${DISTRIBDIR}/common/Makefile.mdset"
 
 .include <bsd.prog.mk>
diff -r 58a44a7bceee -r 6d9fe180285a distrib/sun2/ramdisk/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sun2/ramdisk/list Fri Apr 26 03:15:15 2002 +0000
@@ -0,0 +1,107 @@
+#
+#      $NetBSD: list,v 1.1 2002/04/26 03:15:16 lukem Exp $
+#
+# ramdisk/list - packing list for the ramdisk.
+#
+# The ramdisk root has to stay small enough so the kernel
+# can be loaded in less than one megabyte of ram, including
+# uninitialized data (bss).  Otherwise it will not work on
+# the Sun2/50.  This is not too hard, because the ONLY
+# tools needed in this root are those that one might use
+# to initialize the disk label and copy a miniroot image
+# into the swap partition.  Everything else is done after
+# the machine is rebooted from the miniroot.
+#
+# Note that the "ln" directives below are not really about
+# filesystem links, but rather the ability of the resulting
+# crunched binary to select the right program when argv[0]
+# matches the names on right of the "ln prog" directive.
+# For example, the shell can be run with argv[0]="-sh"
+# (login shell convention) but no such file will exist.
+# Similarly, one may want to run "init" as "oinit"...
+#
+# Notes about what is included (or not) and why:
+#
+# Include mknod incase I forgot some device nodes...
+# Support copying miniroot from NFS, TFTP, or CDROM.
+# Need mount_ffs, mount_ufs to remount the ramdisk.
+#
+# Might use cat to look at files (it's small anyway).
+# Need for copying miniroot from tape: dd, mt
+# Keep to allow minor fixes: ln, mkdir, mv
+# Small and handy: cat, echo, pwd, sync
+#
+# Note: ssh has no "if", so "test" is useless.  Also,
+# left out: cp, chmod, rm.  The ramdisk does not really
+# need them, and they pull in fts_* from libc.
+#
+# Might use these to get the miniroot: rsh, tftp
+#
+# Assume gunzip can run elsewhere, i.e.:
+#   rsh gzcat sun2.miniroot.gz
+# No need to extract archives either...
+#
+
+SRCDIRS        bin sbin usr.bin distrib/utils
+
+# From /usr/src/distrib/utils:
+PROG           sbin/init
+PROG           sbin/ifconfig
+PROG           sbin/edlabel
+PROG           sbin/route
+PROG           bin/dd
+PROG           bin/ls
+PROG           bin/rsh
+PROG           bin/ssh         bin/sh bin/-sh
+# PROG         bin/tftp
+
+# From /usr/src/sbin:
+PROG           sbin/reboot     sbin/halt
+PROG           sbin/mknod
+PROG           sbin/mount
+PROG           sbin/mount_cd9660 sbin/cd9660
+PROG           sbin/mount_ffs  sbin/ffs sbin/mount_ufs sbin/ufs
+PROG           sbin/mount_nfs  sbin/nfs
+PROG           sbin/umount
+
+# From /usr/src/bin:
+PROG           bin/cat
+# PROG         bin/chmod
+# PROG         bin/cp
+PROG           bin/echo
+PROG           bin/ln
+PROG           bin/mkdir
+PROG           bin/mt
+PROG           bin/mv
+PROG           bin/pwd
+# PROG         bin/rm
+PROG           bin/sync
+PROG           bin/zcat
+PROG           bin/rcmd
+
+LIBS libhack.o -lrmt -lutil -lz
+
+# These are built with special flags to save a little space.
+SPECIAL ls             srcdir  distrib/utils/tls
+SPECIAL ssh            srcdir  distrib/utils/ssh
+SPECIAL ifconfig       srcdir  distrib/utils/x_ifconfig
+SPECIAL mount          srcdir  distrib/utils/x_mount
+SPECIAL route          srcdir  distrib/utils/x_route
+SPECIAL umount         srcdir  distrib/utils/x_umount
+
+# various files that we need in /etc for the install
+COPY   ${TOPDIR}/common/rd.disktab     etc/disktab
+COPY   ${TOPDIR}/common/rd.fstab       etc/fstab
+COPY   ${TOPDIR}/common/rd.protocols   etc/protocols
+COPY   ${TOPDIR}/common/rd.services    etc/services
+COPY   ${TOPDIR}/common/rd.passwd      etc/passwd
+COPY   ${TOPDIR}/common/rd.sshrc       .sshrc
+COPY   ${TOPDIR}/common/rd.welcome     .welcome
+
+COPY   ${_SRC_TOP_}/etc/netconfig      etc/netconfig
+
+# Fake /usr
+SYMLINK . usr
+
+# Shell lacks pipe support, so use this.
+CMD    mkfifo dev/pipe
diff -r 58a44a7bceee -r 6d9fe180285a distrib/sun2/ramdisk/mtree.conf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sun2/ramdisk/mtree.conf   Fri Apr 26 03:15:15 2002 +0000
@@ -0,0 +1,14 @@
+#
+#      $NetBSD: mtree.conf,v 1.1 2002/04/26 03:15:16 lukem Exp $
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+
+.
+./bin
+./dev
+./etc
+./mnt
+./sbin
+./tmp
+# (./usr will be a link to root)
diff -r 58a44a7bceee -r 6d9fe180285a distrib/sun2/ramdisk/ramdisk.list
--- a/distrib/sun2/ramdisk/ramdisk.list Fri Apr 26 02:56:45 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-#      $NetBSD: ramdisk.list,v 1.1 2002/04/22 21:17:58 fredette Exp $
-#
-# ramdisk/list - packing list for the ramdisk.
-#
-# The ramdisk root has to stay small enough so the kernel
-# can be loaded in less than one megabyte of ram, including
-# uninitialized data (bss).  Otherwise it will not work on
-# the Sun2/50.  This is not too hard, because the ONLY
-# tools needed in this root are those that one might use
-# to initialize the disk label and copy a miniroot image
-# into the swap partition.  Everything else is done after
-# the machine is rebooted from the miniroot.
-#
-# Note that the "ln" directives below are not really about
-# filesystem links, but rather the ability of the resulting
-# crunched binary to select the right program when argv[0]
-# matches the names on right of the "ln prog" directive.
-# For example, the shell can be run with argv[0]="-sh"
-# (login shell convention) but no such file will exist.
-# Similarly, one may want to run "init" as "oinit"...
-#
-# Notes about what is included (or not) and why:
-#
-# Include mknod incase I forgot some device nodes...
-# Support copying miniroot from NFS, TFTP, or CDROM.
-# Need mount_ffs, mount_ufs to remount the ramdisk.
-#
-# Might use cat to look at files (it's small anyway).
-# Need for copying miniroot from tape: dd, mt
-# Keep to allow minor fixes: ln, mkdir, mv
-# Small and handy: cat, echo, pwd, sync
-#
-# Note: ssh has no "if", so "test" is useless.  Also,
-# left out: cp, chmod, rm.  The ramdisk does not really
-# need them, and they pull in fts_* from libc.
-#
-# Might use these to get the miniroot: rsh, tftp
-#
-# Assume gunzip can run elsewhere, i.e.:
-#   rsh gzcat sun2.miniroot.gz
-# No need to extract archives either...
-#
-
-SRCDIRS        bin sbin usr.bin distrib/utils
-
-# From /usr/src/distrib/utils:
-PROG           sbin/init
-PROG           sbin/ifconfig
-PROG           sbin/edlabel
-PROG           sbin/route
-PROG           bin/dd
-PROG           bin/ls
-PROG           bin/rsh
-PROG           bin/ssh         bin/sh bin/-sh
-# PROG         bin/tftp
-
-# From /usr/src/sbin:
-PROG           sbin/reboot     sbin/halt
-PROG           sbin/mknod
-PROG           sbin/mount
-PROG           sbin/mount_cd9660 sbin/cd9660
-PROG           sbin/mount_ffs  sbin/ffs sbin/mount_ufs sbin/ufs
-PROG           sbin/mount_nfs  sbin/nfs
-PROG           sbin/umount
-
-# From /usr/src/bin:
-PROG           bin/cat
-# PROG         bin/chmod
-# PROG         bin/cp
-PROG           bin/echo
-PROG           bin/ln
-PROG           bin/mkdir
-PROG           bin/mt
-PROG           bin/mv
-PROG           bin/pwd
-# PROG         bin/rm
-PROG           bin/sync
-PROG           bin/zcat
-PROG           bin/rcmd
-
-LIBS libhack.o -lrmt -lutil -lz
-
-SPECIAL init srcdir distrib/utils/init_s
-SPECIAL ls srcdir distrib/utils/tls
-SPECIAL ssh srcdir distrib/utils/ssh
-
-# These are built with special flags to save a little space.



Home | Main Index | Thread Index | Old Index