From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2C87C433DB for ; Thu, 25 Mar 2021 18:53:29 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B3B161A3E for ; Thu, 25 Mar 2021 18:53:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B3B161A3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lPV6P-0001Ye-Ua; Thu, 25 Mar 2021 14:53:05 -0400 Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lPV6O-0001YZ-EO for kernelnewbies@kernelnewbies.org; Thu, 25 Mar 2021 14:53:04 -0400 Received: by mail-vk1-xa2e.google.com with SMTP id u144so634810vkb.13 for ; Thu, 25 Mar 2021 11:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lwoOh+CWDvDO7bSDReHP1yPZuc3xCyMqs390ZjD5Am8=; b=Td8reewYOfsx9WykiHQ8CqhXNBRGLXVPEguaDAq+zVm600Lnov/F7VD0nGJi79Izxg 6/19Zu8IGnPiCK5PH92HNsCoFnECxR1uuQCD2KUTuC6KxyXrq6ThOCzJ5C5xKmehvIf9 bxoiuATTA2X91jT+dr2YGpFQO7FkU/ZM7ZCI09Qxv8rkeeod/GEn8dfnZ3UV4aOKmvRF kQoFWN1QHAR9m6BtWK+GcQ3GvU5pXnukrIVqqovLnqWETT92CoxaYCGDHI540jbFjVX/ nohQqO9SCFXzmXJrTVsl7R9KrM0+NSve9XjQKo/20Tf1TFR3UCMkVCMSFQdLtfYC3rSA JmgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lwoOh+CWDvDO7bSDReHP1yPZuc3xCyMqs390ZjD5Am8=; b=HCh7UtpkkRukTYNsH09vOrJxtYdCfc8MHc143xnEHRYpSP+ERUCVn3jFTEA/ainEEH sO0/ooH0QhxauJ4gSuXBFE/Sl70cJMzZVdjb7Hky2mhPLtP8SUYhi+NwXbLFg4MTkeJl 4M0+B5T8ECjgHOW5EFIRzd5xbiNfpFrk27W+dcahy2yzfbttZPeZ43ZCQuB2lCbVipff b0my9nhj8nTQ0cQ1nENdWPgbYqXAPCsgfZv2X2UlUeoa/HL2q9Z6bzhfqddQaBpAW9Nw 5k4Amtn9dreIYUzdYoMmvKPkc+ZlqAlHkYctdxjLSr0RAd8Z9B1eCb40vxcDMu2CoMu1 Q1qQ== X-Gm-Message-State: AOAM532i4Qu546Fha1EhL27fPyEPTsUi7yNLU6TZP0d9RuN6OfrJyTGL +APmUn/TsXfjghrvY3HxxBBfdXV1JWtL7ioECuM= X-Google-Smtp-Source: ABdhPJx8aSCCpdwtWoC3UsCr1ap3GZJsOk6dhZRYLKFo3cXN9RlAHmNhCJ9CYnEKJ5FPws3FNeawfpfTveqiZ0y+3Wk= X-Received: by 2002:a1f:4191:: with SMTP id o139mr6799294vka.8.1616698383018; Thu, 25 Mar 2021 11:53:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: jim.cromie@gmail.com Date: Thu, 25 Mar 2021 12:52:36 -0600 Message-ID: Subject: Re: make menuconfig To: Martin Herdeis Cc: Kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6753718507089678080==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============6753718507089678080== Content-Type: multipart/alternative; boundary="000000000000d42f1b05be60ecc1" --000000000000d42f1b05be60ecc1 Content-Type: text/plain; charset="UTF-8" On Sat, Mar 20, 2021 at 1:07 PM Martin Herdeis wrote: > Hello, > > I am trying to learn more about the kernel build system and due to that I > tried the following in the top level Kconfig file right at the beginning: > > config FOO > tristate > prompt "FOO" > config BAR > tristate "BAR" if FOO > i suspect that last line - it feels like a thinko, combining a declaration and a dependency. moreover, `ack tristate` (recursive grep w other nicetohaves) shows 0 such uses. heres typical usage drivers/infiniband/hw/hfi1/Kconfig 3: tristate "Intel OPA Gen1 support" drivers/infiniband/hw/vmw_pvrdma/Kconfig 3: tristate "VMware Paravirtualized RDMA Driver" drivers/infiniband/hw/mlx4/Kconfig 3: tristate "Mellanox ConnectX HCA support" drivers/infiniband/hw/mthca/Kconfig 3: tristate "Mellanox HCA support" drivers/infiniband/hw/qib/Kconfig 3: tristate "Intel PCIe HCA support" > default y > > Then I do a make menuconfig and choose the config option FOO with "m" then > the config option BAR shows up with "y". if I exit and save this > constellation m/y shows up in the .config file. But as I understand the > logic the value of the config option FOO defines the upper level for the > value of the config option BAR. > > When I do just a make menuconfig again both options show up as m even > though in the .config file they are still saved as y/m. > > Is that a problem with the default value of BAR? Am I not supposed to give > it a default value out of range when FOO is m? > > > Thank you, > > Martin > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > --000000000000d42f1b05be60ecc1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable





=
shows 0 such uses.

heres typical usage
<= div>
drivers/infiniband/hw/hfi1/Kconfig
3: tristate "Intel OPA G= en1 support"

drivers/infiniband/hw/vmw_pvrdma/Kconfig
3: tri= state "VMware Paravirtualized RDMA Driver"

drivers/infinib= and/hw/mlx4/Kconfig
3: tristate "Mellanox ConnectX HCA support"= ;

drivers/infiniband/hw/mthca/Kconfig
3: tristate "Mellanox = HCA support"

drivers/infiniband/hw/qib/Kconfig
3: tristate &= quot;Intel PCIe HCA support"


=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 default y
=C2=A0
Then I do a make menuconfig and choose the config option FOO with &quo= t;m" then the config option BAR shows up with "y". if I exit= and save this constellation m/y shows up in the .config file. But as I und= erstand the logic the value of the config option FOO defines the upper leve= l for the value of the config option BAR.
=C2=A0
When I do just a make menuconfig again both options show up as m even = though in the .config file they are still saved as y/m.
=C2=A0
Is that a problem with the default value of BAR? Am I not supposed to = give it a default value out of range when FOO is m?
=C2=A0
=C2=A0
Thank you,
=C2=A0
Martin
_______________________________________________
Kernelnewbies mailing list
Kernel= newbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailma= n/listinfo/kernelnewbies
--000000000000d42f1b05be60ecc1-- --===============6753718507089678080== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============6753718507089678080==--