File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,11 +413,15 @@ exports.readPlatform = function(platform) {
413413 if ( platform . name == 'A335BNLT' ) platform . name = 'BeagleBone Black' ;
414414 platform . version = fs . readFileSync ( my . is_capemgr ( ) + '/baseboard/revision' ,
415415 'ascii' ) . trim ( ) ;
416- if ( platform . version . match ( / ^ G R / ) ) {
416+ if ( platform . version [ 0 ] == 0x1A ) ) {
417+ platform . version = '1A' ;
418+ platform . name = 'BeagleBone Green' ;
419+ }
420+ else if ( platform . version . match ( / ^ G R / ) ) {
417421 platform . version = platform . version . substr ( 2 ) ;
418422 platform . name = 'BeagleBone Green' ;
419423 }
420- if ( ! platform . version . match ( / ^ [ \0 4 0 -\176] * $ / ) ) delete platform . version ;
424+ else if ( ! platform . version . match ( / ^ [ \0 4 0 -\176] * $ / ) ) delete platform . version ;
421425 platform . serialNumber = fs . readFileSync ( my . is_capemgr ( ) +
422426 '/baseboard/serial-number' , 'ascii' ) . trim ( ) ;
423427 if ( ! platform . serialNumber . match ( / ^ [ \0 4 0 -\176] * $ / ) ) delete platform . serialNumber ;
You can’t perform that action at this time.
0 commit comments