MediaTek TV EMMCÁ Úë Ã V5.01
MediaTek TV EMMCÁ Úë Ã V5.01
TCL
MediaTek Confidential Release fo
TCL
MediaTek Confidential Release for
Version: 5.0
Release date: 2022-09-01
TCL
Use of this document and any information contained therein is subject to the terms and conditions set forth in Exhibit 1. This document
is subject to change without notice.
Version History
V1.3
15/07/2014
02/02/2015
Improve the description of emmcbin.ini rules
V2.0 28/03/2018 Update ECSD[179]=0x08 to solve the problem of low probability booting
V2.1 02/07/2018 Added notes on dumping user area data from the master slice
V2.2 03/09/2019 Modify the problem of MBOOT fixed at 3M and MPOOL fixed at 2M
V2.5 20/02/2020 Added a method to upgrade mboot before dump to avoid mbootnize
V2.6 22/04/2021
TCL Operation
Delete and replace the emmc.bin part, and emphasize that mboot must be re-burned
V2.8
22/04/2021
25/05/2021
Modify the ECSD[167] register setting description
V2.9 Add some important notes for emmcnize to generate emmc.bin; (use
V4.0 7/5/2022 Support Merak architecture, please see section 2.7 for instructions
V5.0 Support Merak architecture FDE function. Please see the updates of Chapter 2 and 5.
9/1/2022 For a summary of the ECSD register setting requirements for the programmer, see Section 6.
chapter.
TCL
MediaTek Confidential Release for
2
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
Table of Contents
TCL
Version History ··································································································································································2
Table of Contents·······························································································································································3
Creating an Image by Copying the Master Film· ... Introduction· ... Area· ... Area· ... Master Film Preparation· ... Area
Data· ...
TCL
2.3.4 Upgrading the main program via USB after burning mboot with a burner· ...
2.3.5 Adding multioptee· ... Notes· ... Support for Partition Table (emmcnize_V3)· ...
4.2 Making a Master Film· ... Using a programmer to program · ... Sharing of experience in making EMMC master
chip· ... Creating an Image· ... The following CONFIG needs to be opened· ... 22 5.2 Dump Making an Image from a
Master Film· ... Cannot be recognized· ...
TCL
MediaTek Confidential Release for
3
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
5.3 Method of Simulating Burning Master Image· ... Operation· ... 6 Summary of ECSD Setting Requirements
for Programmers· ...
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
4
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
1.1 Introduction
TCL
MediaTek Confidential Release fo
Master chip duplication means dumping the data in the master chip emmc flash, and then using the burner to burn the dumped data into the empty emmc flash, so as to
user area in the emmc flash. So when burning the emmc flash, there are two situations:
1. If the writer does not support burning these two partitions at the same time, you need to burn these two partitions separately.
When programming, you need to set the extended CSD register of the
SPEC of the chip provided by the emmc manufacturer, there are two cases: if escd[167]bit0 is enabled by default before leaving the factory
WR_DATA_REL_USR, that is, escd[167] has been preset to 0x1f or 0x1, then jump directly to step 2); if escd[167]bit0(WR_DATA_REL_USR) is
preset to 0 before leaving the factory, that is, escd[167] has been preset to 0x0, continue with steps c, dc) Set ecsd[167]=0x1, escd[155]=0x1 d) After the
again
MSD801 or all main chips with SPI-NOR boot: Skip this step 2) (no need to burn boot1 area).
= 0x01
When programming, you need to set the extended CSD register of the
SPEC of the chip provided by the emmc manufacturer, there are two cases: if escd[167]bit0 is enabled by default before leaving the factory
WR_DATA_REL_USR, that is, escd[167] has been preset to 0x1f or 0x1, then jump directly to step 2); if escd[167] bit0 (WR_DATA_REL_USR) is
preset to 0 before leaving the factory, that is, escd[167] has been preset to 0x0, then continue with steps c and d
2) Required settings
MSD801: ECSD[179] = 0, MSD918: ECSD[179] = 0x48, all other master chips: ECSD[179] = 0x08. All master chips: ECSD[177] = 0x02, ECSD[162]
= 0x01
Note: If
you want to erase the EMMC, please erase the entire EMMC before setting the extended CSD register. Remove the erase option when programming boot1 and user
TCL
partitions, otherwise the boot1 partition may be accidentally erased when programming the user partition.
Reliable write must be set. If not set, the data written on the eMMC may be damaged when the power is off.
be set, please consult the emmc manufacturer. 2) ECSD[179] = 0x48 sets the boot1 partition
5
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
3) ECSD[177]=0x2 sets the eMMC bit width to 8 bits and the boot mode to standard Speed 4)
Some eMMCs will not boot if ECSD[162] is not set to 1, so it must be set. ECSD[162]=1 requires the eMMC to check the HW reset
pin. The default value is 0, which means it will not be checked. TCL
MediaTek Confidential Release fo
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
6
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
TCL
The boot1 area stores rom_emmc_boot.bin. Since hash0 in rom_emmc_boot.bin may be
Unique key encryption, so you need to burn the original rom_emmc_boot.bin directly to the boot1 area.
1. Use tftp to upgrade all partitions of the mother chip (USB upgrade will not upgrade all partitions by default, but a special USB package for upgrading all partitions is also
acceptable); 2.
After the mother chip is upgraded and started up, no actions can be performed, such as starting the APP (which will generate user encryption behavior or generate a unique ID
for the machine, etc.) or plugging in the USB to upgrade the DRM Key, etc. Otherwise, the dumped data will be unusable; 3.
After the mother chip is started up, power off and restart to enter mboot, and upgrade the mboot partition separately using tftp or USB (both rom_emmc_boot.bin and mboot.bin
files must be re-burned, and only one of them cannot be burned, otherwise there will be a problem of ns_uboot_load_RPMBProg failed! Remember not to use Graffito tool
or ISPtool for upgrading, otherwise the environment variables will be overwritten), and remember not to power off after the upgrade is completed, and directly start the next step
1.3.2 Dump user area data from the master slice TCL
To burn the user area, you need to dump the data in the mother chip emmc flash to the USB disk in the mboot command line. Due to the size limit of FAT 4G files, the generation
the port number used by the USB flash drive. After inserting
the USB flash drive (formatted as FAT32, the capacity should not be less than the total capacity of the EMMC), use the command to determine the
#usb start 1
Use the emmcbin command to copy the data in the EMMC to the USB disk file. #emmcbin [port
number]
#emmcbin 1
After the progress bar is completed and the dump is prompted to be completed, a file named emmc.bin will be generated under the USB flash drive, and the size is consistent with
the EMMC capacity (the emmc capacity can be queried through the mmc size command).
7
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
2) Use the mmc dd command to copy the EMMC data to the USB flash
drive. #mmc dd mmc2usb [port number] For
example, if port 1 is used above,
enter #mmc dd mmc2usb 1. TCL
After the copy is completed (prompted 100%), remember the total size (block number) dumped, which is actually the total capacity of the
EMMC, and will be given in the last line
partition table uses the GPT format, and Windows PC cannot recognize the USB drive with this GPT partition table. In actual tests, when the USB drive is inserted into the
PC, it will not be recognized, and it is also impossible to select this USB drive using WinHEX. Therefore, for the Merak architecture solution, WinHex cannot be used to create
TCL
MediaTek Confidential Release for
Select the USB flash drive as Source and the newly created target file directory as Destination. Fill in 0 for Start sector, which means reading data from the
beginning of the USB flash drive. Note that the Number of sectors to copy here needs to be filled in with the size after "Dump Block:" in 2), then click OK and wait
Use a burner to burn the generated new_emmc.bin into the user area.
TCL
MediaTek Confidential Release for
8
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
2.1 Introduction
TCL
MediaTek Confidential Release fo
Using Emmcnize to pack the image means generating emmc.bin for burning the user area based on the original partition image file.
The difference between the two methods is that there is no need to dump data from the master slice, and the images can be created entirely based on the original images of each partition.
emmc.binÿ
Similarly, you also need to burn the boot1 area and user
area. We use the boot1 area and user area in the emmc flash. So when burning the emmc flash, there are two situations:
1. If the writer does not support burning these two partitions at the same time, you need to burn these two partitions separately.
When programming, you need to set the extended CSD register of the
SPEC of the chip provided by the emmc manufacturer, there are two cases: if escd[167]bit0 is enabled by default before leaving the factory
WR_DATA_REL_USR, that is, escd[167] has been preset to 0x1f or 0x1, then jump directly to step 2); if escd[167]bit0(WR_DATA_REL_USR) is
preset to 0 before leaving the factory, that is, escd[167] has been preset to 0x0, continue with steps c, dc) Set ecsd[167]=0x1, escd[155]=0x1 d) After the
again
= 0x01
2. If the burner supports burning boot and user areas at the same time
When programming, you need to set the extended CSD register of the
SPEC of the chip provided by the emmc manufacturer, there are two cases: if escd[167]bit0 is enabled by default before leaving the factory
WR_DATA_REL_USR, that is, escd[167] has been preset to 0x1f or 0x1, then jump directly to step 2); if escd[167]bit0(WR_DATA_REL_USR) is
preset to 0 before leaving the factory, that is, escd[167] has been preset to 0x0, continue with steps c, dc) Set ecsd[167]=0x1, escd[155]=0x1 d) After the
again
2) Required settings
MSD801: ECSD[179] = 0, MSD918: ECSD[179] = 0x48, all other master chips: ECSD[179] = 0x08. All master chips: ECSD[177] = 0x02, ECSD[162]
= 0x01
Note: If
TCL
you want to erase the EMMC, please erase the entire EMMC before setting the extended CSD register. Remove the erase option when programming boot1 and user
partitions, otherwise the boot1 partition may be accidentally erased when programming the user partition.
Reliable write must be set. If not set, the data written on the eMMC may be damaged when the power is off.
Reliable write is enabled by default in eMMC. If ecsd[167] is 0x1f, reliable write does not need to be set.
9
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited.
Machine Translated by Google
If reliable write cannot be set, please consult the emmc manufacturer. 2) ECSD[179] =
TCL
0x48 sets the boot1 partition of the two boot partitions as the boot partition.
3) ECSD[177]= 0x2 sets the eMMC bit width to 8 bits and the boot mode to standard Speed 4) Some eMMCs will not
boot if ECSD[162] is not set to 1, so it must be set. ECSD[162]=1 requires the eMMC to check the HW reset pin. The default value is 0, which means it will
not be checked.
MediaTek
2.2 Burn boot1 area
Confidential Release fo
Use the burner to burn rom_emmc_boot.bin to the boot1 area directly
ÿ Non-secure boot case (ie AN does not open the BUILD_WITH_SECURE_BOOT option): Skip this step and directly
fill in the blank value for the mpool partition in Section 2.3.2 (Emmcnize will fill in the blank value at the corresponding position of the partition if it cannot
In the case of secure boot + non-secure merge, the MPOOL partition stores the corresponding secureinfo information such as boot img.
TCL
ÿÿÿ nuttx_config.bin
secure_info_recovery.bin ÿ ÿÿÿ
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 10
Machine Translated by Google
TCL
crc ÿÿÿ
MergeBin.exe
ÿÿÿ
SeparateBin.exe
will be generated, and some intermediate files will be generated in the temp directory.
Copy mpool.bin, which will be used when Emmcnize packages the image later.
steps: 1. Put emmcnize_V3 and all the partition images and ini configuration files to be packaged in the same
directory; 2. Execute "./emmcnize_V3 XX.ini XX.bin" and wait for the packaging to be completed. Among them, XX.ini is the name of the configuration file, and XX.bin
is the name of the separate image after packaging. For example, if the configuration
, file name is emmcbin.ini and needs to be packaged into a separate image
emmc.bin, type "./emmcnize_V3
emmcbin.ini emmc.bin". 3. The generated emmc.bin can be directly burned into the
emmc with a burner. 4. If you want to generate a bin containing only the partition table, execute "./emmcnize_V3 XX.ini XX.bin -p", that is, add the -p parameter at the end.
Emmcnize creates a partition table by reading the ini configuration file. The format of the ini configuration file is as follows:
[MBOOT-volume]
image=mboot.bin
vol_id=1
vol_size=0x300000
TCL
vol_name=MBOOT
[MPOOL-volume]
image=mpool.bin
vol_size=0x200000
vol_name=MPOOL
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 11
Machine Translated by Google
TCL
[misc-volume]
image=misc.img
vol_id=3
vol_size=0x80000
[recovery-volume]
image=recovery.img.aes
vol_id=4
vol_size=0x800000
vol_name=recovery
Note:
ÿ The user sets the order and size of each partition in the Board config. The size of each partition must be aligned to 512 bytes, which means the minimum unit is
0x200.
ÿ After compiling Android, a set_partition file will be generated. The order and size of each partition in set_partition must be consistent with the order and size of each partition in emmcbin.ini.
The order and size of each partition must be consistent, and the size of each partition must be aligned to
512Byte; ÿ [XX-volume] is the header of each partition information, and Emmcnize uses this header information to identify the entire
TCL
partition information; ÿ image=XX.img defines the partition image name, which must be the same as the existing image name. If you need to divide a blank partition,
that is, if there is no corresponding partition image, image can be set to a non-existent image name (empty file will be printed when running emmcnize_V3),
ÿ vol_id=X Each partition has a unique vol_id, which cannot be the same. The vol_id number starts from 1 and is arranged in ascending order (+1).
vol_size=XX defines the partition size. Vol_size must not be less than the partition image size. It is best to keep it consistent with the value in set_partition and ensure
defines the emmc partition name. Each partition name cannot be the same. Try to unify it with the image name burned into the partition for easy distinction.
Each parameter of the above partition must be assigned a value, otherwise an error will occur.
2.3.4 Use the burner to burn mboot and then USB upgrade the main program
TCL
If mboot is burned together with the main program, just follow the above steps. If you burn
Use the burner to burn rom_emmc_boot.bin to the emmc boot1 area according to step 2.2; 2) Use the
burner to burn mboot.bin to the 0x200000-0x500000 position in the emmc user area; 3) After the chip is
restarted, use the USB flash drive to upgrade and burn the emmc.bin produced in 2.3.2 into the emmc user area.
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 12
Machine Translated by Google
When using a burner to burn emmc, please refer to 2.1 for ecsd settings.
TCL
2.3.5 Adding multioptee
distinction. For example, this SOC has 2 model_ids: 4, 5, and there are two emmc.bin generated, namely emmc4.bin and emmc5.bin. When upgrading
emmc.bin, just upgrade the corresponding emmc.bin according to the target board model_id. For example, if the target platform model_id is 4, then
upgrade emmc4.bin; if the target board model_id is 5, then
burn emmc5.bin; V2 does not need emmcnize to do separation, and will directly pack tee.aes (or bl31.aes) into emmc.bin. Finally, only one
emmc.bin is generated, and this emmc.bin can be upgraded on the target platform.
2.4 Notes
1. Use this emmcnize to generate emmc.bin. If the mboot config does not have CONFIG_LOAD_ENV_FROM_SN turned on, the boot may get stuck in the kernel
TCL
startup phase after burning emmc.bin. This is because the mboot environment variables will not be set during the burning of emmc.bin like upgrading
MstarUpgrade.bin, which leads to such a problem. After turning on this config, the first boot in mboot will read env from /tvconfig/config/set_env
and set the env inside it. /tvconfig/config/set_env is copied from the set_config file under device/, which is basically the same as the set_config
2. After opening CONFIG_LOAD_ENV_FROM_SN in 1 above, you need to add the recoverycmd setting in set_config under device
a. Otherwise, the mboot env will be reloaded from set_env every time the computer is turned on, which will cause the mboot phase to take a long time.
And the env manually modified under mboot is overwritten by this env load. • (Item
3. On the Android platform, super.img (with Android dynamic partiton enabled) or system.img/vendor.img needs to be
Non-sparse format, because emmcnize will not do any processing on the original image, but just write the original image into emmc.bin. Otherwise,
the system startup will be Android init mount system, vendor logical partition fail, causing the system startup to get stuck.
4. Super.img/system.img/vendor.img are not in sparse format, that is, their image size must be equal to the corresponding partition size.
example): • The size of super.img generated by Full build is 1,620,730,132 bytes. • But the super
TCL
partition size is 0x84A00000, which is 2,225,078,272 bytes. • So it needs to be converted to unsparse
format.
TCL
MediaTek Confidential Release fo
as follows: • First add toolchain under out/host/linux-x86 in the Android root directory. • Then execute simg2img super.img
super.img.raw to convert super.img to super.img.raw. • When the emmcnize tool creates a super partition, the converted super.img.raw must be used.
TCL
•
This is usually because the server's hard disk file system has insufficient space (check with df -u).
6. Although the GPT partition table has a partition name limit of 36, the partition table in the disk_partition_t structure is widely used in mboot;
The limit is 31, so the length limit of the partition name (vol_name) of the emmcnize ini file is 31 bytes. 7. emmcnize supports GPT
partition table, but because we cannot know the size of emmc, we will face two problems:
Therefore, we will set the value of last_usable_lba to about 2G (basically there will be no emmc less than 2G), and then the emmc of mboot will automatically
Adapt will help us populate last_usable_lba and backup partition tables accurately.
1. emmcnize_V3 adds support for GPT partition table (add parameter -g) 2.
TCL
emmcnize_V3 relaxes the restrictions on partition table, the maximum size of partition table can be increased to 128 (of course, this requires synchronous modification
of mboot). 3. emmcnize_V3 supports non-Onebin versions, Onebin V1 and Onebin V2. (See 2.3.5 for details) 4. emmcnize_V3
V1 with parameters (eg: -g –p, etc.) will fail to execute and mistakenly delete the ini file.
question.
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 14
Machine Translated by Google
6. emmcnize_V3 is ultimately statically linked. The advantage is that it avoids dynamic linking problems caused by different server environments. The disadvantage is
TCL
The emmcnize_V3 executable file will be relatively large.
•
[-b partition_start]
• -v : Indicates that the padding part is not filled with 0x0, but with 0xff
The level will do it, which is an important difference between the two), so what the bin is in the emmc is what the emmcnize packs in.
For example, the file that is ultimately burned into the super partition is super.img.raw instead of super.img.
(1) Confirm that the generated emmcbin format content is what we want. Usually, we only need to confirm the first 2M data.
(2) Confirm that the content of the USB drive is correct and that there will be no errors in the data due to tool problems.
• //Usually read the first 2M data for comparison. If the comparison fails, align it with env
b) If there is a problem, you can enter the system: use the dd command to dump the partitions for comparison
c) Combine log analysis to further locate the partition that may have problems
The partition start of other partitions is uniformly placed after the block address 0x3800.
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 15
Machine Translated by Google
• For Merak project, no longer use partition names such as MBOOT / MPOOL. To make emmcnize more concise, all partitions
TCL
Parse the ini file to get the partition name, and use the [-s] option of the emmcnize tool to specify the starting block of the first partition.
•Based on the emmcnize_V4 version, add the -e option, which means to enable the FDE function and bring it in
FDE keyÿ
TCL
[uploads] -a0 refers to the fusion architecture, -a1 refers to the merak architecture
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 16
Machine Translated by Google
file systems do not support such large files, so you can compress emmc.bin and copy it to the USB drive, then connect the USB drive to the TV, decompress it, and then write it to
emmc. This method is relatively easy to operate and feasible, and there is no need to use winhex and other methods to make a USB master image. The specific method is as follows
1. Compress emmc.bin
• gzip emmc.bin # will generate emmc.bin.gz, the compressed file size will be greatly reduced and can be directly copied to the USB flash
• ac androidboot.selinux permissive
clay
res
reboot recovery (make sure to execute in recovery mode, otherwise it may be interrupted by other IO) mkdir /
3. After writing to emmc, manually restart the TV to verify whether the system can start normally
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 17
Machine Translated by Google
TCL
The Mboot processing method is to first read the emmc bin from USB and store it in DRAM, and then write the corresponding location of
EMMC. However, the DRAM size is usually not enough to cache the entire bin, so the bin needs to be cut into several parts.
2. Then type the following commands in mboot, start bin from address 0, and write the entire bin into EMMC.
usb start 0
Notice:
cut into many parts, you can put these commands in scripts, for example, name it usb_upgrade_emmc.txt, and then pass
The following command executes the instructions contained in the scripts in the USB drive:
usb start
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 18
Machine Translated by Google
TCL
Notice:
by default). 2. After the master machine is upgraded and started, no actions can be performed, such as: 1. Start the APP (will generate user
encryption behavior or generate a unique ID for the machine, etc.) 2. Plug in the USB to upgrade the DRM Key, etc. This will make the
dumped
data unusable. 3. The master production principle and steps are the same as Mstar. The main difference is the Fusion system. The Mboot
Bin Size has been adjusted, and the corresponding parameters and Tools need to be updated. Others remain unchanged.
#usb start 1
2) Use the emmcbin command to copy the data in the EMMC to the USB disk file.
#emmcbin 1
After the progress bar is completed and the dump is prompted to be completed, a file named emmc.bin will be generated under the USB flash drive, and the size is consistent
with the EMMC capacity (the emmc capacity can be queried through the mmc size command).
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 19
Machine Translated by Google
Command confirmation, for example, to confirm whether it is plugged into port 1, enter
#usb start 1
dd mmc2usb #mmc 1
After the copy is completed (prompted 100%), remember the total size (number of blocks) dumped, which is actually the total capacity of the EMMC,
3) Use winhex on the PC to copy the dumped data in the USB disk to a file. Select Tools->Disk tools->Clone disk.
TCL
MediaTek Confidential Release for
Select the USB flash drive as Source and the newly created target file directory as Destination. Fill in 0 for Start sector, which means reading data from the beginning of the
USB flash drive. Note that the Number of sectors to copy here needs to be filled in with the size after "Dump Block:" in 2), then click OK and wait for the creation
to be completed.
The MBOOT partition data in the emmc.bin dumped from the mother chip is actually mboot.bin. Since the CustomerKeyBank in mboot.bin is
encrypted by the unique key in the efuse corresponding to the mother chip, the data of the MBOOT partition in emmc.bin needs to be restored to the original
mboot.bin.
TCL
In the console, use the program mbootnize to process it: (This step is different from the mstar tool, so you need to pay attention)
Parameter
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 20
Machine Translated by Google
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 21
Machine Translated by Google
CONFIG_RELOAD_DEFAULT_ENV // The uenv.img generated by full build is empty. After opening this CONFIG, a set of default environment variable values will be reloaded after
uboot starts.
When Emmcnize creates a GANG image, you can bring in the FDE key to create an encrypted image.
In the Merak architecture project, the partition table uses the GPT format, and Windows PC cannot recognize the USB flash drive with this GPT partition table. In actual
tests, when the USB flash drive is inserted into the PC, it cannot be recognized, and it cannot be selected using WinHEX. Therefore, for the Merak architecture solution, WinHex
5.2.2 Note that the mboot command must first turn off FDE
Before doing a dump operation in Uboot, you must first type the following uboot command to turn off FDE
emmc fde inactive //disable FDE function, the dumped data will be encrypted data
(In moot, you can enter cmd: emmc fde, and the fde status will be returned. If it returns inactive, it can be determined that the fde is currently closed.)
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 22
Machine Translated by Google
(In moot, you can enter cmd: emmc fde, and the fde status will be returned. If it returns inactive, it can be determined that the fde is currently closed.)
Since the kernel does not have a command to disable FDE, you cannot perform simulated burning operations under the kernel.
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 23
Machine Translated by Google
TCL
EMMC has several important ECSD registers, which are strongly related to boot and need to be filled in according to the requirements of the SOC solution.
device.
ÿ If it is a factory-made programmer, you need to notify the programmer manufacturer to modify the key registers of MMC ECSD.
The following ECSD register requirements are the same for both Fusion and Merak projects.
ECSD[179] 0x08
TCL
Bit[5:3] is set to 1, Boot partition 1 for boot fails to start, no log
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 24
Machine Translated by Google
TCL
Since the operation is divided into three steps, the positioning process is also divided into three steps. You can refer to them one by one.
This step is to dump the data in EMMC to the USB disk. If the problem of MBOOT part not found appears, it may be
Take the emmc.bin produced by the customer and have a look. Since the image may be too large to open, you can use
dd if=emmc.bin of=emmc_10M.bin count=10000 bs=1024 Get the first 10M of the image, then open the image and find
Go to 2M (200000) and check whether it is mboot data. Figure 1 in the figure below is OK, and Figure 2 is wrong.
Secondly, you can take a general look at the data. Because there is a Windows tool like winhex in the operation process of 1.2, you may see it when an error occurs.
Figure 1 (OK):
TCL
MediaTek Confidential Release for
Figure 2 (error):
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 25
Machine Translated by Google
Question!!! The
#./mbootnize mboot.bin emmc.bin new_emmc.binÿ However, each parameter has a problem
1) Mbootnize Due to
the change of times, there are two versions of this tool. The difference is whether the size of MBOOT is 3M or 5M. Many customers currently only have the 3M version.
So when mboot is larger than 3M, the following error will occur
mboot file size 4070839 too large , can not larger than 3145728
When you encounter this problem, use 5M mbootnize, the link is as follows
For example: after burning, the computer is turned on and stuck at the startup logo, etc.
3ÿ emmc.bin
4ÿ new_emmc.bin
The final master chip cannot be verified because Mediatek does not have a burner. You can use the following method to do a simple verification:
(2). Write the prepared master software to the USB disk in the server
mmc dd usb2mmc 0 1
TCL
7.3 Using the burner to burn
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 26
Machine Translated by Google
TCL
MediaTek Confidential Release fo
TCL
MediaTek Confidential Release for
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 27
Machine Translated by Google
TCL
you represent, collectively “You”) acceptance of the terms and conditions set forth below (“T&C”). By using, accessing or downloading this Document, You are
accepting the T&C and agree to be bound by the T&C. If You don’t agree to the T&C, You may not use this Document and shall immediately destroy any copy
thereof.
MediaTek and its licensors retain titles and all ownership rights in and to this Document and no license (express or implied, by estoppels or otherwise) to any intellectual
propriety rights is granted hereunder. This Document is subject to change without further notification. MediaTek does not assume any
responsibility arising out of or in connection with any use of, or reliance on, this Document, and specifically disclaims any and all liability, including,
without limitation, consequential or incidental damages.
THIS DOCUMENT AND ANY OTHER MATERIALS OR TECHNICAL SUPPORT PROVIDED BY MEDIATEK IN CONNECTION WITH THIS DOCUMENT, IF ANY, ARE
PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. MEDIATEK SPECIFICALLY DISCLAIMS
ALL WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, COMPLETENESS OR ACCURACY AND ALL
WARRANTIES ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF DEALING OR COURSE OF PERFORMANCE. MEDIATEK SHALL NOT BE RESPONSIBLE
FOR ANY MEDIATEK DELIVERABLES MADE TO MEET YOUR SPECIFICATIONS OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
Without limiting the generality of the foregoing, MediaTek makes no warranty, representation or guarantee regarding the suitability of its products for
any particular purpose, nor does MediaTek assume any liability arising out of the application or use of any product, circuit or software. You agree that
TCL
You are solely responsible for the designing, validating and testing Your product incorporating MediaTek’s product and ensure such product meets applicable standards
and any safety, security or other requirements.
The above T&C and all acts in connection with the T&C or this Document shall be governed, construed and interpreted in accordance with the laws of
TCL
MediaTek Confidential Release for
MediaTek Proprietary and Confidential. © 2022 MediaTek Inc. All rights reserved. Unauthorized reproduction or disclosure of this document, in whole or in part, is strictly prohibited. 28