Add support for passing TARGET_CPUTYPE into the build. It's more
important for arm and mips than for the more generic x86 systems.
This commit is contained in:
parent
dbd69b0dc4
commit
d07833f981
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291112
@ -161,11 +161,16 @@ NANO_SLICE_DATA=s4
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Architecture to build. Corresponds to TARGET_ARCH in a buildworld.
|
# Architecture to build. Corresponds to TARGET_ARCH in a buildworld.
|
||||||
# Unfortunately, there's no way to set TARGET at this time, and it
|
# Unfortunately, there's no way to set TARGET at this time, and it
|
||||||
# conflates the two, so architectures where TARGET != TARGET_ARCH do
|
# conflates the two, so architectures where TARGET != TARGET_ARCH and
|
||||||
# not work. This defaults to the arch of the current machine.
|
# TARGET can't be guessed from TARGET_ARCH do not work. This defaults
|
||||||
|
# to the arch of the current machine.
|
||||||
|
|
||||||
NANO_ARCH=`uname -p`
|
NANO_ARCH=`uname -p`
|
||||||
|
|
||||||
|
# CPUTYPE defaults to "" which is the default when CPUTYPE isn't
|
||||||
|
# defined.
|
||||||
|
NANO_CPUTYPE=""
|
||||||
|
|
||||||
# Directory to populate /cfg from
|
# Directory to populate /cfg from
|
||||||
NANO_CFGDIR=""
|
NANO_CFGDIR=""
|
||||||
|
|
||||||
@ -235,7 +240,7 @@ build_world ( ) (
|
|||||||
pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw"
|
pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw"
|
||||||
|
|
||||||
cd ${NANO_SRC}
|
cd ${NANO_SRC}
|
||||||
env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \
|
env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} ${NANO_PMAKE} \
|
||||||
SRCCONF=${SRCCONF} \
|
SRCCONF=${SRCCONF} \
|
||||||
__MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \
|
__MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \
|
||||||
> ${MAKEOBJDIRPREFIX}/_.bw 2>&1
|
> ${MAKEOBJDIRPREFIX}/_.bw 2>&1
|
||||||
@ -256,9 +261,6 @@ build_kernel ( ) (
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${NANO_SRC};
|
cd ${NANO_SRC};
|
||||||
# unset these just in case to avoid compiler complaints
|
|
||||||
# when cross-building
|
|
||||||
unset TARGET_CPUTYPE
|
|
||||||
# Note: We intentionally build all modules, not only the ones in
|
# Note: We intentionally build all modules, not only the ones in
|
||||||
# NANO_MODULES so the built world can be reused by multiple images.
|
# NANO_MODULES so the built world can be reused by multiple images.
|
||||||
eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \
|
eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \
|
||||||
@ -299,7 +301,7 @@ install_world ( ) (
|
|||||||
pprint 3 "log: ${NANO_OBJ}/_.iw"
|
pprint 3 "log: ${NANO_OBJ}/_.iw"
|
||||||
|
|
||||||
cd ${NANO_SRC}
|
cd ${NANO_SRC}
|
||||||
env TARGET_ARCH=${NANO_ARCH} \
|
env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \
|
||||||
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
||||||
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \
|
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \
|
||||||
DESTDIR=${NANO_WORLDDIR} \
|
DESTDIR=${NANO_WORLDDIR} \
|
||||||
@ -313,7 +315,7 @@ install_etc ( ) (
|
|||||||
pprint 3 "log: ${NANO_OBJ}/_.etc"
|
pprint 3 "log: ${NANO_OBJ}/_.etc"
|
||||||
|
|
||||||
cd ${NANO_SRC}
|
cd ${NANO_SRC}
|
||||||
env TARGET_ARCH=${NANO_ARCH} \
|
env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \
|
||||||
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
||||||
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \
|
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \
|
||||||
DESTDIR=${NANO_WORLDDIR} \
|
DESTDIR=${NANO_WORLDDIR} \
|
||||||
@ -344,7 +346,8 @@ install_kernel ( ) (
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${NANO_SRC}
|
cd ${NANO_SRC}
|
||||||
eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \
|
eval "TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \
|
||||||
|
${NANO_MAKE} installkernel \
|
||||||
DESTDIR='${NANO_WORLDDIR}' \
|
DESTDIR='${NANO_WORLDDIR}' \
|
||||||
SRCCONF='${SRCCONF}' \
|
SRCCONF='${SRCCONF}' \
|
||||||
__MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \
|
__MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \
|
||||||
@ -358,7 +361,7 @@ native_xtools ( ) (
|
|||||||
pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
|
pprint 3 "log: ${NANO_OBJ}/_.native_xtools"
|
||||||
|
|
||||||
cd ${NANO_SRC}
|
cd ${NANO_SRC}
|
||||||
env TARGET_ARCH=${NANO_ARCH} \
|
env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \
|
||||||
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
${NANO_MAKE} SRCCONF=${SRCCONF} \
|
||||||
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \
|
__MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \
|
||||||
DESTDIR=${NANO_WORLDDIR} \
|
DESTDIR=${NANO_WORLDDIR} \
|
||||||
|
Loading…
Reference in New Issue
Block a user