Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include/dts-functions.sh fix error handling #7

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions include/dts-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ board_config() {
fi
;;
*)
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
esac
;;
Expand Down Expand Up @@ -410,7 +411,8 @@ board_config() {
fi
;;
*)
error_exit "Board model $BOARD_MODEL is currently not supported"
print_error "Board model $BOARD_MODEL is currently not supported"
return 1
;;
esac
;;
Expand Down Expand Up @@ -493,12 +495,14 @@ board_config() {
fi
;;
*)
error_exit "Board model $BOARD_MODEL is currently not supported"
print_error "Board model $BOARD_MODEL is currently not supported"
return 1
;;
esac
;;
*)
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
esac
;;
Expand Down Expand Up @@ -546,10 +550,12 @@ board_config() {
# SCH5545_FW="/tmp/_T1650A28.exe.extracted/65C10_output/pfsobject/section-7ec6c2b0-3fe3-42a0-a316-22dd0517c1e8/volume-0x60000/file-d386beb8-4b54-4e69-94f5-06091f67e0d3/section0.raw"
# ACM_BIN="/tmp/_T1650A28.exe.extracted/65C10_output/pfsobject/section-7ec6c2b0-3fe3-42a0-a316-22dd0517c1e8/volume-0x500000/file-2d27c618-7dcd-41f5-bb10-21166be7e143/object-0.raw"
print_warning "Dasharo Firmware for Precision T1650 not available yet!"
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
*)
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
esac
;;
Expand All @@ -574,15 +580,17 @@ board_config() {
BIOS_LINK_COMM="$FW_STORE_URL/$DASHARO_REL_NAME/v$DASHARO_REL_VER/${DASHARO_REL_NAME}_v${DASHARO_REL_VER}_${FLASH_CHIP_SIZE}M_vboot_notpm.rom"
;;
*)
error_exit "Platform uses chipset with not supported size"
print_error "Platform uses chipset with not supported size"
return 1
;;
esac
NEED_SMBIOS_MIGRATION="true"
NEED_BLOB_TRANSMISSION="false"
PROGRAMMER_BIOS="internal"
;;
*)
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
esac
;;
Expand Down Expand Up @@ -639,13 +647,15 @@ board_config() {
NEED_BOOTSPLASH_MIGRATION="true"
;;
*)
error_exit "Board model $SYSTEM_MODEL is currently not supported"
print_error "Board model $SYSTEM_MODEL is currently not supported"
return 1
;;
esac
shopt -u nocasematch
;;
*)
error_exit "Board vendor: $SYSTEM_VENDOR is currently not supported"
print_error "Board vendor: $SYSTEM_VENDOR is currently not supported"
return 1
;;
esac
}
Expand Down Expand Up @@ -703,6 +713,9 @@ check_se_creds() {
CLOUDSEND_PASSWORD=$(sed -n '3p' < ${SE_credential_file} | tr -d '\n')
USER_DETAILS="$CLOUDSEND_DOWNLOAD_URL:$CLOUDSEND_PASSWORD"
board_config
if [ "$?" == "1" ]; then
return 1
fi
TEST_LOGS_URL="https://cloud.3mdeb.com/index.php/s/${CLOUDSEND_LOGS_URL}/authenticate/showShare"

if [ ! -v BIOS_LINK_DES ] && [ ! -v HEADS_LINK_DES ]; then
DaniilKl marked this conversation as resolved.
Show resolved Hide resolved
Expand Down