Re: Can't load linux64.ko module

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Wed, 4 Apr 2018 13:19:55 -0700
On Wed, Apr 04, 2018 at 12:09:02PM -0700, Steve Kargl wrote:
> 
> kernel config file contains
> 
> options         COMPAT_LINUX32
> options         COMPAT_LINUXKPI
> options         LINPROCFS
> 
> When booting, the kernel tries to load the module.  A manual
> loading of the module results in
> 
> % kldload /boot/kernel/linux64.ko
> kldload: an error occurred while loading module /boot/kernel/linux64.ko.
> Please check dmesg(8) for more details.
> sleepdirt:fvwm:root[203] dmesg | tail -2
> link_elf_obj: symbol elf64_linux_vdso_fixup undefined
> linker_load_file: /boot/kernel/linux64.ko - unsupported file type
> 
> Now, that I look at /sys/amd64/conf/NOTES again, I find that
> there is a COMPAT_LINUX as well as the COMPAT_LINUX32.  I must
> have conflated that two options into being the same thing.
> 

Hmmm, this is interesting.  /sys/amd64/conf/NOTES contains

Lines 270-271
# To enable Linuxulator support, one must also include COMPAT_LINUX in the
# config as well.  The other option is to load both as modules.

And then lines 636-637

# Enable Linux ABI emulation
#XXX#options 	COMPAT_LINUX

with no explanation of the #XXX notations.  So, building the
kernel with COMPAT_LINUX gives

===> SLEEPDIRT
mkdir -p /usr/obj/usr/src/amd64.amd64/sys
--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/amd64/conf;  PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin  config  -d /usr/obj/usr/src/amd64.amd64/sys/SLEEPDIRT  -I '/usr/src/sys/amd64/conf' '/usr/src/sys/amd64/conf/SLEEPDIRT'
/usr/src/sys/amd64/conf/SLEEPDIRT: unknown option "COMPAT_LINUX"
*** [buildkernel] Error code 1

make[1]: stopped in /usr/src
1 error

I guess XXX means Linux emulation isn't supported.  Bummer.


-- 
Steve
Received on Wed Apr 04 2018 - 18:19:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:15 UTC