hvk: support boot_prefix U-Boot variable
authorHugo Villeneuve <hugo@hugovil.com>
Mon, 10 Feb 2025 17:02:25 +0000 (12:02 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 25 Mar 2025 19:03:31 +0000 (15:03 -0400)
scripts/hvk-compile.sh

index f16c8dc..8031630 100755 (executable)
@@ -168,6 +168,14 @@ if [ "${EVK_IP}" != "" ]; then
         if [ "${EXTLINUX}" = "1" ]; then
             # Switch to test kernel and DTB:
             ssh root@${EVK_IP} "sed -i -e 's@^DEFAULT.*@DEFAULT test@' /boot/extlinux/extlinux.conf"
+
+            # Determine if using boot_prefix variable U-Boot on target:
+            ssh -q root@${EVK_IP} "fw_printenv boot_prefix | grep -q boot_prefix" && BOOT_PREFIX=1 || BOOT_PREFIX=0;
+
+            if [ "${BOOT_PREFIX}" = "1" ]; then
+                # Optionally set boot_prefix variable:
+                ssh root@${EVK_IP} "fw_setenv boot_prefix /boot/test"
+            fi
         fi
     fi