Make ramdisk location configurable
Also, the ramdisk is now built when the memory driver is compiled.
This commit is contained in:
parent
3baaafe113
commit
a8f6f3ebc9
2 changed files with 18 additions and 8 deletions
|
@ -3,6 +3,8 @@ PROG= memory
|
||||||
SRCS= memory.c imgrd.mfs
|
SRCS= memory.c imgrd.mfs
|
||||||
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
||||||
|
|
||||||
|
RAMDISK_PATH?= ${NETBSDSRCDIR}/drivers/ramdisk
|
||||||
|
|
||||||
DPADD+= ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
|
DPADD+= ${LIBBLOCKDRIVER} ${LIBCHARDRIVER} ${LIBSYS}
|
||||||
LDADD+= -lblockdriver -lchardriver -lsys
|
LDADD+= -lblockdriver -lchardriver -lsys
|
||||||
|
|
||||||
|
@ -25,8 +27,11 @@ touch-genfiles:
|
||||||
${_MKTARGET_CREATE}
|
${_MKTARGET_CREATE}
|
||||||
${OBJCOPY} -Ibinary -B${ARCH} -Oelf32-${ARCH}-minix $< $@
|
${OBJCOPY} -Ibinary -B${ARCH} -Oelf32-${ARCH}-minix $< $@
|
||||||
|
|
||||||
imgrd.mfs:
|
${RAMDISK_PATH}/image: .PHONY
|
||||||
ln -s ../ramdisk/image $@
|
${MAKE} -C ${RAMDISK_PATH} image
|
||||||
|
|
||||||
|
imgrd.mfs: ${RAMDISK_PATH}/image
|
||||||
|
ln -fs ${RAMDISK_PATH}/image $@
|
||||||
CLEANFILES+= imgrd.mfs
|
CLEANFILES+= imgrd.mfs
|
||||||
|
|
||||||
.include <minix.bootprog.mk>
|
.include <minix.bootprog.mk>
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
TOOL_PWD_MKDB?= ${NETBSDSRCDIR}/usr.sbin/pwd_mkdb/pwd_mkdb
|
||||||
|
install:
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
PROG_DRIVERS=at_wini floppy pci
|
PROG_DRIVERS=at_wini floppy pci
|
||||||
PROG_COMMANDS=cdprobe dev2name loadramdisk mount fsck.mfs sysenv sh \
|
PROG_COMMANDS=cdprobe dev2name loadramdisk mount fsck.mfs sysenv sh \
|
||||||
service
|
service
|
||||||
|
@ -41,7 +46,7 @@ image: proto.gen mtab rc $(EXTRA) pwd.db spwd.db passwd
|
||||||
|
|
||||||
.for driver in $(PROG_DRIVERS)
|
.for driver in $(PROG_DRIVERS)
|
||||||
$(driver): ../$(driver)/$(driver)
|
$(driver): ../$(driver)/$(driver)
|
||||||
install $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
../$(driver)/$(driver):
|
../$(driver)/$(driver):
|
||||||
$(MAKE) -C ../$(driver) $(driver)
|
$(MAKE) -C ../$(driver) $(driver)
|
||||||
|
@ -54,7 +59,7 @@ dir.$(cmd)=ash
|
||||||
dir.$(cmd)=$(cmd)
|
dir.$(cmd)=$(cmd)
|
||||||
.endif
|
.endif
|
||||||
$(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
|
$(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
|
||||||
install $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
../../commands/$(dir.$(cmd))/$(cmd):
|
../../commands/$(dir.$(cmd))/$(cmd):
|
||||||
$(MAKE) -C ../../commands/$(dir.$(cmd)) $(cmd)
|
$(MAKE) -C ../../commands/$(dir.$(cmd)) $(cmd)
|
||||||
|
@ -62,12 +67,12 @@ $(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
|
||||||
|
|
||||||
.for etc in $(EXTRA)
|
.for etc in $(EXTRA)
|
||||||
$(etc): ../../etc/$(etc)
|
$(etc): ../../etc/$(etc)
|
||||||
install $> $@
|
${INSTALL} $> $@
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for cmd in $(PROG_USRSBIN)
|
.for cmd in $(PROG_USRSBIN)
|
||||||
$(cmd): ../../usr.sbin/$(cmd)/$(cmd)
|
$(cmd): ../../usr.sbin/$(cmd)/$(cmd)
|
||||||
install $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
../../usr.sbin/$(cmd)/$(cmd):
|
../../usr.sbin/$(cmd)/$(cmd):
|
||||||
$(MAKE) -C ../../usr.sbin/$(cmd) $(cmd)
|
$(MAKE) -C ../../usr.sbin/$(cmd) $(cmd)
|
||||||
|
@ -75,7 +80,7 @@ $(cmd): ../../usr.sbin/$(cmd)/$(cmd)
|
||||||
|
|
||||||
.for server in $(PROG_SERVERS)
|
.for server in $(PROG_SERVERS)
|
||||||
$(server): ../../servers/$(server)/$(server)
|
$(server): ../../servers/$(server)/$(server)
|
||||||
install $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
../../servers/$(server)/$(server):
|
../../servers/$(server)/$(server):
|
||||||
$(MAKE) -C ../../servers/$(server) $(server)
|
$(MAKE) -C ../../servers/$(server) $(server)
|
||||||
|
@ -85,7 +90,7 @@ pwd.db spwd.db passwd: ../../etc/master.passwd ../../usr.sbin/pwd_mkdb/pwd_mkdb
|
||||||
rm -f ../../etc/master.passwd.orig ../../etc/passwd.orig
|
rm -f ../../etc/master.passwd.orig ../../etc/passwd.orig
|
||||||
rm -f ../../etc/pwd.db.tmp ../../etc/spwd.db.tmp
|
rm -f ../../etc/pwd.db.tmp ../../etc/spwd.db.tmp
|
||||||
../../usr.sbin/pwd_mkdb/pwd_mkdb -V 0 -p -d ../../ ../../etc/master.passwd
|
../../usr.sbin/pwd_mkdb/pwd_mkdb -V 0 -p -d ../../ ../../etc/master.passwd
|
||||||
install ../../etc/$@ $@
|
${INSTALL} ../../etc/$@ $@
|
||||||
|
|
||||||
proto.gen: $(PROGRAMS) proto.sh ${PROTO} proto.common.etc proto.common.dynamic proto.sh
|
proto.gen: $(PROGRAMS) proto.sh ${PROTO} proto.common.etc proto.common.dynamic proto.sh
|
||||||
strip $(PROGRAMS)
|
strip $(PROGRAMS)
|
||||||
|
|
Loading…
Reference in a new issue