From 0ff0c77acc9892799dbdec374a66ed8542752df4 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 7 Sep 2016 13:36:08 -0700 Subject: [PATCH] feat: zero out configured bytes from drive before flashing with bmap (#691) This PR makes use of the `bytesToZeroOutFromTheBeginning` option introduced in: - https://github.com/resin-io-modules/etcher-image-stream/pull/34 - https://github.com/resin-io-modules/bmapflash/pull/6 The option, when set in `manifest.json`, causes a certain amount of bytes to be zeroed out before the bmap-assisted write process starts, in order to prevent issues on certain ROM bootloaders causing by `bmap-tools` thinking certain parts of the initial sectors are holes. The following components were upgraded: - `etcher-image-stream` was upgraded to v4.1.0 - `etcher-image-write` was upgraded to v8.1.0 Changelog-Entry: Allow archive images to configure a certain amount of bytes to be zeroed out from the beginning of the drive when using bmaps. Change-Type: minor Fixes: https://github.com/resin-io/etcher/issues/673 Signed-off-by: Juan Cruz Viotti --- lib/cli/writer.js | 3 ++- npm-shrinkwrap.json | 18 +++++++++--------- package.json | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/cli/writer.js b/lib/cli/writer.js index 217a9127..13645623 100644 --- a/lib/cli/writer.js +++ b/lib/cli/writer.js @@ -69,7 +69,8 @@ exports.writeImage = (imagePath, drive, options, onProgress) => { }, results.image, { check: options.validateWriteOnSuccess, transform: results.image.transform, - bmap: results.image.bmap + bmap: results.image.bmap, + bytesToZeroOutFromTheBeginning: results.image.bytesToZeroOutFromTheBeginning }); }).then((writer) => { return new Bluebird((resolve, reject) => { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index cc119942..62d75fcf 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -394,9 +394,9 @@ "resolved": "https://registry.npmjs.org/bluebird-retry/-/bluebird-retry-0.7.0.tgz" }, "bmapflash": { - "version": "1.1.2", - "from": "bmapflash@>=1.1.2 <2.0.0", - "resolved": "https://registry.npmjs.org/bmapflash/-/bmapflash-1.1.2.tgz", + "version": "1.2.0", + "from": "bmapflash@>=1.2.0 <2.0.0", + "resolved": "https://registry.npmjs.org/bmapflash/-/bmapflash-1.2.0.tgz", "dependencies": { "isarray": { "version": "1.0.0", @@ -1398,9 +1398,9 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz" }, "etcher-image-stream": { - "version": "4.0.0", - "from": "etcher-image-stream@4.0.0", - "resolved": "https://registry.npmjs.org/etcher-image-stream/-/etcher-image-stream-4.0.0.tgz", + "version": "4.1.0", + "from": "etcher-image-stream@4.1.0", + "resolved": "https://registry.npmjs.org/etcher-image-stream/-/etcher-image-stream-4.1.0.tgz", "dependencies": { "yauzl": { "version": "2.6.0", @@ -1410,9 +1410,9 @@ } }, "etcher-image-write": { - "version": "8.0.0", - "from": "etcher-image-write@8.0.0", - "resolved": "https://registry.npmjs.org/etcher-image-write/-/etcher-image-write-8.0.0.tgz", + "version": "8.1.0", + "from": "etcher-image-write@8.1.0", + "resolved": "https://registry.npmjs.org/etcher-image-write/-/etcher-image-write-8.1.0.tgz", "dependencies": { "isarray": { "version": "1.0.0", diff --git a/package.json b/package.json index 21ca6d46..ec087837 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "chalk": "^1.1.3", "drivelist": "^3.3.3", "electron-is-running-in-asar": "^1.0.0", - "etcher-image-stream": "^4.0.0", - "etcher-image-write": "^8.0.0", + "etcher-image-stream": "^4.1.0", + "etcher-image-write": "^8.1.0", "etcher-latest-version": "^1.0.0", "file-tail": "^0.3.0", "flexboxgrid": "^6.3.0",