Wiren Board 5: Восстановление прошивки/en: различия между версиями

Материал из Wiren Board
(Новая страница: «'''Note: this section describes how to completely overwrite the contents of the Wiren Board Controller internal drive. All user data will be permanently lost. To…»)
(не показано 15 промежуточных версий этого же участника)
Строка 2: Строка 2:
In Wiren Board 5, the firmware is stored in the EMMC chip soldered on the board. In case of problems with loading the controller  a full flashing may be required, which can be done via Micro USB, booting the controller in USB Mass-Storage Gadget mode using the [[Сборка образа для загрузки в режиме USB Mass-Storage/en#.D0.A1.D0.B1.D0.BE.D1.80.D0.BA.D0.B0_mxsldr|mxsldr]] utility.
In Wiren Board 5, the firmware is stored in the EMMC chip soldered on the board. In case of problems with loading the controller  a full flashing may be required, which can be done via Micro USB, booting the controller in USB Mass-Storage Gadget mode using the [[Сборка образа для загрузки в режиме USB Mass-Storage/en#.D0.A1.D0.B1.D0.BE.D1.80.D0.BA.D0.B0_mxsldr|mxsldr]] utility.


'''Note: this section describes how to completely overwrite the contents of the  Wiren Board Controller internal drive. All user data will be permanently lost. To avoid data loss, see the appropriate [[Потеря_файлов_при_обновлении_ПО/en|''section'']].'''
'''Note: this section describes how to completely overwrite the contents of the  Wiren Board Controller internal drive. All user data will be permanently lost. To avoid data loss, see the appropriate [[Пропажа_файлов_при_обновлении_прошивки/en|''storage'']].'''




== Step-by-step guide for Linux ==
== Пошаговая инструкция для Linux ==


#Download the file ''wb5_usbfw.sb'' on your computer [https://github.com/contactless/wirenboard/tree/master/contrib/u-boot here].
#Скачайте на компьютер файл ''wb5_usbfw.sb'' [https://github.com/contactless/wirenboard/tree/master/contrib/u-boot отсюда].
#Assemble the program [[Сборка_образа_для_загрузки_в_режиме_USB_Mass-Storage/en#Assembling mxsldr|''mxsldr'']] on the computer.
#Соберите на компьютере программу [[Special:MyLanguage/Сборка_образа_для_загрузки_в_режиме_USB_Mass-Storage#Сборка mxsldr|''mxsldr'']].
#Download the firmware image to your computer from [https://github.com/contactless/wirenboard/releases here] (image extension is .img.zip. When downloading, select the option for your version of the board of your Wiren Board controller).
#Скачайте на компьютер образ прошивки [https://github.com/contactless/wirenboard/releases отсюда] (расширение образа .img.zip. При скачивании выберите вариант для вашей версии платы контроллера).
#Extract the .img file from the zip archive.
#Извлеките файл img из zip-архива.
#Turn off the controller.
#Выключите контроллер.
#Determine the type of processor module (normal or industrial). To do this, look at the marking of the memory chip on the processor module board:
#Определите тип процессорного модуля (обычный или industrial). Для этого посмотрите маркировку чипа памяти на плате процессорного модуля:
#*Regular version: SanDisk
#*Обычная версия: ''SanDisk''
#*Industrial version: 6VA18JW983
#*Industrial версия: ''6VA18JW983''
#Connect the Micro USB connector of the controller (usually signed as FW) to the USB port of the computer.'''0 It is also highly recommended to connect the controller and #Debug USB software to track the firmware process.'' For the industrial version, a Debug USB connection is ''strongly required'' during the firmware process.
#Соедините разъём Micro USB контроллера (обычно подписан как FW) с портом USB компьютера. ''Настоятельно рекомендуется также подключить контроллер и по Debug USB для отслеживания процесса прошивки.'' Для industrial версии подключение по Debug USB в процессе прошивки - '''обязательно'''.
#Go to the folder with the compiled [[Сборка_образа_для_загрузки_в_режиме_USB_Mass-Storage/en#Assembling mxsldr|''mxsldr'']].
#Перейдите в папку с собранным [[Special:MyLanguage/Сборка_образа_для_загрузки_в_режиме_USB_Mass-Storage#Сборка mxsldr|''mxsldr'']].
#Then:
#Затем:
#*(for WB5 version.3) close the FW jumper next to the Micro USB connector;
#* (для версии WB5.3) замкните перемычку FW рядом с разъёмом Micro USB;
#*(for the version of WB5.6+) hold down the small button next to the microUSB connector.
#* (для версии WB5.6+) зажмите маленькую кнопку рядом с разъёмом Micro USB.
#Without removing the jumper/hanging the button, connect the power to the controller, wait a few seconds and run <syntaxhighlight lang="bash">$ sudo ./mxsldr /X/XX/wb5_usbfw.sb</syntaxhighlight> Where /X/XX/wb5_usbfw.sb is the path to the downloaded file.
#Не снимая перемычку/не отпуская кнопку, подключите к контроллеру питание, подождите несколько секунд и запустите на компьютере <syntaxhighlight lang="bash">$ sudo ./mxsldr /X/XX/wb5_usbfw.sb</syntaxhighlight> Где /X/XX/wb5_usbfw.sb - это путь к скачанному файлу.
#If the image is successfully loaded after a few seconds, the green led will flash and the controller memory will be detected as a drive on the computer.
#При успешной загрузке образа через несколько секунд замигает зеленый светодиод, память контроллера определится на компьютере как накопитель.
#Then:
#Затем:
#*(for the version of WB5.3) remove FW jumper;
#* (для версии WB5.3) снимите пермычку FW;
#*(for the version of WB5.6+), release the button to FW.
#* (для версии WB5.6+) отпустите кнопку FW.
#Find out how your system has defined a new drive (such as /dev/sdb). This can be seen in the output
#Поймите, как в вашей системе определился новый накопитель (например, как ''/dev/sdb''). Это можно посмотреть в выводе
#:<syntaxhighlight lang="bash">dmesg | tail</syntaxhighlight>
#:<syntaxhighlight lang="bash">dmesg | tail</syntaxhighlight>
#:[[File:Dmesg.png |600px|thumb|center|Command dmesg output | tail. The target drive is /dev/sdb]].
#:[[File:Dmesg.png |600px|thumb|center|Вид вывода команды dmesg | tail. Нужный накопитель - /dev/sdb]]
#:''Note:''
#:''Примечание:''
#:If you have an ''industrial'' version of the processor module and the output of the command does not match the one shown in the screenshot (there is no device of the "sd*" type), then you need to open the Debug console of the controller and enter the following:
#:Если у вас '''industrial''' версия процессорного модуля и вывод команды не совпадает с указанным на скриншоте (нет устройства вида "sd*"), то нужно открыть Debug консоль контроллера и ввести в неё следующее:  
#:<syntaxhighlight lang="bash">/sbin/modprobe g_mass_storage file=/dev/mmcblk0 iManufacturer="Wiren Board" iProduct="Wiren Board"</syntaxhighlight>
#:<syntaxhighlight lang="bash">/sbin/modprobe g_mass_storage file=/dev/mmcblk0 iManufacturer="Wiren Board" iProduct="Wiren Board"</syntaxhighlight>
#:then re-enter the following in the  PC terminal
#:затем уже в терминале ПК снова ввести
#:<syntaxhighlight lang="bash">dmesg | tail</syntaxhighlight>  
#:<syntaxhighlight lang="bash">dmesg | tail</syntaxhighlight>  
#:to find out how the drive is defined in the system.
#:для того, чтобы узнать, как накопитель определился в системе.
#:'''Attention! If you make a mistake with the definition of the drive name, and in the next paragraph substitute the name corresponding to your other drive, its contents will be lost.'''
#:'''Внимание! Если вы ошибётесь с определением имени накопителя, и в следующем пункте подставите название, соответствующее другому вашему накопителю, его содержимое будет потеряно.'''
#To write firmware to the controller, replace the following in the command below
#Чтобы записать прошивку в контроллер, замените в команде ниже
#*''/X/XX/XXXXX_emmc_wb5.img'' - replace with the path to the pre-extracted firmware file,
#* ''/X/XX/XXXXX_emmc_wb5.img'' на путь к заранее распакованному файлу прошивки,
#*''/dev/sdX'' - replace with the name of the partition under which the drive is defined in the system,
#* ''/dev/sdX'' на название раздела, под которым накопитель определился в системе,
#:and run the command <syntaxhighlight lang="bash">$ sudo dd if=/X/XX/XXXXX_emmc_wb5.img of=/dev/sdX bs=1M conv=fdatasync && sync</syntaxhighlight>  
#: и выполните команду <syntaxhighlight lang="bash">$ sudo dd if=/X/XX/XXXXX_emmc_wb5.img of=/dev/sdX bs=1M conv=fdatasync && sync</syntaxhighlight>
#After recording is complete, disconnect the controller from the USB, turn off the controller, and then turn it back on.
#После завершения записи отключите контроллер от USB, отключите питание от контроллера и включите снова.

Версия 18:40, 31 мая 2019

Другие языки:

In Wiren Board 5, the firmware is stored in the EMMC chip soldered on the board. In case of problems with loading the controller a full flashing may be required, which can be done via Micro USB, booting the controller in USB Mass-Storage Gadget mode using the mxsldr utility.

Note: this section describes how to completely overwrite the contents of the Wiren Board Controller internal drive. All user data will be permanently lost. To avoid data loss, see the appropriate storage.


Пошаговая инструкция для Linux

  1. Скачайте на компьютер файл wb5_usbfw.sb отсюда.
  2. Соберите на компьютере программу mxsldr.
  3. Скачайте на компьютер образ прошивки отсюда (расширение образа .img.zip. При скачивании выберите вариант для вашей версии платы контроллера).
  4. Извлеките файл img из zip-архива.
  5. Выключите контроллер.
  6. Определите тип процессорного модуля (обычный или industrial). Для этого посмотрите маркировку чипа памяти на плате процессорного модуля:
    • Обычная версия: SanDisk
    • Industrial версия: 6VA18JW983
  7. Соедините разъём Micro USB контроллера (обычно подписан как FW) с портом USB компьютера. Настоятельно рекомендуется также подключить контроллер и по Debug USB для отслеживания процесса прошивки. Для industrial версии подключение по Debug USB в процессе прошивки - обязательно.
  8. Перейдите в папку с собранным mxsldr.
  9. Затем:
    • (для версии WB5.3) замкните перемычку FW рядом с разъёмом Micro USB;
    • (для версии WB5.6+) зажмите маленькую кнопку рядом с разъёмом Micro USB.
  10. Не снимая перемычку/не отпуская кнопку, подключите к контроллеру питание, подождите несколько секунд и запустите на компьютере
    $ sudo ./mxsldr /X/XX/wb5_usbfw.sb
    
    Где /X/XX/wb5_usbfw.sb - это путь к скачанному файлу.
  11. При успешной загрузке образа через несколько секунд замигает зеленый светодиод, память контроллера определится на компьютере как накопитель.
  12. Затем:
    • (для версии WB5.3) снимите пермычку FW;
    • (для версии WB5.6+) отпустите кнопку FW.
  13. Поймите, как в вашей системе определился новый накопитель (например, как /dev/sdb). Это можно посмотреть в выводе
    dmesg | tail
    
    tail. Нужный накопитель - /dev/sdb
    Примечание:
    Если у вас industrial версия процессорного модуля и вывод команды не совпадает с указанным на скриншоте (нет устройства вида "sd*"), то нужно открыть Debug консоль контроллера и ввести в неё следующее:
    /sbin/modprobe g_mass_storage file=/dev/mmcblk0 iManufacturer="Wiren Board" iProduct="Wiren Board"
    
    затем уже в терминале ПК снова ввести
    dmesg | tail
    
    для того, чтобы узнать, как накопитель определился в системе.
    Внимание! Если вы ошибётесь с определением имени накопителя, и в следующем пункте подставите название, соответствующее другому вашему накопителю, его содержимое будет потеряно.
  14. Чтобы записать прошивку в контроллер, замените в команде ниже
    • /X/XX/XXXXX_emmc_wb5.img на путь к заранее распакованному файлу прошивки,
    • /dev/sdX на название раздела, под которым накопитель определился в системе,
    и выполните команду
    $ sudo dd if=/X/XX/XXXXX_emmc_wb5.img of=/dev/sdX bs=1M conv=fdatasync && sync
    
  15. После завершения записи отключите контроллер от USB, отключите питание от контроллера и включите снова.