[yocto] First attempt at x32 system: kernel panic

Paul D. DeRocco pderocco at ix.netcom.com
Mon Jun 5 16:13:55 PDT 2017

I took a functioning 32-bit x86 system built with Morty and successfully
converted it to 64-bit. Builds and runs fine. Next, I tried applying the
x32 tune, as described in the Yocto manual. I created another BSP layer,
changed all the names accordingly, set CONFIG_64BIT=y and CONFIG_X86_X32=y
in one of my .cfg files, set DEFAULTTUNE to "core2-64-x32", and set
baselib to the expression documented in the Yocto manual (which boils down
to "libx32"). It builds without complaint, but when I run it, I get a
kernel panic almost immediately.

The problem is that the kernel is being compiled as regular 64-bit code
while everything else is using the x32 tune as it should. The init program
is symlinked to systemd, which objdump shows as having an architecture of
i386:x64-32, while various object modules used to build the kernel show
i386:x86-64. Everything in /lib seems to be x64-32 except for the .ko
files in /lib/modules.

I thought perhaps the problem was that one of my .scc files specifies
KARCH as x86_64, which I used because "yocto-bsp list karch" only lists
that and i386 for this CPU. I guessed that there might be an x64_32
choice, and tried that, but it went ahead and built an x86_64 kernel again
without complaint. I also tried removing CONFIG_64BIT=y, with the same

So why am I getting a 64-bit kernel without the x32 tune?


Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com

More information about the yocto mailing list