]> Zhao Yanbai Git Server - minix.git/commitdiff
Dynamically determine which ramdisk to use
authorThomas Veerman <thomas@minix3.org>
Wed, 6 Jun 2012 11:49:36 +0000 (11:49 +0000)
committerThomas Veerman <thomas@minix3.org>
Mon, 18 Jun 2012 10:53:36 +0000 (10:53 +0000)
.Also, rename ext2_ramdisk to ramdisk_ext2.

drivers/Makefile
drivers/memory/Makefile
drivers/ramdisk_ext2/Makefile [moved from drivers/ext2_ramdisk/Makefile with 70% similarity]
drivers/ramdisk_ext2/device_table.txt [moved from drivers/ext2_ramdisk/device_table.txt with 100% similarity]
drivers/ramdisk_ext2/mtab [moved from drivers/ext2_ramdisk/mtab with 100% similarity]
drivers/ramdisk_ext2/rc [moved from drivers/ext2_ramdisk/rc with 100% similarity]
share/mk/bsd.own.mk

index 825e43538dfbe7c18384c178fb4545846aae4864..491c33376d7e8654a2207b005407276c81c63022 100644 (file)
@@ -14,8 +14,13 @@ 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 \
-       ext2_ramdisk ramdisk memory
+       memory
+.endif
 
+.if ${MKBUILDEXT2RD} != "yes"
+SUBDIR+= ramdisk
+.else
+SUBDIR+= ramdisk_ext2
 .endif
 
 .include <bsd.subdir.mk>
index 24f68b5a227e60e17ce641120a54fb85c92e1c0b..c61195f621fdbc1756e142d4ad80f7a124b0323e 100644 (file)
@@ -1,9 +1,15 @@
 # Makefile for memory driver (MEMORY)
+
 PROG=  memory
 SRCS=  memory.c imgrd.mfs
 OBJS=  ${SRCS:N*.h:R:S/$/.o/g}
+MKBUILDEXT2RD?=        no
 
-RAMDISK_PATH?= ${NETBSDSRCDIR}/drivers/ramdisk
+.if ${MKBUILDEXT2RD} != "yes"
+RAMDISK_PATH= ${NETBSDSRCDIR}/drivers/ramdisk
+.else
+RAMDISK_PATH= ${NETBSDSRCDIR}/drivers/ramdisk_ext2
+.endif
 
 DPADD+=        ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
 LDADD+=        -lblockdriver -lchardriver -lsys
similarity index 70%
rename from drivers/ext2_ramdisk/Makefile
rename to drivers/ramdisk_ext2/Makefile
index bb307196cee1e5a6c3ee0874a4adbf95690ec811..37d0e0d02ca8ccb06878b7e9107b31aa0f6dddbb 100644 (file)
@@ -5,7 +5,7 @@
 BINFILES = dev2name mount  sh service \
            sysenv
 
-SBINFILES = ahci at_wini ext2 floppy mfs procfs \
+SBINFILES = ahci at_wini ext2 floppy procfs \
             fsck.mfs
 
 ETCFILES  = system.conf mtab passwd pwd.db spwd.db master.passwd \
@@ -22,18 +22,18 @@ all:
 # we have to make sure they are already installed
 # (that's a little bit to coarse grain though...)
 install_files:
-       ${MAKE} -C ${MINIXSRCDIR}/commands install
-       ${MAKE} -C ${MINIXSRCDIR}/usr.bin install
-       ${MAKE} -C ${MINIXSRCDIR}/usr.sbin install
-       ${MAKE} -C ${MINIXSRCDIR}/usr.bin install
-       ${MAKE} -C ${MINIXSRCDIR}/sbin install
-       ${MAKE} -C ${MINIXSRCDIR}/bin install
-       ${MAKE} -C ${MINIXSRCDIR}/servers install
-       ${MAKE} -C ${MINIXSRCDIR}/drivers/acpi install
-       ${MAKE} -C ${MINIXSRCDIR}/drivers/ahci install
-       ${MAKE} -C ${MINIXSRCDIR}/drivers/at_wini install
-       ${MAKE} -C ${MINIXSRCDIR}/drivers/floppy install
-       ${MAKE} -C ${MINIXSRCDIR}/drivers/pci install
+       ${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
index 69aab94b0f51aec30c482b071f8fa03090cc542c..1c64f1fdd5b1ac14e7bff76ff4775255ba45adf7 100644 (file)
@@ -759,7 +759,7 @@ _MKVARS.no= \
        MKUNPRIVED MKUPDATE MKX11 MKZFS MKBSDTAR
 #MINIX-specific vars
 _MKVARS.no+= \
-       MKIMAGEONLY MKSMALL
+       MKIMAGEONLY MKSMALL MKBUILDEXT2RD
 .for var in ${_MKVARS.no}
 ${var}?=no
 .endfor