Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2012 16:31:06 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= <des@des.no>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson <rwatson@freebsd.org>, John Baldwin <jhb@freebsd.org>
Subject:   Re: svn commit: r239679 - head/sys/mips/conf
Message-ID:  <CAGH67wT_9DhMnRoTyhO1c0_gkZ2g6bz0X9ptZ2gHoQ9jU7KkSQ@mail.gmail.com>
In-Reply-To: <86fw6xe9br.fsf@ds4.des.no>
References:  <201208251202.q7PC2EL6034670@svn.freebsd.org> <201209041517.52973.jhb@freebsd.org> <86k3w9e9tx.fsf@ds4.des.no> <CAGH67wRz9XTEkHqb71Ksvwt4S6i0ytqD14P4XNsoKEp-G-i7xw@mail.gmail.com> <86fw6xe9br.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 4, 2012 at 3:01 PM, Dag-Erling Sm=F8rgrav <des@des.no> wrote:
> Garrett Cooper <yanegomi@gmail.com> writes:
>> Dag-Erling Sm=F8rgrav <des@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!=3D     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}!=3D 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=3Dmips64:mips might not work in all cases, righ=
t?

$ make -VKERNCONFS TARGET=3Dmips TARGET_ARCH=3Dmips64 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=3Dmips TARGET_ARCH=3Dmips 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wT_9DhMnRoTyhO1c0_gkZ2g6bz0X9ptZ2gHoQ9jU7KkSQ>