Re: Issue/Bug report: auto.conf not generated correctly when CROSS_COMPILE environment var set

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

 



Hi Joonas

On Tue, Jul 9, 2019 at 6:58 PM Joonas Kylmälä <joonas.kylmala@xxxxxx> wrote:
>
> Hi Masahiro and Michal,
>
> I'm having a build issue regarding auto.conf generation with the the
> latest master (commit 5ad18b2e60b7) plus this patch to use
> CONFIG_USB_FUNCTIONFS as built-in module:
>
> diff --git a/arch/arm/configs/imx_v6_v7_defconfig
> b/arch/arm/configs/imx_v6_v7_defconfig
> index 8116648a8efd..228098c64c48 100644
> --- a/arch/arm/configs/imx_v6_v7_defconfig
> +++ b/arch/arm/configs/imx_v6_v7_defconfig
> @@ -345,14 +345,7 @@ CONFIG_USB_CONFIGFS_F_MIDI=y
>  CONFIG_USB_CONFIGFS_F_HID=y
>  CONFIG_USB_CONFIGFS_F_UVC=y
>  CONFIG_USB_CONFIGFS_F_PRINTER=y
> -CONFIG_USB_ZERO=m
> -CONFIG_USB_AUDIO=m
> -CONFIG_USB_ETH=m
> -CONFIG_USB_G_NCM=m
> -CONFIG_USB_GADGETFS=m
> -CONFIG_USB_FUNCTIONFS=m
> -CONFIG_USB_MASS_STORAGE=m
> -CONFIG_USB_G_SERIAL=m
> +CONFIG_USB_FUNCTIONFS=y
>  CONFIG_MMC=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_PLTFM=y
>
> Here is a excerpt from my terminal so you can understand and reproduce
> the bug/issue easily:
>
> user@builder:~/linux$ export CROSS_COMPILE=arm-none-eabi-
> user@builder:~/linux$ export ARCH=arm
> user@builder:~/linux$ make mrproper && make clean && make
> imx_v6_v7_defconfig && rgrep USB_FUNCTIONFS | grep "auto.conf"
>   CLEAN   scripts/basic
>   CLEAN   scripts/kconfig
>   CLEAN   include/config include/generated
>   CLEAN   .config
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
>   HOSTCC  scripts/kconfig/confdata.o
>   HOSTCC  scripts/kconfig/expr.o
>   LEX     scripts/kconfig/lexer.lex.c
>   YACC    scripts/kconfig/parser.tab.h
>   HOSTCC  scripts/kconfig/lexer.lex.o
>   YACC    scripts/kconfig/parser.tab.c
>   HOSTCC  scripts/kconfig/parser.tab.o
>   HOSTCC  scripts/kconfig/preprocess.o
>   HOSTCC  scripts/kconfig/symbol.o
>   HOSTLD  scripts/kconfig/conf
> #
> # configuration written to .config
> #
> user@builder:~/linux$ make mrproper && make clean && make
> imx_v6_v7_defconfig && make syncconfig && rgrep USB_FUNCTIONFS | grep
> "auto.conf"
>   CLEAN   scripts/basic
>   CLEAN   scripts/kconfig
>   CLEAN   include/config include/generated
>   CLEAN   .config
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
>   HOSTCC  scripts/kconfig/confdata.o
>   HOSTCC  scripts/kconfig/expr.o
>   LEX     scripts/kconfig/lexer.lex.c
>   YACC    scripts/kconfig/parser.tab.h
>   HOSTCC  scripts/kconfig/lexer.lex.o
>   YACC    scripts/kconfig/parser.tab.c
>   HOSTCC  scripts/kconfig/parser.tab.o
>   HOSTCC  scripts/kconfig/preprocess.o
>   HOSTCC  scripts/kconfig/symbol.o
>   HOSTLD  scripts/kconfig/conf
> #
> # configuration written to .config
> #
> scripts/kconfig/conf  --syncconfig Kconfig
> include/config/auto.conf:CONFIG_USB_FUNCTIONFS=y
> include/config/auto.conf:CONFIG_USB_FUNCTIONFS_GENERIC=y
>
> As we can see in the first build command run CONFIG_USB_FUNCTIONFS=y
> doesn't appear in the file include/config/auto.conf, it only appears
> after running "make syncconfig". Normally this is not a problem for me
> since for "make *_defconfig" I don't use CROSS_COMPILE in that step and
> I only use it in "make zImage". If I run "CROSS_COMPILE=xxxx make
> zImage" then I think syncconfig is triggered because in the "make
> *_defconfig" stage the compiler was different [1] and so I don't hit
> this issue with auto.conf not being generated correctly.


This seems the (well-known?) "choice forgets user's input" issue.

This part is so complicated and badly-hacked.
I do not have enough time to fix this cleanly now
(if somebody sends a correct fix, that would be appreciated)

I just sent out an easy workaround.
https://patchwork.kernel.org/patch/11041571/

Hope it will fix the issue.



Joonas


-- 
Best Regards
Masahiro Yamada




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

  Powered by Linux