Don't build ext2 ramdisk for cross compilation
. as mkfs.mfs is now cross compilable, we can remove the ext2 ramdisk special case for cross compilation.
This commit is contained in:
parent
aab6eb7615
commit
39dfb2bc55
8 changed files with 4 additions and 201 deletions
|
@ -6,7 +6,7 @@
|
|||
.if ${MKIMAGEONLY} == "yes"
|
||||
|
||||
# memory driver must be last for ramdisk image
|
||||
SUBDIR= at_wini floppy log tty pci ext2_ramdisk ramdisk memory
|
||||
SUBDIR= at_wini floppy log tty pci ramdisk memory
|
||||
|
||||
.else
|
||||
|
||||
|
@ -14,13 +14,7 @@ SUBDIR= at_wini floppy log tty pci ext2_ramdisk ramdisk memory
|
|||
SUBDIR+= ahci amddev atl2 at_wini audio dec21140A dp8390 dpeth \
|
||||
e1000 fbd filter floppy fxp hello lance log orinoco pci printer \
|
||||
random readclock rtl8139 rtl8169 ti1225 tty vbox acpi \
|
||||
memory
|
||||
.endif
|
||||
|
||||
.if ${MKBUILDEXT2RD} != "yes"
|
||||
SUBDIR+= ramdisk
|
||||
.else
|
||||
SUBDIR+= ramdisk_ext2
|
||||
memory ramdisk
|
||||
.endif
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
|
|
@ -5,12 +5,7 @@ SRCS= memory.c imgrd.mfs
|
|||
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
||||
MKBUILDEXT2RD?= no
|
||||
|
||||
.if ${MKBUILDEXT2RD} != "yes"
|
||||
RAMDISK_PATH= ${NETBSDSRCDIR}/drivers/ramdisk
|
||||
.else
|
||||
RAMDISK_PATH= ${NETBSDSRCDIR}/drivers/ramdisk_ext2
|
||||
.endif
|
||||
|
||||
DPADD+= ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
|
||||
LDADD+= -lblockdriver -lchardriver -lsys
|
||||
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
# Makefile for ramdisk image
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
BINFILES = dev2name mount sh service \
|
||||
sysenv
|
||||
|
||||
SBINFILES = ahci at_wini ext2 floppy procfs \
|
||||
fsck.mfs
|
||||
|
||||
ETCFILES = system.conf mtab passwd pwd.db spwd.db master.passwd \
|
||||
rs.single
|
||||
|
||||
USRBINFILES = loadramdisk cdprobe
|
||||
USRSBINFILES = acpi pci
|
||||
IMAGE_DIRS= bin sbin etc usr/bin usr/sbin
|
||||
|
||||
install:
|
||||
all:
|
||||
|
||||
# as we are taking the binaries directly out of the destree
|
||||
# we have to make sure they are already installed
|
||||
# (that's a little bit to coarse grain though...)
|
||||
install_files:
|
||||
${MAKE} -C ${NETBSDSRCDIR}/commands install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/usr.bin install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/usr.sbin install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/usr.bin install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/sbin install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/bin install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/servers install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/acpi install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/ahci install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/at_wini install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/floppy install
|
||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/pci install
|
||||
|
||||
|
||||
image.d: install_files
|
||||
@echo -n "preparing image... "
|
||||
rm -rf image.d
|
||||
${INSTALL_DIR} image.d
|
||||
@for f in $(IMAGE_DIRS); do ${INSTALL_DIR} image.d/$$f; done
|
||||
@for f in $(BINFILES); do cp $(DESTDIR)/bin/$$f image.d/bin; done
|
||||
@for f in $(SBINFILES); do cp $(DESTDIR)/sbin/$$f image.d/sbin; done
|
||||
@for f in $(ETCFILES); do cp $(DESTDIR)/etc/$$f image.d/etc; done
|
||||
@for f in $(USRBINFILES); do cp $(DESTDIR)/usr/bin/$$f image.d/usr/bin; done
|
||||
@for f in $(USRSBINFILES); do cp $(DESTDIR)/usr/sbin/$$f image.d/usr/sbin; done
|
||||
@cp rc image.d/etc;
|
||||
if [ ! -z ${EXT2_EXTRA_TREE} ] ; \
|
||||
then \
|
||||
echo "Copying additional files";\
|
||||
cp -a ${EXT2_EXTRA_TREE}/* image.d/; \
|
||||
fi
|
||||
@echo "done"
|
||||
|
||||
image:: image.d
|
||||
@echo -n "generating image... "
|
||||
genext2fs -q -N 1000 -D device_table.txt -b 21000 -U -d image.d $@
|
||||
rm -rf image.d
|
||||
@echo "done."
|
||||
|
||||
clean:
|
||||
rm -rf image.d image
|
||||
.PHONY: image
|
||||
|
||||
.include <minix.service.mk>
|
|
@ -1,18 +0,0 @@
|
|||
/dev d 755 0 0 - - - - -
|
||||
/dev/null c 666 0 0 1 3 0 0 -
|
||||
/dev/log c 666 0 0 4 0 0 0 -
|
||||
/dev/console c 666 0 0 4 0 0 0 -
|
||||
/dev/ttyc c 666 0 0 4 1 1 1 4
|
||||
/dev/tty c 666 0 0 5 0 0 0 -
|
||||
/dev/tty0 c 666 0 0 4 0 0 1 4
|
||||
/dev/imgrd b 666 0 0 1 6 0 0 -
|
||||
/dev/c0d0 b 600 0 0 3 0 0 0 -
|
||||
/dev/c0d0p0s0 b 600 0 0 3 128 0 0 -
|
||||
/dev/c0d0p0s1 b 600 0 0 3 129 0 0 -
|
||||
/dev/c0d0p0s2 b 600 0 0 3 130 0 0 -
|
||||
/dev/c0d0p0s3 b 600 0 0 3 131 0 0 -
|
||||
/dev/c0d1 b 600 0 0 3 5 0 0 -
|
||||
/dev/c1d0 b 600 0 0 8 0 0 0 -
|
||||
/dev/fd0 b 666 0 0 2 0 0 0 -
|
||||
#/dev/ttyp c 666 0 0 4 128 128 1 16
|
||||
|
|
@ -1 +0,0 @@
|
|||
/dev/imgrd / 3 rw
|
|
@ -1,76 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exec >/dev/log
|
||||
exec 2>/dev/log
|
||||
exec </dev/null
|
||||
|
||||
FSCK=/bin/fsck.mfs
|
||||
ACPI=/usr/sbin/acpi
|
||||
if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
||||
then
|
||||
/bin/service -c up $ACPI
|
||||
fi
|
||||
/bin/service -c up /usr/sbin/pci
|
||||
/bin/service -cn up /sbin/floppy -dev /dev/fd0
|
||||
if [ X`/bin/sysenv ahci` = Xyes ]
|
||||
then
|
||||
# this is here temporarily, for testing purposes
|
||||
/bin/service -c up /sbin/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
||||
else
|
||||
/bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0
|
||||
/bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1
|
||||
fi
|
||||
/bin/service up /sbin/procfs || echo "WARNING: couldn't start procfs"
|
||||
|
||||
if /bin/sysenv rootdevname >/dev/null
|
||||
then
|
||||
rootdevname=/dev/`/bin/sysenv rootdevname`
|
||||
else
|
||||
rootdev=`/bin/sysenv rootdev` || echo 'No rootdev?'
|
||||
rootdevname=`/bin/dev2name "$rootdev"` ||
|
||||
{ echo 'No device name for root device'; exit 1; }
|
||||
fi
|
||||
|
||||
if [ "`sysenv bin_img`" = 1 ]
|
||||
then
|
||||
bin_img="-i "
|
||||
fi
|
||||
|
||||
if sysenv cdproberoot >/dev/null
|
||||
then
|
||||
echo
|
||||
echo 'Looking for boot CD. This may take a minute.'
|
||||
echo 'Please ignore any error messages.'
|
||||
echo
|
||||
cddev=`cdprobe` || { echo 'No CD found'; exit 1; }
|
||||
export cddev
|
||||
echo "Loading ramdisk from ${cddev}p1"
|
||||
loadramdisk "$cddev"p1
|
||||
elif [ "$rootdevname" = "/dev/ram" ]
|
||||
then
|
||||
if /bin/sysenv rootdevname >/dev/null
|
||||
then
|
||||
ramimagename=/dev/`/bin/sysenv ramimagename`
|
||||
else
|
||||
ramimagedev=`/bin/sysenv ramimagedev` ||
|
||||
{ echo 'ramimagedev not found'; exit 1; }
|
||||
ramimagename=`/bin/dev2name "$ramimagedev"` ||
|
||||
{ echo 'No device name for ramimagedev'; exit 1; }
|
||||
fi
|
||||
|
||||
echo "Loading ramdisk from $ramimagename"
|
||||
loadramdisk "$ramimagename" || echo "WARNING: loadramdisk failed"
|
||||
fi
|
||||
echo "Root device name is $rootdevname"
|
||||
if [ -e $FSCK ]
|
||||
then $FSCK -p $rootdevname
|
||||
fi
|
||||
|
||||
# Change root from temporary boot ramdisk to the configure
|
||||
# root device
|
||||
/bin/mount -n $bin_img"$rootdevname" /
|
||||
|
||||
/bin/mount -e -n -t procfs none /proc || echo "WARNING: couldn't mount procfs"
|
||||
|
||||
exec /bin/sh /etc/rc "$@"
|
|
@ -11,11 +11,6 @@ GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
|
|||
# Specify the programs that are part of the system image.
|
||||
KERNEL= kernel
|
||||
# PROGRAMS are in the order they should be loaded by boot
|
||||
.if ${MKBUILDEXT2RD} != "yes"
|
||||
FS= ${NETBSDSRCDIR}/servers/mfs/mfs
|
||||
.else
|
||||
FS= ${NETBSDSRCDIR}/servers/ext2/ext2
|
||||
.endif
|
||||
PROGRAMS= \
|
||||
${NETBSDSRCDIR}/servers/ds/ds \
|
||||
${NETBSDSRCDIR}/servers/rs/rs \
|
||||
|
@ -25,7 +20,7 @@ PROGRAMS= \
|
|||
${NETBSDSRCDIR}/drivers/memory/memory \
|
||||
${NETBSDSRCDIR}/drivers/log/log \
|
||||
${NETBSDSRCDIR}/drivers/tty/tty \
|
||||
${FS} \
|
||||
${NETBSDSRCDIR}/servers/mfs/mfs \
|
||||
${NETBSDSRCDIR}/servers/vm/vm \
|
||||
${NETBSDSRCDIR}/servers/pfs/pfs \
|
||||
${NETBSDSRCDIR}/servers/init/init
|
||||
|
@ -107,26 +102,7 @@ fdboot:
|
|||
@sync
|
||||
|
||||
install:
|
||||
.if ${MKBUILDEXT2RD} != "yes"
|
||||
${MAKE} includes services hdboot
|
||||
.else
|
||||
${MAKE} cross_install
|
||||
.endif
|
||||
|
||||
cross_install:
|
||||
${INSTALL_DIR} ${DESTDIR}/multiboot
|
||||
n=0; \
|
||||
for i in ${PROGRAMS}; \
|
||||
do \
|
||||
n=`expr $$n + 1`; \
|
||||
[ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \
|
||||
newname="${DESTDIR}/multiboot/$${prefix}$${n}_`basename $$i`"; \
|
||||
${INSTALL} $$i $$newname; \
|
||||
strip -s $$newname; \
|
||||
gzip -f $$newname; \
|
||||
done
|
||||
${INSTALL} ../kernel/kernel ${DESTDIR}/multiboot/
|
||||
strip -s ${DESTDIR}/multiboot/kernel
|
||||
|
||||
# download and update NetBSD reference sources.
|
||||
nbsd_fetch:
|
||||
|
|
|
@ -767,7 +767,7 @@ _MKVARS.no= \
|
|||
MKARZERO
|
||||
#MINIX-specific vars
|
||||
_MKVARS.no+= \
|
||||
MKIMAGEONLY MKSMALL MKBUILDEXT2RD USETOOLS
|
||||
MKIMAGEONLY MKSMALL USETOOLS
|
||||
.for var in ${_MKVARS.no}
|
||||
${var}?=no
|
||||
.endfor
|
||||
|
|
Loading…
Reference in a new issue