svn commit: r239679 - head/sys/mips/conf

Garrett Cooper yanegomi at gmail.com
Tue Sep 4 23:31:08 UTC 2012


On Tue, Sep 4, 2012 at 3:01 PM, Dag-Erling Smørgrav <des at des.no> wrote:
> Garrett Cooper <yanegomi at gmail.com> writes:
>> Dag-Erling Smørgrav <des at des.no> writes:
>> > It doesn't build the BERI kernels because they're mips64/mips, and
>> > it only builds mips/mips.
>> Does it sanitize TARGETS and KERNCONFs properly?
>
> I have no idea what that even means.

Answering myself, it should if TARGET isn't explicitly defined to
something that the conversion logic wouldn't create collisions for
(from .../Makefile in stable/9):

405 KERNCONFS!=     cd ${KERNSRCDIR}/${TARGET}/conf && \
406                 find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
407                 ! -name DEFAULTS ! -name NOTES
408 universe_kernconfs:
409 .for kernel in ${KERNCONFS}
410 TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \
411         config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \
412         grep -v WARNING: | cut -f 2
413 .if empty(TARGET_ARCH_${kernel})
414 .error "Target architecture for ${TARGET}/conf/${kernel} unknown.
config(8)     likely too old."
415 .endif

In particular TARGETS_ARCHS=mips64:mips might not work in all cases, right?

$ make -VKERNCONFS TARGET=mips TARGET_ARCH=mips64 tinderbox
ADM5120 ALCHEMY AP91 AP93 AP94 AP96 AR71XX_BASE AR724X_BASE
AR91XX_BASE BERI_DE4_MDROOT BERI_DE4_SDROOT BERI_SIM_MDROOT
BERI_TEMPLATE DIR-825 GXEMUL IDT MALTA MALTA64 OCTEON1 PB47 PB92 QEMU
ROUTERSTATION ROUTERSTATION_MFS RSPRO RSPRO_MFS RSPRO_STANDALONE
RT305X SENTRY5 SWARM SWARM64 SWARM64_SMP SWARM_SMP TP-WN1043ND XLP
XLP64 XLPN32 XLR XLR64 XLRN32
$ make -VKERNCONFS TARGET=mips TARGET_ARCH=mips tinderbox
ADM5120 ALCHEMY AP91 AP93 AP94 AP96 AR71XX_BASE AR724X_BASE
AR91XX_BASE BERI_DE4_MDROOT BERI_DE4_SDROOT BERI_SIM_MDROOT
BERI_TEMPLATE DIR-825 GXEMUL IDT MALTA MALTA64 OCTEON1 PB47 PB92 QEMU
ROUTERSTATION ROUTERSTATION_MFS RSPRO RSPRO_MFS RSPRO_STANDALONE
RT305X SENTRY5 SWARM SWARM64 SWARM64_SMP SWARM_SMP TP-WN1043ND XLP
XLP64 XLPN32 XLR XLR64 XLRN32

You have to explicitly set the machine directive in the KERNCONF in
order for it to only compile on one TARGET_ARCH:

$ egrep -r 'machine.*64' sys/mips/conf/
sys/mips/conf/XLP64:machine     mips mips64
sys/mips/conf/BERI_TEMPLATE:machine             mips mips64
sys/mips/conf/GXEMUL:machine            mips mips64
sys/mips/conf/XLR64:machine     mips mips64
sys/mips/conf/SWARM64:machine           mips mips64
sys/mips/conf/SWARM64_SMP:machine               mips mips64
sys/mips/conf/MALTA64:machine           mips mips64el   # Malta
supports both, so it isn't in std.malta

Thanks!
-Garrett

PS I think brooks@ is aware of what needs to be fixed and is working
on the solution.


More information about the svn-src-head mailing list