Re: how to have the kernel do udev's job and autoload the right modules ?

From: Ken Moffat
Date: Wed May 06 2015 - 12:56:05 EST


On Wed, May 06, 2015 at 01:54:27AM +0100, linuxcbon linuxcbon wrote:
> On Tue, May 5, 2015 at 11:26 PM, Ken Moffat <zarniwhoop@xxxxxxxxxxxx> wrote:
> > I don't think you have ever given any context about what you are
> > trying to do. It looks to me as if there are two alternatives:
> (...)
> I am trying to write a minimal rc.sysinit
> Only the udev part is missing , because the kernel doesn't
> know how to modprobe many modules by itself.
> (Without udev, I can boot up to desktop, but sound , network and
> full screen video are missing.)
>
> > 1. You are building for a particular machine.
> > 2. You are building a distro.
> > Äen
> (...)
> I need it to work for any hardware, (well normal pc), so answer 2.
> I need udev to detect and modprobe which modules are needed.
>
> linuxcbon

So, your earlier comment that only two different network drivers and
two sound drivers are needed will turn out to be incorrect when you
have access to more hardware.

And when that happens, you will discover that there are all sorts of
things which differ - since you asked on the kernel list, I will
mention KMS for the video, of which we have at least three variants
on x86 hardware.

I suggest that you take the time to look at eudev and mdev, and
think about how you can use the facilities they offer.

Alternatively, get over your dislike of modprobe and write some
scripts - perhaps using lspci as well as reading /sys - to work out
what hardware is present.

If you have not compiled all of the necesary disk drivers into the
kernel, you are likely to find that some (older) machines will not
be able to access their disk(s). But we all learn best when we try
things out, so I wish you an enjoyable learning experience!

Äen
--
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/