Gentoo Archives: gentoo-releng

From: Daniel Drake <dsd@g.o>
To: gentoo-releng@l.g.o
Subject: Re: [gentoo-releng] Automating the process of building kernel pci drivers
Date: Tue, 19 Apr 2005 07:19:04
Message-Id: 4264B0F0.4090904@gentoo.org
In Reply to: [gentoo-releng] Automating the process of building kernel pci drivers by Chris White
1 Chris White wrote:
2 > Here's a proposal I had after talking over with some kernel devs and
3 > plasmaroo (since he works on genkernel):
4
5 Kernel hackers have been thinking about this for eternities but have never
6 come up with a perfect solution.
7
8 Here's one problem I can see:
9
10 http://sosdg.org/~coywolf/lxr/source/drivers/ide/pci/amd74xx.c#L504
11
12 You can see in that table, that support for certain devices depends on the
13 CONFIG_BLK_DEV_IDE_SATA option. When you do your first-pass, presumably using
14 a config where every PCI-related option is selected, you'll get the amd74xx
15 driver providing support for those devices. Your script needs to be able to
16 detect that support for that particular device is *also* dependant on that
17 option, otherwise it wouldn't be selected when the users build.
18 [ This is ignoring the fact that there's another driver for this hardware in
19 the kernel. I'm sure there are other drivers which genuinely depend on certain
20 other config options for device support ]
21
22 Which brings up the next question, once the utility has figured out that I
23 need modules including snd-intel8x0, amd74xx, forcedeth, how is it going to
24 then deduce that the options required are CONFIG_SND_INTEL8X0,
25 CONFIG_BLK_DEV_AMD74XX and CONFIG_FORCEDETH?
26
27 Also, the clashing problem.. Drivers such as 8139cp and 8139too support the
28 same PCI devices, but you can't figure out which driver is useful until you
29 probe the hardware. It's usually safe to build both. But when you come to
30 other situations, such as sk98lin vs skge (almost identical device tables),
31 you are only ever going to want one or the other.
32
33 Daniel
34 --
35 gentoo-releng@g.o mailing list