For newly created operating systems, one of the main problems is writing drivers for a variety of devices, and that’s why I have this question.

Do you think it’s possible to create a transitional layer to run Linux drivers(or from some other os) for your own kernel without porting each one, or is it pointless because it would require recreating almost the entire Linux kernel?

  • gid@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    19 days ago

    It’s possible, but depending on the driver you want to support you’d be doing a lot of work implementing the Linux API for your kernel. At which point, you’ve basically created an alternative Linux kernel.

  • BillibusMaximus@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    19 days ago

    With the caveat that I’ve done some, but very little, kernel development -

    NDISwrapper allows(allowed? Not sure if it’s still used) Linux to use network drivers written for Windows.

    So that kind of thing is certainly possible.

    You would likely need to implement the relevant parts of the Linux kernel API as part of your translation layer, then map it (with additional translation code for compatibility) to your OS’s native functions.

    But it would certainly be a big undertaking.

  • TurboWafflz@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    19 days ago

    I know there’s a project for freebsd called wifibox which runs wifi drivers in a small linux VM for hardware that doesn’t have native freebsd support