On Thu, Nov 15, 2018 at 07:44:53PM +0100, Ulf Magnusson wrote: > I'd go for the more manual version though. I wonder if this is > significant/common enough to warrant a Kconfig feature, and it can be > handled in other ways. Here is something I came up with a couple weeks ago. It greps the config for an option, then if it exists it will print something. I added coloring to allow me to make the message red. I could formalize this more, and it might be useful for other message people may want to print. diff --git a/init/Kconfig b/init/Kconfig index b59e856511e1..70fad5e142e5 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1842,6 +1842,14 @@ config CMDLINE_OVERRIDE This is used to work around broken boot loaders. This should be set to 'N' under normal conditions. +# If you have the old style CONFIG_CMDLINE inside your config you will lose these options +# This serves as a warning to let you know that you are losing these options. +m1 := You appear to have the legacy option CONFIG_CMDLINE in your config. +m2 := Be aware this option will be removed, and you will lose the contents +m3 := unless you move to the new CONFIG_CMDLINE_PREPEND, CONFIG_CMDLINE_APPEND +m4 := options. +$(warning-if,$(success, grep -e "CONFIG_CMDLINE=\".\+\"" $(PWD)/$(O)/$(KCONFIG_CONFIG)), $(red, $(m1)$(m2)$(m3)$(m4))) + endif endmenu # General setup diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include index dad5583451af..7de7505388b7 100644 --- a/scripts/Kconfig.include +++ b/scripts/Kconfig.include @@ -28,3 +28,22 @@ ld-option = $(success,$(LD) -v $(1)) # gcc version including patch level gcc-version := $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') + +# Color sequences +red = [31m$(1)[0m +black = [30m$(1)[0m +green = [32m$(1)[0m +yellow = [33m$(1)[0m +blue = [34m$(1)[0m +magenta = [35m$(1)[0m +cyan = [36m$(1)[0m +white = [37m$(1)[0m +default = [39m$(1)[0m + +# Text properties +bold = [1m$(1)[0m +#bold = [1m$(1)[0m +underlined = [4m$(1)[0m +blinking = [5m$(1)[0m +reset = [0m$(1)[0m +