From d9a204764132c6c0ed1824c54d90721e17e53adf Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 24 Oct 2014 21:20:49 +0100 Subject: sunxi: kconfig: Introduce CONFIG_TARGET_ This was done automatically with the following bits of scripting. The Kconfig choice content was generated with this script snippet: for i in $(git grep -l CONFIG_ARCH_SUNXI configs/*) ; do TARGET=$(sed -n -e 's/CONFIG_SYS_EXTRA_OPTIONS="\([^,"]\+\).*/\1/p' $i); MACH=$(sed -n -e 's/.*CONFIG_\(MACH_SUN.I\)=./\1/p' $i) echo "config TARGET_$TARGET" echo " bool \"$TARGET\"" echo " depends on $MACH" echo done defconfigs were updated with a sed script (t): # Extract board from first entry of CONFIG_SYS_EXTRA_OPTIONS, /^CONFIG_SYS_EXTRA_OPTIONS/ { s/^\(CONFIG_SYS_EXTRA_OPTIONS="\)\([^,"]\+\),\?\(.*\)/\1\3\nCONFIG_TARGET_\2=y/; # Print and delete first line (CONFIG_SYS_EXTRA_OPTIONS), leaving # CONFIG_TARGET_ in pattern space P;D; }; # Move CONFIG_TARGET_ to hold space /^CONFIG_TARGET/{h;n} # Print CONFIG_TARGET_ after CONFIG_MACH_ in either SPL or # normal mode. /^CONFIG_MACH/{p;g;p;n}; /^\+S:CONFIG_MACH/{p;g;s/^CONFIG_TARGET/+S:&/;p;n}; # Print any remaining lines normally p; Run as: sed -i -n -f t $(git grep -l CONFIG_ARCH_SUNXI configs/*) and then manually removing the one instance of CONFIG_SYS_EXTRA_OPTIONS="" from Colombus_defconfig board/sunxi/Makefile was updated with: sed -e 's/^\(obj-\$(CONFIG_\)\(.*\)\().*+= dram_.*\)/\1TARGET_\2\3/g' board/sunxi/Makefile and manually retabbing a few lines to line up again. The board descriptions could certainly be improved. Signed-off-by: Ian Campbell Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- configs/Colombus_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs/Colombus_defconfig') diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig index 4c0ea7859a..89291f90e9 100644 --- a/configs/Colombus_defconfig +++ b/configs/Colombus_defconfig @@ -1,5 +1,5 @@ -CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS" CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_MACH_SUN6I=y +CONFIG_TARGET_COLOMBUS=y CONFIG_FDTFILE="sun6i-a31-colombus.dtb" -- cgit v1.2.1