Page MenuHomeFreeBSD

Fix the 'linux' rc script on aarch64.

Authored by trasz on Mar 16 2021, 4:49 PM.



Previously it would try to load linux.ko instead of linux64.ko
and fail.

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

trasz requested review of this revision.Mar 16 2021, 4:49 PM
emaste added inline comments.

Do we actually use linuxaout anywhere? I think this might be dead?


Well, not dead, but could just be load_kld -e linuxelf linux

Good point; we still seem to support a.out on i386, but here it's only being used to determine whether we need to load the module or not, and ELF is enough to do that.

Right - as far as I can tell we only ever register a 'linuxelf' module, not 'linuxaout'

It looks like it originally arrived in

commit 27bc1b287e497f817ea9d08f319e7c7dceb413c4
Author: Gordon Tetlow <>
Date:   Thu Jun 13 22:14:37 2002 +0000

    Merge in all the changes that Mike Makonnen has been maintaining for a
    while. This is only the script pieces, the glue for the build comes next.
    Submitted by:   Mike Makonnen <>
    Reviewed by:    silence on -current and -hackers
    Prodded by:     rwatson

    svn path=/head/; revision=98184


+       if ! kldstat -v | grep -E 'linux(aout|elf)' > /dev/null; then
+               kldload linux > /dev/null 2>&1
+       fi

Perhaps the linuxulator module was originally split in two parts or such.

This revision is now accepted and ready to land.Mar 17 2021, 1:57 PM
This revision was automatically updated to reflect the committed changes.

Can we also get this patch backported to 13-STABLE?

I'm currently working on getting Linux Aarch64 ports working on 13, and this is a prerequisite.

Honestly, for arm64 we need all of Linuxulator backported to 13-STABLE. The one currently there doesn't support some pretty basic things, like signal delivery.

Any help with this is welcome, btw. It should be largely just merging, rebuilding, and testing, and perhaps resolving dependencies.