Changeset View
Changeset View
Standalone View
Standalone View
Makefile
Show First 20 Lines • Show All 411 Lines • ▼ Show 20 Lines | |||||
# | # | ||||
# universe | # universe | ||||
# | # | ||||
# Attempt to rebuild *everything* for all supported architectures, | # Attempt to rebuild *everything* for all supported architectures, | ||||
# with a reasonable chance of success, regardless of how old your | # with a reasonable chance of success, regardless of how old your | ||||
# existing system is. | # existing system is. | ||||
# | # | ||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) | .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) | ||||
TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64 | TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 | ||||
_UNIVERSE_TARGETS= ${TARGETS} | _UNIVERSE_TARGETS= ${TARGETS} | ||||
TARGET_ARCHES_arm?= arm armeb armv6 | TARGET_ARCHES_arm?= arm armeb armv6 | ||||
TARGET_ARCHES_arm64?= aarch64 | TARGET_ARCHES_arm64?= aarch64 | ||||
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf | TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf | ||||
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe | TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe | ||||
TARGET_ARCHES_riscv= riscv64 riscv64sf | |||||
jhb: riscv64sf? | |||||
.for target in ${TARGETS} | .for target in ${TARGETS} | ||||
TARGET_ARCHES_${target}?= ${target} | TARGET_ARCHES_${target}?= ${target} | ||||
.endfor | .endfor | ||||
MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc | |||||
Not Done Inline ActionsWill need MARK_PARAMS_riscv64sf?= as well. Possibly it should be 'MAKE_PARAMS_<target>' instead as otherwise if we require an external GCC for MIPS it would be clumsy to list 9 identical MAKE_PARAMS_mips<foo>' vs a single MAKE_PARAMS_mips. jhb: Will need MARK_PARAMS_riscv64sf?= as well.
Possibly it should be 'MAKE_PARAMS_<target>'… | |||||
Not Done Inline ActionsI think that's fair - if we come to a situation where we need different $target_arch-specific params we can introduce them then. emaste: I think that's fair - if we come to a situation where we need different $target_arch-specific… | |||||
# XXX Remove riscv from universe if the required toolchain package is missing. | |||||
.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv} | |||||
Done Inline ActionsI wonder if we should check for /usr/local/share/toolchains/riscv64-gcc.mk instead? Even though I suspect riscv64-gcc depends on riscv64-binutils, we still require riscv64-xtoolchain-gcc to be installed for CROSS_TOOLCHAIN=riscv64-gcc to work emaste: I wonder if we should check for `/usr/local/share/toolchains/riscv64-gcc.mk` instead? Even… | |||||
Not Done Inline ActionsAgree! br: Agree! | |||||
_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv} | |||||
universe: universe_riscv_skip .PHONY | |||||
universe_epilogue: universe_riscv_skip .PHONY | |||||
universe_riscv_skip: universe_prologue .PHONY | |||||
@echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build" | |||||
.endif | |||||
.if defined(UNIVERSE_TARGET) | .if defined(UNIVERSE_TARGET) | ||||
MAKE_JUST_WORLDS= YES | MAKE_JUST_WORLDS= YES | ||||
.else | .else | ||||
UNIVERSE_TARGET?= buildworld | UNIVERSE_TARGET?= buildworld | ||||
.endif | .endif | ||||
KERNSRCDIR?= ${.CURDIR}/sys | KERNSRCDIR?= ${.CURDIR}/sys | ||||
targets: .PHONY | targets: .PHONY | ||||
Show All 33 Lines | |||||
.for target_arch in ${TARGET_ARCHES_${target}} | .for target_arch in ${TARGET_ARCHES_${target}} | ||||
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY | universe_${target}_worlds: universe_${target}_${target_arch} .PHONY | ||||
universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY | universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY | ||||
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" | @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" | ||||
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | ||||
${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ | ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ | ||||
TARGET=${target} \ | TARGET=${target} \ | ||||
TARGET_ARCH=${target_arch} \ | TARGET_ARCH=${target_arch} \ | ||||
${MAKE_PARAMS_${target}} \ | |||||
> _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ | > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ | ||||
(echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ | (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ | ||||
"check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ | "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ | ||||
${MAKEFAIL})) | ${MAKEFAIL})) | ||||
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" | @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" | ||||
.endfor | .endfor | ||||
.endif # !MAKE_JUST_KERNELS | .endif # !MAKE_JUST_KERNELS | ||||
Show All 39 Lines | |||||
.error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old." | .error "Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old." | ||||
.endif | .endif | ||||
universe_kernconfs: universe_kernconf_${TARGET}_${kernel} | universe_kernconfs: universe_kernconf_${TARGET}_${kernel} | ||||
universe_kernconf_${TARGET}_${kernel}: .MAKE | universe_kernconf_${TARGET}_${kernel}: .MAKE | ||||
@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ | ||||
${SUB_MAKE} ${JFLAG} buildkernel \ | ${SUB_MAKE} ${JFLAG} buildkernel \ | ||||
TARGET=${TARGET} \ | TARGET=${TARGET} \ | ||||
TARGET_ARCH=${TARGET_ARCH_${kernel}} \ | TARGET_ARCH=${TARGET_ARCH_${kernel}} \ | ||||
${MAKE_PARAMS_${TARGET}} \ | |||||
KERNCONF=${kernel} \ | KERNCONF=${kernel} \ | ||||
> _.${TARGET}.${kernel} 2>&1 || \ | > _.${TARGET}.${kernel} 2>&1 || \ | ||||
(echo "${TARGET} ${kernel} kernel failed," \ | (echo "${TARGET} ${kernel} kernel failed," \ | ||||
"check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) | "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) | ||||
.endfor | .endfor | ||||
universe: universe_epilogue | universe: universe_epilogue | ||||
universe_epilogue: .PHONY | universe_epilogue: .PHONY | ||||
@echo "--------------------------------------------------------------" | @echo "--------------------------------------------------------------" | ||||
Show All 38 Lines |
riscv64sf?