diff options
author | imp <imp@FreeBSD.org> | 2011-02-11 02:37:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2011-02-11 02:37:47 +0000 |
commit | a5adf9c2c66af432cfdd5a146c805de2a39849bc (patch) | |
tree | 941a523a755aaa36840b86f35e281fe44e68fb31 /Makefile.inc1 | |
parent | dcd87e72a9bb5b46828d2c620521db90f4b79f34 (diff) | |
download | FreeBSD-src-a5adf9c2c66af432cfdd5a146c805de2a39849bc.zip FreeBSD-src-a5adf9c2c66af432cfdd5a146c805de2a39849bc.tar.gz |
CPUTYPE is now a required define for calling Makefile.inc1 diretly, so
make sure we define it for the xdev stuff.
Move xdev stuff to be last again in this file.
# xdev-build works now, but xdev-install appears to be broken though.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 84 |
1 files changed, 45 insertions, 39 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 0fd7e24..37fde6f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1389,11 +1389,54 @@ check-old: check-old-files check-old-libs check-old-dirs showconfig: @${MAKE} -n -f bsd.own.mk -V dummy -dg1 | grep ^MK_ | sort +.if !empty(KRNLOBJDIR) && !empty(KERNCONF) +DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ + +.if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) +.if exists(${KERNCONFDIR}/${KERNCONF}) +FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ + ${KERNCONFDIR}/${KERNCONF} +.endif +.endif + +.endif + +.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH}) +DTBOUTPUTPATH= ${.CURDIR} +.endif + +# +# Build 'standalone' Device Tree Blob +# +builddtb: + @if [ "${FDT_DTS_FILE}" = "" ]; then \ + echo "ERROR: FDT_DTS_FILE must be specified!"; \ + exit 1; \ + fi; \ + if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ + echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ + exist!"; \ + exit 1; \ + fi; \ + if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \ + echo "WARNING: DTB will be placed in the current working \ + directory"; \ + fi + @PATH=${TMPPATH} \ + dtc -O dtb -o \ + ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ + -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ############### .if defined(XDEV) && defined(XDEV_ARCH) +.if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH} +XDEV_CPUTYPE?=${CPUTYPE} +.else +XDEV_CPUTYPE?=${TARGET_CPUTYPE} +.endif + NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ -DWITHOUT_MAN -DWITHOUT_NLS -DWITHOUT_PROFILE \ -DWITHOUT_KERBEROS -DWITHOUT_RESCUE -DNO_WARNS @@ -1401,7 +1444,8 @@ NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT \ XDDIR=${XDEV}-freebsd XDTP=/usr/${XDDIR} CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ - TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} + TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ + CPUTYPE=${XDEV_CPUTYPE} CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDTP} \ TOOLS_PREFIX=${XDTP} @@ -1477,41 +1521,3 @@ _xi-links: ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \ done .endif - -.if !empty(KRNLOBJDIR) && !empty(KERNCONF) -DTBOUTPUTPATH= ${KRNLOBJDIR}/${KERNCONF}/ - -.if !defined(FDT_DTS_FILE) || empty(FDT_DTS_FILE) -.if exists(${KERNCONFDIR}/${KERNCONF}) -FDT_DTS_FILE!= awk 'BEGIN {FS="="} /^makeoptions[[:space:]]+FDT_DTS_FILE/ {print $$2}' \ - ${KERNCONFDIR}/${KERNCONF} -.endif -.endif - -.endif - -.if !defined(DTBOUTPUTPATH) || !exists(${DTBOUTPUTPATH}) -DTBOUTPUTPATH= ${.CURDIR} -.endif - -# -# Build 'standalone' Device Tree Blob -# -builddtb: - @if [ "${FDT_DTS_FILE}" = "" ]; then \ - echo "ERROR: FDT_DTS_FILE must be specified!"; \ - exit 1; \ - fi; \ - if [ ! -f ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} ]; then \ - echo "ERROR: Specified DTS file (${FDT_DTS_FILE}) does not \ - exist!"; \ - exit 1; \ - fi; \ - if [ "${DTBOUTPUTPATH}" = "${.CURDIR}" ]; then \ - echo "WARNING: DTB will be placed in the current working \ - directory"; \ - fi - @PATH=${TMPPATH} \ - dtc -O dtb -o \ - ${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \ - -p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE} |