@acst11/node-raspberrypi-usbboot 中文文档教程
node-rasbberrypi-usbboot
将 Raspberry Pi 计算模块和 Zeros 转换为大容量存储设备。
Usage
有关用法,请参阅示例。
在大多数 GNU/Linux 发行版上,您需要以 root 身份运行它。
导入 UsbbootScanner
,实例化它,然后在实例上附加以下事件侦听器:
attach
: a device was connected and we started transforming it to a mass storage device;detach
: a device was detached, note that this could mean that it was physically detached or that it was successfully transformed into a mass storage device;error
: an error occured.
attach
和 detach
事件侦听器将获得一个 UsbbootDevice
作为参数。 此对象将发出 progress
事件,其参数是完成百分比。 当设备将自身重新连接为大容量存储设备时,进度将为 100
。 这之后将是 UsbbootScanner
的 detach
事件(因为设备 将不再是 usbboot 设备)。
Details
这在很大程度上基于 Raspberry Pi USB 启动代码。
它应该支持 Raspberry Pi Compute Modules 和 Raspberry Pi Zeros。
该模块将向 pis 上传一个比上面的原始代码稍微复杂的内核,它允许设备 以更长的准备阶段为代价达到更高的写入速度。
Troubleshooting
如果您在使用此模块时遇到任何问题,请检查它是否适用于上面的原始 USB 引导链接。
您可以通过将 DEBUG
env var 设置为 node-raspberrypi-usbboot
来启用调试输出。
node-rasbberrypi-usbboot
Transforms Raspberry Pi Compute Modules and Zeros to mass storage devices.
Usage
For usage, see the example.
On most GNU/Linux distributions, you'll need to run this as root.
Import UsbbootScanner
, instanciate it, then on the instance attach the following event listeners:
attach
: a device was connected and we started transforming it to a mass storage device;detach
: a device was detached, note that this could mean that it was physically detached or that it was successfully transformed into a mass storage device;error
: an error occured.
The attach
and detach
event listeners will get a UsbbootDevice
as parameter. This object will emit progress
events which parameter is the percentage of completion. The progress will be 100
when the device reattaches itself as a mass storage device. This will be followed by a detach
event from the UsbbootScanner
(because the device will no longer be a usbboot device).
Details
This is heavily based on Raspberry Pi USB booting code.
It should support Raspberry Pi Compute Modules and Raspberry Pi Zeros.
This module will upload a slightly more complex kernel to the pis than the original code above, it allows the devices to reach higher write speeds at the cost of a longer preparation phase.
Troubleshooting
If you have any trouble using this module, please check if it works with the original usb boot link above.
You can enable debug output by setting the DEBUG
env var to node-raspberrypi-usbboot
.
你可能也喜欢
- 5rolli-workflowy2trello 中文文档教程
- @2600hz/sds-react-components 中文文档教程
- @4lch4/pblib 中文文档教程
- @500tech/babel-preset-react-app 中文文档教程
- @9fv.io/notimplemented-error 中文文档教程
- @aaronhuggins/concat-md 中文文档教程
- @abdur-rakib/react-native-button 中文文档教程
- @abibv/vscode-icons-js 中文文档教程
- @ableneo/prettier-config 中文文档教程
- @abmprotocl/dotbtc-plugin-mcd 中文文档教程