On Jun 14, 2014, at 3:57 PM, Oliver Pinter <oliver.pntr@gmail.com> wrote:
> On 6/13/14, John Baldwin <jhb@freebsd.org> wrote:
>> On Friday, June 13, 2014 6:21:28 am Oliver Pinter wrote:
>>> Hi All!
>>> =
>>> When I try to build i386 kernel on amd64 host running compile error
>>> due wrong cpufunc.h picked up by build system.
>>> =
>>> I used the attached script to build the kernel, and I attached a build
>>> log.
>>> =
>>> Any suggestion how can I fix this?
>> =
>> To build an i386 kernel on an amd64 host do this:
>> =
>> cd /usr/src (or some other tree)
>> make TARGET=3Di386 kernel-toolchain
>> make TARGET=3Di386 buildkernel
>> make TARGET=3Di386 installkernel DESTDIR=3D/some/place
>> =
>> And your i386 kernel will end up in /some/place/boot/kernel/kernel. (You
>> can
>> set things like KERNCONF to pick an alternate kernel config just as with
>> normal 'make buildkernel'.)
>> =
>> (Your attachment was size zero for me btw)
>> =
>> --
>> John Baldwin
>> =
> =
> I used this script to build the kernel:
> http://svnweb.freebsd.org/socsvn/soc2014/op/tools/build_kernel_32bit.csh?=
view=3Dlog
> =
> And the error log are there:
> https://gist.github.com/opntr/cf8aa0e404c0c5ed6f90 .
> I get this error, when I first build kernel for amd64 system, and
> after that i386 kernel, and only the kernel.
> =
> Now seems like I can build the whole system with buildworld
> buildkernel on vanilla master, I removed the objdir and do a clean
> buildworld. Now I test the modified kernel build, after the
> buildworld.
> =
> It is broken too. When I do only make kernel-toolchain buildkernel,
> than this are broken for vanilla freebsd source and for my version to.
> =
> summary:
> OK: make buildworld buildkernel
> BROKEN: make kernel-toolchain buildkernel
On the same line? O?r is that just a summary?
> Seems like someone in build environment bootstrapping are broken.
I=92ve not been able to reproduce this.
rm -rf $OBJDIR
make TARGET=3Di386 kernel-toolchain
make TARGET=3Di386 buildkernel
works just fine on current with a clean tree and an empty/missing make.conf=
and src.conf.
As for your script, don=92t define MACHINE and MACHINE_ARCH. That=92s almos=
t always wrong since that overrides things on the command line, which is wh=
at make buildkernel winds up translating to. You never need to define those=
yourself in any supported environment, and likely most unsupported ones.
Also, I=92d strongly recommend doing it as two invocations to make, not one=
.. kernel-toolchain likely doesn=92t have all the right guards in place for =
it that buildworld likely does. Or you can dive in and figure that out. You=
can=92t really do anything *kernel* related until kernel-toolchain finishe=
s=85
Warner
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"