Changeset View
Changeset View
Standalone View
Standalone View
head/sys/conf/kern.post.mk
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_CPUARCH} \ | ||||
${.CURDIR}/gdbinit.machine | ${.CURDIR}/gdbinit.machine | ||||
.endif | .endif | ||||
.endif | .endif | ||||
${FULLKERNEL}: ${SYSTEM_DEP} vers.o | ${FULLKERNEL}: ${SYSTEM_DEP} vers.o | ||||
@rm -f ${.TARGET} | @rm -f ${.TARGET} | ||||
@echo linking ${.TARGET} | @echo linking ${.TARGET} | ||||
${SYSTEM_LD} | ${SYSTEM_LD} | ||||
.if !empty(MD_ROOT_SIZE_CONFIGURED) && defined(MFS_IMAGE) | |||||
@sh ${S}/tools/embed_mfs.sh ${.TARGET} ${MFS_IMAGE} | |||||
.endif | |||||
.if ${MK_CTF} != "no" | .if ${MK_CTF} != "no" | ||||
@echo ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ... | @echo ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ... | ||||
@${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o | @${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o | ||||
.endif | .endif | ||||
.if !defined(DEBUG) | .if !defined(DEBUG) | ||||
${OBJCOPY} --strip-debug ${.TARGET} | ${OBJCOPY} --strip-debug ${.TARGET} | ||||
.endif | .endif | ||||
${SYSTEM_LD_TAIL} | ${SYSTEM_LD_TAIL} | ||||
▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | |||||
vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h | vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h | ||||
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -h | ${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -h | ||||
vnode_if_newproto.h: | vnode_if_newproto.h: | ||||
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -p | ${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -p | ||||
vnode_if_typedef.h: | vnode_if_typedef.h: | ||||
${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q | ${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q | ||||
.if ${MFS_IMAGE:Uno} != "no" | .if ${MFS_IMAGE:Uno} != "no" | ||||
.if empty(MD_ROOT_SIZE_CONFIGURED) | |||||
# Generate an object file from the file system image to embed in the kernel | # Generate an object file from the file system image to embed in the kernel | ||||
# via linking. Make sure the contents are in the mfs section and rename the | # via linking. Make sure the contents are in the mfs section and rename the | ||||
# start/end/size variables to __start_mfs, __stop_mfs, and mfs_size, | # start/end/size variables to __start_mfs, __stop_mfs, and mfs_size, | ||||
# respectively. | # respectively. | ||||
embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} | embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} | ||||
${OBJCOPY} --input-target binary \ | ${OBJCOPY} --input-target binary \ | ||||
--output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \ | --output-target ${EMBEDFS_FORMAT.${MACHINE_ARCH}} \ | ||||
--binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \ | --binary-architecture ${EMBEDFS_ARCH.${MACHINE_ARCH}} \ | ||||
${MFS_IMAGE} ${.TARGET} | ${MFS_IMAGE} ${.TARGET} | ||||
${OBJCOPY} \ | ${OBJCOPY} \ | ||||
--rename-section .data=mfs,contents,alloc,load,readonly,data \ | --rename-section .data=mfs,contents,alloc,load,readonly,data \ | ||||
--redefine-sym \ | --redefine-sym \ | ||||
_binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_size=__mfs_root_size \ | _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_size=__mfs_root_size \ | ||||
--redefine-sym \ | --redefine-sym \ | ||||
_binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_start=mfs_root \ | _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_start=mfs_root \ | ||||
--redefine-sym \ | --redefine-sym \ | ||||
_binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \ | _binary_${MFS_IMAGE:C,[^[:alnum:]],_,g}_end=mfs_root_end \ | ||||
${.TARGET} | ${.TARGET} | ||||
.endif | |||||
.endif | .endif | ||||
# XXX strictly, everything depends on Makefile because changes to ${PROF} | # XXX strictly, everything depends on Makefile because changes to ${PROF} | ||||
# only appear there, but we don't handle that. | # only appear there, but we don't handle that. | ||||
.include "kern.mk" | .include "kern.mk" |