support for integer comparison in kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i tried searching but couldnt find anything relevant ... has there
been discussion on the topic of adding integer comparison operators to
the kconfig language ?

for example, in the Blackfin world we control the supported silicon
revision selection (older versions have too many bugs to run Linux
while newer ones arent supported by the toolchain):
config BF_REV_MIN
    int
    default 0 if (BF52x || BF54x)
    default 2 if (BF537 || BF536 || BF534)
config BF_REV_MAX
    int
    default 2 if (BF52x || BF54x)
    default 3 if (BF537 || BF536 || BF534)

we then use these permissible values to build a list of silicon revision flags:
choice
    prompt "Silicon Rev"
config BF_REV_0_0
    bool "0.0"
config BF_REV_0_1
    bool "0.1"
config BF_REV_0_2
    bool "0.2"
config BF_REV_ANY
    bool "any"
config BF_REV_NONE
    bool "none"
endchoice

we'd like to have each numeric config have a depend string like so:
    depends on (BF_REV_MIN <= # && # <= BF_REV_MAX)
unless there is some other kconfig magic i'm not aware of to do this better ?

side note, kconfig will silently transform "<=" into "=" ... boy that
killed some time trying to figure out wtf was going on ;)
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux