MT7986 Single Image SOP v1.4 20220130
MT7986 Single Image SOP v1.4 20220130
MT7986 Single Image SOP v1.4 20220130
Use
z.c al
tws enti
om
ng@ nfid
gyo Co
MT7986 Single Image SOP
din Tek
2022/1/30
ang edia
M
z.c al
tws enti
om
Revision Date Author (Optional) Description
1.0 2021-12-3 Micheal Su Official release
ng@ nfid
1.1 2022-1-13 Micheal Su Modify eMMC partition layout
1.2 2022-1-18 Jones Huang Add ALL-300G Flash Programmer example
1.3 2022-1-26 Micheal Su Add generate GPT_EMMC command
gyo Co
1.4 2022-1-30 Micheal Su Add for SPIM-NAND flash
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 2
CONFIDENTIAL C
Use
Outline
z.c al
tws enti
om
Generate SPIM-NAND Single Image
ng@ nfid
Generate eMMC Single Image
gyo Co
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 3
CONFIDENTIAL C
Use
z.c al
tws enti
om
ng@ nfid
Generate SPIM-NAND Single Image
gyo Co
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 4
CONFIDENTIAL C
Use
Prepare File for SPIM-NAND Single Image
z.c al
tws enti
• bl2.img
om
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
ng@ nfid
• fip.bin
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
gyo Co
• kernal_image
din Tek
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 5
CONFIDENTIAL C
Use
How to Generate SPIM-NAND Single Image
z.c al
tws enti
• Put all those files under the same folder,
om
– bl2.img
ng@ nfid
– fip.bin
– kernal_image, e.g. openwrt-mediatek-mt7986-mt7986a-ax6000-2500wan-spim-nand-rfb-
squashfs-factory.bin
gyo Co
– mk_image.sh
• Run mk_image.sh
din Tek
– CMD:~/#> ./mk_image.sh -p <CHIP Name> -d <Flash Type> -b <bl2.img> -f <fip.bin> -k <Kernel
image> ang edia
– For example:
CMD:~/#> ./mk_image.sh -p mt7986a -d spim-nand -b bl2.img -f fip.bin -k openwrt-mediatek-
mt7986-mt7986a-ax6000-2500wan-spim-nand-rfb-squashfs-factory.bin
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 6
CONFIDENTIAL C
How to Program SPIM-NAND Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Select SPI-NAND P/N (MXIC’s part as example)
om
ng@ nfid
gyo Co
“Must” choose MX35LF1GE4AB-Z4x(WSON8-6*8)(DisECC)
“Do not” choose MX35LF1GE4AB-Z4x(WSON8-6*8)(enECC)
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 7
CONFIDENTIAL C
How to Program SPIM-NAND Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Load image
om
3
2
ng@ nfid
1
gyo Co
din Tek
ang edia 4
M
5
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 8
CONFIDENTIAL C
How to Program SPIM-NAND Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Setup for programming
om
ng@ nfid
2
1
gyo Co
din Tek
ang edia
M
Please use “Auto” to program SPI-NAND Flash
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 9
CONFIDENTIAL C
How to Program SPIM-NAND Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Programming (check contact first)
om
ng@ nfid
1
gyo Co
din Tek
ang edia
Flash chip may not be contacted very well in the socket
So, please do the package contact check first.
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 10
CONFIDENTIAL C
How to Program SPIM-NAND Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Programming (formal programming)
om
ng@ nfid
1
gyo Co
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 11
CONFIDENTIAL C
Use
z.c al
tws enti
om
ng@ nfid
Generate eMMC Single Image
gyo Co
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 12
CONFIDENTIAL C
Use
eMMC Physical Partitions
z.c al
tws enti
• According to eMMC standard 5.1 section 6.2.1, eMMC devices have the following physical
om
partitions
ng@ nfid
• In MTK's platforms, we use boot area
partition 1 & user data area (UDA) only.
gyo Co
• BL2 is placed at boot partition 1,
and the rest is at UDA.
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 13
CONFIDENTIAL C
Use
MT7986 eMMC Partition Layout
z.c al
tws enti
• Boot partition 1: BL2
om
4GB Flash
0x0
GPT 17KB
0x4400
• UDA:
ng@ nfid
The flash partition layout define at 0x400000
Uboot Env 512KB
atf/tools/dev/gpt_editor/example/mt7986-emmc.json 0x480000
gyo Co
Factory (RF) 2MB
0x680000
FIP 2MB
din Tek
0x880000
Kernel 32MB
ang edia 0x2880000
RootFS 256MB
M
0x12880000
0xFFFFFFFF
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 14
CONFIDENTIAL C
Use
MT7986 eMMC Partition Layout
z.c al
tws enti
• For Programmer need to prepare bl2.img for boot partition 1 and mt7986-eMMC-single-
om
image.bin for UDA.
ng@ nfid
• mt7986-eMMC-single-image.bin is includes,
– GPT (GPT_EMMC)
gyo Co
– FIP (fip.bin)
– firmware (kernel image, openwrt-mediatek-mt7986-xxxxxx.bin)
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 15
CONFIDENTIAL C
Use
Prepare File for eMMC Single Image
z.c al
tws enti
• bl2.img
om
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
ng@ nfid
• fip.bin
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
gyo Co
• kernal_image
din Tek
– Please refer to MT7986_Build_SOP_xxx.pdf application note.
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 16
CONFIDENTIAL C
Use
How to Generate eMMC Single Image
z.c al
tws enti
• Put all those files under the same folder,
om
– GPT_EMMC
ng@ nfid
– fip.bin
– kernal_image, e.g. openwrt-mediatek-mt7986-mt7986a-ax8400-2500wan-emmc-rfb-squashfs-
gyo Co
sysupgrade.bin
– mk_image.sh
din Tek
• Run mk_image.sh
– CMD:~/#> ./mk_image.sh -p <CHIP Name> -d <Flash Type> -g <GPT table> -f <fip.bin> -k <Kernel
ang edia
image>
– For example:
CMD:~/#> ./mk_image.sh -p mt7986a -d emmc -g GPT_EMMC -f fip.bin -k openwrt-mediatek-
M
mt7986-mt7986a-ax8400-2500wan-emmc-rfb-squashfs-sysupgrade.bin
Use
z.c al
The example of ALL-300G programmer
tws enti
• Select eMMC flash type,
om
ng@ nfid
gyo Co
1
din Tek
ang edia eMMC 4.5 use BG153_256G_VCCQ3.3V
2 eMMC 5.1 use BG153_256G_VCCQ1.8V
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 18
CONFIDENTIAL C
How to Program Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Load image,
om
3
ng@ nfid
1 mt7986-eMMC-single-image.bin
gyo Co
din Tek
2
ang edia
bl2.img
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 19
CONFIDENTIAL C
How to Program Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Configure EXT_CSD register
om
ng@ nfid
• ext_csd[162] = 0x01
• ext_csd[167] = 0x1F
gyo Co
• ext_csd[177] = 0x00
• ext_csd[179] = 0x48
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 20
CONFIDENTIAL C
How to Program Single Image by Programmer
Use
z.c al
The example of ALL-300G programmer
tws enti
• Start program,
om
ng@ nfid
Check
gyo Co
1
2
din Tek
3
4 ang edia
5
M
6
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved. 21
Use
z.c al
tws enti
om
ng@ nfid
gyo Co
din Tek
MediaTek Proprietary and Confidential
© 2021 MediaTek Inc. All rights reserved. The term “MediaTek” refers to MediaTek Inc. and/or its affiliates.
ang edia
This document has been prepared solely for informational purposes. The content herein is made available to a restricted number of clients or partners, for internal
use, pursuant to a license agreement or any other applicable agreement and subject to this notice. THIS DOCUMENT AND ANY ORAL INFORMATION PROVIDED BY
MEDIATEK IN CONNECTION WITH THIS DOCUMENT (COLLECTIVELY THIS “DOCUMENT”), IF ANY, ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND,
WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. MEDIATEK DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS OR GUARANTEE REGARDING THE
M
USE OR THE RESULT OF THE USE OF THIS DOCUMENT IN TERMS OF CORRECTNESS, ACCURACY, TIMELINESS, RELIABILITY, OR OTHERWISE. MEDIATEK SPECIFICALLY
DISCLAIMS ALL WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTIES ARISING OUT OF
COURSE OF PERFORMANCE, COURSE OF DEALING OR USAGE OF TRADE. This Document must be held in strict confidence and may not be communicated,
reproduced, distributed or disclosed to any third party or to any other person, or being referred to publicly, in whole or in part at any time except with MediaTek’s
prior written consent, which MediaTek reserves the right to deny for any reason. You agree to indemnify MediaTek for any loss or damages suffered by MediaTek
for your unauthorized use or disclosure of this Document, in whole or in part. If you are not the intended recipient of this document, please delete and destroy all
copies immediately.
CONFIDENTIAL C
Use
z.c al
tws enti
om
ng@ nfid
gyo Co
din Tek
ang edia
M
MediaTek Proprietary and Confidential. © 2021 MediaTek Inc. All rights reserved.