hvk: add support for all* DEFCONFIG options
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 14 Mar 2024 16:15:14 +0000 (12:15 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 14 Mar 2024 16:17:21 +0000 (12:17 -0400)
scripts/hvk-common.sh
scripts/hvk-init.sh
scripts/hvk-save-defconfig.sh
scripts/hvk-x86.sh

index fb03814..df6e5f3 100644 (file)
@@ -31,6 +31,17 @@ KMAKE="make ${MAKEJOBS_ARG}"
 # Needed to compile sample userspace programs (rtc-test):
 export CROSS_COMPILE_KCFLAGS=${KCFLAGS}
 
+DEFCONFIG_OPT=""
+
+case ${DEFCONFIG_BOARD} in
+    all*)
+        DEFCONFIG_OPT="${DEFCONFIG_BOARD}"
+        ;;
+    *)
+        DEFCONFIG_OPT="${DEFCONFIG_BOARD}_defconfig"
+        ;;
+esac
+
 # Arg1: src file
 # Arg2: destination user@host
 copy_exec()
index 8e7fb1c..dc34592 100755 (executable)
@@ -17,11 +17,7 @@ if [ x"${DEFCONFIG_AUTOGEN}" != x"" ]; then
     fi
 fi
 
-if [ x"${DEFCONFIG_BOARD}" = x"all" ]; then
-    ${KMAKE} allyesconfig
-else
-    ${KMAKE} ${DEFCONFIG_BOARD}_defconfig
-fi
+${KMAKE} ${DEFCONFIG_OPT}
 
 if [ x"${1}" = x"yocto" ]; then
     LOCALVERSION="${YOCTO_LOCALVERSION}"
index 8e1f653..287ca47 100755 (executable)
@@ -4,10 +4,11 @@ SCRIPT="`readlink -e $0`"
 SCRIPTPATH=$(dirname ${SCRIPT})
 source ${SCRIPTPATH}/hvk-common.sh
 
-if [ x"${DEFCONFIG_BOARD}" = x"all" ]; then
-    "Error, cannot save defconfig for \"all\""
-    exit 1
-fi
+case ${DEFCONFIG_BOARD} in
+    all*)
+        "Error, cannot save defconfig for \"${DEFCONFIG_BOARD}\""
+        exit 1
+esac
 
 cfg_prefix="arch/${ARCH}/"
 
index bc37085..43209bb 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-DEFCONFIG_BOARD=all
+DEFCONFIG_BOARD=allyesconfig
 
 ARCH=x86