Add installation ramdisk for virt68k. With the GENERIC kernel, you can
just specify this file with "-initrd /path/to/inst-ramdisk.fs" on the Qemu command line and it will boot right into the installer.
This commit is contained in:
parent
25ffd25ddc
commit
7518155848
|
@ -0,0 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
SUBDIR=
|
||||
SUBDIR+= ramdisks
|
||||
SUBDIR+= .WAIT
|
||||
|
||||
TARGETS+= release
|
||||
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
||||
|
||||
SUBDIR=
|
||||
SUBDIR+= inst-ramdisk
|
||||
|
||||
TARGETS+= release
|
||||
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,46 @@
|
|||
# $NetBSD: Makefile.ramdisk,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
||||
|
||||
NOSANITIZER= # defined
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
||||
|
||||
VIRT68KCOMMON= ${.CURDIR}/../common
|
||||
|
||||
.PATH: ${VIRT68KCOMMON}
|
||||
|
||||
WARNS= 1
|
||||
DBG= -Os
|
||||
|
||||
CRUNCHBIN= ramdiskbin
|
||||
|
||||
# Use ${.CURDIR}/list only if LISTS was not already defined by the caller.
|
||||
LISTS?= ${.CURDIR}/list
|
||||
LISTS+= ${VIRT68KCOMMON}/list.ramdisk
|
||||
MTREECONF= ${DISTRIBDIR}/common/mtree.common
|
||||
IMAGEENDIAN= be
|
||||
IMAGEDEPENDS+= ${CRUNCHBIN} \
|
||||
dot.profile \
|
||||
${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
|
||||
${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
|
||||
${DISTRIBDIR}/common/services
|
||||
|
||||
.if defined(USE_SYSINST)
|
||||
LISTS+= ${DISTRIBDIR}/common/list.sysinst
|
||||
MAKEFS_FLAGS+= -f 14
|
||||
.endif
|
||||
|
||||
# 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.dhcpcd"
|
||||
.include "${DISTRIBDIR}/common/Makefile.makedev"
|
||||
.include "${DISTRIBDIR}/common/Makefile.image"
|
||||
|
||||
release: check_RELEASEDIR
|
||||
${RELEASE_INSTALL} ${IMAGE} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisks
|
||||
|
||||
.include <bsd.prog.mk>
|
|
@ -0,0 +1,76 @@
|
|||
# $NetBSD: dot.profile,v 1.1 2024/01/07 00:57:13 thorpej 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=wsvt25
|
||||
export TERM
|
||||
HOME=/
|
||||
export HOME
|
||||
BLOCKSIZE=1k
|
||||
export BLOCKSIZE
|
||||
EDITOR=ed
|
||||
export EDITOR
|
||||
|
||||
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 ^?
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
mount -t tmpfs tmpfs /var
|
||||
mount -t tmpfs -o union tmpfs /etc
|
||||
|
||||
mkdir -p /var/run /var/db
|
||||
|
||||
# mount the ramdisk read write
|
||||
mount -u $ROOTDEV /
|
||||
|
||||
grep() sed -n "/$1/p"
|
||||
|
||||
if [ -x /sysinst ]; then
|
||||
# run the installation or upgrade script.
|
||||
sysinst || stty sane
|
||||
else
|
||||
echo "This image contains utilities which may be needed"
|
||||
echo "to get you out of a pinch."
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,78 @@
|
|||
# $NetBSD: list.ramdisk,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
||||
|
||||
SRCDIRS external/bsd/less/bin
|
||||
SRCDIRS bin sbin usr.bin usr.sbin libexec
|
||||
|
||||
# Programs for a minimal ramdisk image
|
||||
|
||||
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/mv
|
||||
PROG bin/pax usr/bin/tar
|
||||
PROG bin/pwd
|
||||
PROG bin/rm
|
||||
PROG bin/sh
|
||||
PROG bin/stty
|
||||
PROG bin/sync
|
||||
|
||||
PROG sbin/chown bin/chgrp
|
||||
PROG sbin/disklabel
|
||||
PROG sbin/dkctl
|
||||
PROG sbin/dmesg
|
||||
PROG sbin/fsck
|
||||
PROG sbin/fsck_ffs
|
||||
PROG sbin/gpt
|
||||
PROG sbin/ifconfig
|
||||
PROG sbin/init
|
||||
PROG sbin/mknod
|
||||
PROG sbin/mount
|
||||
PROG sbin/mount_cd9660
|
||||
PROG sbin/mount_ffs
|
||||
# PROG sbin/mount_kernfs
|
||||
PROG sbin/mount_nfs
|
||||
PROG sbin/mount_tmpfs
|
||||
PROG sbin/newfs sbin/mount_mfs
|
||||
PROG sbin/ping
|
||||
PROG sbin/reboot sbin/halt
|
||||
PROG sbin/route
|
||||
PROG sbin/shutdown
|
||||
PROG sbin/sysctl
|
||||
PROG sbin/swapctl
|
||||
PROG sbin/umount
|
||||
|
||||
PROG usr/bin/ftp
|
||||
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
|
||||
PROG usr/bin/less usr/bin/more
|
||||
PROG usr/bin/sed
|
||||
PROG usr/bin/tset
|
||||
|
||||
PROG usr/sbin/chroot
|
||||
|
||||
SPECIAL ed srcdir distrib/utils/x_ed
|
||||
SPECIAL gzip srcdir distrib/utils/x_gzip
|
||||
SPECIAL ping srcdir distrib/utils/x_ping
|
||||
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
|
||||
SPECIAL route srcdir distrib/utils/x_route
|
||||
SPECIAL umount srcdir distrib/utils/x_umount
|
||||
|
||||
LIBS libhack.o -ledit -lutil -lcurses -lterminfo -lcrypt -ll -lm -lz -lprop
|
||||
|
||||
# init invokes the shell as -sh
|
||||
ARGVLN sh -sh
|
||||
|
||||
# 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}/../common/dot.profile .profile
|
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD: Makefile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
||||
|
||||
IMAGE= inst-ramdisk.fs
|
||||
IMAGESIZE= 4000k
|
||||
IMAGEDEPENDS=
|
||||
USE_SYSINST= yes
|
||||
SMALLPROG_INET6=1
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.ramdisk"
|
||||
|
||||
.if ${USE_INET6} != "no"
|
||||
LISTS+= ${DISTRIBDIR}/common/list.inet6
|
||||
.endif
|
|
@ -0,0 +1 @@
|
|||
# $NetBSD: list,v 1.1 2024/01/07 00:57:13 thorpej Exp $
|
Loading…
Reference in New Issue