Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-raspberrypi-usbboot

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-raspberrypi-usbboot - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5-build-mcraa-win-cm4-ce7b5fedeecfa6646d575d90e79f998a73eaf929-1

1

build/index.d.ts

@@ -8,2 +8,3 @@ /// <reference types="node" />

private _step;
last_serial: number;
constructor(portId: string);

@@ -10,0 +11,0 @@ get progress(): number;

16

build/index.js

@@ -112,3 +112,3 @@ "use strict";

// Delay in ms after which we consider that the device was unplugged (not resetted)
const DEVICE_UNPLUG_TIMEOUT = 5000;
const DEVICE_UNPLUG_TIMEOUT = 50000;
// Delay (in ms) to wait when epRead throws an error

@@ -319,2 +319,3 @@ const READ_ERROR_DELAY = 100;

this._step = 0;
this.last_serial = -1;
}

@@ -398,2 +399,3 @@ get progress() {

usbbootDevice.step = step;
usbbootDevice.last_serial = device.deviceDescriptor.iSerialNumber;
if (step === usbbootDevice.LAST_STEP) {

@@ -434,2 +436,8 @@ this.remove(device);

const usbbootDevice = this.get(device);
let forceSecondstage = false;
if (device.deviceDescriptor.iSerialNumber == (usbbootDevice === null || usbbootDevice === void 0 ? void 0 : usbbootDevice.last_serial)) {
if (device.deviceDescriptor.idProduct == 10001) {
forceSecondstage = true;
}
}
if ((isRaspberryPiInMassStorageMode(device) ||

@@ -444,3 +452,3 @@ isComputeModule4InMassStorageMode(device)) &&

}
debug('Found serial number', device.deviceDescriptor.iSerialNumber);
debug('Found serial number', device.deviceDescriptor.iSerialNumber, `forceSecondStage: ${forceSecondstage}`);
debug('port id', devicePortId(device));

@@ -450,4 +458,4 @@ try {

// cm: 0; cm4: 3
if (device.deviceDescriptor.iSerialNumber === 0 ||
device.deviceDescriptor.iSerialNumber === 3) {
if ((device.deviceDescriptor.iSerialNumber === 0 ||
device.deviceDescriptor.iSerialNumber === 3) && !forceSecondstage) {
debug('Sending bootcode.bin', devicePortId(device));

@@ -454,0 +462,0 @@ this.step(device, 0);

@@ -7,4 +7,9 @@ # Change Log

# v1.0.5
## (2023-01-09)
* patch: WIP force second stage [Peter Makra]
# v1.0.4
## (2022-10-20)
## (2022-10-21)

@@ -11,0 +16,0 @@ * switch from concourse to flowzone [Zane Hitchcox]

{
"name": "node-raspberrypi-usbboot",
"version": "1.0.4",
"version": "1.0.5-build-mcraa-win-cm4-ce7b5fedeecfa6646d575d90e79f998a73eaf929-1",
"description": "Transforms Raspberry Pi Compute Modules and Zeros to mass storage devices.",

@@ -42,4 +42,4 @@ "main": "build/index.js",

"versionist": {
"publishedAt": "2022-10-20T13:32:13.650Z"
"publishedAt": "2023-01-09T21:53:11.794Z"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc