DHCOM Update: Linux Root Filesystem: Difference between revisions
No edit summary |
|||
Line 4: | Line 4: | ||
== Update Kernel == | == Update/Backup Kernel == | ||
To run a linux root filesystem update you have to provide a update kernel in the root directory of your update media (e. g. microSD, SD, USB). The filename of the update kernel has to be '''''uImage.update'''''. Please download the matching update kernel in the download area of your board (e. g. [[COM iMX25 Bootloader U-Boot#Downloads|Download area iMX25]] or [[COM AM35 Bootloader U-Boot#Downloads|Download area AM35x]]). | To run a linux root filesystem update you have to provide a update kernel in the root directory of your update media (e. g. microSD, SD, USB). The filename of the update kernel has to be '''''uImage.update'''''. Please download the matching update kernel in the download area of your board (e. g. [[COM iMX25 Bootloader U-Boot#Downloads|Download area iMX25]] or [[COM AM35 Bootloader U-Boot#Downloads|Download area AM35x]]). | ||
The latest version of the Update/Backup Kernel allows to read the NAND Flash content (of the rootfs mtd partition) and store it on a flash storage (e. g. microSD, SD, USB). | |||
== Supported Root Filesystem Images == | == Supported Root Filesystem Images == | ||
=== Update Mode === | |||
You have to provide your new root filesystem in one of the following formats: | You have to provide your new root filesystem in one of the following formats: | ||
Line 25: | Line 26: | ||
It is important that the appropriate file extension is used. If you have to update a big number of devices we recommend to use the <code> *.ubi </code> format because it is the fastest. If you need help to create <code> *.ubi </code> or <code> *.ubifs </code> images please have a look to [[UBI/UBIFS Filesystem|this page]]. | It is important that the appropriate file extension is used. If you have to update a big number of devices we recommend to use the <code> *.ubi </code> format because it is the fastest. If you need help to create <code> *.ubi </code> or <code> *.ubifs </code> images please have a look to [[UBI/UBIFS Filesystem|this page]]. | ||
=== Backup Mode === | |||
:{|class="wikitable" style="text-align: center; width: 350px" | |||
|- | |||
| <code> *.tar </code> || Tarball archive without compression | |||
|} | |||
The appropriate file extension has to be specified. Only if it ends with "*.tar" the backup mode is used. | |||
To flash it back into the NAND-Flash of your target you have to compress the tarball archive on your workstation to get a "*.tar.gz" or "*.tar.bz2". | |||
# gzip myrootfsbackup.tar | |||
Latest revision as of 13:32, 29 April 2015
To write a new linux root filesystem into the NAND-Flash memory of a DHCOM device you can use the DHCOM Update Mechanism. The root filesystem update is started by u-boot like other NAND-Flash updates. Unlike other NAND-Flash updates u-boot is not capable to write the rootfilesystem itself. For this purpose u-boot loads a minimal linux kernel which does the work. We call this tiny kernel in the further description "Update Kernel".
Update/Backup Kernel
To run a linux root filesystem update you have to provide a update kernel in the root directory of your update media (e. g. microSD, SD, USB). The filename of the update kernel has to be uImage.update. Please download the matching update kernel in the download area of your board (e. g. Download area iMX25 or Download area AM35x).
The latest version of the Update/Backup Kernel allows to read the NAND Flash content (of the rootfs mtd partition) and store it on a flash storage (e. g. microSD, SD, USB).
Supported Root Filesystem Images
Update Mode
You have to provide your new root filesystem in one of the following formats:
*.ubi
UBI Image *.ubifs
UBIFS Image *.tar.gz
Tarball archive with gzip compression *.tar.bz2
Tarball archive with bzip2 compression
It is important that the appropriate file extension is used. If you have to update a big number of devices we recommend to use the *.ubi
format because it is the fastest. If you need help to create *.ubi
or *.ubifs
images please have a look to this page.
Backup Mode
*.tar
Tarball archive without compression
The appropriate file extension has to be specified. Only if it ends with "*.tar" the backup mode is used.
To flash it back into the NAND-Flash of your target you have to compress the tarball archive on your workstation to get a "*.tar.gz" or "*.tar.bz2".
# gzip myrootfsbackup.tar
Set Up a Root Filesystem Update
You can start a linux root filesystem update on the u-boot console with the command
update rootfs <RootfsImageFilename>
To run a automaticaly update or to run a rootfilesystem update with the command update
without additional options you have to provide a "DHupdate.ini"-file.
Examples for DHupdate.ini Files
Example 1:
##DHCOMupdate## [display] progress.bmp done.bmp error.bmp [led] GPIO_D high [update] rootfs ImageFilename.ubi reset [end]
Example 2:
##DHCOMupdate## [display] progress.bmp done.bmp error.bmp [led] GPIO_D high [update] settings DHCOM_SettingsBlock.bin refresh bootloader u-boot_image.bin linux uImage_NewLinuxKernel rootfs ImageFilename.tar.gz [end]
Note: It is necessary to use UNIX End Of Line conversion in DHupdate.ini files.
Use NAND-FLash Rootfilesystem
If your DHCOM board does not use the root filesystem within the NAND-Flash check the following on the u-boot console:
printenv linux_root
If you got the following output your board is configured to use a root filesystem on a micro SD card:
linux_root=root=/dev/mmcblk0p2 rootwait
You can configure your board to use the NAND-Flash root filesystem with the following commands:
setenv linux_root ubi.mtd=X root=ubi0:nand_rootfs rootfstype=ubifs
saveenv
The number X
specifies the mtd device to use. You can determine this number on a runnig device with
# cat /proc/mtd
On i.MX25 X=6 and on AM35x X=7.