]> Zhao Yanbai Git Server - minix.git/commitdiff
Don't build ext2 ramdisk for cross compilation
authorThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 09:29:44 +0000 (09:29 +0000)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:54:56 +0000 (10:54 +0000)
. as mkfs.mfs is now cross compilable, we can remove the ext2 ramdisk
  special case for cross compilation.

drivers/Makefile
drivers/memory/Makefile
drivers/ramdisk_ext2/Makefile [deleted file]
drivers/ramdisk_ext2/device_table.txt [deleted file]
drivers/ramdisk_ext2/mtab [deleted file]
drivers/ramdisk_ext2/rc [deleted file]
releasetools/Makefile
share/mk/bsd.own.mk

index 491c33376d7e8654a2207b005407276c81c63022..774f65e86e5ca686ebd4fba8c7c64eeeb0114ba2 100644 (file)
@@ -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>
index c61195f621fdbc1756e142d4ad80f7a124b0323e..fc535176946ae8ba50cd31f0ed138c4a413fe4d3 100644 (file)
@@ -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 (file)
index 37d0e0d..0000000
+++ /dev/null
@@ -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>
diff --git a/drivers/ramdisk_ext2/device_table.txt b/drivers/ramdisk_ext2/device_table.txt
deleted file mode 100644 (file)
index 2270d64..0000000
+++ /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 (file)
index 8b92699..0000000
+++ /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 (file)
index 67d1771..0000000
+++ /dev/null
@@ -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 "$@"
index 2172b816aa7ddc99b415171c7090057ea8accd0b..d0202e58a2b581890b795b7629559fa3287dd99b 100644 (file)
@@ -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:
index 629eb84b23e5fcbc59a4adb821da7bca5f5a0625..1f41fc73c9d86f929b43e702511769d98dfab9fa 100644 (file)
@@ -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