You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Talos-2 fixes to comply with hashing file standard. Bypass flash-gui.sh prompt when talos-2 ato validate hashes against hashes provided under tgz through flash.sh validation (still offer zip and tgz, which tgz might change to zip later but only tgz offered through builds)
Attempt to address #1526 (comment)
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Copy file name to clipboardExpand all lines: initrd/bin/flash-gui.sh
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,11 @@ while true; do
63
63
--yesno "You will need to insert a USB drive containing your BIOS image (*.$UPDATE_PKG_EXT or\n*.$UPDATE_PLAIN_EXT).\n\nAfter you select this file, this program will reflash your BIOS.\n\nDo you want to proceed?" 0 80);then
64
64
mount_usb
65
65
if grep -q /media /proc/mounts;then
66
-
find /media ! -path '*/\.*' -type f \( -name "*.$UPDATE_PLAIN_EXT" -o -type f -name "*.$UPDATE_PKG_EXT"\)| sort >/tmp/filelist.txt
find /media ! -path '*/\.*' -type f \( -name "*.$UPDATE_PLAIN_EXT" -o -type f -name "*.$UPDATE_PKG_EXT"\)| sort >/tmp/filelist.txt
70
+
fi
67
71
file_selector "/tmp/filelist.txt""Choose the ROM to flash"
68
72
if [ "$FILE"=="" ];then
69
73
exit 1
@@ -109,12 +113,19 @@ while true; do
109
113
# Continue on using the verified ROM
110
114
ROM="$PACKAGE_ROM"
111
115
else
116
+
# talos-2 uses a .tgz file for its "plain" update, contains other parts as well, validated against hashes under flash.sh
117
+
# Skip prompt for hash validation for talos-2. Only method is through tgz or through bmc with individual parts
118
+
if [ "${CONFIG_BOARD%_*}"!= talos-2 ];then
112
119
# a rom file was provided. exit if we shall not proceed
113
120
ROM="$PKG_FILE"
114
121
ROM_HASH=$(sha256sum "$ROM"| awk '{print $1}')|| die "Failed to hash ROM file"
115
122
if! (whiptail $CONFIG_ERROR_BG_COLOR --title 'Flash ROM without integrity check?' \
116
123
--yesno "You have provided a *.$UPDATE_PLAIN_EXT file. The integrity of the file can not be\nchecked automatically for this file type.\n\nROM: $ROM\nSHA256SUM: $ROM_HASH\n\nIf you do not know how to check the file integrity yourself,\nyou should use a *.$UPDATE_PKG_EXT file instead.\n\nIf the file is damaged, you will not be able to boot anymore.\nDo you want to proceed flashing without file integrity check?" 0 80);then
117
124
exit 1
125
+
fi
126
+
else
127
+
#We are on talos-2, so we have a tgz file. We will pass it directly to flash.sh which will take care of it
0 commit comments