From: Thomas Veerman Date: Wed, 6 Jun 2012 11:49:36 +0000 (+0000) Subject: Dynamically determine which ramdisk to use X-Git-Tag: v3.2.1~509 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-signzone.html?a=commitdiff_plain;h=03ea1c1676c326e5577fd645cdb49c656d3d604f;p=minix.git Dynamically determine which ramdisk to use .Also, rename ext2_ramdisk to ramdisk_ext2. --- diff --git a/drivers/Makefile b/drivers/Makefile index 825e43538..491c33376 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -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 diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 24f68b5a2..c61195f62 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile @@ -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 diff --git a/drivers/ext2_ramdisk/Makefile b/drivers/ramdisk_ext2/Makefile similarity index 70% rename from drivers/ext2_ramdisk/Makefile rename to drivers/ramdisk_ext2/Makefile index bb307196c..37d0e0d02 100644 --- a/drivers/ext2_ramdisk/Makefile +++ b/drivers/ramdisk_ext2/Makefile @@ -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 diff --git a/drivers/ext2_ramdisk/device_table.txt b/drivers/ramdisk_ext2/device_table.txt similarity index 100% rename from drivers/ext2_ramdisk/device_table.txt rename to drivers/ramdisk_ext2/device_table.txt diff --git a/drivers/ext2_ramdisk/mtab b/drivers/ramdisk_ext2/mtab similarity index 100% rename from drivers/ext2_ramdisk/mtab rename to drivers/ramdisk_ext2/mtab diff --git a/drivers/ext2_ramdisk/rc b/drivers/ramdisk_ext2/rc similarity index 100% rename from drivers/ext2_ramdisk/rc rename to drivers/ramdisk_ext2/rc diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 69aab94b0..1c64f1fdd 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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