Backup and mass production instructions¶
For mass production and backup, this chapter is very very very important .
Embedfire LubanCat-RK series boards currently only support two boot methods: SD card and eMMC. Therefore, in the mass production process, the main thing is to choose the appropriate system image download method according to the product.
For system image storage media, we recommend the use of eMMC. eMMC has faster read and write speeds and higher stability. The SD card will have poor compatibility. Using some brands and series of SD cards will cause the system to fail to start or run abnormally. In addition, the Android system image cannot run on the SD card.
In addition to special instructions for image downloading, some users also have needs such as modifying the root file system and customizing system services. As a result, the content in this section will be too cluttered. We have listed some common technical routes, and users can follow the diagram according to their own circumstances.
Mirror download¶
Embedfire LubanCat-RK series boards currently only support two boot methods: SD card and eMMC. We will explain the burning of the two boot media separately below.
SD Card¶
There is currently only one way to burn the LubanCat image provided by Embedfire to the SD card, which is to use Rockchip’s official burning tool SD DiskTool, which only provides the Windows version.
SD card burning does not support partition burning. Only the complete update.img image generated by the SDK can be burned.
In actual use, when using SDDiskTool to repeatedly burn the image to the SD card on the Win10 system, because the SD card that has been burned has many partitions, it will cause a blue screen on the computer, and there is currently no solution. If you must use this tool, other software content should be saved before burning.
Please see the following chapters for related content on SD card burning:
eMMC¶
There are two ways to burn the LubanCat image provided by Embedfire to eMMC, namely using an SD upgrade card to burn the image to eMMC and using a USB burning tool to burn the image.
The production of SD upgrade card also requires the use of SDDiskTool tool. Partition burning is not supported. Only the complete update.img image generated by the SDK can be burned. The principle is to burn the complete boot image to the SD card, and then save a copy of update.img to the SD card. The system starts from the SD card, and then burns the update.img image to the eMMC.
There are two ways to use USB burning tools to burn images to eMMC. One is to use Rockchip’s development tool RKDevTool (Windows version) or Linux_Upgrade_Tool (Linux version), and the other is to use Rockchip’s USB mass production burning tool, FactoryTool (Windows only).
RKDevTool and Linux_Upgrade_Tool have similar functions, and both support partition burning and complete update.img image burning. These two tools are mainly used for image burning during the development process. They not only have burning functions, but also have other advanced functions, but they can only be connected to one board at a time for operation.
FactoryTool mass production tool is mainly used for factory production. It only supports update.img image. It can burn multiple boards at the same time and is easy to operate.
Based on the comprehensive analysis of the above burning methods, FactoryTool mass production tool is suitable for large-volume burning in factories, while RKDevTool and Linux_Upgrade_Tool are suitable for development or small-batch burning. The SD card burning method is not recommended.
For eMMC burning related content and software usage instructions, please see the following chapters:
Complete image unpacking and merging¶
Through the understanding of the burning process above, we will find that during the production process we mainly use the complete image update.img, and what we release is also the complete image of xxx_update.img. For users who want to carry out secondary development, the main modification content is the root file system. When we back up, we also back up the root file system.
So how to turn each individual partition image into a complete image update.img involves the packaging and unpacking of the complete image. Read the following chapters for specific content:
Backup and restore¶
Some users want to quickly add their own functions for secondary development, but are not very familiar with the image building and compilation steps. At this time, you can modify it directly based on the Embedfire LubanCat image and use the modified image for secondary distribution, which involves backing up the board image and burning it again.
Depending on the content of the modification and the difficulty of the operation, you can choose the following methods:
Completely back up the entire contents of the SD card or eMMC and burn it¶
You can choose to directly back up the entire SD card and eMMC. The backup process of this method is the simplest. However, the backup RAW format image cannot be burned through Rockchip micro-production tools. You can choose this method if you are using an SD card to boot or eMMC burning in the verification stage and small batch production stage.
Back up the root file system partition¶
If our modification content is small, we can also choose to back up only the root file system partition or other separate partitions to obtain a separate partition image. At this time, we can choose to use Rockchip development tools to burn the image partition, or we can package the partition image into a complete image. The subsequent burning process will be consistent with the LubanCat image burning process provided by Embedfire.
However, the limitation of this method is that if you back up multiple partitions, each partition must be backed up separately as a partition image. With the unpacking and packaging of the image, the whole process will be very complicated.
Modify rootfs.img image on PC¶
If we only modify a small amount of the root file system, we can directly mount rootfs.img to the Linux PC for modification. This method is only suitable for developers who are familiar with the root file system. Improper modification may cause the system to fail to start or work abnormally.
If developers are familiar with the use of chroot tools, they can even directly use the host network to install software packages, modify system services, etc.
Add system service¶
When users use LubanCat boards, they need to add or modify some system services. According to the timing of addition, it can be divided into the following two methods.
Add or modify system services to the board¶
The image has been burned into the board. You need to add or modify system services on the started board and modify them immediately according to your needs.
Add or modify system services to the build script¶
The system image has not yet been generated. It is necessary to add the corresponding system services and set the corresponding parameters when building the root file system. Doing this ensures that our modifications are deterministic and reproducible.