ramdisk:add support for cross building a dso ramdisk.
Change-Id: Ib2840bceab10cf98cb0abfbdb2393af4d59be102
This commit is contained in:
parent
aacce8f40c
commit
65c5a092c1
2 changed files with 38 additions and 10 deletions
|
@ -29,7 +29,15 @@ PROG_COMMANDS=cdprobe loadramdisk mount fsck.mfs sysenv sh \
|
||||||
service
|
service
|
||||||
PROG_SERVERS=mfs procfs
|
PROG_SERVERS=mfs procfs
|
||||||
PROG_USRSBIN=pwd_mkdb
|
PROG_USRSBIN=pwd_mkdb
|
||||||
PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} ${PROG_USRSBIN}
|
|
||||||
|
.if ${LDSTATIC} == "-dynamic"
|
||||||
|
RAMDISK_DYNAMIC=1
|
||||||
|
PROG_LIBEXEC+=ld.elf_so
|
||||||
|
PROG_LIBS+=libc libminlib libcompat_minix libterminfo
|
||||||
|
.endif
|
||||||
|
|
||||||
|
PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} ${PROG_USRSBIN} ${PROG_LIBEXEC}
|
||||||
|
|
||||||
EXTRA=system.conf master.passwd rs.single
|
EXTRA=system.conf master.passwd rs.single
|
||||||
PROTO_FILES=proto.common.etc proto.common.dynamic proto.dev
|
PROTO_FILES=proto.common.etc proto.common.dynamic proto.dev
|
||||||
|
|
||||||
|
@ -48,6 +56,7 @@ RAMDISK_INC_ACPI=1
|
||||||
CPPFLAGS+= -I${NETBSDSRCDIR}/servers
|
CPPFLAGS+= -I${NETBSDSRCDIR}/servers
|
||||||
CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${EXTRA} image image.c t proto.gen
|
CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${EXTRA} image image.c t proto.gen
|
||||||
CLEANFILES += ${LIBRARIES}
|
CLEANFILES += ${LIBRARIES}
|
||||||
|
CLEANFILES += ${PROG_LIBEXEC}
|
||||||
CLEANFILES += ${.OBJDIR}/etc/*
|
CLEANFILES += ${.OBJDIR}/etc/*
|
||||||
|
|
||||||
image: proto.gen ${EXTRA} mtab rc pwd.db spwd.db passwd
|
image: proto.gen ${EXTRA} mtab rc pwd.db spwd.db passwd
|
||||||
|
@ -75,9 +84,28 @@ ${driver}: ${PROGROOT}/drivers/${driver}/${driver}
|
||||||
${INSTALL} $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
${PROGROOT}/drivers/${driver}/${driver}:
|
${PROGROOT}/drivers/${driver}/${driver}:
|
||||||
${MAKE} -C ${NETBSDSRCDIR}/drivers/${driver} ${driver}
|
${MAKE} -C ${NETBSDSRCDIR}/drivers/${driver} all
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
.for lib in ${PROG_LIBS}
|
||||||
|
PROGRAMS+=${lib}.so.0
|
||||||
|
CLEANFILES += ${lib}.so.0
|
||||||
|
${lib}.so.0:${PROGROOT}/lib/${lib}/${lib}.so.0
|
||||||
|
${INSTALL} $> $@
|
||||||
|
|
||||||
|
${PROGROOT}/lib/${lib}/${lib}.so.0:
|
||||||
|
${MAKE} -C ${NETBSDSRCDIR}/lib/${lib} all
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.for libexec in ${PROG_LIBEXEC}
|
||||||
|
${libexec}:${PROGROOT}/libexec/${libexec}/${libexec}
|
||||||
|
${INSTALL} $> $@
|
||||||
|
|
||||||
|
${PROGROOT}/libexec/${libexec}/${libexec}:
|
||||||
|
${MAKE} -C ${NETBSDSRCDIR}/libexec/${libexec} all
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
.for cmd in ${PROG_COMMANDS}
|
.for cmd in ${PROG_COMMANDS}
|
||||||
.if ${cmd} == sh
|
.if ${cmd} == sh
|
||||||
dir.${cmd}=ash
|
dir.${cmd}=ash
|
||||||
|
@ -88,7 +116,7 @@ ${cmd}: ${PROGROOT}/commands/${dir.${cmd}}/${cmd}
|
||||||
${INSTALL} $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
${PROGROOT}/commands/$(dir.${cmd})/${cmd}:
|
${PROGROOT}/commands/$(dir.${cmd})/${cmd}:
|
||||||
${MAKE} -C ${NETBSDSRCDIR}/commands/${dir.${cmd}} ${cmd}
|
${MAKE} -C ${NETBSDSRCDIR}/commands/${dir.${cmd}} all
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for etc in ${EXTRA}
|
.for etc in ${EXTRA}
|
||||||
|
@ -101,7 +129,7 @@ ${cmd}: ${PROGROOT}/usr.sbin/${cmd}/${cmd}
|
||||||
${INSTALL} $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
${PROGROOT}/usr.sbin/${cmd}/${cmd}:
|
${PROGROOT}/usr.sbin/${cmd}/${cmd}:
|
||||||
${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${cmd} ${cmd}
|
${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${cmd} all
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for server in ${PROG_SERVERS}
|
.for server in ${PROG_SERVERS}
|
||||||
|
@ -109,7 +137,7 @@ ${server}: ${PROGROOT}/servers/${server}/${server}
|
||||||
${INSTALL} $> $@
|
${INSTALL} $> $@
|
||||||
|
|
||||||
${PROGROOT}/servers/${server}/${server}:
|
${PROGROOT}/servers/${server}/${server}:
|
||||||
${MAKE} -C ${NETBSDSRCDIR}/servers/${server} ${server}
|
${MAKE} -C ${NETBSDSRCDIR}/servers/${server} all
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
etc/master.passwd: ${NETBSDSRCDIR}/etc/master.passwd
|
etc/master.passwd: ${NETBSDSRCDIR}/etc/master.passwd
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
libexec d--755 0 0
|
libexec d--755 0 0
|
||||||
ld.elf_so ---755 0 0 /usr/libexec/ld.elf_so
|
ld.elf_so ---755 0 0 ld.elf_so
|
||||||
$
|
$
|
||||||
usr d--755 0 0
|
usr d--755 0 0
|
||||||
lib d--755 0 0
|
lib d--755 0 0
|
||||||
libc.so.0 ---755 0 0 /usr/lib/libc.so.0
|
libc.so.0 ---755 0 0 libc.so.0
|
||||||
libminlib.so.0 ---755 0 0 /usr/lib/libminlib.so.0
|
libminlib.so.0 ---755 0 0 libminlib.so.0
|
||||||
libcompat_minix.so.0 ---755 0 0 /usr/lib/libcompat_minix.so.0
|
libcompat_minix.so.0 ---755 0 0 libcompat_minix.so.0
|
||||||
libterminfo.so.0 ---755 0 0 /usr/lib/libterminfo.so.0
|
libterminfo.so.0 ---755 0 0 libterminfo.so.0
|
||||||
$
|
$
|
||||||
$
|
$
|
||||||
|
|
Loading…
Reference in a new issue