socfpga: move configuration options to config file
PATCH 1/1 socfpga: move configuration options to config file
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
configs/socfpga_cyclone5_defconfig +16 -0
@@ -6,3 +6,19 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_ASKENV=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_DFU=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_GREPENV=y +CONFIG_CMD_MII=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PING=y +CONFIG_CMD_SETEXPR=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y
include/configs/socfpga_cyclone5.h +0 -18
@@ -18,24 +18,6 @@#define CONFIG_FAT_WRITE #define CONFIG_HW_WATCHDOG -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_BOOTZ -#define CONFIG_CMD_CACHE -#define CONFIG_CMD_DFU -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_EXT4 -#define CONFIG_CMD_EXT4_WRITE -#define CONFIG_CMD_FAT -#define CONFIG_CMD_FPGA -#define CONFIG_CMD_FS_GENERIC -#define CONFIG_CMD_GREPENV -#define CONFIG_CMD_MII -#define CONFIG_CMD_MMC -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING -#define CONFIG_CMD_SETEXPR -#define CONFIG_CMD_USB -#define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_REGEX /* Enable regular expression support */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 socfpga: move configuration options to config file
Quoted 4 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Best regards,
Marek Vasut
PATCH 1/1 socfpga: move configuration options to config file
Quoted 7 lines · Marek Vasut
Quoted 4 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Lets remove CONFIG_CMD_RUN from .config, then select it:
run (CMD_RUN) [N/y/?] (NEW) y
Now you warning for most C files:
CC arch/arm/lib/asm-offsets.s
In file included from include/configs/socfpga_cyclone5.h:16:0,
from include/config.h:5,
from include/common.h:18,
from
arch/arm/lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#define CONFIG_CMD_RUN /* run command in env variable */
^
In file included from ././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
the location of the previous definition
#define CONFIG_CMD_RUN 1
^
In file included from include/configs/socfpga_cyclone5.h:16:0,
from include/config.h:5,
from include/common.h:18,
from
lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#define CONFIG_CMD_RUN /* run command in env variable */
^
In file included from ././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
the location of the previous definition
#define CONFIG_CMD_RUN 1
^
CHK include/generated/asm-offsets.h
CHK include/generated/generic-asm-offsets.h
LDS u-boot.lds
In file included from
include/configs/socfpga_cyclone5.h:16:0,
from include/config.h:5,
from arch/arm/cpu/u-boot.lds:10:
include/config_cmd_default.h:38:0:
warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#define CONFIG_CMD_RUN /* run command in env variable */
^
In file included from ././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
the location of the previous definition
#define CONFIG_CMD_RUN 1
^
HOSTCC tools/mkenvimage.o
PavelSignature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 socfpga: move configuration options to config file
Quoted 15 lines · Pavel Machek
Quoted 7 lines · Marek Vasut
Quoted 4 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Lets remove
CONFIG_CMD_RUNfrom .config, then select it:run (
CMD_RUN) [N/y/?] (NEW) yNow you warning for most C files:
Quoted 13 lines
CC
arch/arm/lib/asm-offsets.s
In file included frominclude/configs/socfpga_cyclone5.h:16:0,
frominclude/config.h:5,
frominclude/common.h:18,
from
arch/arm/lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#defineCONFIG_CMD_RUN/* run command in env variable */
^
In file included from././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
That meant CONFIG_CMD_RUN is defined by default, yes? In which case, this patch would just paper over some bug (?) instead of fixing the root cause ? The correct fix would probably be to zap those macros, which are defined by default from the socfpga_cyclone5.h file, no ?
Best regards,
Marek Vasut
PATCH 1/1 socfpga: move configuration options to config file
Quoted 30 lines · Marek Vasut
Quoted 15 lines · Pavel Machek
Quoted 7 lines · Marek Vasut
Quoted 4 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Lets remove
CONFIG_CMD_RUNfrom .config, then select it:run (
CMD_RUN) [N/y/?] (NEW) yNow you warning for most C files:
Quoted 13 lines
CC
arch/arm/lib/asm-offsets.s
In file included frominclude/configs/socfpga_cyclone5.h:16:0,
frominclude/config.h:5,
frominclude/common.h:18,
from
arch/arm/lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#defineCONFIG_CMD_RUN/* run command in env variable */
^
In file included from././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
Quoted 4 lines
That meant
CONFIG_CMD_RUNis defined by default, yes? In which case, this patch would just paper over some bug (?) instead of fixing the root cause ? The correct fix would probably be to zap those macros, which are defined by default from thesocfpga_cyclone5.hfile, no ?
CONFIG_CMD_RUN is defined in socfpga_cyclone5.h, but it is set to N by .config. Take a look. If you set it to Y, you'll get the ugly warnings. Try that.
Apply the patch. See that .config now corresponds to real configuration and warnings are gone.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH 1/1 socfpga: move configuration options to config file
Quoted 37 lines · Pavel Machek
Quoted 36 lines · Marek Vasut
Quoted 34 lines · Pavel Machek
Quoted 7 lines · Marek Vasut
Quoted 4 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Lets remove
CONFIG_CMD_RUNfrom .config, then select it:run (
CMD_RUN) [N/y/?] (NEW) yNow you warning for most C files:
CCarch/arm/lib/asm-offsets.s
In file included frominclude/configs/socfpga_cyclone5.h:16:0,from
include/config.h:5,from
include/common.h:18,from
arch/arm/lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]#define CONFIG_CMD_RUN /* run command in env variable */^
In file included from././include/linux/kconfig.h:4:0,from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
Quoted 8 lines
Quoted 4 lines
That meant
CONFIG_CMD_RUNis defined by default, yes? In which case, this patch would just paper over some bug (?) instead of fixing the root cause ? The correct fix would probably be to zap those macros, which are defined by default from thesocfpga_cyclone5.hfile, no ?
CONFIG_CMD_RUNis defined insocfpga_cyclone5.h, but it is set to N by .config. Take a look. If you set it to Y, you'll get the ugly warnings. Try that.
I also looked into include/config_cmd_default.h , where the CONFIG_CMD_RUN is defined. It should therefore be safe to remove CONFIG_CMD_RUN from socfpga_cyclone5.h .
Quoted 4 lines
Apply the patch. See that .config now corresponds to real configuration and warnings are gone.
Pavel
Best regards,
Marek Vasut
PATCH 1/1 socfpga: move configuration options to config file
In reply to Pavel Machek2015-04-20 21:30 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 21 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Signed-off-by Pavel Machek <[email protected]>configs/socfpga_cyclone5_defconfig +6
-0@@ -6,3 +6,19 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_ASKENV=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_DFU=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_EXT4=y
configs/socfpga_cyclone5_defconfig CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" · line 24
Quoted 10 lines
configs/socfpga_cyclone5_defconfig +10
-0+CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_GREPENV=y +CONFIG_CMD_MII=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PING=y +CONFIG_CMD_SETEXPR=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y
You need to add these to common/Kconfig
as well as to your defconfig.
Otherwise, they do not appear in the .config file.
There exist CMD_RUN, CMD_PING, CMD_USB in common/Kconfig, but most of the others are missing.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 socfpga: move configuration options to config file
In reply to Marek Vasut2015-04-21 6:32 GMT+09:00 Marek Vasut <[email protected]>:
Quoted 30 lines · Pavel Machek
Quoted 15 lines · Marek Vasut
Quoted 7 lines · Pavel Machek
Quoted 4 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Can you please elaborate on such warnings ?
Lets remove
CONFIG_CMD_RUNfrom .config, then select it:run (
CMD_RUN) [N/y/?] (NEW) yNow you warning for most C files:
Quoted 13 lines
CC
arch/arm/lib/asm-offsets.s
In file included frominclude/configs/socfpga_cyclone5.h:16:0,
frominclude/config.h:5,
frominclude/common.h:18,
from
arch/arm/lib/asm-offsets.c:15:
include/config_cmd_default.h:38:0: warning: "CONFIG_CMD_RUN" redefined [enabled by default]
#defineCONFIG_CMD_RUN/* run command in env variable */
^
In file included from././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:35:0: note: this is
Quoted 4 lines
That meant
CONFIG_CMD_RUNis defined by default, yes? In which case, this patch would just paper over some bug (?) instead of fixing the root cause ? The correct fix would probably be to zap those macros, which are defined by default from thesocfpga_cyclone5.hfile, no ?
We usually define boolean macros without values, like
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_BOOTZ
#define CONFIG_CMD_CACHE
On the other hand, Kconfig define boolean macros as 1 (see include/generated/autoconf.h)
That is why the compiler spits tons of warnings.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 1/1 socfpga: move configuration options to config file
In reply to Masahiro YamadaSetting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
---
v2:
Quoted 7 lines
You need to add these to common/Kconfig
as well as to your defconfig.Otherwise, they do not appear in the .config file.
There exist
CMD_RUN,CMD_PING,CMD_USBin common/Kconfig, but most of the others are missing.
Ok, I did conversion only for those present in Kconfig.
configs/socfpga_cyclone5_defconfig +5 -0
@@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=y
configs/socfpga_socrates_defconfig +5 -0
@@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=y
include/configs/socfpga_cyclone5.h +0 -5
@@ -22,19 +22,14 @@#define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE #define CONFIG_CMD_DFU -#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT -#define CONFIG_CMD_FPGA #define CONFIG_CMD_FS_GENERIC #define CONFIG_CMD_GREPENV #define CONFIG_CMD_MII #define CONFIG_CMD_MMC -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING #define CONFIG_CMD_SETEXPR -#define CONFIG_CMD_USB #define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_REGEX /* Enable regular expression support */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v2 1/1 socfpga: move configuration options to config file
Quoted 6 lines · Pavel Machek
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Signed-off-by Pavel Machek <[email protected]>
Ping? Please apply.
Quoted 65 lines
---
v2:Quoted 7 lines
You need to add these to common/Kconfig
as well as to your defconfig.Otherwise, they do not appear in the .config file.
There exist
CMD_RUN,CMD_PING,CMD_USBin common/Kconfig, but most of the others are missing.Ok, I did conversion only for those present in
Kconfig.configs/socfpga_cyclone5_defconfig +5
-0@@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=yconfigs/socfpga_socrates_defconfig +5
-0@@ -6,3 +6,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socrates" CONFIG_DM=y CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_FPGA=y +CONFIG_CMD_NET=y +CONFIG_CMD_PING=y +CONFIG_CMD_USB=yinclude/configs/socfpga_cyclone5.h +0
-5@@ -22,19 +22,14 @@#define CONFIG_CMD_BOOTZ #define CONFIG_CMD_CACHE #define CONFIG_CMD_DFU -#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE #define CONFIG_CMD_FAT -#define CONFIG_CMD_FPGA #define CONFIG_CMD_FS_GENERIC #define CONFIG_CMD_GREPENV #define CONFIG_CMD_MII #define CONFIG_CMD_MMC -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING #define CONFIG_CMD_SETEXPR -#define CONFIG_CMD_USB #define CONFIG_CMD_USB_MASS_STORAGE #define CONFIG_REGEX /* Enable regular expression support */
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v2 1/1 socfpga: move configuration options to config file
2015-05-15 17:31 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 10 lines · Pavel Machek
Quoted 6 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Signed-off-by Pavel Machek <[email protected]>Ping? Please apply.
This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 1/1 socfpga: move configuration options to config file
Quoted 7 lines · Masahiro Yamada
2015-05-15 17:31 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 6 lines · Pavel Machek
Quoted 5 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Pavel Machek <[email protected]>Ping? Please apply.
This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA.
Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable...
Thanks,
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v2 1/1 socfpga: move configuration options to config file
Hi.
2015-05-15 17:48 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 10 lines · Masahiro Yamada
Quoted 9 lines
2015-05-15 17:31 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 8 lines · Pavel Machek
Quoted 6 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Signed-off-by Pavel Machek <[email protected]>
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Ping? Please apply.
This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA.
Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable...
The defconfig files in u-boot/master have been all cleaned up by
commit bd328eb38274ffaf04caaa8a6ecc09b7e19a650e
Author: Joe Hershberger <[email protected]> Date: Tue May 12 14:46:24 2015 -0500
Clean all defconfigs with savedefconfig
If this patch is applied onto u-boot-socfpga now and then a pull-req is issued, it will cause a conflict.
So, I recommend Marek to sync u-boot-socfpga/master with the mainline, and then v3 should be applied.
Please use savedefconfig rather than adding entries to the bottom of the files.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 1/1 socfpga: move configuration options to config file
Quoted 1 line · Masahiro Yamada
Hi.
Hi!
Quoted 30 lines
2015-05-15 17:48 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 10 lines · Masahiro Yamada
Quoted 9 lines
2015-05-15 17:31 GMT+09:00 Pavel Machek <[email protected]>:
Quoted 8 lines · Pavel Machek
Quoted 6 lines
Setting configuration options in header file leads to incosistency between .config user sees, and .config he has. What is worse, a lot of compile warnings is presented for any such config option user sets in .config.
Signed-off-by Pavel Machek <[email protected]>Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Ping? Please apply.
This message was sent to me, but I assume it was addressed to Marek because it is only related to SOCFPGA.
Yes, I'd like Marek to apply it. And Marek wanted your confirmation it looks reasonable...
The defconfig files in u-boot/master have been all cleaned up by
commit
bd328eb38274ffaf04caaa8a6ecc09b7e19a650eAuthor: Joe Hershberger <[email protected]> Date: Tue May 12 14:46:24 2015 -0500Clean all defconfigs with savedefconfig
Quoted 5 lines
If this patch is applied onto u-boot-socfpga now and then a pull-req is issued, it will cause a conflict.
So, I recommend Marek to sync u-boot-socfpga/master with the mainline, and then v3 should be applied.
Yes Sir, synched!
Quoted 2 lines
Please use savedefconfig rather than adding entries to the bottom of the files.
Best regards,
Marek Vasut