diff options
author | Dan Murphy <dmurphy@ti.com> | 2020-03-25 13:34:00 -0500 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2020-03-25 13:41:38 -0500 |
commit | 6a65ba2db6cd6fe3239b888fcf66636792a980f6 (patch) | |
tree | c2dc47fe795e57c50ab3360bf4e844db3ead3cde | |
parent | 8fdd8048ad93998e6f54b34e5ec36c47693438de (diff) | |
download | linux-dt-6a65ba2db6cd6fe3239b888fcf66636792a980f6.tar.gz |
defconfigs: defconfig_builder: Update defconfig builder for system test
Add the ability to create system test defconfigs from the command line
or have them listed.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
-rwxr-xr-x | config/defconfig_builder.sh | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/config/defconfig_builder.sh b/config/defconfig_builder.sh index 8429e1e..d909468 100755 --- a/config/defconfig_builder.sh +++ b/config/defconfig_builder.sh @@ -195,7 +195,6 @@ list_all_targets() { } get_build_details() { - count=0 max_types=0 while [ "x${SUPPORTED_ARCH[max_types]}" != "x" ] @@ -204,7 +203,9 @@ get_build_details() { if [ -e "$DEFCONFIG_MAP_FILE" ]; then BUILD_DETAILS=$(grep -w "$CHOSEN_BUILD_TYPE" "$DEFCONFIG_MAP_FILE") if [ ! -z "$BUILD_DETAILS" ]; then - DEFCONFIG_KERNEL_PATH=${SUPPORTED_ARCH[(count * 3) + 1]} + if [ -z ${DEFCONFIG_KERNEL_PATH} ]; then + DEFCONFIG_KERNEL_PATH=${SUPPORTED_ARCH[(count * 3) + 1]} + fi break fi fi @@ -305,7 +306,7 @@ choose_defconfig_type() { TEMP_TYPE_FILE=$(mktemp -t $TMP_TEMPLATE) - TYPE_FILE=$(awk '{print$2}' "$DEFCONFIG_MAP_FILE" | sort -u | grep -i "SDK_") + TYPE_FILE=$(awk '{print$2}' "$DEFCONFIG_MAP_FILE" | sort -u | grep -i ${TYPE}) max_types=0 for TYPE_TMP in $TYPE_FILE; @@ -371,6 +372,15 @@ choose_architecture() { elif [ "$REPLY" -gt '0' -a "$REPLY" -le "$max_types" ]; then REPLY_DISP="$REPLY""." ARCH_TO_BUILD=$(awk '{if ($1 == "'"$REPLY_DISP"'") print $2;}' "$TEMP_ARCH_FILE") + # System test configs are specific and contain + # the v7 and v8 tags so we have to do something + # special. + if [ ${ARCH_TO_BUILD} == "System" ]; then + SYSTEM_TEST_ARCH=$(awk '{if ($1 == "'"$REPLY_DISP"'") print $4;}' "$TEMP_ARCH_FILE") + ARCH_TEST="System Test "${SYSTEM_TEST_ARCH} + else + ARCH_TEST=${ARCH_TO_BUILD} + fi break else echo -e "\n'$REPLY' is not a valid choice. Please \ @@ -383,7 +393,7 @@ choose_architecture() { while [ "x${SUPPORTED_ARCH[max_types]}" != "x" ] do ARCH_TYPE=${SUPPORTED_ARCH[max_types]} - ARCH_COUNTER=$(grep -c "$ARCH_TO_BUILD" <<< $ARCH_TYPE) + ARCH_COUNTER=$(grep -c "$ARCH_TEST" <<< $ARCH_TYPE) if [ "$ARCH_COUNTER" -gt 0 ]; then break fi @@ -447,7 +457,9 @@ set_working_directory SUPPORTED_ARCH=( "v7 ARM Architecture" "$KERNEL_PATH/arch/arm/configs" "$SCRIPT_PATH/defconfig_map.txt" -"v8 ARM Architecture" "$KERNEL_PATH/arch/arm64/configs" "$SCRIPT_PATH/v8_defconfig_map.txt") +"v8 ARM Architecture" "$KERNEL_PATH/arch/arm64/configs" "$SCRIPT_PATH/v8_defconfig_map.txt" +"System Test v7 Builds" "$KERNEL_PATH/arch/arm/configs" "$SCRIPT_PATH/system_test/system_test_map.txt" +"System Test v8 Builds" "$KERNEL_PATH/arch/arm64/configs" "$SCRIPT_PATH/system_test/v8_system_test_map.txt") BUILD_TYPE_FILE=$(mktemp -t $TMP_TEMPLATE) @@ -484,7 +496,12 @@ if [ ! -e "$DEFCONFIG_MAP_FILE" ]; then exit 1 fi -choose_defconfig_type +if [ ${ARCH_TO_BUILD} == "System" ]; then + TYPE="System_" +else + TYPE="SDK_" + choose_defconfig_type +fi choose_build_type get_build_details |