Page MenuHomeFreeBSD

Fix the 'linux' rc script on aarch64.
ClosedPublic

Authored by trasz on Mar 16 2021, 4:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 10:28 PM
Unknown Object (File)
Sat, Nov 9, 5:07 AM
Unknown Object (File)
Sun, Oct 20, 5:15 PM
Unknown Object (File)
Wed, Oct 16, 6:17 AM
Unknown Object (File)
Oct 14 2024, 7:52 PM
Unknown Object (File)
Oct 14 2024, 2:29 AM
Unknown Object (File)
Oct 12 2024, 1:08 PM
Unknown Object (File)
Oct 11 2024, 5:11 AM

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz requested review of this revision.Mar 16 2021, 4:49 PM
emaste added inline comments.
libexec/rc/rc.d/linux
22

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

22

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 <gordon@FreeBSD.org>
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 <makonnen@pacbell.net>
    Reviewed by:    silence on -current and -hackers
    Prodded by:     rwatson

Notes:
    svn path=/head/; revision=98184

as

+       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.