DHCOM How to use the Update Mechanism: Difference between revisions
Jneuhauser (talk | contribs) No edit summary |
Jneuhauser (talk | contribs) No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
* Baseboard with USB port like [https://www.dh-electronics.com/produkte/dhsom-system-on-modules/dh-pdk2 PDK2] / [https://www.dh-electronics.com/produkte/dhsom-system-on-modules/dh-picoitx2 picoITX2] / [https://www.dh-electronics.com/produkte/dhcon-controls-connectivity/dhcon-drc02 DRC02] | * Baseboard with USB port like [https://www.dh-electronics.com/produkte/dhsom-system-on-modules/dh-pdk2 PDK2] / [https://www.dh-electronics.com/produkte/dhsom-system-on-modules/dh-picoitx2 picoITX2] / [https://www.dh-electronics.com/produkte/dhcon-controls-connectivity/dhcon-drc02 DRC02] | ||
= Prepare a USB stick | = Prepare a USB stick for the Update Mechanism = | ||
The bootloader update mechanism expects a single FAT32 partition on a storage device such as a USB stick or SD card. | The bootloader update mechanism expects a single FAT32 partition on a removable storage device such as a USB stick or SD card. | ||
Make the | Make the removable device available in your system by connecting it to your computer. If you work with a virtual machine, then connect the newly connected device to your virtual machine. | ||
== Linux == | == Linux == | ||
Line 21: | Line 21: | ||
=== Open GParted and select device === | === Open GParted and select device === | ||
* Open the disk utility '''GParted''' | * Open the disk utility '''GParted'''. | ||
: <span style="color: gray;">Note: You will be asked for your user password to gain super user right through sudo.</span> | : <span style="color: gray;">Note: You will be asked for your user password to gain super user right through sudo.</span> | ||
* Choose your device in the drop down menu right at the top of the user interface | * Choose your device in the drop down menu right at the top of the user interface. | ||
:[[File:Gparted_select_device.JPG|500px]] | :[[File:Gparted_select_device.JPG|500px]] | ||
: <span style="color: red;">Warning: Be sure that you have selected the correct device for the following steps.</span> | : <span style="color: red;">Warning: Be sure that you have selected the correct device for the following steps.</span> | ||
Line 30: | Line 30: | ||
* Verify that you already have a DOS partition table and that the first partition is formatted as FAT32 by selecting '''''Device Information''''' in the '''''View''''' menu | * Verify that you already have a DOS partition table and that the first partition is formatted as FAT32 by selecting '''''Device Information''''' in the '''''View''''' menu | ||
:[[File:Gparted_show_device_info.JPG|500px]] | :[[File:Gparted_show_device_info.JPG|500px]] | ||
* If you see <span style="color: orange;">Partition table: msdos</span> and <span style="color: orange;">File System: fat32</span> your USB stick is already prepared for the Update Mechanism and you can head over to [[#Place Update Files on the USB stick]] | * If you see <span style="color: orange;">Partition table: msdos</span> and <span style="color: orange;">File System: fat32</span> your USB stick is already prepared for the Update Mechanism and you can head over to [[#Place Update Files on the USB stick]]. | ||
* If you only see <span style="color: orange;">Partition table: msdos</span> head over to [[#Create FAT32 formatted partition]] | * If you only see <span style="color: orange;">Partition table: msdos</span> head over to [[#Create FAT32 formatted partition]]. | ||
* And if you don´t see anything like in the picture follow the next steps | * And if you don´t see anything like in the picture follow the next steps. | ||
=== Create DOS partition table === | === Create DOS partition table === | ||
Line 41: | Line 41: | ||
=== Create FAT32 formatted partition === | === Create FAT32 formatted partition === | ||
<span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | <span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | ||
* Remove any existing partition by selecting them and choosing '''''Delete''''' in '''''Partition''''' menu | * Remove any existing partition by selecting them and choosing '''''Delete''''' in '''''Partition''''' menu. | ||
* Create a FAT32 formatted partition with '''''New''''' in the '''''Partition''''' menu and ensure you select <span style="color: orange;">File system: fat32</span>. | * Create a FAT32 formatted partition with '''''New''''' in the '''''Partition''''' menu and ensure you select <span style="color: orange;">File system: fat32</span>. | ||
:[[File:Gparted_create_partition.JPG|500px]] | :[[File:Gparted_create_partition.JPG|500px]] | ||
* Apply all operations to write changes to disk | * Apply all operations to write changes to disk. | ||
:[[File:Gparted_apply_operations.JPG|500px]] | :[[File:Gparted_apply_operations.JPG|500px]] | ||
Line 58: | Line 58: | ||
=== Check current partition table and partition format === | === Check current partition table and partition format === | ||
* Open the dialog '''''Properties''''' with a right-click on the device | * Open the dialog '''''Properties''''' with a right-click on the device. | ||
:[[File:Windows_disk_mgmt_check_properties.JPG|500px]] | :[[File:Windows_disk_mgmt_check_properties.JPG|500px]] | ||
* Check for <span style="color: orange;">Partition style: Master Boot Record (MBR)</span> in the '''''Volumes''''' tab | * Check for <span style="color: orange;">Partition style: Master Boot Record (MBR)</span> in the '''''Volumes''''' tab. | ||
:[[File:Windows_disk_mgmt_check_partition_type.JPG|500px]] | :[[File:Windows_disk_mgmt_check_partition_type.JPG|500px]] | ||
: If you don´t see <span style="color: orange;">Partition style: Master Boot Record (MBR)</span> follow [https://docs.microsoft.com/en-us/windows-server/storage/disk-management/change-a-gpt-disk-into-an-mbr-disk#converting-using-a-command-line Convert to MBR using a command line] and continue with [[#Create FAT32 partition]] afterwards | : If you don´t see <span style="color: orange;">Partition style: Master Boot Record (MBR)</span> follow [https://docs.microsoft.com/en-us/windows-server/storage/disk-management/change-a-gpt-disk-into-an-mbr-disk#converting-using-a-command-line Convert to MBR using a command line] and continue with [[#Create FAT32 partition]] afterwards. | ||
* Check for <span style="color: orange;">File system: FAT32</span> in the '''''General''''' tab of the '''''Properties''''' windows of the '''''Volume''''' | * Check for <span style="color: orange;">File system: FAT32</span> in the '''''General''''' tab of the '''''Properties''''' windows of the '''''Volume'''''. | ||
:[[File:Windows_disk_mgmt_partition_properties.JPG|500px]] | :[[File:Windows_disk_mgmt_partition_properties.JPG|500px]] | ||
:[[File:Windows_disk_mgmt_check_format_type.JPG|500px]] | :[[File:Windows_disk_mgmt_check_format_type.JPG|500px]] | ||
: If you don´t see <span style="color: orange;">File system: FAT32</span> continue at [[#Remove existing partitions]] | : If you don´t see <span style="color: orange;">File system: FAT32</span> continue at [[#Remove existing partitions]]. | ||
* Congratulations your USB stick is already prepared for the Update Mechanism and you can head over to [[#Place Update Files on the USB stick]] | * Congratulations your USB stick is already prepared for the Update Mechanism and you can head over to [[#Place Update Files on the USB stick]]. | ||
=== Remove existing partitions === | === Remove existing partitions === | ||
<span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | <span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | ||
* | * Select '''''Delete Volume''''' in the right-click menu to delete the existing partition on the device. | ||
:[[File:Windows_disk_mgmt_delete_partition.JPG|500px]] | :[[File:Windows_disk_mgmt_delete_partition.JPG|500px]] | ||
=== Create FAT32 partition === | === Create FAT32 partition === | ||
<span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | <span style="color: red;">Warning: The following steps will cause data loss on the selected device!</span> | ||
* Create a | * Create a new partition with '''''New Simple Partition''''' in the right-click menu of the unallocated space. | ||
:[[File:Windows_disk_mgmt_new_partition.JPG|500px]] | :[[File:Windows_disk_mgmt_new_partition.JPG|500px]] | ||
* Use all defaults in the wizard, except in the '''''Format Partition''''' step, choose <span style="color: orange;">File system: FAT32</span>. | |||
:[[File:Windows_disk_mgmt_fat32_partition.JPG|500px]] | :[[File:Windows_disk_mgmt_fat32_partition.JPG|500px]] | ||
= Place Update Files on the USB stick = | = Place Update Files on the USB stick = | ||
== Linux == | |||
* Open the '''''Extract to''''' dialog by right-clicking on the downloaded update zip file. | |||
:[[File:How_to_update_mechanism-linux_extract_files_1.JPG|500px]] | |||
* Select the the prepared USB flash drive as the destination. | |||
:[[File:How_to_update_mechanism-linux_extract_files_2.JPG|500px]] | |||
* Make sure that the update files are located in the root directory of your prepared USB stick. | |||
:[[File:How_to_update_mechanism-linux_extract_files_3.JPG|500px]] | |||
== Windows == | |||
* Open the '''''Extract All''''' dialog by right-clicking on the downloaded update zip file. | |||
:[[File:How_to_update_mechanism-windows_extract_files_1.JPG|500px]] | |||
* Select the root directory of the prepared USB flash drive as the destination. | |||
:[[File:How_to_update_mechanism-windows_extract_files_2.JPG|500px]] | |||
* Make sure that the update files are located in the root directory of your prepared USB stick. | |||
:[[File:How_to_update_mechanism-windows_extract_files_3.JPG|500px]] | |||
= Update target system = | |||
# Insert the prepared USB stick into a USB port of the baseboard | |||
# Switch on or restart the device to start the update from USB stick automatically from the bootloader <br>Note: If the update doesn´t start automatically, execute <code>update auto</code> from the bootloader shell | |||
# Wait until the update has been applied successfully | |||
'''If the update was started successfully, the serial console output should look like:''' | |||
<nowiki> | |||
U-Boot 2015.10 (Jun 27 2017 - 10:01:06 +0200) | |||
DH version 1.1.0.6 | |||
CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz | |||
Reset cause: POR | |||
Board: DHCOM i.MX6 | |||
DRAM: 512 MiB | |||
I2C: ready | |||
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 | |||
Load DH settings... | |||
44 bytes read in 81 ms (0 Bytes/s) | |||
Info: Can't load DH settings file from eeprom | |||
1152054 bytes read in 240 ms (4.6 MiB/s) | |||
Unable to allocate framebuffer memory | |||
In: serial | |||
Out: serial | |||
Err: serial | |||
Net: FEC [PRIME] | |||
Press DEL to abort autoboot in 0 seconds | |||
--> Update INFO: No MMC/SD - Card detected! | |||
--> Update: Try to initialize USB Stick on Host Port:starting USB... | |||
USB0: Port not available. | |||
USB1: USB EHCI 1.00 | |||
scanning bus 1 for devices... 3 USB Device(s) found | |||
scanning usb for storage devices... 1 Storage Device(s) found | |||
scanning usb for ethernet devices... 0 Ethernet Device(s) found | |||
reading DHupdate.ini | |||
180 bytes read in 18 ms (9.8 KiB/s) | |||
--> Update: found DHupdate.ini (180 bytes) | |||
==> Update: Start to Load Update Kernel | |||
reading zImage_imx6s-dhcom4.update | |||
8975788 bytes read in 288 ms (29.7 MiB/s) | |||
Kernel image @ 0x12000000 [ 0x000000 - 0x886b50 ] | |||
Starting kernel ... | |||
...</nowiki> | |||
'''If the update was successful, the output should look like:''' | |||
<nowiki> | |||
... | |||
==> Update executed successful ... | |||
==> It is safe to turn off the system!! | |||
~ #</nowiki> | |||
= Troubleshooting = | |||
<pre style="color: red">TODO: Add common errors and mistakes</pre> |
Latest revision as of 12:03, 20 February 2020
This guide describes how to properly update the built-in flash or eMMC memory on DHCOM devices with a provided update zip file.
Required hard- and software
- DHCOM Update files mostly provided as zip file (If you don't have the needed update files, please ask DH electronics)
- Windows / Linux computer or virtual machine with a administrative account
- Empty USB stick with at least 1 GB capacity
- DHCOM i.MX6 / i.MX25 / AM335x / AM35xx
- Baseboard with USB port like PDK2 / picoITX2 / DRC02
Prepare a USB stick for the Update Mechanism
The bootloader update mechanism expects a single FAT32 partition on a removable storage device such as a USB stick or SD card.
Make the removable device available in your system by connecting it to your computer. If you work with a virtual machine, then connect the newly connected device to your virtual machine.
Linux
This step by step guide has been developed and tested with the Virtual Machine for Application Development from DH electronics and should also work with gparted on other linux distros.
Open GParted and select device
- Open the disk utility GParted.
- Note: You will be asked for your user password to gain super user right through sudo.
- Choose your device in the drop down menu right at the top of the user interface.
Check current partition table and partition format
- Verify that you already have a DOS partition table and that the first partition is formatted as FAT32 by selecting Device Information in the View menu
- If you see Partition table: msdos and File System: fat32 your USB stick is already prepared for the Update Mechanism and you can head over to #Place Update Files on the USB stick.
- If you only see Partition table: msdos head over to #Create FAT32 formatted partition.
- And if you don´t see anything like in the picture follow the next steps.
Create DOS partition table
Warning: The following steps will cause data loss on the selected device!
- Create a empty dos partition table with Create Partition Table in the Device menu and ensure you select msdos as type.
Create FAT32 formatted partition
Warning: The following steps will cause data loss on the selected device!
- Remove any existing partition by selecting them and choosing Delete in Partition menu.
- Create a FAT32 formatted partition with New in the Partition menu and ensure you select File system: fat32.
- Apply all operations to write changes to disk.
Windows
This step by step guide has been developed and tested with Windows 10 Professional Version 1809 and should also work with Windows 7/8 and similar.
Open Disk Management
- Press the Windows button, type compmgmt.msc and start the Microsoft Service Console as administrator by Run as administrator in the right-click menu.
- In the tree view on the left side of the window, select Disk Management in the section Storage.
Check current partition table and partition format
- Open the dialog Properties with a right-click on the device.
- Check for Partition style: Master Boot Record (MBR) in the Volumes tab.
- If you don´t see Partition style: Master Boot Record (MBR) follow Convert to MBR using a command line and continue with #Create FAT32 partition afterwards.
- Check for File system: FAT32 in the General tab of the Properties windows of the Volume.
- If you don´t see File system: FAT32 continue at #Remove existing partitions.
- Congratulations your USB stick is already prepared for the Update Mechanism and you can head over to #Place Update Files on the USB stick.
Remove existing partitions
Warning: The following steps will cause data loss on the selected device!
- Select Delete Volume in the right-click menu to delete the existing partition on the device.
Create FAT32 partition
Warning: The following steps will cause data loss on the selected device!
- Create a new partition with New Simple Partition in the right-click menu of the unallocated space.
- Use all defaults in the wizard, except in the Format Partition step, choose File system: FAT32.
Place Update Files on the USB stick
Linux
- Open the Extract to dialog by right-clicking on the downloaded update zip file.
- Select the the prepared USB flash drive as the destination.
- Make sure that the update files are located in the root directory of your prepared USB stick.
Windows
- Open the Extract All dialog by right-clicking on the downloaded update zip file.
- Select the root directory of the prepared USB flash drive as the destination.
- Make sure that the update files are located in the root directory of your prepared USB stick.
Update target system
- Insert the prepared USB stick into a USB port of the baseboard
- Switch on or restart the device to start the update from USB stick automatically from the bootloader
Note: If the update doesn´t start automatically, executeupdate auto
from the bootloader shell - Wait until the update has been applied successfully
If the update was started successfully, the serial console output should look like:
U-Boot 2015.10 (Jun 27 2017 - 10:01:06 +0200) DH version 1.1.0.6 CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz Reset cause: POR Board: DHCOM i.MX6 DRAM: 512 MiB I2C: ready MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Load DH settings... 44 bytes read in 81 ms (0 Bytes/s) Info: Can't load DH settings file from eeprom 1152054 bytes read in 240 ms (4.6 MiB/s) Unable to allocate framebuffer memory In: serial Out: serial Err: serial Net: FEC [PRIME] Press DEL to abort autoboot in 0 seconds --> Update INFO: No MMC/SD - Card detected! --> Update: Try to initialize USB Stick on Host Port:starting USB... USB0: Port not available. USB1: USB EHCI 1.00 scanning bus 1 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found scanning usb for ethernet devices... 0 Ethernet Device(s) found reading DHupdate.ini 180 bytes read in 18 ms (9.8 KiB/s) --> Update: found DHupdate.ini (180 bytes) ==> Update: Start to Load Update Kernel reading zImage_imx6s-dhcom4.update 8975788 bytes read in 288 ms (29.7 MiB/s) Kernel image @ 0x12000000 [ 0x000000 - 0x886b50 ] Starting kernel ... ...
If the update was successful, the output should look like:
... ==> Update executed successful ... ==> It is safe to turn off the system!! ~ #
Troubleshooting
TODO: Add common errors and mistakes