Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cross-compiling kernel



Hi all,

I want to build an x86 kernel on my faster amd64 machine, also to share and test the same patches prepared by Maya for the ACPI sleep problems on another laptop where actually I use "release 7.1"

To build the "native" kernel I used:

./build.sh -U -u tools
./build kernel=CONFNAME

Is building an x86 a "full cross compile" ? I suppose yes and I followef the NetBSD build for sparc, just with x86.
I want to use the standard kernel GENERIC, thus I did:

./build.sh -U -m i386 -u tools

I don't get a full x86 toolchain though, in /usr/obj I find:
$ ls /usr/obj/
sys                                     tools
tooldir.NetBSD-8.99.1-amd64

I expected instead something like:
/usr/obj/tooldir.NetBSD-8.99.1-i386

build.sh says:
===> build.sh command:    ./build.sh -U -m i386 -u tools
===> build.sh started:    Fri Aug  4 14:11:18 CEST 2017
===> NetBSD version:      8.99.1
===> MACHINE:             i386
===> MACHINE_ARCH:        i386
===> Build platform:      NetBSD 8.99.1 amd64
===> HOST_SH:             /bin/sh
===> MAKECONF file:       /etc/mk.conf
#    objdir  /usr/obj/
===> TOOLDIR path: /usr/src/obj/tooldir.NetBSD-8.99.1-amd64
===> DESTDIR path:        /usr/src/obj/destdir.i386
===> RELEASEDIR path:     /usr/src/obj/releasedir
===> Updated makewrapper: /usr/src/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbmake-i386

so it is expected apparently.

although I find inside multiple binaries, e.g. :
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbmake
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbmake-amd64
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbmake-i386

I thus tried:
$ /usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbmake-i386 depend

but this fails:
/usr/src/obj/tooldir.NetBSD-8.99.1-amd64/bin/nbgenassym: /usr/src/obj/tooldir.NetBSD-8.99.1-amd64/bin/i486--netbsdelf-gcc: not found

I have several i486 tools, but not all:
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/i486--netbsdelf-dbsym
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/i486--netbsdelf-fdisk
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/i486--netbsdelf-install
/usr/obj/tooldir.NetBSD-8.99.1-amd64/bin/i486--netbsdelf-mdsetimage


Where am I doing something wrong?

Riccardo


Home | Main Index | Thread Index | Old Index