hvk: reorder functions
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 16 Sep 2025 15:28:54 +0000 (11:28 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 16 Sep 2025 15:29:00 +0000 (11:29 -0400)
No functional change intended.

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
scripts/hvk-compile.sh

index 8031630..6db238b 100755 (executable)
@@ -82,29 +82,6 @@ if [ ! -f .config ]; then
     exit 1
 fi
 
-KMAKE="${KMAKE} ${warnings_opts}"
-
-if grep -q '^CONFIG_MODULES=y' .config; then
-    CONFIG_MODULES=1
-else
-    CONFIG_MODULES=0
-fi
-
-${KMAKE}
-
-if [ x"${mode}" = x"linux" ]; then
-    if [ x"${CONFIG_MODULES}" = x"1" ]; then
-        ${KMAKE} modules_prepare
-        ${KMAKE} modules
-    fi
-
-    if [ x"${DTB_SRC}" != x"" ]; then
-        ${KMAKE} dtbs
-    fi
-elif [ x"${mode}" = x"uboot" ]; then
-    ${KMAKE} u-boot-initial-env
-fi
-
 function rootfs_install() {
     mkdir -p ${deploydir}
 
@@ -149,6 +126,29 @@ function rootfs_archive() {
     popd
 }
 
+KMAKE="${KMAKE} ${warnings_opts}"
+
+if grep -q '^CONFIG_MODULES=y' .config; then
+    CONFIG_MODULES=1
+else
+    CONFIG_MODULES=0
+fi
+
+${KMAKE}
+
+if [ x"${mode}" = x"linux" ]; then
+    if [ x"${CONFIG_MODULES}" = x"1" ]; then
+        ${KMAKE} modules_prepare
+        ${KMAKE} modules
+    fi
+
+    if [ x"${DTB_SRC}" != x"" ]; then
+        ${KMAKE} dtbs
+    fi
+elif [ x"${mode}" = x"uboot" ]; then
+    ${KMAKE} u-boot-initial-env
+fi
+
 if [ "${archive}" = "1" ]; then
     rootfs_install
     rootfs_archive