File tree Expand file tree Collapse file tree 6 files changed +608
-3
lines changed Expand file tree Collapse file tree 6 files changed +608
-3
lines changed Original file line number Diff line number Diff line change 2929 if ( data . arch == "esp8266" ) {
3030 toggle ( 'rev' ) ;
3131 }
32+ const isESP32 = data . arch && ( data . arch . toLowerCase ( ) === 'esp32' || data . arch . toLowerCase ( ) === 'esp32-s2' ) ;
33+ if ( isESP32 ) {
34+ gId ( 'bootloader-section' ) . style . display = 'block' ;
35+ if ( data . bootloaderSHA256 ) {
36+ gId ( 'bootloader-hash' ) . innerText = 'Current bootloader SHA256: ' + data . bootloaderSHA256 ;
37+ }
38+ }
3239 } )
3340 . catch ( error => {
3441 console . log ( 'Could not fetch device info:' , error ) ;
4249 @import url ("style.css" );
4350 </ style >
4451</ head >
45-
46- < body onload ="GetV() ">
52+ < body onload ="GetV(); ">
4753 < h2 > WLED Software Update</ h2 >
4854 < form method ='POST ' action ='./update ' id ='upd ' enctype ='multipart/form-data ' onsubmit ="toggle('upd') ">
4955 Installed version: < span class ="sip installed-version "> Loading...</ span > < br >
@@ -60,6 +66,16 @@ <h2>WLED Software Update</h2>
6066 < button id ="rev " type ="button " onclick ="cR() "> Revert update</ button > < br >
6167 < button type ="button " onclick ="B() "> Back</ button >
6268 </ form >
69+ < div id ="bootloader-section " style ="display:none; ">
70+ < hr class ="sml ">
71+ < h2 > ESP32 Bootloader Update</ h2 >
72+ < div id ="bootloader-hash " class ="sip " style ="margin-bottom:8px; "> </ div >
73+ < form method ='POST ' action ='./updatebootloader ' id ='bootupd ' enctype ='multipart/form-data ' onsubmit ="toggle('bootupd') ">
74+ < b > Warning:</ b > Only upload verified ESP32 bootloader files!< br >
75+ < input type ='file ' name ='update ' required > < br >
76+ < button type ="submit "> Update Bootloader</ button >
77+ </ form >
78+ </ div >
6379 < div id ="Noupd " class ="hide "> < b > Updating...</ b > < br > Please do not close or refresh the page :)</ div >
6480</ body >
6581</ html >
Original file line number Diff line number Diff line change @@ -820,6 +820,9 @@ void serializeInfo(JsonObject root)
820820 root[F (" resetReason1" )] = (int )rtc_get_reset_reason (1 );
821821 #endif
822822 root[F (" lwip" )] = 0 ; // deprecated
823+ #ifndef WLED_DISABLE_OTA
824+ root[F (" bootloaderSHA256" )] = getBootloaderSHA256Hex ();
825+ #endif
823826#else
824827 root[F (" arch" )] = " esp8266" ;
825828 root[F (" core" )] = ESP.getCoreVersion ();
You can’t perform that action at this time.
0 commit comments