diff mbox

[3/3] Kconfig: add a default allrandom.config

Message ID 20180216214117.1947175-4-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann Feb. 16, 2018, 9:41 p.m. UTC
Building randconfig kernels frequently leads to build errors from
drivers that have additional build dependencies, or that we don't
want to build for compile-testing for some other reason.

We already have a couple of compile-time options that can deal with this
problem, but the complete set is not documented well.  We also have a
method to override some options during 'make randconfig' and a couple
of other make targets. However, we don't yet combine those two.

This adds a new allrandom.config file to turn on CONFIG_COMPILE_TEST,
CONFIG_STANDALONE and CONFIG_PREVENT_FIRMWARE_BUILD for all randconfig
builds. This in turn disables some other options that we already try
to avoid in 'allmodconfig' builds and that make no sense in a general
randconfig build.

Building with 'make randconfig KCONFIG_ALLCONFIG=1' should now always
succeed without warnings on x86 and arm64, aside from recent regressions.
Other architectures probably need additional bugfixes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/configs/allrandom.config | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 kernel/configs/allrandom.config

Comments

Masahiro Yamada Feb. 20, 2018, 9:16 a.m. UTC | #1
2018-02-17 6:41 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> Building randconfig kernels frequently leads to build errors from
> drivers that have additional build dependencies, or that we don't
> want to build for compile-testing for some other reason.

Can you fix the former case?

The latter seems OK.


> We already have a couple of compile-time options that can deal with this
> problem, but the complete set is not documented well.  We also have a
> method to override some options during 'make randconfig' and a couple
> of other make targets. However, we don't yet combine those two.


From this statement,

kernel/configs/compile_test.config

would make more sense?




> This adds a new allrandom.config file to turn on CONFIG_COMPILE_TEST,
> CONFIG_STANDALONE and CONFIG_PREVENT_FIRMWARE_BUILD for all randconfig
> builds. This in turn disables some other options that we already try
> to avoid in 'allmodconfig' builds and that make no sense in a general
> randconfig build.
>
> Building with 'make randconfig KCONFIG_ALLCONFIG=1' should now always


Can you type 'make randconfig compile_test.config', instead?

(Or 'make allmodconfig compile_test.config' for full-build test)


The merge_config has a little bit different logic
from KCONFIG_ALLCONFIG=1, but I guess it leads to the almost same result.



> succeed without warnings on x86 and arm64, aside from recent regressions.
> Other architectures probably need additional bugfixes.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  kernel/configs/allrandom.config | 6 ++++++
>  1 file changed, 6 insertions(+)
>  create mode 100644 kernel/configs/allrandom.config
>
> diff --git a/kernel/configs/allrandom.config b/kernel/configs/allrandom.config
> new file mode 100644
> index 000000000000..67294ef2e3a2
> --- /dev/null
> +++ b/kernel/configs/allrandom.config
> @@ -0,0 +1,6 @@
> +# maximize search space, disable options not worth testing
> +CONFIG_COMPILE_TEST=y
> +
> +# reduce compile-time dependencies
> +CONFIG_STANDALONE=y
> +CONFIG_PREVENT_FIRMWARE_BUILD=y
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Feb. 20, 2018, 11:11 a.m. UTC | #2
On Tue, Feb 20, 2018 at 10:16 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2018-02-17 6:41 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
>> Building randconfig kernels frequently leads to build errors from
>> drivers that have additional build dependencies, or that we don't
>> want to build for compile-testing for some other reason.
>
> Can you fix the former case?

I'm sure it can be done with runtime detection of the tools, not sure if that's
a good idea. What we would need here is

CONFIG_WANXL_BUILD_FIRMWARE: needs to check for as68k and ld68k
CONFIG_AIC79XX_BUILD_FIRMWARE: needs flex, bison and berkeley db.
        I have all those but it still failed to build for me.
STANDALONE now (after the removal of sound/oss) only controls
      ACPI_CUSTOM_DSDT_FILE, we could remove STANDALONE now
      I think, it doesn't actually get in the way of anything. For the stable
      kernels, I'd still need to deal with CONFIG_STANDALONE for the oss
      drivers.

My feeling right now is that we're better off making both STANDALONE
and PREVENT_FIRMWARE_BUILD depend on !COMPILE_TEST,
and then find a way to force that.

