File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -392,17 +392,17 @@ export class FlashManager {
392392
393393 try {
394394 for await ( const image of systemImages ) {
395- const [ onDownload , onFlash ] = createSteps ( [ 1 , image . hasAB ? 2 : 1 ] , this . #setProgress. bind ( this ) )
395+ // Flash system to slot A only (large, slow), other A/B partitions to both slots
396+ const flashBothSlots = image . hasAB && image . name !== 'system'
397+ const [ onDownload , onFlash ] = createSteps ( [ 1 , flashBothSlots ? 2 : 1 ] , this . #setProgress. bind ( this ) )
396398
397399 this . #setMessage( `Downloading ${ image . name } ` )
398400 await this . imageManager . downloadImage ( image , onDownload )
399401 const blob = await this . imageManager . getImage ( image )
400402 onDownload ( 1.0 )
401403
402- // Flash image to each slot
403- const slots = image . hasAB ? [ '_a' , '_b' ] : [ '' ]
404+ const slots = flashBothSlots ? [ '_a' , '_b' ] : ( image . hasAB ? [ '_a' ] : [ '' ] )
404405 for ( const [ slot , onSlotProgress ] of withProgress ( slots , onFlash ) ) {
405- // NOTE: userdata image name does not match partition name
406406 const partitionName = `${ image . name . startsWith ( 'userdata_' ) ? 'userdata' : image . name } ${ slot } `
407407
408408 this . #setMessage( `Flashing ${ partitionName } ` )
You can’t perform that action at this time.
0 commit comments