Re: tristate and bool not enogh for Kconfig anymore



On Sun, 21 Oct 2007 12:24:02 +0200 Henrik Carlqvist wrote:

On Sun, 21 Oct 2007 00:47:38 -0400
Valdis.Kletnieks@xxxxxx wrote:

On Sat, 20 Oct 2007 21:17:00 +0200, Sam Ravnborg said:
I assume
depends on MODULES

should do the trick.

Umm... I think that will work backwards, and give you CONFIG_FOO=y
if.f the kernel *supports* modules. What he needs is to be able to say
CONFIG_FOO=n or CONFIG_FOO=m, but *ban* CONFIG_FOO=y.

Yes, thats right, MODULES does not ban y as would be needed. As an example

Agreed.

I tried to do a quick test, I edited drivers/scsi/qla2xxx/Kconfig to look
like this:

-8<-------------------------------------------------------
config SCSI_QLA_FC
tristate "QLogic QLA2XXX Fibre Channel Support"
depends on PCI && SCSI && MODULES
select SCSI_FC_ATTRS
select FW_LOADER
---help---
This qla2xxx driver supports all QLogic Fibre Channel
PCI and PCIe host adapters.

By default, firmware for the ISP parts will be loaded
via the Firmware Loader interface.

ISP Firmware Filename
---------- -----------------
21xx ql2100_fw.bin
22xx ql2200_fw.bin
2300, 2312, 6312 ql2300_fw.bin
2322, 6322 ql2322_fw.bin
24xx ql2400_fw.bin

Upon request, the driver caches the firmware image until
the driver is unloaded.

Firmware images can be retrieved from:

ftp://ftp.qlogic.com/outgoing/linux/firmware/
-8<-------------------------------------------------------

The only thing that I did change was that I added "&& MODULES" to the
depends line. However, this only causes the driver to be possible to build
when you build a kernel with module support. Still tristate allows you to
build it both as a module and as a driver built into the kernel. However,
when built into the kernel the driver is unusable as it needs its firmware
which it can't reach.

Is there any other way to specify that a functionality can only be built
as a module, not built into the kernel?

config FOO
depends on BAR && m

restricts FOO to module-only.

In my firsta attempts to post about these tests my post ended up not on
the mailing list but as a reply to Sam Ravnborg only, apologies for
that...

---
~Randy
-
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/



Relevant Pages

  • Re: Linux GPL and binary module exception clause?
    ... >> But also note how it's only the BINARY MODULE that is a derived work. ... > a device driver containing a binary blob that was explicitly written as ... Clearly it no longer depends on the kernel, and you can show that to ... And I think this argument is _especially_ strong for things like firmware ...
    (Linux-Kernel)
  • Re: ndis0 interrrupt storm
    ... crashdump from a non-debug kernel, ... I built a driver with the XP driver using ndisgen and the same source as ... I got a panic but I couldn't get a crashdump with the GENERIC kernel ...
    (freebsd-questions)
  • Re: ndis0 interrrupt storm
    ... crashdump from a non-debug kernel, ... I built a driver with the XP driver using ndisgen and the same source as ... I got a panic but I couldn't get a crashdump with the GENERIC kernel ...
    (freebsd-questions)
  • Re: [PATCH 2/3] firmware: Add CONFIG_BUILTIN_FIRMWARE option
    ... the kernel handles device nodes and on how udev maps them to real ... Please keep in mind that when we created request_firmwaremost of the driver model developers still thought that having class devices was a good idea. ... That has changed and to represent firmware loading in a clean and race free environment where you could load multipl firmwares at the same time for the same driver, ... firmware files inside the kernel. ...
    (Linux-Kernel)
  • Re: [PATCH] request_firmware: skip timeout if userspace was not notified
    ... needs to be removed from the kernel, that's known for a very long ... your point is that the firmware loader is ... or use a kernel module for the driver that needs ... kernel on boot if built in unless an initramfs is carefully ...
    (Linux-Kernel)