SSD_EMMC UPGRADE
1. Overview¶
eMMC upgrade solution is to obtain the upgrade image from the eMMC flash after entering the emmcstar
command under UBOOT, and burn it into the corresponding boot flash.
In order to support upgrade, eMMC needs to divide an area in the UDA partition to save the upgrade data, and because the kernel needs to support reading and writing data in this area, so this area needs to use an emmc partition that can be recognized by the kernel. The partition design is as follows:
Figure 1: Partition design of eMMC upgrade scheme
upgrade partition must be the first partition in the emmc partition, which is determined by the code logic of the identification of emmc partition under uboot. When upgrading, all other partitions will be deleted, and the upgrade partition will not be affected, so it can only be the first partition.
As show in figure 1:
head:total 64 blocks,include partition table information
reserved:from 64 to 615200blocks. Include boot environment information(0x278-0x378 blocks) and others are reserved.
others partitions: start from 615200 blocks
2. Enable eMMC upgrade¶
Compile the project and make the eMMC upgrade package:
cd project make dispcam_p3_emmc-nor.glibc-9.1.0-ext4fs.s01a.64.qfn128_defconfig make menuconfig # Image --> # (emmc.ext4fs.partition.config) Image Partition Config # [*] eMMC boot linux # (nor) boot.bin burn in which flash(nor/spinand) when emmc boot # (0xC800000) eMMC upgrade partition size(byte) when linux boot from eMMC # /*The above item sets the size of the upgrade partition. We need to set it according to the size of the actual image package, which needs to be no less than the image package, in block, is set to 0xC800000 (200M). Save and exit. */ make clean; make image- nocheck -j32 # Create an image_upgrade package that supports emmc upgrade. `-o` is optional. If `-o` is used, its value must be set to 1, otherwise other packaging schemes are used. sh make_emmc_upgrade_sigmastar.sh # Select Y or N according to the files to be upgraded, the default is Y. image/output/images/ SigmastarUpgradeEMMC.bin is the final generated eMMC upgrade image.
3. eMMC upgrade method¶
-
First, burn the image made in the previous step into the corresponding flash through the network or USB or master chip burning method, and successfully boot to linux. At this time, the partition structure of the eMMC is shown in Figure 1.
-
The
upgrade
partition is recognized as/ dev /mmcblk0p1
under the kernel. Next, you can burn the upgrade data (such as SigmastarUpgradeEMMC.bin made in the previous step ) to address 0 ofmmcblk0p1
in binary data. Commanddd
is used here. In this way, the upgrade data is ready. -
Reboot to uboot, input
emmcstar 1
in the uboot command line to update the upgrade data to the flash from theupgrade
partition in the eMMC flash . After the upgrade is complete, you need to manually reset and restart the new system.Note: The
emmcstar
command must be followed by a non-zero parameter, otherwise this upgrade scheme will not be used.