From 6c7390c7d7a0a0f6942b7e52449a2af3f3fac18c Mon Sep 17 00:00:00 2001 From: Pawel Langowski Date: Thu, 6 Mar 2025 12:02:33 +0100 Subject: [PATCH] deploy: install_workflow: Exit when trying to flash v1.1.1 on 13th gen and above This copies the changes from https://github.com/Dasharo/meta-dts/pull/108 to the install workflow Signed-off-by: Pawel Langowski --- scripts/dasharo-deploy | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/dasharo-deploy b/scripts/dasharo-deploy index 13fbfc48..794e3123 100644 --- a/scripts/dasharo-deploy +++ b/scripts/dasharo-deploy @@ -917,6 +917,23 @@ install_workflow() { download_bios verify_artifacts bios fi + + # TODO: It is not a good practice to do some target specific work in the code + # of a scallable product, this should be handled in a more scallable way: + if [[ "$UPDATE_VERSION" == "1.1.1" && \ + ( "$BOARD_MODEL" == "PRO Z690-A WIFI DDR4(MS-7D25)" || \ + "$BOARD_MODEL" == "PRO Z690-A DDR4(MS-7D25)" || \ + "$BOARD_MODEL" == "PRO Z690-A (MS-7D25)" || \ + "$BOARD_MODEL" == "PRO Z690-A WIFI (MS-7D25)" ) ]]; then + + cpu_gen_check=$($LSCPU | grep -F "Model name" | grep -E "\-(13|14)[0-9]{3}" | wc -l) + + if [ $cpu_gen_check -ne 0 ]; then + echo "You have a 13th gen or above CPU and are trying to flash Dasharo v1.1.1 on a MSI PRO Z690-A DDR4 or DDR5 board" + echo "That version does not support gen 13 and above CPU. Therefore we cannot continue with flashing." + error_exit "Aborting update process..." + fi + fi # Ask user for confirmation: display_warning