From 39dfb2bc5511fc2c6765e388ccd348fe642f2d06 Mon Sep 17 00:00:00 2001 From: Thomas Veerman Date: Mon, 18 Jun 2012 09:29:44 +0000 Subject: [PATCH] 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. --- drivers/Makefile | 10 +--- drivers/memory/Makefile | 5 -- drivers/ramdisk_ext2/Makefile | 67 ----------------------- drivers/ramdisk_ext2/device_table.txt | 18 ------- drivers/ramdisk_ext2/mtab | 1 - drivers/ramdisk_ext2/rc | 76 --------------------------- releasetools/Makefile | 26 +-------- share/mk/bsd.own.mk | 2 +- 8 files changed, 4 insertions(+), 201 deletions(-) delete mode 100644 drivers/ramdisk_ext2/Makefile delete mode 100644 drivers/ramdisk_ext2/device_table.txt delete mode 100644 drivers/ramdisk_ext2/mtab delete mode 100644 drivers/ramdisk_ext2/rc diff --git a/drivers/Makefile b/drivers/Makefile index 491c33376..774f65e86 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -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 diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index c61195f62..fc5351769 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -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 diff --git a/drivers/ramdisk_ext2/Makefile b/drivers/ramdisk_ext2/Makefile deleted file mode 100644 index 37d0e0d02..000000000 --- a/drivers/ramdisk_ext2/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# Makefile for ramdisk image - -.include - -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 diff --git a/drivers/ramdisk_ext2/device_table.txt b/drivers/ramdisk_ext2/device_table.txt deleted file mode 100644 index 2270d6469..000000000 --- a/drivers/ramdisk_ext2/device_table.txt +++ /dev/null @@ -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 - diff --git a/drivers/ramdisk_ext2/mtab b/drivers/ramdisk_ext2/mtab deleted file mode 100644 index 8b92699c0..000000000 --- a/drivers/ramdisk_ext2/mtab +++ /dev/null @@ -1 +0,0 @@ -/dev/imgrd / 3 rw diff --git a/drivers/ramdisk_ext2/rc b/drivers/ramdisk_ext2/rc deleted file mode 100644 index 67d177159..000000000 --- a/drivers/ramdisk_ext2/rc +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh -set -e - -exec >/dev/log -exec 2>/dev/log -exec /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 "$@" diff --git a/releasetools/Makefile b/releasetools/Makefile index 2172b816a..d0202e58a 100644 --- a/releasetools/Makefile +++ b/releasetools/Makefile @@ -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: diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 629eb84b2..1f41fc73c 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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 -- 2.44.0