>> We already have a couple of compile-time options that can deal with this
>> problem, but the complete set is not documented well.  We also have a
>> method to override some options during 'make randconfig' and a couple
>> of other make targets. However, we don't yet combine those two.
>
>
> From this statement,
>
> kernel/configs/compile_test.config
>
> would make more sense?

My original thought was that the allrandom.config file name is already
documented and I just wanted a more consistent behavior, not come
up with something new.

>> This adds a new allrandom.config file to turn on CONFIG_COMPILE_TEST,
>> CONFIG_STANDALONE and CONFIG_PREVENT_FIRMWARE_BUILD for all randconfig
>> builds. This in turn disables some other options that we already try
>> to avoid in 'allmodconfig' builds and that make no sense in a general
>> randconfig build.
>>
>> Building with 'make randconfig KCONFIG_ALLCONFIG=1' should now always
>
>
> Can you type 'make randconfig compile_test.config', instead?
>
> (Or 'make allmodconfig compile_test.config' for full-build test)
>
>
> The merge_config has a little bit different logic
> from KCONFIG_ALLCONFIG=1, but I guess it leads to the almost same result.

I suspect that one difference in a randconfig kernel is that all options that
depend on CONFIG_COMPILE_TEST have a 50% lower chance of getting
enabled that way, but eventually they will get enabled.

      Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Masahiro Yamada Feb. 20, 2018, 4:51 p.m. UTC | #3
2018-02-20 20:11 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Tue, Feb 20, 2018 at 10:16 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> 2018-02-17 6:41 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
>>> Building randconfig kernels frequently leads to build errors from
>>> drivers that have additional build dependencies, or that we don't
>>> want to build for compile-testing for some other reason.
>>
>> Can you fix the former case?
>
> I'm sure it can be done with runtime detection of the tools, not sure if that's
> a good idea. What we would need here is
>
> CONFIG_WANXL_BUILD_FIRMWARE: needs to check for as68k and ld68k
> CONFIG_AIC79XX_BUILD_FIRMWARE: needs flex, bison and berkeley db.
>         I have all those but it still failed to build for me.
> STANDALONE now (after the removal of sound/oss) only controls
>       ACPI_CUSTOM_DSDT_FILE, we could remove STANDALONE now
>       I think, it doesn't actually get in the way of anything. For the stable
>       kernels, I'd still need to deal with CONFIG_STANDALONE for the oss
>       drivers.
>
> My feeling right now is that we're better off making both STANDALONE
> and PREVENT_FIRMWARE_BUILD depend on !COMPILE_TEST,
> and then find a way to force that.
>
>>> We already have a couple of compile-time options that can deal with this
>>> problem, but the complete set is not documented well.  We also have a
>>> method to override some options during 'make randconfig' and a couple
>>> of other make targets. However, we don't yet combine those two.
>>
>>
>> From this statement,
>>
>> kernel/configs/compile_test.config
>>
>> would make more sense?
>
> My original thought was that the allrandom.config file name is already
> documented and I just wanted a more consistent behavior, not come
> up with something new.


I thought this would be used by merge_config.sh,
but I understood allrandom.config would be better.



>>> This adds a new allrandom.config file to turn on CONFIG_COMPILE_TEST,
>>> CONFIG_STANDALONE and CONFIG_PREVENT_FIRMWARE_BUILD for all randconfig
>>> builds. This in turn disables some other options that we already try
>>> to avoid in 'allmodconfig' builds and that make no sense in a general
>>> randconfig build.
>>>
>>> Building with 'make randconfig KCONFIG_ALLCONFIG=1' should now always
>>
>>
>> Can you type 'make randconfig compile_test.config', instead?
>>
>> (Or 'make allmodconfig compile_test.config' for full-build test)
>>
>>
>> The merge_config has a little bit different logic
>> from KCONFIG_ALLCONFIG=1, but I guess it leads to the almost same result.
>
> I suspect that one difference in a randconfig kernel is that all options that
> depend on CONFIG_COMPILE_TEST have a 50% lower chance of getting
> enabled that way, but eventually they will get enabled.
>

You are right.

The behavior is slightly different.
diff mbox

Patch

diff --git a/kernel/configs/allrandom.config b/kernel/configs/allrandom.config
new file mode 100644
index 000000000000..67294ef2e3a2
--- /dev/null
+++ b/kernel/configs/allrandom.config
@@ -0,0 +1,6 @@ 
+# maximize search space, disable options not worth testing
+CONFIG_COMPILE_TEST=y
+
+# reduce compile-time dependencies
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y