2 # SPDX-License-Identifier: GPL-2.0-only
4 # Copyright © 2020 David Woodhouse <dwmw2@infradead.org>
6 # Generate as "scatter file" for use with the MediaTek SP Flash tool for
7 # writing images to MediaTek boards. This can be used to write images
8 # even on a bricked board which has no preloader installed, or broken
11 # NOTE: At the time of writing (2020-07-20), the Linux tool linked from
12 # the front page of https://spflashtool.com/ is out of date and does not
13 # support MT7623. The newer v5.1916 found on the download page at
14 # https://spflashtool.com/download/ has been tested on UniElec U7623 and
15 # Banana Pi R2 from Linux, and does work.
20 PROJECT
=${3%-scatter.txt}
24 # OpenWrt eMMC scatter file for ${DEVICENAME}
25 # For use with SP Flash Tool: https://spflashtool.com/download/
27 # Unzip the file system file ${PROJECT}-${IMAGE}.gz before flashing.
28 # Connect the device's USB port, although it won't appear to the host yet.
29 # Load this scatter file into the SP Flash Tool, select 'Format All + Download'
30 # After pressing the 'Download' button, power on the board.
31 # The /dev/ttyACM0 device should appear on USB and the tool should find it.
33 - general: MTK_PLATFORM_CFG
35 - config_version: V1.1.2
42 - partition_index: SYS0
43 partition_name: PRELOADER
44 file_name: ${PROJECT}-preloader.bin
47 linear_start_addr: 0x0
48 physical_start_addr: 0x0
49 partition_size: 0x40000
51 storage: HW_STORAGE_EMMC
54 operation_type: BOOTLOADERS
58 - partition_index: SYS1
59 partition_name: OPENWRT
60 file_name: ${PROJECT}-${IMAGE}
63 linear_start_addr: 0x00000
64 physical_start_addr: 0x00000
65 partition_size: 0x4000000
67 storage: HW_STORAGE_EMMC
70 operation_type: UPDATE