• Ian Campbell's avatar
    sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD> · d9a20476
    Ian Campbell authored
    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"
    defconfigs were updated with a sed script (t):
        # Extract board from first entry of CONFIG_SYS_EXTRA_OPTIONS,
            # Print and delete first line (CONFIG_SYS_EXTRA_OPTIONS), leaving
            # CONFIG_TARGET_<BOARD> in pattern space
        # Move CONFIG_TARGET_<BOARD> to hold space
        # Print CONFIG_TARGET_<BOARD> after CONFIG_MACH_<SOC> in either SPL or
        # normal mode.
        # Print any remaining lines normally
    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
    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: default avatarIan Campbell <ijc@hellion.org.uk>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>