SSD_Uboot Upgrade Guide


1. Overview

SSD20X does not support empty chip upgrade, but provides USB/SD card upgrade function in the Uboot stage. The upgrade can specify the partition that needs to be upgraded, as long as the corresponding upgrade package is prepared and executed according to the following documents.


2. SD card upgrade

Uboot supports SD card by default, you only need to put the corresponding upgrade package (default: SigmastarUpgradeSD.bin) into the root directory of the SD card, and perform the corresponding operation in uboot.

2.1. Build SD card upgrade package

After the image has been packaged under the project, run the script ./make_sd_upgrade_sigmastar.sh and follow the prompts to select the corresponding partition to be upgraded to package and generate the SD card upgrade package.

After the package is completed, SigmastarUpgradeSD.bin will be generated in the project/image/output/images directory, as shown below. Copy the file to the root directory of the SD card.


2.2. SD card upgrade operation

SSD20X does not support empty chip upgrade, you can only boot and press enter to enter the uboot console, enter sdstar in the console to upgrade, and it will automatically restart after the upgrade is successful.

SigmaStar # sdstar

In addition, you can also set the following env to achieve the effect of automatically detecting and upgrading at booting (that is, you do not need to manually knock sdstar)

setenv sdautoupgrade 1;saveenv;

3. U disk upgrade

Uboot enables USB driver support, and then puts the corresponding upgrade package (default: SigmastarUpgrade.bin) into the root directory of the U disk, and executes the corresponding operation in uboot.

3.1. Configuring Uboot config

After using the corresponding defconfig configuration (public version nand configuration: make infinity2m_spinand_defconfig), enable the following configuration through make menuconfig.

Enable the following configuration under Device Drivers:

Enable the following configuration under MStar drivers:


3.2. Build a U-disk upgrade package

After the image has been packaged under the project, run the script ./make_usb_upgrade_sigmastar.sh and follow the prompts to select the corresponding partition to be upgraded and package it to generate a U-disk upgrade package.

After the package is completed, SigmastarUpgrade.bin will be generated in the project/image/output/images directory, as shown below. Copy the file to the root directory of the U disk.


3.3. U Disk Upgrade Operation

SSD20X does not support U-disk blank upgrade, press enter after booting to enter the Uboot console.

Set the usb upgrade port:

If you are not sure about the USB port, you can also use usb cmd to detect the storage device as shown below: Enter usb start 0/½ to see which port can identify the storage device (usually 0 is more common)

After identification, set the corresponding port, as shown in the screenshot above: setenv UpgradePort 1; saveenv; then usbstart enters the upgrade, and automatically restarts after the upgrade is successful

In addition, you can also set the following env to achieve the effect of automatically detecting and upgrading at startup (that is, you do not need to manually knock usbstar)

setenv usbautoupgrade 1;saveenv

4. The upgrade package opens CRC check

a. The CRC check is for each partition data. If the CRC check of a certain partition data fails during the upgrade process, the entire upgrade process will be interrupted.

b. CRC check needs to open the following config: CONFIG_UPGRADE_CRC_CHECK (off by default)


5. Support version control

At present, version is just a simple time record of packaging: upgrade_bin_version=11261056

a. When upgrading, the version recorded by upgrade_bin_version on the env on the board will be compared, and only when the version is different will it be upgraded (the size will not be compared, and it will be upgraded if it is different)

b. You can turn on version verification by setting env: setenv enable_version_chk 1; saveenv;


6. USB/SD card upgrade support UI progress bar display

The following config needs to be enabled: CONFIG_SSTAR_UPGRADE_UI (off by default)