boot 0.45: Fix 0.44 regression (auto-add semi-colon between each boot code chunk)
parent
3f20ad8af0
commit
bbd2cac110
|
|
@ -48,3 +48,4 @@
|
||||||
0.42: Sort *.boot.js files lexically and by optional numeric priority, e.g. appname.<priority>.boot.js
|
0.42: Sort *.boot.js files lexically and by optional numeric priority, e.g. appname.<priority>.boot.js
|
||||||
0.43: Fix Gadgetbridge handling with Programmable:off
|
0.43: Fix Gadgetbridge handling with Programmable:off
|
||||||
0.44: Write .boot0 without ever having it all in RAM (fix Bangle.js 1 issues with BTHRM)
|
0.44: Write .boot0 without ever having it all in RAM (fix Bangle.js 1 issues with BTHRM)
|
||||||
|
0.45: Fix 0.44 regression (auto-add semi-colon between each boot code chunk)
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ var bootFiles = require('Storage').list(/\.boot\.js$/).sort((a,b)=>{
|
||||||
var fileSize = boot.length + bootPost.length;
|
var fileSize = boot.length + bootPost.length;
|
||||||
bootFiles.forEach(bootFile=>{
|
bootFiles.forEach(bootFile=>{
|
||||||
// match the size of data we're adding below in bootFiles.forEach
|
// match the size of data we're adding below in bootFiles.forEach
|
||||||
fileSize += 2+bootFile.length+1+require('Storage').read(bootFile).length+1;
|
fileSize += 2+bootFile.length+1+require('Storage').read(bootFile).length+2;
|
||||||
});
|
});
|
||||||
// write file in chunks (so as not to use up all RAM)
|
// write file in chunks (so as not to use up all RAM)
|
||||||
require('Storage').write('.boot0',boot,0,fileSize);
|
require('Storage').write('.boot0',boot,0,fileSize);
|
||||||
|
|
@ -231,8 +231,8 @@ bootFiles.forEach(bootFile=>{
|
||||||
var bf = require('Storage').read(bootFile);
|
var bf = require('Storage').read(bootFile);
|
||||||
require('Storage').write('.boot0',bf,fileOffset);
|
require('Storage').write('.boot0',bf,fileOffset);
|
||||||
fileOffset+=bf.length;
|
fileOffset+=bf.length;
|
||||||
require('Storage').write('.boot0',"\n",fileOffset);
|
require('Storage').write('.boot0',";\n",fileOffset);
|
||||||
fileOffset+=1;
|
fileOffset+=2;
|
||||||
});
|
});
|
||||||
require('Storage').write('.boot0',bootPost,fileOffset);
|
require('Storage').write('.boot0',bootPost,fileOffset);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "boot",
|
"id": "boot",
|
||||||
"name": "Bootloader",
|
"name": "Bootloader",
|
||||||
"version": "0.44",
|
"version": "0.45",
|
||||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||||
"icon": "bootloader.png",
|
"icon": "bootloader.png",
|
||||||
"type": "bootloader",
|
"type": "bootloader",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue