From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/5] autoboot: fix a bunch of misconversion of CONFIG_BOOTDELAY
Date: Sat, 11 Jun 2016 08:43:22 -0400 [thread overview]
Message-ID: <20160611124115.GM11619@bill-the-cat> (raw)
In-Reply-To: <cb3eb061-3112-4ca3-cf10-afe868c592f4@redhat.com>
On Sat, Jun 11, 2016 at 01:31:29PM +0200, Hans de Goede wrote:
> Hi,
>
> On 11-06-16 11:44, Masahiro Yamada wrote:
> >Commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY into
> >a Kconfig option") made a number of misconversion.
> >
> >[1] CONFIG_BOOTDELAY=-1 all gone
> >[2] CONFIG_BOOTDELAY=1 all gone
> >[3] CONFIG_BOOTDELAY=2 all gone
> >[4] Conditionally defined CONFIG_BOOTDELAY all gone
> >
> >All of the misconverted boards now use the default value,
> >CONFIG_BOOTDELAY=0, which came from the Kconfig entry.
> >
> >I am imagining some reasons for this.
> >
> >For [1], due to the bug of tools/scripts/define2mk.sed (now fixed),
> > #define CONFIG_BOOTDELAY -1
> >was converted to
> > CONFIG_BOOTDELAY="-1"
> >in the include/autoconf.mk, so the tools/moveconfig.py regarded it
> >as a string type option, and failed to move it.
> >
> >For [2], as you see in the comment block in the define2mk.sed,
> > #define CONFIG_BOOTDELAY 1
> >is converted to
> > CONFIG_BOOTDELAY=y
> >in the include/autoconf.mk. This needs a special care because we do
> >not know whether we are moving a bool option with value y or an
> >integer option with value 1. A recently-sent patch fixes this issue.
> >
> >I do not understand the reason for [3].
> >
> >[4] is another case the current moveconfig cannot handle correctly.
> >If the define is surrounded by #ifndef CONFIG_BOOTDELAY like follows,
> >the default value from Kconfig entry beats the define in C header.
> >
> > #ifndef CONFIG_BOOTDELAY
> > #define CONFIG_BOOTDELAY 3
> > #endif
> >
> >Joe's patch can solve this issue.
> >
> >Anyway, I ran the newest moveconfig tool based on commit 3191d8408053
> >(=immediately prior to the bad commit) to generate this patch.
> >
> >Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >---
> >
> >Changes in v2:
> > - Fix case [4]
[snip]
>
> No, just no NACK at least for all the sunxi boards.
>
> This madness where everytime we convert something to Kconfig
> we end up bloating ALL the defconfigs needs to stop and it
> needs to stop now.
>
> I'm 100% done with fixing up things everytime after someone
> thinks this is a good idea.
>
> This is not a good idea, it is a REALLY REALLY bad idea.
>
> The defconfig files should contain board specific settings,
> we had the same nonsense when some of the CONFIG_CMD_FOO
> things were converted, and all of a sudden we had the
> same 5 extra lines in every defconfig for every board
> which used to use config_distro_bootcmd.h
>
> Apparently no one was smart enough to realize that if
> we were moving stuff from a common config header to
> Kconfig, we would need something like
>
> CONFIG_DISTRO_BOOTCMD in Kconfig which would then select
> all CONFIG_CMD_FOO options which were moved, and then
> board / soc Kconfig snippets could simply do:
>
> select CONFIG_DISTRO_BOOTCMD
>
> I've hacked around this for sunxi:
>
> config ARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> select CMD_BOOTZ
> select CMD_DHCP
> select CMD_EXT2
> select CMD_EXT4
> select CMD_FAT
> select CMD_FS_GENERIC
> select CMD_GPIO
> select CMD_MII
> select CMD_MMC if MMC
> select CMD_PING
> select CMD_USB
> ...
>
> But I'm sick and tired of this nonsense repeating over
> and over again.
OK. You make some good points. Can you please write the help text for
DISTRO_DEFAULTS and DISTRO_BOOTCMD and do at least the initial selects
for things that have been converted? That will help out a lot, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160611/802cdceb/attachment.sig>
next prev parent reply other threads:[~2016-06-11 12:43 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 9:44 [U-Boot] [PATCH v2 0/5] Urgent fixes for misconverted CONFIG_BOOTDELAY Masahiro Yamada
2016-06-11 9:44 ` [U-Boot] [PATCH v2 1/5] ARM: stm32: remove unused CONFIG_AUTOBOOT Masahiro Yamada
2016-06-12 22:55 ` Masahiro Yamada
2016-06-11 9:44 ` [U-Boot] [PATCH v2 2/5] autoboot: follow-up cleanup after CONFIG_BOOTDELAY moves Masahiro Yamada
2016-06-12 22:56 ` Masahiro Yamada
2016-06-11 9:44 ` [U-Boot] [PATCH v2 3/5] tools: fix define2mk.sed to not add quotes around negative integers Masahiro Yamada
2016-06-12 22:54 ` Masahiro Yamada
2016-06-11 9:44 ` [U-Boot] [PATCH v2 4/5] autoboot: fix a bunch of misconversion of CONFIG_BOOTDELAY Masahiro Yamada
2016-06-11 11:31 ` Hans de Goede
2016-06-11 12:43 ` Tom Rini [this message]
2016-06-11 14:38 ` Hans de Goede
2016-06-11 13:46 ` Masahiro Yamada
2016-06-11 14:54 ` Hans de Goede
2016-06-13 8:02 ` Stefano Babic
2016-06-13 8:17 ` Maxime Ripard
2016-06-19 14:10 ` Tom Rini
2016-06-11 9:44 ` [U-Boot] [PATCH v2 5/5] autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.c Masahiro Yamada
2016-06-12 16:50 ` [U-Boot] [PATCH v2 0/5] Urgent fixes for misconverted CONFIG_BOOTDELAY Tom Rini
2016-06-12 21:07 ` Masahiro Yamada
2016-06-12 23:15 ` Masahiro Yamada
2016-06-13 5:42 ` Heiko Schocher
2016-06-13 7:53 ` yamada.masahiro at socionext.com
2016-06-13 8:21 ` Heiko Schocher
2016-06-13 12:47 ` Tom Rini
2016-06-13 13:07 ` Wolfgang Denk
2016-06-13 13:51 ` Hans de Goede
2016-06-13 13:58 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160611124115.GM11619@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox