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)
Sun, Apr 21, 8:27 PM
Unknown Object (File)
Sat, Apr 20, 5:11 AM
Unknown Object (File)
Sat, Apr 20, 12:36 AM
Unknown Object (File)
Wed, Apr 17, 8:06 PM
Unknown Object (File)
Fri, Apr 12, 7:22 PM
Unknown Object (File)
Fri, Apr 12, 6:28 PM
Unknown Object (File)
Fri, Apr 12, 3:22 PM
Unknown Object (File)
Mar 16 2024, 9:22 PM

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37893
Build 34782: arc lint + arc unit

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.