Commit 02f55036e50146488ab256d4496409d9b693bdcf
1 parent
f2ebacd723
Exists in
smarc-8mq-q10.0.0_2.6.0
Fix the path errors and add trusty support
Showing 9 changed files with 64 additions and 66 deletions Inline Diff
- imx8m/smarc_mx8mq/BoardConfig.mk
- imx8m/smarc_mx8mq/UbootKernelBoardConfig.mk
- imx8m/smarc_mx8mq/smarc_mx8mq.mk
- imx8m/smarc_mx8mq/uuu/uuu-android-smarc-mx8mq-emmc.lst
- imx8m/smarc_mx8mq/uuu/uuu-android-smarc-mx8mq-sd.lst
- imx8m/smarc_mx8mq/uuu/uuu_android_smarc_flash.bat
- imx8m/smarc_mx8mq/uuu/uuu_android_smarc_flash.sh
- scripts/sh/smarc-mkemmc.sh
- scripts/sh/smarc-mksdcard.sh
imx8m/smarc_mx8mq/BoardConfig.mk
1 | # | 1 | # |
2 | # SoC-specific compile-time definitions. | 2 | # SoC-specific compile-time definitions. |
3 | # | 3 | # |
4 | 4 | ||
5 | BOARD_SOC_TYPE := IMX8MQ | 5 | BOARD_SOC_TYPE := IMX8MQ |
6 | BOARD_TYPE := SMARC-IMX8MQ | 6 | BOARD_TYPE := SMARC-IMX8MQ |
7 | BOARD_HAVE_VPU := true | 7 | BOARD_HAVE_VPU := true |
8 | BOARD_VPU_TYPE := hantro | 8 | BOARD_VPU_TYPE := hantro |
9 | HAVE_FSL_IMX_GPU2D := false | 9 | HAVE_FSL_IMX_GPU2D := false |
10 | HAVE_FSL_IMX_GPU3D := true | 10 | HAVE_FSL_IMX_GPU3D := true |
11 | HAVE_FSL_IMX_IPU := false | 11 | HAVE_FSL_IMX_IPU := false |
12 | HAVE_FSL_IMX_PXP := false | 12 | HAVE_FSL_IMX_PXP := false |
13 | BOARD_KERNEL_BASE := 0x40400000 | 13 | BOARD_KERNEL_BASE := 0x40400000 |
14 | TARGET_GRALLOC_VERSION := v3 | 14 | TARGET_GRALLOC_VERSION := v3 |
15 | TARGET_HIGH_PERFORMANCE := true | 15 | TARGET_HIGH_PERFORMANCE := true |
16 | TARGET_USES_HWC2 := true | 16 | TARGET_USES_HWC2 := true |
17 | TARGET_HWCOMPOSER_VERSION := v2.0 | 17 | TARGET_HWCOMPOSER_VERSION := v2.0 |
18 | USE_OPENGL_RENDERER := true | 18 | USE_OPENGL_RENDERER := true |
19 | TARGET_HAVE_VULKAN := true | 19 | TARGET_HAVE_VULKAN := true |
20 | ENABLE_CFI=false | 20 | ENABLE_CFI=false |
21 | 21 | ||
22 | SOONG_CONFIG_IMXPLUGIN += \ | 22 | SOONG_CONFIG_IMXPLUGIN += \ |
23 | BOARD_HAVE_VPU \ | 23 | BOARD_HAVE_VPU \ |
24 | BOARD_VPU_TYPE | 24 | BOARD_VPU_TYPE |
25 | 25 | ||
26 | SOONG_CONFIG_IMXPLUGIN_BOARD_SOC_TYPE = IMX8MQ | 26 | SOONG_CONFIG_IMXPLUGIN_BOARD_SOC_TYPE = IMX8MQ |
27 | SOONG_CONFIG_IMXPLUGIN_BOARD_HAVE_VPU = true | 27 | SOONG_CONFIG_IMXPLUGIN_BOARD_HAVE_VPU = true |
28 | SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_TYPE = hantro | 28 | SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_TYPE = hantro |
29 | SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_ONLY = false | 29 | SOONG_CONFIG_IMXPLUGIN_BOARD_VPU_ONLY = false |
30 | 30 | ||
31 | # | 31 | # |
32 | # Product-specific compile-time definitions. | 32 | # Product-specific compile-time definitions. |
33 | # | 33 | # |
34 | 34 | ||
35 | IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq | 35 | IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq |
36 | 36 | ||
37 | include device/fsl/imx8m/BoardConfigCommon.mk | 37 | include device/fsl/imx8m/BoardConfigCommon.mk |
38 | 38 | ||
39 | BUILD_TARGET_FS ?= ext4 | 39 | BUILD_TARGET_FS ?= ext4 |
40 | TARGET_USERIMAGES_USE_EXT4 := true | 40 | TARGET_USERIMAGES_USE_EXT4 := true |
41 | 41 | ||
42 | TARGET_RECOVERY_FSTAB = $(IMX_DEVICE_PATH)/fstab.freescale | 42 | TARGET_RECOVERY_FSTAB = $(IMX_DEVICE_PATH)/fstab.freescale |
43 | 43 | ||
44 | # Support gpt | 44 | # Support gpt |
45 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) | 45 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) |
46 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab_super.bpt | 46 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab_super.bpt |
47 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab_super.bpt \ | 47 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab_super.bpt \ |
48 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader_super.bpt \ | 48 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader_super.bpt \ |
49 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader_super.bpt | 49 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader_super.bpt |
50 | else | 50 | else |
51 | ifeq ($(IMX_NO_PRODUCT_PARTITION),true) | 51 | ifeq ($(IMX_NO_PRODUCT_PARTITION),true) |
52 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab-no-product.bpt | 52 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab-no-product.bpt |
53 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab-no-product.bpt \ | 53 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab-no-product.bpt \ |
54 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader-no-product.bpt \ | 54 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader-no-product.bpt \ |
55 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader-no-product.bpt | 55 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader-no-product.bpt |
56 | else | 56 | else |
57 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab.bpt | 57 | BOARD_BPT_INPUT_FILES += device/fsl/common/partition/device-partitions-13GB-ab.bpt |
58 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab.bpt \ | 58 | ADDITION_BPT_PARTITION = partition-table-28GB:device/fsl/common/partition/device-partitions-28GB-ab.bpt \ |
59 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader.bpt \ | 59 | partition-table-dual:device/fsl/common/partition/device-partitions-13GB-ab-dual-bootloader.bpt \ |
60 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader.bpt | 60 | partition-table-28GB-dual:device/fsl/common/partition/device-partitions-28GB-ab-dual-bootloader.bpt |
61 | endif | 61 | endif |
62 | endif | 62 | endif |
63 | 63 | ||
64 | # Vendor Interface manifest and compatibility | 64 | # Vendor Interface manifest and compatibility |
65 | DEVICE_MANIFEST_FILE := $(IMX_DEVICE_PATH)/manifest.xml | 65 | DEVICE_MANIFEST_FILE := $(IMX_DEVICE_PATH)/manifest.xml |
66 | DEVICE_MATRIX_FILE := $(IMX_DEVICE_PATH)/compatibility_matrix.xml | 66 | DEVICE_MATRIX_FILE := $(IMX_DEVICE_PATH)/compatibility_matrix.xml |
67 | 67 | ||
68 | TARGET_BOOTLOADER_BOARD_NAME := SMARC | 68 | TARGET_BOOTLOADER_BOARD_NAME := SMARC |
69 | 69 | ||
70 | USE_OPENGL_RENDERER := true | 70 | USE_OPENGL_RENDERER := true |
71 | 71 | ||
72 | BOARD_WLAN_DEVICE := nxp | 72 | BOARD_WLAN_DEVICE := nxp |
73 | WPA_SUPPLICANT_VERSION := VER_0_8_X | 73 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
74 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 | 74 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
75 | BOARD_HOSTAPD_DRIVER := NL80211 | 75 | BOARD_HOSTAPD_DRIVER := NL80211 |
76 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) | 76 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
77 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) | 77 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) |
78 | 78 | ||
79 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true | 79 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true |
80 | 80 | ||
81 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth | 81 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth |
82 | 82 | ||
83 | # NXP 8997 BT | 83 | # NXP 8997 BT |
84 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth | 84 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(IMX_DEVICE_PATH)/bluetooth |
85 | BOARD_CUSTOM_BT_CONFIG := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)/vnd_config.txt | 85 | BOARD_CUSTOM_BT_CONFIG := $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR)/vnd_config.txt |
86 | BOARD_HAVE_BLUETOOTH_NXP := true | 86 | BOARD_HAVE_BLUETOOTH_NXP := true |
87 | 87 | ||
88 | BOARD_USE_SENSOR_FUSION := true | 88 | BOARD_USE_SENSOR_FUSION := true |
89 | 89 | ||
90 | # we don't support sparse image. | 90 | # we don't support sparse image. |
91 | TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false | 91 | TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false |
92 | 92 | ||
93 | BOARD_HAVE_USB_CAMERA := true | 93 | BOARD_HAVE_USB_CAMERA := true |
94 | BOARD_HAVE_USB_MJPEG_CAMERA := false | 94 | BOARD_HAVE_USB_MJPEG_CAMERA := false |
95 | 95 | ||
96 | USE_ION_ALLOCATOR := true | 96 | USE_ION_ALLOCATOR := true |
97 | USE_GPU_ALLOCATOR := false | 97 | USE_GPU_ALLOCATOR := false |
98 | 98 | ||
99 | BOARD_AVB_ENABLE := true | 99 | BOARD_AVB_ENABLE := true |
100 | TARGET_USES_MKE2FS := true | 100 | TARGET_USES_MKE2FS := true |
101 | BOARD_AVB_ALGORITHM := SHA256_RSA4096 | 101 | BOARD_AVB_ALGORITHM := SHA256_RSA4096 |
102 | # The testkey_rsa4096.pem is copied from external/avb/test/data/testkey_rsa4096.pem | 102 | # The testkey_rsa4096.pem is copied from external/avb/test/data/testkey_rsa4096.pem |
103 | BOARD_AVB_KEY_PATH := device/fsl/common/security/testkey_rsa4096.pem | 103 | BOARD_AVB_KEY_PATH := device/fsl/common/security/testkey_rsa4096.pem |
104 | 104 | ||
105 | # define frame buffer count | 105 | # define frame buffer count |
106 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 | 106 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 |
107 | 107 | ||
108 | ifeq ($(PRODUCT_IMX_DRM),true) | 108 | ifeq ($(PRODUCT_IMX_DRM),true) |
109 | CMASIZE=736M | 109 | CMASIZE=736M |
110 | else | 110 | else |
111 | CMASIZE=1280M | 111 | CMASIZE=1280M |
112 | endif | 112 | endif |
113 | 113 | ||
114 | # NXP default config | 114 | # NXP default config |
115 | BOARD_KERNEL_CMDLINE := console=ttymxc0,115200 earlycon=imxuart,0x30880000,115200 init=/init androidboot.console=ttymxc0 androidboot.hardware=freescale firmware_class.path=/vendor/firmware loop.max_part=7 | 115 | BOARD_KERNEL_CMDLINE := console=ttymxc0,115200 earlycon=imxuart,0x30880000,115200 init=/init androidboot.console=ttymxc0 androidboot.hardware=freescale firmware_class.path=/vendor/firmware loop.max_part=7 |
116 | 116 | ||
117 | # framebuffer config | 117 | # framebuffer config |
118 | BOARD_KERNEL_CMDLINE += androidboot.fbTileSupport=enable | 118 | BOARD_KERNEL_CMDLINE += androidboot.fbTileSupport=enable |
119 | 119 | ||
120 | # memory config | 120 | # memory config |
121 | BOARD_KERNEL_CMDLINE += transparent_hugepage=never cma=$(CMASIZE) | 121 | BOARD_KERNEL_CMDLINE += transparent_hugepage=never cma=$(CMASIZE) |
122 | 122 | ||
123 | # display config | 123 | # display config |
124 | BOARD_KERNEL_CMDLINE += androidboot.lcd_density=240 androidboot.primary_display=imx-dcss androidboot.gui_resolution=1080p | 124 | BOARD_KERNEL_CMDLINE += androidboot.lcd_density=240 androidboot.primary_display=imx-dcss androidboot.gui_resolution=1080p |
125 | 125 | ||
126 | # wifi config | 126 | # wifi config |
127 | BOARD_KERNEL_CMDLINE += androidboot.wificountrycode=CN | 127 | BOARD_KERNEL_CMDLINE += androidboot.wificountrycode=CN |
128 | 128 | ||
129 | ifeq ($(TARGET_USERIMAGES_USE_UBIFS),true) | 129 | ifeq ($(TARGET_USERIMAGES_USE_UBIFS),true) |
130 | ifeq ($(TARGET_USERIMAGES_USE_EXT4),true) | 130 | ifeq ($(TARGET_USERIMAGES_USE_EXT4),true) |
131 | $(error "TARGET_USERIMAGES_USE_UBIFS and TARGET_USERIMAGES_USE_EXT4 config open in same time, please only choose one target file system image") | 131 | $(error "TARGET_USERIMAGES_USE_UBIFS and TARGET_USERIMAGES_USE_EXT4 config open in same time, please only choose one target file system image") |
132 | endif | 132 | endif |
133 | endif | 133 | endif |
134 | 134 | ||
135 | BOARD_PREBUILT_DTBOIMAGE := out/target/product/smarc_mx8mq/dtbo-smarcimx8mq-hdmi.img | 135 | BOARD_PREBUILT_DTBOIMAGE := out/target/product/smarc_mx8mq/dtbo-smarcimx8mq-hdmi.img |
136 | 136 | ||
137 | TARGET_BOARD_DTS_CONFIG := \ | 137 | TARGET_BOARD_DTS_CONFIG := \ |
138 | smarcimx8mq-dcss-lvds:imx8mq-smarc-dcss-lvds.dtb \ | 138 | imx8mq-smarc-dcss-lvds:imx8mq-smarc-dcss-lvds.dtb \ |
139 | smarcimx8mq-dp:imx8mq-smarc-dp.dtb \ | 139 | imx8mq-smarc-dp:imx8mq-smarc-dp.dtb \ |
140 | smarcimx8mq:imx8mq-smarc.dtb \ | 140 | imx8mq-smarc:imx8mq-smarc.dtb \ |
141 | smarcimx8mq-dual-display:imx8mq-smarc-dual-display.dtb \ | 141 | imx8mq-smarc-dual-display:imx8mq-smarc-dual-display.dtb \ |
142 | smarcimx8mq-hdmi:imx8mq-smarc-hdmi.dtb \ | 142 | imx8mq-smarc-hdmi:imx8mq-smarc-hdmi.dtb \ |
143 | smarcimx8mq-lcdif-lvds:imx8mq-smarc-lcdif-lvds.dtb | 143 | imx8mq-smarc-lcdif-lvds:imx8mq-smarc-lcdif-lvds.dtb |
144 | 144 | ||
145 | BOARD_SEPOLICY_DIRS := \ | 145 | BOARD_SEPOLICY_DIRS := \ |
146 | device/fsl/imx8m/sepolicy \ | 146 | device/fsl/imx8m/sepolicy \ |
147 | $(IMX_DEVICE_PATH)/sepolicy | 147 | $(IMX_DEVICE_PATH)/sepolicy |
148 | 148 | ||
149 | ifeq ($(PRODUCT_IMX_DRM),true) | 149 | ifeq ($(PRODUCT_IMX_DRM),true) |
150 | BOARD_SEPOLICY_DIRS += \ | 150 | BOARD_SEPOLICY_DIRS += \ |
151 | $(IMX_DEVICE_PATH)/sepolicy_drm | 151 | $(IMX_DEVICE_PATH)/sepolicy_drm |
152 | endif | 152 | endif |
153 | 153 | ||
154 | TARGET_BOARD_KERNEL_HEADERS := device/fsl/common/kernel-headers | 154 | TARGET_BOARD_KERNEL_HEADERS := device/fsl/common/kernel-headers |
155 | 155 | ||
156 | ALL_DEFAULT_INSTALLED_MODULES += $(BOARD_VENDOR_KERNEL_MODULES) | 156 | ALL_DEFAULT_INSTALLED_MODULES += $(BOARD_VENDOR_KERNEL_MODULES) |
157 | 157 | ||
158 | BOARD_USES_METADATA_PARTITION := true | 158 | BOARD_USES_METADATA_PARTITION := true |
159 | BOARD_ROOT_EXTRA_FOLDERS += metadata | 159 | BOARD_ROOT_EXTRA_FOLDERS += metadata |
160 | 160 | ||
161 | PRODUCT_COPY_FILES += \ | 161 | PRODUCT_COPY_FILES += \ |
162 | $(IMX_DEVICE_PATH)/init.recovery.freescale.rc:root/init.recovery.freescale.rc | 162 | $(IMX_DEVICE_PATH)/init.recovery.freescale.rc:root/init.recovery.freescale.rc |
163 | 163 |
imx8m/smarc_mx8mq/UbootKernelBoardConfig.mk
1 | TARGET_BOOTLOADER_POSTFIX := bin | 1 | TARGET_BOOTLOADER_POSTFIX := bin |
2 | UBOOT_POST_PROCESS := true | 2 | UBOOT_POST_PROCESS := true |
3 | 3 | ||
4 | # u-boot target for smarc-imx8mq | 4 | # u-boot target for smarc-imx8mq |
5 | TARGET_BOOTLOADER_CONFIG := \ | 5 | TARGET_BOOTLOADER_CONFIG := \ |
6 | imx8mq-smarc_2g:smarcimx8mq_2g_ser3_android_defconfig \ | 6 | imx8mq-smarc_2g:smarcimx8mq_2g_ser3_android_defconfig \ |
7 | imx8mq-smarc_4g:smarcimx8mq_4g_ser3_android_defconfig \ | 7 | imx8mq-smarc_4g:smarcimx8mq_4g_ser3_android_defconfig \ |
8 | imx8mq-dual-smarc_2g:smarcimx8mq_2g_ser3_android_dual_defconfig \ | ||
9 | imx8mq-dual-smarc_4g:smarcimx8mq_4g_ser3_android_dual_defconfig \ | ||
8 | imx8mq-smarc_2g-uuu:smarcimx8mq_2g_ser3_android_uuu_defconfig \ | 10 | imx8mq-smarc_2g-uuu:smarcimx8mq_2g_ser3_android_uuu_defconfig \ |
9 | imx8mq-smarc_4g-uuu:smarcimx8mq_4g_ser3_android_uuu_defconfig | 11 | imx8mq-smarc_4g-uuu:smarcimx8mq_4g_ser3_android_uuu_defconfig |
10 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 12 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
11 | TARGET_BOOTLOADER_CONFIG += \ | 13 | TARGET_BOOTLOADER_CONFIG += \ |
12 | imx8mq-smarc_2g-trusty:smarcimx8mq_2g_ser3_android_trusty_defconfig \ | 14 | imx8mq-trusty-smarc_2g:smarcimx8mq_2g_ser3_android_trusty_defconfig \ |
13 | imx8mq-smarc_4g-trusty:smarcimx8mq_4g_ser3_android_trusty_defconfig | 15 | imx8mq-trusty-smarc_4g:smarcimx8mq_4g_ser3_android_trusty_defconfig |
14 | TARGET_BOOTLOADER_CONFIG += \ | 16 | TARGET_BOOTLOADER_CONFIG += \ |
15 | imx8mq-smarc_2g-trusty-secure-unlock:smarcimx8mq_2g_ser3_android_trusty_secure_unlock_defconfig \ | 17 | imx8mq-trusty-secure-unlock-smarc_2g:smarcimx8mq_2g_ser3_android_trusty_secure_unlock_defconfig \ |
16 | imx8mq-smarc_4g-trusty-secure-unlock:smarcimx8mq_4g_ser3_android_trusty_secure_unlock_defconfig | 18 | imx8mq-trusty-secure-unlock-smarc_4g:smarcimx8mq_4g_ser3_android_trusty_secure_unlock_defconfig |
19 | TARGET_BOOTLOADER_CONFIG += \ | ||
20 | imx8mq-trusty-dual-smarc_2g:smarcimx8mq_2g_ser3_android_trusty_dual_defconfig \ | ||
21 | imx8mq-trusty-dual-smarc_4g:smarcimx8mq_4g_ser3_android_trusty_dual_defconfig | ||
17 | endif | 22 | endif |
18 | 23 | ||
19 | TARGET_KERNEL_DEFCONFIG := imx_v8_android_defconfig | 24 | TARGET_KERNEL_DEFCONFIG := imx_v8_android_defconfig |
20 | TARGET_KERNEL_ADDITION_DEFCONF := android_addition_defconfig | 25 | TARGET_KERNEL_ADDITION_DEFCONF := android_addition_defconfig |
21 | 26 | ||
22 | # absolute path is used, not the same as relative path used in AOSP make | 27 | # absolute path is used, not the same as relative path used in AOSP make |
23 | TARGET_DEVICE_DIR := $(patsubst %/, %, $(dir $(realpath $(lastword $(MAKEFILE_LIST))))) | 28 | TARGET_DEVICE_DIR := $(patsubst %/, %, $(dir $(realpath $(lastword $(MAKEFILE_LIST))))) |
24 | 29 | ||
25 | # define bootloader rollback index | 30 | # define bootloader rollback index |
26 | BOOTLOADER_RBINDEX ?= 0 | 31 | BOOTLOADER_RBINDEX ?= 0 |
27 | 32 | ||
28 | 33 |
imx8m/smarc_mx8mq/smarc_mx8mq.mk
1 | # This is a Embedian Android Reference Design platform based on i.MX8QP ARD board | 1 | # This is a Embedian Android Reference Design platform based on i.MX8QP ARD board |
2 | # It will inherit from FSL core product which in turn inherit from Google generic | 2 | # It will inherit from FSL core product which in turn inherit from Google generic |
3 | 3 | ||
4 | IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq | 4 | IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq |
5 | LINUX_FIRMWARE_IMX_PATH := vendor/nxp | ||
6 | FSL_PROPRIETARY_PATH := vendor/nxp | ||
7 | IMX_SECURITY_PATH := vendor/nxp-private/security | ||
8 | IMX_PATH := vendor/nxp-opensource | ||
9 | FSL_CODEC_PATH := vendor/nxp | ||
5 | 10 | ||
6 | # configs shared between uboot, kernel and Android rootfs | 11 | # configs shared between uboot, kernel and Android rootfs |
7 | include $(IMX_DEVICE_PATH)/SharedBoardConfig.mk | 12 | include $(IMX_DEVICE_PATH)/SharedBoardConfig.mk |
8 | 13 | ||
9 | -include device/fsl/common/imx_path/ImxPathConfig.mk | 14 | -include device/fsl/common/imx_path/ImxPathConfig.mk |
10 | include device/fsl/imx8m/ProductConfigCommon.mk | 15 | include device/fsl/imx8m/ProductConfigCommon.mk |
11 | 16 | ||
12 | ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab_nand.freescale),) | 17 | ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab_nand.freescale),) |
13 | $(shell touch $(IMX_DEVICE_PATH)/fstab_nand.freescale) | 18 | $(shell touch $(IMX_DEVICE_PATH)/fstab_nand.freescale) |
14 | endif | 19 | endif |
15 | 20 | ||
16 | ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab.freescale),) | 21 | ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab.freescale),) |
17 | $(shell touch $(IMX_DEVICE_PATH)/fstab.freescale) | 22 | $(shell touch $(IMX_DEVICE_PATH)/fstab.freescale) |
18 | endif | 23 | endif |
19 | 24 | ||
20 | # Overrides | 25 | # Overrides |
21 | PRODUCT_NAME := smarc_mx8mq | 26 | PRODUCT_NAME := smarc_mx8mq |
22 | PRODUCT_DEVICE := smarc_mx8mq | 27 | PRODUCT_DEVICE := smarc_mx8mq |
23 | PRODUCT_MODEL := smarc_mx8mq | 28 | PRODUCT_MODEL := smarc_mx8mq |
24 | 29 | ||
25 | PRODUCT_FULL_TREBLE_OVERRIDE := true | 30 | PRODUCT_FULL_TREBLE_OVERRIDE := true |
26 | 31 | ||
27 | #Enable this to choose 32 bit user space build | 32 | #Enable this to choose 32 bit user space build |
28 | #IMX8_BUILD_32BIT_ROOTFS := true | 33 | #IMX8_BUILD_32BIT_ROOTFS := true |
29 | 34 | ||
30 | #Enable this to use dynamic partitions for the readonly partitions not touched by bootloader | 35 | #Enable this to use dynamic partitions for the readonly partitions not touched by bootloader |
31 | TARGET_USE_DYNAMIC_PARTITIONS ?= true | 36 | TARGET_USE_DYNAMIC_PARTITIONS ?= true |
32 | #If the device is retrofit to have dynamic partition feature, set this variable to true to build | 37 | #If the device is retrofit to have dynamic partition feature, set this variable to true to build |
33 | #the images and OTA package. Here is a demo to update 10.0.0_1.0.0 to 10.0.0_2.0.0 or higher | 38 | #the images and OTA package. Here is a demo to update 10.0.0_1.0.0 to 10.0.0_2.0.0 or higher |
34 | TARGET_USE_RETROFIT_DYNAMIC_PARTITION ?= false | 39 | TARGET_USE_RETROFIT_DYNAMIC_PARTITION ?= false |
35 | 40 | ||
36 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) | 41 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) |
37 | PRODUCT_USE_DYNAMIC_PARTITIONS := true | 42 | PRODUCT_USE_DYNAMIC_PARTITIONS := true |
38 | BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true | 43 | BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true |
39 | BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true | 44 | BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true |
40 | ifeq ($(TARGET_USE_RETROFIT_DYNAMIC_PARTITION),true) | 45 | ifeq ($(TARGET_USE_RETROFIT_DYNAMIC_PARTITION),true) |
41 | PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := true | 46 | PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := true |
42 | BOARD_SUPER_PARTITION_METADATA_DEVICE := system | 47 | BOARD_SUPER_PARTITION_METADATA_DEVICE := system |
43 | ifeq ($(IMX_NO_PRODUCT_PARTITION),true) | 48 | ifeq ($(IMX_NO_PRODUCT_PARTITION),true) |
44 | BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor | 49 | BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor |
45 | BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 2952790016 | 50 | BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 2952790016 |
46 | BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 536870912 | 51 | BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 536870912 |
47 | else | 52 | else |
48 | BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor product | 53 | BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor product |
49 | BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 1610612736 | 54 | BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 1610612736 |
50 | BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 536870912 | 55 | BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 536870912 |
51 | BOARD_SUPER_PARTITION_PRODUCT_DEVICE_SIZE := 1879048192 | 56 | BOARD_SUPER_PARTITION_PRODUCT_DEVICE_SIZE := 1879048192 |
52 | endif | 57 | endif |
53 | endif | 58 | endif |
54 | endif | 59 | endif |
55 | 60 | ||
56 | # Include keystore attestation keys and certificates. | 61 | # Include keystore attestation keys and certificates. |
57 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 62 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
58 | -include $(IMX_SECURITY_PATH)/attestation/imx_attestation.mk | 63 | -include $(IMX_SECURITY_PATH)/attestation/imx_attestation.mk |
59 | endif | 64 | endif |
60 | 65 | ||
61 | # Copy device related config and binary to board | 66 | # Copy device related config and binary to board |
62 | PRODUCT_COPY_FILES += \ | 67 | PRODUCT_COPY_FILES += \ |
63 | $(IMX_DEVICE_PATH)/app_whitelist.xml:system/etc/sysconfig/app_whitelist.xml \ | 68 | $(IMX_DEVICE_PATH)/app_whitelist.xml:system/etc/sysconfig/app_whitelist.xml \ |
64 | $(IMX_DEVICE_PATH)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ | 69 | $(IMX_DEVICE_PATH)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ |
65 | $(IMX_DEVICE_PATH)/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ | 70 | $(IMX_DEVICE_PATH)/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ |
66 | $(IMX_DEVICE_PATH)/input-port-associations.xml:$(TARGET_COPY_OUT_VENDOR)/etc/input-port-associations.xml \ | 71 | $(IMX_DEVICE_PATH)/input-port-associations.xml:$(TARGET_COPY_OUT_VENDOR)/etc/input-port-associations.xml \ |
67 | $(IMX_DEVICE_PATH)/fstab.freescale:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.freescale \ | 72 | $(IMX_DEVICE_PATH)/fstab.freescale:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.freescale \ |
68 | $(IMX_DEVICE_PATH)/init.imx8mq.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.imx8mq.rc \ | 73 | $(IMX_DEVICE_PATH)/init.imx8mq.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.imx8mq.rc \ |
69 | $(IMX_DEVICE_PATH)/init.recovery.freescale.rc:root/init.recovery.freescale.rc \ | 74 | $(IMX_DEVICE_PATH)/init.recovery.freescale.rc:root/init.recovery.freescale.rc \ |
70 | $(IMX_DEVICE_PATH)/early.init.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/early.init.cfg \ | 75 | $(IMX_DEVICE_PATH)/early.init.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/early.init.cfg \ |
71 | $(IMX_DEVICE_PATH)/init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.rc \ | 76 | $(IMX_DEVICE_PATH)/init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.rc \ |
72 | $(IMX_DEVICE_PATH)/init.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.usb.rc \ | 77 | $(IMX_DEVICE_PATH)/init.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.usb.rc \ |
73 | $(IMX_DEVICE_PATH)/required_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/required_hardware.xml \ | 78 | $(IMX_DEVICE_PATH)/required_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/required_hardware.xml \ |
74 | $(IMX_DEVICE_PATH)/ueventd.freescale.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ | 79 | $(IMX_DEVICE_PATH)/ueventd.freescale.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ |
75 | $(LINUX_FIRMWARE_IMX_PATH)/linux-firmware-imx/firmware/sdma/sdma-imx7d.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/imx/sdma/sdma-imx7d.bin \ | 80 | $(LINUX_FIRMWARE_IMX_PATH)/linux-firmware-imx/firmware/sdma/sdma-imx7d.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/imx/sdma/sdma-imx7d.bin \ |
76 | device/fsl/common/init/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \ | 81 | device/fsl/common/init/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \ |
77 | device/fsl/common/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \ | 82 | device/fsl/common/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \ |
78 | device/fsl/common/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf | 83 | device/fsl/common/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf |
79 | 84 | ||
80 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) | 85 | ifeq ($(TARGET_USE_DYNAMIC_PARTITIONS),true) |
81 | PRODUCT_COPY_FILES += \ | 86 | PRODUCT_COPY_FILES += \ |
82 | $(FSL_PROPRIETARY_PATH)/fsl-proprietary/dynamic_partiton_tools/lpmake:lpmake \ | 87 | $(FSL_PROPRIETARY_PATH)/fsl-proprietary/dynamic_partiton_tools/lpmake:lpmake \ |
83 | $(FSL_PROPRIETARY_PATH)/fsl-proprietary/dynamic_partiton_tools/lpmake.exe:lpmake.exe | 88 | $(FSL_PROPRIETARY_PATH)/fsl-proprietary/dynamic_partiton_tools/lpmake.exe:lpmake.exe |
84 | endif | 89 | endif |
85 | 90 | ||
86 | # Audio card json | 91 | # Audio card json |
87 | PRODUCT_COPY_FILES += \ | 92 | PRODUCT_COPY_FILES += \ |
88 | $(IMX_DEVICE_PATH)/sgtl5000_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/sgtl5000_config.json \ | 93 | $(IMX_DEVICE_PATH)/sgtl5000_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/sgtl5000_config.json \ |
89 | device/fsl/common/audio-json/cdnhdmi_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/audio/cdnhdmi_config.json \ | 94 | device/fsl/common/audio-json/cdnhdmi_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/audio/cdnhdmi_config.json \ |
90 | device/fsl/common/audio-json/readme.txt:$(TARGET_COPY_OUT_VENDOR)/etc/configs/audio/readme.txt | 95 | device/fsl/common/audio-json/readme.txt:$(TARGET_COPY_OUT_VENDOR)/etc/configs/audio/readme.txt |
91 | 96 | ||
92 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 97 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
93 | PRODUCT_COPY_FILES += \ | 98 | PRODUCT_COPY_FILES += \ |
94 | device/fsl/common/security/rpmb_key_test.bin:rpmb_key_test.bin \ | 99 | device/fsl/common/security/rpmb_key_test.bin:rpmb_key_test.bin \ |
95 | device/fsl/common/security/testkey_public_rsa4096.bin:testkey_public_rsa4096.bin | 100 | device/fsl/common/security/testkey_public_rsa4096.bin:testkey_public_rsa4096.bin |
96 | endif | 101 | endif |
97 | 102 | ||
98 | # ONLY devices that meet the CDD's requirements may declare these features | 103 | # ONLY devices that meet the CDD's requirements may declare these features |
99 | PRODUCT_COPY_FILES += \ | 104 | PRODUCT_COPY_FILES += \ |
100 | frameworks/native/data/etc/android.hardware.audio.output.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.output.xml \ | 105 | frameworks/native/data/etc/android.hardware.audio.output.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.output.xml \ |
101 | frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ | 106 | frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ |
102 | frameworks/native/data/etc/android.hardware.camera.external.xml:vendor/etc/permissions/android.hardware.camera.external.xml \ | 107 | frameworks/native/data/etc/android.hardware.camera.external.xml:vendor/etc/permissions/android.hardware.camera.external.xml \ |
103 | frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ | 108 | frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ |
104 | frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \ | 109 | frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \ |
105 | frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \ | 110 | frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \ |
106 | frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \ | 111 | frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \ |
107 | frameworks/native/data/etc/android.hardware.screen.portrait.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.portrait.xml \ | 112 | frameworks/native/data/etc/android.hardware.screen.portrait.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.portrait.xml \ |
108 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ | 113 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ |
109 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \ | 114 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \ |
110 | frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \ | 115 | frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \ |
111 | frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ | 116 | frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ |
112 | frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ | 117 | frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ |
113 | frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \ | 118 | frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \ |
114 | frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_1.xml \ | 119 | frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_1.xml \ |
115 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ | 120 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ |
116 | frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ | 121 | frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ |
117 | frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ | 122 | frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ |
118 | frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \ | 123 | frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \ |
119 | frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \ | 124 | frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \ |
120 | frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \ | 125 | frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \ |
121 | frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml \ | 126 | frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml \ |
122 | frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \ | 127 | frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \ |
123 | frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \ | 128 | frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \ |
124 | frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \ | 129 | frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \ |
125 | frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \ | 130 | frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \ |
126 | frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \ | 131 | frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \ |
127 | frameworks/native/data/etc/android.software.picture_in_picture.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.picture_in_picture.xml | 132 | frameworks/native/data/etc/android.software.picture_in_picture.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.picture_in_picture.xml |
128 | 133 | ||
129 | # Vendor seccomp policy files for media components: | 134 | # Vendor seccomp policy files for media components: |
130 | PRODUCT_COPY_FILES += \ | 135 | PRODUCT_COPY_FILES += \ |
131 | $(IMX_DEVICE_PATH)/seccomp/mediacodec-seccomp.policy:vendor/etc/seccomp_policy/mediacodec.policy \ | 136 | $(IMX_DEVICE_PATH)/seccomp/mediacodec-seccomp.policy:vendor/etc/seccomp_policy/mediacodec.policy \ |
132 | $(IMX_DEVICE_PATH)/seccomp/mediaextractor-seccomp.policy:vendor/etc/seccomp_policy/mediaextractor.policy | 137 | $(IMX_DEVICE_PATH)/seccomp/mediaextractor-seccomp.policy:vendor/etc/seccomp_policy/mediaextractor.policy |
133 | 138 | ||
134 | PRODUCT_COPY_FILES += \ | 139 | PRODUCT_COPY_FILES += \ |
135 | device/fsl/imx8m/evk_8mq/powerhint_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/powerhint_imx8mq.json | 140 | device/fsl/imx8m/evk_8mq/powerhint_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/powerhint_imx8mq.json |
136 | 141 | ||
137 | # fastboot_imx_flashall scripts, fsl-sdcard-partition script and uuu_imx_android_flash scripts | 142 | # fastboot_imx_flashall scripts, fsl-sdcard-partition script and uuu_imx_android_flash scripts |
138 | PRODUCT_COPY_FILES += \ | 143 | PRODUCT_COPY_FILES += \ |
139 | $(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-emmc.lst:uuu-android-smarc-mx8mq-emmc.lst \ | 144 | $(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-emmc.lst:uuu-android-smarc-mx8mq-emmc.lst \ |
140 | $(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-sd.lst:uuu-android-smarc-mx8mq-sd.lst \ | 145 | $(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-sd.lst:uuu-android-smarc-mx8mq-sd.lst \ |
141 | $(IMX_DEVICE_PATH)/uuu/uuu_android_smarc_flash.bat:uuu_android_smarc_flash.bat \ | 146 | $(IMX_DEVICE_PATH)/uuu/uuu_android_smarc_flash.bat:uuu_android_smarc_flash.bat \ |
142 | $(IMX_DEVICE_PATH)/uuu/uuu_android_smarc_flash.sh:uuu_android_smarc_flash.sh \ | 147 | $(IMX_DEVICE_PATH)/uuu/uuu_android_smarc_flash.sh:uuu_android_smarc_flash.sh \ |
143 | device/embedian/scripts/sh/smarc-mkemmc.sh:smarc-mkemmc.sh \ | 148 | device/embedian/scripts/sh/smarc-mkemmc.sh:smarc-mkemmc.sh \ |
144 | device/embedian/scripts/sh/smarc-mksdcard.sh:smarc-mksdcard.sh \ | 149 | device/embedian/scripts/sh/smarc-mksdcard.sh:smarc-mksdcard.sh \ |
145 | device/fsl/common/tools/fastboot_imx_flashall.sh:fastboot_imx_flashall.sh | 150 | device/fsl/common/tools/fastboot_imx_flashall.sh:fastboot_imx_flashall.sh |
146 | 151 | ||
147 | USE_XML_AUDIO_POLICY_CONF := 1 | 152 | USE_XML_AUDIO_POLICY_CONF := 1 |
148 | 153 | ||
149 | DEVICE_PACKAGE_OVERLAYS := $(IMX_DEVICE_PATH)/overlay | 154 | DEVICE_PACKAGE_OVERLAYS := $(IMX_DEVICE_PATH)/overlay |
150 | 155 | ||
151 | PRODUCT_CHARACTERISTICS := tablet | 156 | PRODUCT_CHARACTERISTICS := tablet |
152 | 157 | ||
153 | PRODUCT_AAPT_CONFIG += xlarge large tvdpi hdpi xhdpi xxhdpi | 158 | PRODUCT_AAPT_CONFIG += xlarge large tvdpi hdpi xhdpi xxhdpi |
154 | 159 | ||
155 | # GPU openCL g2d | 160 | # GPU openCL g2d |
156 | PRODUCT_COPY_FILES += \ | 161 | PRODUCT_COPY_FILES += \ |
157 | $(IMX_PATH)/imx/opencl-2d/cl_g2d.cl:$(TARGET_COPY_OUT_VENDOR)/etc/cl_g2d.cl | 162 | $(IMX_PATH)/imx/opencl-2d/cl_g2d.cl:$(TARGET_COPY_OUT_VENDOR)/etc/cl_g2d.cl |
158 | 163 | ||
159 | # GPU openCL SDK header file | 164 | # GPU openCL SDK header file |
160 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/CL/cl_sdk.mk | 165 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/CL/cl_sdk.mk |
161 | 166 | ||
162 | # GPU openVX SDK header file | 167 | # GPU openVX SDK header file |
163 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/nnxc_kernels/nnxc_kernels.mk | 168 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/nnxc_kernels/nnxc_kernels.mk |
164 | 169 | ||
165 | # GPU openCL icdloader config file | 170 | # GPU openCL icdloader config file |
166 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/gpu-viv/icdloader/icdloader.mk | 171 | -include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/gpu-viv/icdloader/icdloader.mk |
167 | 172 | ||
168 | # HWC2 HAL | 173 | # HWC2 HAL |
169 | PRODUCT_PACKAGES += \ | 174 | PRODUCT_PACKAGES += \ |
170 | android.hardware.graphics.composer@2.3-service | 175 | android.hardware.graphics.composer@2.3-service |
171 | 176 | ||
172 | # Gralloc HAL | 177 | # Gralloc HAL |
173 | PRODUCT_PACKAGES += \ | 178 | PRODUCT_PACKAGES += \ |
174 | android.hardware.graphics.mapper@2.0-impl-2.1 \ | 179 | android.hardware.graphics.mapper@2.0-impl-2.1 \ |
175 | android.hardware.graphics.allocator@2.0-impl \ | 180 | android.hardware.graphics.allocator@2.0-impl \ |
176 | android.hardware.graphics.allocator@2.0-service | 181 | android.hardware.graphics.allocator@2.0-service |
177 | 182 | ||
178 | # RenderScript HAL | 183 | # RenderScript HAL |
179 | PRODUCT_PACKAGES += \ | 184 | PRODUCT_PACKAGES += \ |
180 | android.hardware.renderscript@1.0-impl | 185 | android.hardware.renderscript@1.0-impl |
181 | 186 | ||
182 | PRODUCT_PACKAGES += \ | 187 | PRODUCT_PACKAGES += \ |
183 | libEGL_VIVANTE \ | 188 | libEGL_VIVANTE \ |
184 | libGLESv1_CM_VIVANTE \ | 189 | libGLESv1_CM_VIVANTE \ |
185 | libGLESv2_VIVANTE \ | 190 | libGLESv2_VIVANTE \ |
186 | gralloc_viv.imx \ | 191 | gralloc_viv.imx \ |
187 | libGAL \ | 192 | libGAL \ |
188 | libGLSLC \ | 193 | libGLSLC \ |
189 | libVSC \ | 194 | libVSC \ |
190 | libgpuhelper \ | 195 | libgpuhelper \ |
191 | libSPIRV_viv \ | 196 | libSPIRV_viv \ |
192 | libvulkan_VIVANTE \ | 197 | libvulkan_VIVANTE \ |
193 | vulkan.imx \ | 198 | vulkan.imx \ |
194 | libCLC \ | 199 | libCLC \ |
195 | libLLVM_viv \ | 200 | libLLVM_viv \ |
196 | libOpenCL \ | 201 | libOpenCL \ |
197 | libg2d-opencl \ | 202 | libg2d-opencl \ |
198 | libg2d-viv \ | 203 | libg2d-viv \ |
199 | libOpenVX \ | 204 | libOpenVX \ |
200 | libOpenVXU \ | 205 | libOpenVXU \ |
201 | libNNVXCBinary-evis \ | 206 | libNNVXCBinary-evis \ |
202 | libNNVXCBinary-evis2 \ | 207 | libNNVXCBinary-evis2 \ |
203 | libNNVXCBinary-lite \ | 208 | libNNVXCBinary-lite \ |
204 | libOvx12VXCBinary-evis \ | 209 | libOvx12VXCBinary-evis \ |
205 | libOvx12VXCBinary-evis2 \ | 210 | libOvx12VXCBinary-evis2 \ |
206 | libOvx12VXCBinary-lite \ | 211 | libOvx12VXCBinary-lite \ |
207 | libNNGPUBinary-evis \ | 212 | libNNGPUBinary-evis \ |
208 | libNNGPUBinary-evis2 \ | 213 | libNNGPUBinary-evis2 \ |
209 | libNNGPUBinary-lite \ | 214 | libNNGPUBinary-lite \ |
210 | libNNGPUBinary-ulite \ | 215 | libNNGPUBinary-ulite \ |
211 | libNNArchPerf \ | 216 | libNNArchPerf \ |
212 | libarchmodelSw \ | 217 | libarchmodelSw \ |
213 | gatekeeper.imx | 218 | gatekeeper.imx |
214 | 219 | ||
215 | PRODUCT_PACKAGES += \ | 220 | PRODUCT_PACKAGES += \ |
216 | android.hardware.audio@5.0-impl:32 \ | 221 | android.hardware.audio@5.0-impl:32 \ |
217 | android.hardware.audio@2.0-service \ | 222 | android.hardware.audio@2.0-service \ |
218 | android.hardware.audio.effect@5.0-impl:32 \ | 223 | android.hardware.audio.effect@5.0-impl:32 \ |
219 | android.hardware.power@1.3-service.imx \ | 224 | android.hardware.power@1.3-service.imx \ |
220 | android.hardware.light@2.0-impl \ | 225 | android.hardware.light@2.0-impl \ |
221 | android.hardware.light@2.0-service \ | 226 | android.hardware.light@2.0-service \ |
222 | android.hardware.configstore@1.1-service \ | 227 | android.hardware.configstore@1.1-service \ |
223 | configstore@1.1.policy | 228 | configstore@1.1.policy |
224 | 229 | ||
225 | # Thermal HAL | 230 | # Thermal HAL |
226 | PRODUCT_PACKAGES += \ | 231 | PRODUCT_PACKAGES += \ |
227 | android.hardware.thermal@2.0-service.imx | 232 | android.hardware.thermal@2.0-service.imx |
228 | PRODUCT_COPY_FILES += \ | 233 | PRODUCT_COPY_FILES += \ |
229 | device/fsl/imx8m/evk_8mq/thermal_info_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/thermal_info_config_imx8mq.json | 234 | device/fsl/imx8m/evk_8mq/thermal_info_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/thermal_info_config_imx8mq.json |
230 | 235 | ||
231 | # Neural Network HAL and lib | 236 | # Neural Network HAL and lib |
232 | PRODUCT_PACKAGES += \ | 237 | PRODUCT_PACKAGES += \ |
233 | libovxlib \ | 238 | libovxlib \ |
234 | libnnrt \ | 239 | libnnrt \ |
235 | android.hardware.neuralnetworks@1.2-service-vsi-npu-server | 240 | android.hardware.neuralnetworks@1.2-service-vsi-npu-server |
236 | 241 | ||
237 | # Usb HAL | 242 | # Usb HAL |
238 | PRODUCT_PACKAGES += \ | 243 | PRODUCT_PACKAGES += \ |
239 | android.hardware.usb@1.1-service.imx | 244 | android.hardware.usb@1.1-service.imx |
240 | 245 | ||
241 | # Bluetooth HAL | 246 | # Bluetooth HAL |
242 | PRODUCT_PACKAGES += \ | 247 | PRODUCT_PACKAGES += \ |
243 | android.hardware.bluetooth@1.0-impl \ | 248 | android.hardware.bluetooth@1.0-impl \ |
244 | android.hardware.bluetooth@1.0-service | 249 | android.hardware.bluetooth@1.0-service |
245 | 250 | ||
246 | # WiFi HAL | 251 | # WiFi HAL |
247 | PRODUCT_PACKAGES += \ | 252 | PRODUCT_PACKAGES += \ |
248 | android.hardware.wifi@1.0-service \ | 253 | android.hardware.wifi@1.0-service \ |
249 | wifilogd \ | 254 | wifilogd \ |
250 | wificond | 255 | wificond |
251 | 256 | ||
252 | # NXP 8997 Bluetooth vendor config | 257 | # NXP 8997 Bluetooth vendor config |
253 | PRODUCT_PACKAGES += \ | 258 | PRODUCT_PACKAGES += \ |
254 | bt_vendor.conf | 259 | bt_vendor.conf |
255 | 260 | ||
256 | # NXP 8997 Wifi and Bluetooth Combo Firmware | 261 | # NXP 8997 Wifi and Bluetooth Combo Firmware |
257 | PRODUCT_COPY_FILES += \ | 262 | PRODUCT_COPY_FILES += \ |
258 | vendor/nxp/imx-firmware/nxp/FwImage_8997/pcieuart8997_combo_v4.bin:vendor/firmware/pcieuart8997_combo_v4.bin \ | 263 | vendor/nxp/imx-firmware/nxp/FwImage_8997/pcieuart8997_combo_v4.bin:vendor/firmware/pcieuart8997_combo_v4.bin \ |
259 | vendor/nxp/imx-firmware/nxp/android_wifi_mod_para.conf:vendor/firmware/wifi_mod_para.conf | 264 | vendor/nxp/imx-firmware/nxp/android_wifi_mod_para.conf:vendor/firmware/wifi_mod_para.conf |
260 | 265 | ||
261 | # Wifi regulatory | 266 | # Wifi regulatory |
262 | PRODUCT_COPY_FILES += \ | 267 | PRODUCT_COPY_FILES += \ |
263 | external/wireless-regdb/regulatory.db:vendor/firmware/regulatory.db \ | 268 | external/wireless-regdb/regulatory.db:vendor/firmware/regulatory.db \ |
264 | external/wireless-regdb/regulatory.db.p7s:vendor/firmware/regulatory.db.p7s | 269 | external/wireless-regdb/regulatory.db.p7s:vendor/firmware/regulatory.db.p7s |
265 | 270 | ||
266 | # hardware backed keymaster service | 271 | # hardware backed keymaster service |
267 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 272 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
268 | PRODUCT_PACKAGES += \ | 273 | PRODUCT_PACKAGES += \ |
269 | android.hardware.keymaster@3.0-service.trusty | 274 | android.hardware.keymaster@3.0-service.trusty |
270 | endif | 275 | endif |
271 | 276 | ||
272 | PRODUCT_COPY_FILES += \ | 277 | PRODUCT_COPY_FILES += \ |
273 | $(IMX_DEVICE_PATH)/camera_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/camera_config_imx8mq.json \ | 278 | $(IMX_DEVICE_PATH)/camera_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/camera_config_imx8mq.json \ |
274 | device/fsl/imx8m/evk_8mq/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml | 279 | device/fsl/imx8m/evk_8mq/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml |
275 | 280 | ||
276 | # Keymaster HAL | 281 | # Keymaster HAL |
277 | PRODUCT_PACKAGES += \ | 282 | PRODUCT_PACKAGES += \ |
278 | android.hardware.keymaster@3.0-impl \ | 283 | android.hardware.keymaster@3.0-impl \ |
279 | android.hardware.keymaster@3.0-service | 284 | android.hardware.keymaster@3.0-service |
280 | 285 | ||
281 | # DRM HAL | 286 | # DRM HAL |
282 | TARGET_ENABLE_MEDIADRM_64 := true | 287 | TARGET_ENABLE_MEDIADRM_64 := true |
283 | PRODUCT_PACKAGES += \ | 288 | PRODUCT_PACKAGES += \ |
284 | android.hardware.drm@1.0-impl \ | 289 | android.hardware.drm@1.0-impl \ |
285 | android.hardware.drm@1.0-service | 290 | android.hardware.drm@1.0-service |
286 | 291 | ||
287 | # new gatekeeper HAL | 292 | # new gatekeeper HAL |
288 | PRODUCT_PACKAGES += \ | 293 | PRODUCT_PACKAGES += \ |
289 | android.hardware.gatekeeper@1.0-impl \ | 294 | android.hardware.gatekeeper@1.0-impl \ |
290 | android.hardware.gatekeeper@1.0-service | 295 | android.hardware.gatekeeper@1.0-service |
291 | 296 | ||
292 | # Add Trusty OS backed gatekeeper and secure storage proxy | 297 | # Add Trusty OS backed gatekeeper and secure storage proxy |
293 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 298 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
294 | PRODUCT_PACKAGES += \ | 299 | PRODUCT_PACKAGES += \ |
295 | gatekeeper.trusty \ | 300 | gatekeeper.trusty \ |
296 | storageproxyd | 301 | storageproxyd |
297 | endif | 302 | endif |
298 | 303 | ||
299 | #Dumpstate HAL 1.0 support | 304 | #Dumpstate HAL 1.0 support |
300 | PRODUCT_PACKAGES += \ | 305 | PRODUCT_PACKAGES += \ |
301 | android.hardware.dumpstate@1.0-service.imx | 306 | android.hardware.dumpstate@1.0-service.imx |
302 | 307 | ||
303 | ifeq ($(PRODUCT_IMX_TRUSTY),true) | 308 | ifeq ($(PRODUCT_IMX_TRUSTY),true) |
304 | #Oemlock HAL 1.0 support | 309 | #Oemlock HAL 1.0 support |
305 | PRODUCT_PACKAGES += \ | 310 | PRODUCT_PACKAGES += \ |
306 | android.hardware.oemlock@1.0-service.imx | 311 | android.hardware.oemlock@1.0-service.imx |
307 | endif | 312 | endif |
308 | 313 | ||
309 | ifneq ($(BUILD_TARGET_FS),ubifs) | 314 | ifneq ($(BUILD_TARGET_FS),ubifs) |
310 | PRODUCT_PROPERTY_OVERRIDES += \ | 315 | PRODUCT_PROPERTY_OVERRIDES += \ |
311 | ro.frp.pst=/dev/block/by-name/presistdata | 316 | ro.frp.pst=/dev/block/by-name/presistdata |
312 | endif | 317 | endif |
313 | 318 | ||
314 | # ro.product.first_api_level indicates the first api level the device has commercially launched on. | 319 | # ro.product.first_api_level indicates the first api level the device has commercially launched on. |
315 | PRODUCT_PROPERTY_OVERRIDES += \ | 320 | PRODUCT_PROPERTY_OVERRIDES += \ |
316 | ro.product.first_api_level=28 \ | 321 | ro.product.first_api_level=28 \ |
317 | vendor.typec.legacy=true | 322 | vendor.typec.legacy=true |
318 | 323 | ||
319 | PRODUCT_PACKAGES += \ | 324 | PRODUCT_PACKAGES += \ |
320 | libg1 \ | 325 | libg1 \ |
321 | libhantro \ | 326 | libhantro \ |
322 | libcodec | 327 | libcodec |
323 | 328 | ||
324 | # CANbus tools | 329 | # CANbus tools |
325 | PRODUCT_PACKAGES += \ | 330 | PRODUCT_PACKAGES += \ |
326 | candump \ | 331 | candump \ |
327 | cansend \ | 332 | cansend \ |
328 | cangen \ | 333 | cangen \ |
329 | canfdtest \ | 334 | canfdtest \ |
330 | cangw \ | 335 | cangw \ |
331 | canplayer \ | 336 | canplayer \ |
332 | cansniffer \ | 337 | cansniffer \ |
333 | isotprecv \ | 338 | isotprecv \ |
334 | isotpsend \ | 339 | isotpsend \ |
335 | isotpserver | 340 | isotpserver |
336 | 341 | ||
337 | # imx c2 codec binary | 342 | # imx c2 codec binary |
338 | PRODUCT_PACKAGES += \ | 343 | PRODUCT_PACKAGES += \ |
339 | lib_vpu_wrapper \ | 344 | lib_vpu_wrapper \ |
340 | lib_imx_c2_videodec_common \ | 345 | lib_imx_c2_videodec_common \ |
341 | lib_imx_c2_videodec \ | 346 | lib_imx_c2_videodec \ |
342 | lib_imx_c2_vpuwrapper_dec \ | 347 | lib_imx_c2_vpuwrapper_dec \ |
343 | lib_imx_c2_process \ | 348 | lib_imx_c2_process \ |
344 | lib_imx_c2_process_dummy_post \ | 349 | lib_imx_c2_process_dummy_post \ |
345 | c2_component_register \ | 350 | c2_component_register \ |
346 | c2_component_register_ms \ | 351 | c2_component_register_ms \ |
347 | c2_component_register_wmv9 \ | 352 | c2_component_register_wmv9 \ |
348 | c2_component_register_ra \ | 353 | c2_component_register_ra \ |
349 | c2_component_register_rv | 354 | c2_component_register_rv |
350 | 355 | ||
351 | # Add oem unlocking option in settings. | 356 | # Add oem unlocking option in settings. |
352 | PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/by-name/presistdata | 357 | PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/by-name/presistdata |
353 | PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true | 358 | PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true |
354 | 359 | ||
355 | # Tensorflow lite camera demo | 360 | # Tensorflow lite camera demo |
356 | PRODUCT_PACKAGES += \ | 361 | PRODUCT_PACKAGES += \ |
357 | tflitecamerademo | 362 | tflitecamerademo |
358 | 363 | ||
359 | # Multi-Display launcher | 364 | # Multi-Display launcher |
360 | PRODUCT_PACKAGES += \ | 365 | PRODUCT_PACKAGES += \ |
361 | MultiClientInputMethod \ | 366 | MultiClientInputMethod \ |
362 | MultiDisplay | 367 | MultiDisplay |
363 | 368 | ||
364 | # Specify rollback index for bootloader and for AVB | 369 | # Specify rollback index for bootloader and for AVB |
365 | ifneq ($(AVB_RBINDEX),) | 370 | ifneq ($(AVB_RBINDEX),) |
366 | BOARD_AVB_ROLLBACK_INDEX := $(AVB_RBINDEX) | 371 | BOARD_AVB_ROLLBACK_INDEX := $(AVB_RBINDEX) |
367 | else | 372 | else |
368 | BOARD_AVB_ROLLBACK_INDEX := 0 | 373 | BOARD_AVB_ROLLBACK_INDEX := 0 |
369 | endif | 374 | endif |
370 | 375 | ||
371 | #DRM Widevine 1.2 L3 support | 376 | #DRM Widevine 1.2 L3 support |
372 | PRODUCT_PACKAGES += \ | 377 | PRODUCT_PACKAGES += \ |
373 | android.hardware.drm@1.0-impl \ | 378 | android.hardware.drm@1.0-impl \ |
374 | android.hardware.drm@1.0-service \ | 379 | android.hardware.drm@1.0-service \ |
375 | android.hardware.drm@1.2-service.widevine \ | 380 | android.hardware.drm@1.2-service.widevine \ |
376 | android.hardware.drm@1.2-service.clearkey \ | 381 | android.hardware.drm@1.2-service.clearkey \ |
377 | libwvdrmcryptoplugin \ | 382 | libwvdrmcryptoplugin \ |
378 | libwvhidl \ | 383 | libwvhidl \ |
379 | libwvdrmengine \ | 384 | libwvdrmengine \ |
380 | 385 | ||
381 | IMX-DEFAULT-G2D-LIB := libg2d-viv | 386 | IMX-DEFAULT-G2D-LIB := libg2d-viv |
382 | 387 | ||
383 | ifeq ($(PREBUILT_FSL_IMX_CODEC),true) | 388 | ifeq ($(PREBUILT_FSL_IMX_CODEC),true) |
384 | ifneq ($(IMX8_BUILD_32BIT_ROOTFS),true) | 389 | ifneq ($(IMX8_BUILD_32BIT_ROOTFS),true) |
385 | INSTALL_64BIT_LIBRARY := true | 390 | INSTALL_64BIT_LIBRARY := true |
386 | endif | 391 | endif |
387 | -include $(FSL_CODEC_PATH)/fsl-codec/fsl-codec.mk | 392 | -include $(FSL_CODEC_PATH)/fsl-codec/fsl-codec.mk |
388 | endif | 393 | endif |
389 | 394 | ||
390 | $(call inherit-product-if-exists, vendor/nxp-private/security/nxp_security.mk) | 395 | $(call inherit-product-if-exists, vendor/nxp-private/security/nxp_security.mk) |
391 | 396 |
imx8m/smarc_mx8mq/uuu/uuu-android-smarc-mx8mq-emmc.lst
1 | uuu_version 1.3.74 | 1 | uuu_version 1.3.74 |
2 | SDP: boot -f u-boot-imx8mq-smarc_4g-uuu.imx | 2 | SDP: boot -f u-boot-imx8mq-smarc_4g-uuu.imx |
3 | SDPU: delay 1000 | 3 | SDPU: delay 1000 |
4 | SDPU: write -f u-boot-imx8mq-smarc_4g-uuu.imx -offset 0x57c00 | 4 | SDPU: write -f u-boot-imx8mq-smarc_4g-uuu.imx -offset 0x57c00 |
5 | SDPU: jump | 5 | SDPU: jump |
6 | SDPV: delay 1000 | 6 | SDPV: delay 1000 |
7 | SDPV: write -f u-boot-imx8mq-smarc_4g-uuu.imx -skipspl | 7 | SDPV: write -f u-boot-imx8mq-smarc_4g-uuu.imx -skipspl |
8 | SDPV: jump | 8 | SDPV: jump |
9 | FB: ucmd setenv fastboot_dev mmc | 9 | FB: ucmd setenv fastboot_dev mmc |
10 | FB: ucmd setenv mmcdev 0 | 10 | FB: ucmd setenv mmcdev 0 |
11 | FB: ucmd mmc dev 0 | 11 | FB: ucmd mmc dev 0 |
12 | FB: ucmd mmc dev 0 0 | 12 | FB: ucmd mmc dev 0 0 |
13 | FB: ucmd mmc erase 0x2000 0x8 | 13 | FB: ucmd mmc erase 0x2000 0x8 |
14 | FB: ucmd mmc partconf 0 1 1 1 | 14 | FB: ucmd mmc partconf 0 1 1 1 |
15 | FB[-t 600000]: flash bootloader0 u-boot-imx8mq-smarc_4g.imx | 15 | FB[-t 600000]: flash bootloader0 u-boot-imx8mq-trusty-smarc_4g.imx |
16 | FB[-t 600000]: flash gpt partition-table.img | 16 | FB[-t 600000]: flash gpt partition-table.img |
17 | FB: ucmd setenv fastboot_dev mmc | 17 | FB: ucmd setenv fastboot_dev mmc |
18 | FB[-t 600000]: flash dtbo_a dtbo-smarcimx8mq-hdmi.img | 18 | FB[-t 600000]: flash dtbo_a dtbo-imx8mq-smarc-hdmi.img |
19 | FB[-t 600000]: flash boot_a boot.img | 19 | FB[-t 600000]: flash boot_a boot.img |
20 | FB[-t 600000]: flash vbmeta_a vbmeta-smarcimx8mq-hdmi.img | 20 | FB[-t 600000]: flash vbmeta_a vbmeta-imx8mq-smarc-hdmi.img |
21 | FB[-t 600000]: flash dtbo_b dtbo-smarcimx8mq-hdmi.img | 21 | FB[-t 600000]: flash dtbo_b dtbo-imx8mq-smarc-hdmi.img |
22 | FB[-t 600000]: flash boot_b boot.img | 22 | FB[-t 600000]: flash boot_b boot.img |
23 | FB[-t 600000]: flash vbmeta_b vbmeta-smarcimx8mq-hdmi.img | 23 | FB[-t 600000]: flash vbmeta_b vbmeta-imx8mq-smarc-hdmi.img |
24 | FB[-t 600000]: flash super super.img | 24 | FB[-t 600000]: flash super super.img |
25 | FB[-t 600000]: erase misc | 25 | FB[-t 600000]: erase misc |
26 | FB[-t 600000]: erase presistdata | 26 | FB[-t 600000]: erase presistdata |
27 | FB[-t 600000]: erase fbmisc | 27 | FB[-t 600000]: erase fbmisc |
28 | FB[-t 600000]: erase metadata | 28 | FB[-t 600000]: erase metadata |
29 | FB[-t 600000]: erase userdata | 29 | FB[-t 600000]: erase userdata |
30 | FB: done | 30 | FB: done |
31 | 31 |
imx8m/smarc_mx8mq/uuu/uuu-android-smarc-mx8mq-sd.lst
1 | uuu_version 1.3.74 | 1 | uuu_version 1.3.74 |
2 | SDP: boot -f u-boot-imx8mq-smarc_4g-uuu.imx | 2 | SDP: boot -f u-boot-imx8mq-smarc_4g-uuu.imx |
3 | SDPU: delay 1000 | 3 | SDPU: delay 1000 |
4 | SDPU: write -f u-boot-imx8mq-smarc_4g-uuu.imx -offset 0x57c00 | 4 | SDPU: write -f u-boot-imx8mq-smarc_4g-uuu.imx -offset 0x57c00 |
5 | SDPU: jump | 5 | SDPU: jump |
6 | SDPV: delay 1000 | 6 | SDPV: delay 1000 |
7 | SDPV: write -f u-boot-imx8mq-smarc_4g-uuu.imx -skipspl | 7 | SDPV: write -f u-boot-imx8mq-smarc_4g-uuu.imx -skipspl |
8 | SDPV: jump | 8 | SDPV: jump |
9 | FB: ucmd setenv fastboot_dev mmc | 9 | FB: ucmd setenv fastboot_dev mmc |
10 | FB: ucmd setenv mmcdev 1 | 10 | FB: ucmd setenv mmcdev 1 |
11 | FB: ucmd mmc dev 1 | 11 | FB: ucmd mmc dev 1 |
12 | FB: ucmd mmc dev 1 0 | 12 | FB: ucmd mmc dev 1 0 |
13 | FB: ucmd mmc erase 0x2000 0x8 | 13 | FB: ucmd mmc erase 0x2000 0x8 |
14 | FB: ucmd mmc partconf 1 1 1 1 | 14 | FB: ucmd mmc partconf 1 1 1 1 |
15 | FB[-t 600000]: flash bootloader0 u-boot-imx8mq-smarc_4g.imx | 15 | FB[-t 600000]: flash bootloader0 u-boot-imx8mq-trusty-smarc_4g.imx |
16 | FB[-t 600000]: flash gpt partition-table.img | 16 | FB[-t 600000]: flash gpt partition-table.img |
17 | FB: ucmd setenv fastboot_dev mmc | 17 | FB: ucmd setenv fastboot_dev mmc |
18 | FB[-t 600000]: flash dtbo_a dtbo-smarcimx8mq-hdmi.img | 18 | FB[-t 600000]: flash dtbo_a dtbo-imx8mq-smarc-hdmi.img |
19 | FB[-t 600000]: flash boot_a boot.img | 19 | FB[-t 600000]: flash boot_a boot.img |
20 | FB[-t 600000]: flash vbmeta_a vbmeta-smarcimx8mq-hdmi.img | 20 | FB[-t 600000]: flash vbmeta_a vbmeta-imx8mq-smarc-hdmi.img |
21 | FB[-t 600000]: flash dtbo_b dtbo-smarcimx8mq-hdmi.img | 21 | FB[-t 600000]: flash dtbo_b dtbo-imx8mq-smarc-hdmi.img |
22 | FB[-t 600000]: flash boot_b boot.img | 22 | FB[-t 600000]: flash boot_b boot.img |
23 | FB[-t 600000]: flash vbmeta_b vbmeta-smarcimx8mq-hdmi.img | 23 | FB[-t 600000]: flash vbmeta_b vbmeta-imx8mq-smarc-hdmi.img |
24 | FB[-t 600000]: flash super super.img | 24 | FB[-t 600000]: flash super super.img |
25 | FB[-t 600000]: erase misc | 25 | FB[-t 600000]: erase misc |
26 | FB[-t 600000]: erase presistdata | 26 | FB[-t 600000]: erase presistdata |
27 | FB[-t 600000]: erase fbmisc | 27 | FB[-t 600000]: erase fbmisc |
28 | FB[-t 600000]: erase metadata | 28 | FB[-t 600000]: erase metadata |
29 | FB[-t 600000]: erase userdata | 29 | FB[-t 600000]: erase userdata |
30 | FB: done | 30 | FB: done |
31 | 31 |
imx8m/smarc_mx8mq/uuu/uuu_android_smarc_flash.bat
1 | :: Do not output the command | 1 | :: Do not output the command |
2 | @echo off | 2 | @echo off |
3 | 3 | ||
4 | echo This script is validated with uuu 1.3.124 version, it is recommended to align with this version. | 4 | echo This script is validated with uuu 1.3.124 version, it is recommended to align with this version. |
5 | 5 | ||
6 | ::--------------------------------------------------------------------------------- | 6 | ::--------------------------------------------------------------------------------- |
7 | ::Variables | 7 | ::Variables |
8 | ::--------------------------------------------------------------------------------- | 8 | ::--------------------------------------------------------------------------------- |
9 | 9 | ||
10 | :: For batch script, %0 is not script name in a so-called function, so save the script name here | 10 | :: For batch script, %0 is not script name in a so-called function, so save the script name here |
11 | set script_first_argument=%0 | 11 | set script_first_argument=%0 |
12 | :: For users execute this script in powershell, clear the quation marks first. | 12 | :: For users execute this script in powershell, clear the quation marks first. |
13 | set script_first_argument=%script_first_argument:"=% | 13 | set script_first_argument=%script_first_argument:"=% |
14 | :: reserve last 13 characters, which is the lenght of the name of this script file. | 14 | :: reserve last 13 characters, which is the lenght of the name of this script file. |
15 | set script_name=%script_first_argument:~-25% | 15 | set script_name=%script_first_argument:~-25% |
16 | 16 | ||
17 | set soc_name= | 17 | set soc_name= |
18 | set uboot_feature= | 18 | set uboot_feature= |
19 | set dtb_feature= | 19 | set dtb_feature= |
20 | set /A card_size=0 | 20 | set /A card_size=0 |
21 | set slot= | 21 | set slot= |
22 | set bootimage=boot.img | 22 | set bootimage=boot.img |
23 | set systemimage_file=system.img | 23 | set systemimage_file=system.img |
24 | set vendor_file=vendor.img | 24 | set vendor_file=vendor.img |
25 | set product_file=product.img | 25 | set product_file=product.img |
26 | set partition_file=partition-table.img | 26 | set partition_file=partition-table.img |
27 | set super_file=super.img | 27 | set super_file=super.img |
28 | set /A support_dtbo=0 | 28 | set /A support_dtbo=0 |
29 | set /A support_recovery=0 | 29 | set /A support_recovery=0 |
30 | set /A support_dualslot=0 | 30 | set /A support_dualslot=0 |
31 | set /A support_mcu_os=0 | 31 | set /A support_mcu_os=0 |
32 | set /A support_trusty=0 | 32 | set /A support_trusty=0 |
33 | set /A support_dynamic_partition=0 | 33 | set /A support_dynamic_partition=0 |
34 | set boot_partition=boot | 34 | set boot_partition=boot |
35 | set recovery_partition=recovery | 35 | set recovery_partition=recovery |
36 | set system_partition=system | 36 | set system_partition=system |
37 | set vendor_partition=vendor | 37 | set vendor_partition=vendor |
38 | set product_partition=product | 38 | set product_partition=product |
39 | set vbmeta_partition=vbmeta | 39 | set vbmeta_partition=vbmeta |
40 | set dtbo_partition=dtbo | 40 | set dtbo_partition=dtbo |
41 | set mcu_os_partition=mcu_os | 41 | set mcu_os_partition=mcu_os |
42 | set super_partition=super | 42 | set super_partition=super |
43 | set /A flash_mcu=0 | 43 | set /A flash_mcu=0 |
44 | set /A statisc=0 | 44 | set /A statisc=0 |
45 | set /A erase=0 | 45 | set /A erase=0 |
46 | set image_directory= | 46 | set image_directory= |
47 | 47 | ||
48 | set target_dev=emmc | 48 | set target_dev=emmc |
49 | set sdp=SDP | 49 | set sdp=SDP |
50 | set /A uboot_env_start=0 | 50 | set /A uboot_env_start=0 |
51 | set /A uboot_env_len=0 | 51 | set /A uboot_env_len=0 |
52 | set board= | 52 | set board= |
53 | set imx7ulp_evk_m4_sf_start_byte=0 | 53 | set imx7ulp_evk_m4_sf_start_byte=0 |
54 | set imx7ulp_evk_m4_sf_length_byte=0x20000 | 54 | set imx7ulp_evk_m4_sf_length_byte=0x20000 |
55 | set imx7ulp_stage_base_addr=0x60800000 | 55 | set imx7ulp_stage_base_addr=0x60800000 |
56 | set imx8qm_stage_base_addr=0x98000000 | 56 | set imx8qm_stage_base_addr=0x98000000 |
57 | set bootloader_used_by_uuu= | 57 | set bootloader_used_by_uuu= |
58 | set bootloader_flashed_to_board= | 58 | set bootloader_flashed_to_board= |
59 | set yocto_image= | 59 | set yocto_image= |
60 | set /A error_level=0 | 60 | set /A error_level=0 |
61 | set /A intervene=0 | 61 | set /A intervene=0 |
62 | set /A support_dual_bootloader=0 | 62 | set /A support_dual_bootloader=0 |
63 | set dual_bootloader_partition= | 63 | set dual_bootloader_partition= |
64 | set /A daemon_mode=0 | 64 | set /A daemon_mode=0 |
65 | set /A flag=1 | 65 | set /A flag=1 |
66 | set /A dryrun=0 | 66 | set /A dryrun=0 |
67 | set lpmake_system_image_a= | 67 | set lpmake_system_image_a= |
68 | set lpmake_system_image_b= | 68 | set lpmake_system_image_b= |
69 | set lpmake_vendor_image_a= | 69 | set lpmake_vendor_image_a= |
70 | set lpmake_vendor_image_b= | 70 | set lpmake_vendor_image_b= |
71 | set lpmake_product_image_a= | 71 | set lpmake_product_image_a= |
72 | set lpmake_product_image_b= | 72 | set lpmake_product_image_b= |
73 | set /A dont_generate_super=0 | 73 | set /A dont_generate_super=0 |
74 | 74 | ||
75 | 75 | ||
76 | :: We want to detect illegal feature input to some extent. Here it's based on SoC names. Since an SoC may be on a | 76 | :: We want to detect illegal feature input to some extent. Here it's based on SoC names. Since an SoC may be on a |
77 | :: board running different set of images(android and automative for a example), so misuse the features of one set of | 77 | :: board running different set of images(android and automative for a example), so misuse the features of one set of |
78 | :: images when flash another set of images can not be detect early with this scenario. | 78 | :: images when flash another set of images can not be detect early with this scenario. |
79 | set imx8mm_uboot_feature=dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty | 79 | set imx8mm_uboot_feature=dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty |
80 | set imx8mn_uboot_feature=dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 | 80 | set imx8mn_uboot_feature=dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 |
81 | set imx8mp_uboot_feature=dual trusty-dual evk-uuu trusty-secure-unlock trusty | 81 | set imx8mp_uboot_feature=dual trusty-dual evk-uuu trusty-secure-unlock trusty |
82 | set imx8mq_uboot_feature=dual trusty-dual evk-uuu trusty-secure-unlock trusty | 82 | set imx8mq_uboot_feature=smarc_2g trusty-smarc_2g trusty-dual-smarc_2g trusty-secure-unlock-smarc_2g smarc_4g trusty-smarc_4g trusty-dual-smarc_4g trusty-secure-unlock-smarc_4g |
83 | set smarcimx8mq_uboot_feature=smarc_4g smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_4g-trusty smarc_2g smarc_2g-uuu smarc_2g-trusty-secure-unlock smarc_2g-trusty | ||
84 | set imx8qxp_uboot_feature=mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu | 83 | set imx8qxp_uboot_feature=mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu |
85 | set imx8qm_uboot_feature=mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi | 84 | set imx8qm_uboot_feature=mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi |
86 | set imx7ulp_uboot_feature=evk-uuu | 85 | set imx7ulp_uboot_feature=evk-uuu |
87 | 86 | ||
88 | set imx8mm_dtb_feature=ddr4 m4 mipi-panel | 87 | set imx8mm_dtb_feature=ddr4 m4 mipi-panel |
89 | set imx8mn_dtb_feature=mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg | 88 | set imx8mn_dtb_feature=mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg |
90 | set imx8mp_dtb_feature=rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 | 89 | set imx8mp_dtb_feature=rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 |
91 | set imx8mq_dtb_feature=dual mipi-panel mipi | 90 | set imx8mq_dtb_feature=hdmi dcss-lvds dp lcdif-lvds dual-display dual mipi-panel mipi |
92 | set smarcimx8mq_dtb_feature=hdmi dcss-lvds lcdif-lvds dp dual-display | ||
93 | set imx8qxp_dtb_feature= | 91 | set imx8qxp_dtb_feature= |
94 | set imx8qm_dtb_feature=hdmi mipi-panel md xen | 92 | set imx8qm_dtb_feature=hdmi mipi-panel md xen |
95 | set imx7ulp_dtb_feature=evk-mipi evk mipi | 93 | set imx7ulp_dtb_feature=evk-mipi evk mipi |
96 | 94 | ||
97 | ::--------------------------------------------------------------------------------- | 95 | ::--------------------------------------------------------------------------------- |
98 | :: Parse command line, since there is no syntax like "switch case" in bat file, | 96 | :: Parse command line, since there is no syntax like "switch case" in bat file, |
99 | :: the way to process the command line is a bit redundant, still, it can work. | 97 | :: the way to process the command line is a bit redundant, still, it can work. |
100 | ::--------------------------------------------------------------------------------- | 98 | ::--------------------------------------------------------------------------------- |
101 | :: If no option provided when executing this script, show help message and exit. | 99 | :: If no option provided when executing this script, show help message and exit. |
102 | if [%1] == [] ( | 100 | if [%1] == [] ( |
103 | echo please provide more information with command script options | 101 | echo please provide more information with command script options |
104 | call :help | 102 | call :help |
105 | goto :eof | 103 | goto :eof |
106 | ) | 104 | ) |
107 | 105 | ||
108 | :parse_loop | 106 | :parse_loop |
109 | if [%1] == [] goto :parse_end | 107 | if [%1] == [] goto :parse_end |
110 | if %1 == -h call :help & goto :eof | 108 | if %1 == -h call :help & goto :eof |
111 | if %1 == -f set soc_name=%2& shift & shift & goto :parse_loop | 109 | if %1 == -f set soc_name=%2& shift & shift & goto :parse_loop |
112 | if %1 == -c set /A card_size=%2& shift & shift & goto :parse_loop | 110 | if %1 == -c set /A card_size=%2& shift & shift & goto :parse_loop |
113 | if %1 == -u set uboot_feature=-%2& shift & shift & goto :parse_loop | 111 | if %1 == -u set uboot_feature=-%2& shift & shift & goto :parse_loop |
114 | if %1 == -d set dtb_feature=%2& shift & shift & goto :parse_loop | 112 | if %1 == -d set dtb_feature=%2& shift & shift & goto :parse_loop |
115 | if %1 == -a set slot=_a& shift & goto :parse_loop | 113 | if %1 == -a set slot=_a& shift & goto :parse_loop |
116 | if %1 == -b set slot=_b& shift & goto :parse_loop | 114 | if %1 == -b set slot=_b& shift & goto :parse_loop |
117 | if %1 == -m set /A flash_mcu=1 & shift & goto :parse_loop | 115 | if %1 == -m set /A flash_mcu=1 & shift & goto :parse_loop |
118 | if %1 == -e set /A erase=1 & shift & goto :parse_loop | 116 | if %1 == -e set /A erase=1 & shift & goto :parse_loop |
119 | if %1 == -D set image_directory=%2& shift & shift & goto :parse_loop | 117 | if %1 == -D set image_directory=%2& shift & shift & goto :parse_loop |
120 | if %1 == -t set target_dev=%2&shift &shift & goto :parse_loop | 118 | if %1 == -t set target_dev=%2&shift &shift & goto :parse_loop |
121 | if %1 == -p set board=%2&shift &shift & goto :parse_loop | 119 | if %1 == -p set board=%2&shift &shift & goto :parse_loop |
122 | if %1 == -y set yocto_image=%2&shift &shift & goto :parse_loop | 120 | if %1 == -y set yocto_image=%2&shift &shift & goto :parse_loop |
123 | if %1 == -i set /A intervene=1 & shift & goto :parse_loop | 121 | if %1 == -i set /A intervene=1 & shift & goto :parse_loop |
124 | if %1 == -daemon set /A daemon_mode=1 & shift & goto :parse_loop | 122 | if %1 == -daemon set /A daemon_mode=1 & shift & goto :parse_loop |
125 | if %1 == -dryrun set /A dryrun=1 & shift & goto :parse_loop | 123 | if %1 == -dryrun set /A dryrun=1 & shift & goto :parse_loop |
126 | if %1 == -super set /A dont_generate_super=1 & shift & goto :parse_loop | 124 | if %1 == -super set /A dont_generate_super=1 & shift & goto :parse_loop |
127 | echo unknown option "%1", please check it. | 125 | echo unknown option "%1", please check it. |
128 | call :help & set /A error_level=1 && goto :exit | 126 | call :help & set /A error_level=1 && goto :exit |
129 | :parse_end | 127 | :parse_end |
130 | 128 | ||
131 | 129 | ||
132 | :: avoid substring judgement error | 130 | :: avoid substring judgement error |
133 | set uboot_feature_test=A%uboot_feature% | 131 | set uboot_feature_test=A%uboot_feature% |
134 | 132 | ||
135 | :: Process of the uboot_feature parameter | 133 | :: Process of the uboot_feature parameter |
136 | if not [%uboot_feature_test:trusty=%] == [%uboot_feature_test%] set /A support_trusty=1 | 134 | if not [%uboot_feature_test:trusty=%] == [%uboot_feature_test%] set /A support_trusty=1 |
137 | if not [%uboot_feature_test:secure=%] == [%uboot_feature_test%] set /A support_trusty=1 | 135 | if not [%uboot_feature_test:secure=%] == [%uboot_feature_test%] set /A support_trusty=1 |
138 | if not [%uboot_feature_test:dual=%] == [%uboot_feature_test%] set /A support_dual_bootloader=1 | 136 | if not [%uboot_feature_test:dual=%] == [%uboot_feature_test%] set /A support_dual_bootloader=1 |
139 | 137 | ||
140 | :: TrustyOS can't boot from SD card | 138 | :: TrustyOS can't boot from SD card |
141 | if [%target_dev%] == [sd] ( | 139 | if [%target_dev%] == [sd] ( |
142 | if [%support_trusty%] equ [1] ( | 140 | if [%support_trusty%] equ [1] ( |
143 | echo can not boot up from SD with trusty enabled | 141 | echo can not boot up from SD with trusty enabled |
144 | call :help & set /A error_level=1 && goto :exit | 142 | call :help & set /A error_level=1 && goto :exit |
145 | ) | 143 | ) |
146 | ) | 144 | ) |
147 | 145 | ||
148 | :: -i option should not be used together with -daemon | 146 | :: -i option should not be used together with -daemon |
149 | if [%intervene%] equ [1] ( | 147 | if [%intervene%] equ [1] ( |
150 | if [%daemon_mode%] equ [1] ( | 148 | if [%daemon_mode%] equ [1] ( |
151 | echo -daemon mode will be igonred | 149 | echo -daemon mode will be igonred |
152 | ) | 150 | ) |
153 | ) | 151 | ) |
154 | 152 | ||
155 | :: if directory is specified, and the last character is not backslash, add one backslash | 153 | :: if directory is specified, and the last character is not backslash, add one backslash |
156 | if not [%image_directory%] == [] if not %image_directory:~-1% == \ ( | 154 | if not [%image_directory%] == [] if not %image_directory:~-1% == \ ( |
157 | set image_directory=%image_directory%\ | 155 | set image_directory=%image_directory%\ |
158 | ) | 156 | ) |
159 | 157 | ||
160 | :: If sdcard size is not correctly set, exit | 158 | :: If sdcard size is not correctly set, exit |
161 | if %card_size% neq 0 set /A statisc+=1 | 159 | if %card_size% neq 0 set /A statisc+=1 |
162 | if %card_size% neq 7 set /A statisc+=1 | 160 | if %card_size% neq 7 set /A statisc+=1 |
163 | if %card_size% neq 14 set /A statisc+=1 | 161 | if %card_size% neq 14 set /A statisc+=1 |
164 | if %card_size% neq 28 set /A statisc+=1 | 162 | if %card_size% neq 28 set /A statisc+=1 |
165 | if %statisc% == 4 echo card_size is not a legal value & set /A error_level=1 && goto :exit | 163 | if %statisc% == 4 echo card_size is not a legal value & set /A error_level=1 && goto :exit |
166 | 164 | ||
167 | :: dual bootloader support will use different gpt, this is only for imx8m | 165 | :: dual bootloader support will use different gpt, this is only for imx8m |
168 | if [%support_dual_bootloader%] equ [1] ( | 166 | if [%support_dual_bootloader%] equ [1] ( |
169 | if not [%soc_name:imx8m=%] == [%soc_name%] ( | 167 | if not [%soc_name:imx8m=%] == [%soc_name%] ( |
170 | if %card_size% == 0 ( | 168 | if %card_size% == 0 ( |
171 | set partition_file=partition-table-dual.img | 169 | set partition_file=partition-table-dual.img |
172 | )else ( | 170 | )else ( |
173 | set partition_file=partition-table-%card_size%GB-dual.img | 171 | set partition_file=partition-table-%card_size%GB-dual.img |
174 | ) | 172 | ) |
175 | )else ( | 173 | )else ( |
176 | if %card_size% gtr 0 set partition_file=partition-table-%card_size%GB.img | 174 | if %card_size% gtr 0 set partition_file=partition-table-%card_size%GB.img |
177 | ) | 175 | ) |
178 | )else ( | 176 | )else ( |
179 | if %card_size% gtr 0 set partition_file=partition-table-%card_size%GB.img | 177 | if %card_size% gtr 0 set partition_file=partition-table-%card_size%GB.img |
180 | ) | 178 | ) |
181 | 179 | ||
182 | 180 | ||
183 | :: dump the partition table image file into text file and check whether some partition names are in it | 181 | :: dump the partition table image file into text file and check whether some partition names are in it |
184 | if exist partition-table_1.txt ( | 182 | if exist partition-table_1.txt ( |
185 | del partition-table_1.txt | 183 | del partition-table_1.txt |
186 | ) | 184 | ) |
187 | certutil -encodehex %image_directory%%partition_file% partition-table_1.txt > nul | 185 | certutil -encodehex %image_directory%%partition_file% partition-table_1.txt > nul |
188 | :: get the last column, it's ASCII character of the values in partition table file. none-printable value displays as a dot | 186 | :: get the last column, it's ASCII character of the values in partition table file. none-printable value displays as a dot |
189 | if exist partition-table_2.txt ( | 187 | if exist partition-table_2.txt ( |
190 | del partition-table_2.txt | 188 | del partition-table_2.txt |
191 | ) | 189 | ) |
192 | :: put all the lines in a file into one line | 190 | :: put all the lines in a file into one line |
193 | for /f "tokens=17 delims= " %%I in (partition-table_1.txt) do echo %%I>> partition-table_2.txt | 191 | for /f "tokens=17 delims= " %%I in (partition-table_1.txt) do echo %%I>> partition-table_2.txt |
194 | if exist partition-table_3.txt ( | 192 | if exist partition-table_3.txt ( |
195 | del partition-table_3.txt | 193 | del partition-table_3.txt |
196 | ) | 194 | ) |
197 | for /f "delims=" %%J in (partition-table_2.txt) do ( | 195 | for /f "delims=" %%J in (partition-table_2.txt) do ( |
198 | set /p="%%J"<nul>>partition-table_3.txt 2>nul | 196 | set /p="%%J"<nul>>partition-table_3.txt 2>nul |
199 | ) | 197 | ) |
200 | 198 | ||
201 | :: check whether there is "bootloader_b" in partition file | 199 | :: check whether there is "bootloader_b" in partition file |
202 | find "b.o.o.t.l.o.a.d.e.r._.b." partition-table_3.txt > nul && set /A support_dual_bootloader=1 && echo dual bootloader is supported | 200 | find "b.o.o.t.l.o.a.d.e.r._.b." partition-table_3.txt > nul && set /A support_dual_bootloader=1 && echo dual bootloader is supported |
203 | :: check whether there is "dtbo" in partition file | 201 | :: check whether there is "dtbo" in partition file |
204 | find "d.t.b.o." partition-table_3.txt > nul && set /A support_dtbo=1 && echo dtbo is supported | 202 | find "d.t.b.o." partition-table_3.txt > nul && set /A support_dtbo=1 && echo dtbo is supported |
205 | :: check whether there is "recovery" in partition file | 203 | :: check whether there is "recovery" in partition file |
206 | find "r.e.c.o.v.e.r.y." partition-table_3.txt > nul && set /A support_recovery=1 && echo recovery is supported | 204 | find "r.e.c.o.v.e.r.y." partition-table_3.txt > nul && set /A support_recovery=1 && echo recovery is supported |
207 | :: check whether there is "boot_b" in partition file | 205 | :: check whether there is "boot_b" in partition file |
208 | find "b.o.o.t._.b." partition-table_3.txt > nul && set /A support_dualslot=1 && echo dual slot is supported | 206 | find "b.o.o.t._.b." partition-table_3.txt > nul && set /A support_dualslot=1 && echo dual slot is supported |
209 | :: check whether there is "super" in partition table | 207 | :: check whether there is "super" in partition table |
210 | find "s.u.p.e.r." partition-table_3.txt > nul && set /A support_dynamic_partition=1 && echo dynamic partition is supported | 208 | find "s.u.p.e.r." partition-table_3.txt > nul && set /A support_dynamic_partition=1 && echo dynamic partition is supported |
211 | 209 | ||
212 | del partition-table_1.txt | 210 | del partition-table_1.txt |
213 | del partition-table_2.txt | 211 | del partition-table_2.txt |
214 | del partition-table_3.txt | 212 | del partition-table_3.txt |
215 | 213 | ||
216 | :: get device and board specific parameter, for now, this step can't make sure the soc_name is definitely correct | 214 | :: get device and board specific parameter, for now, this step can't make sure the soc_name is definitely correct |
217 | if not [%soc_name:imx8qm=%] == [%soc_name%] ( | 215 | if not [%soc_name:imx8qm=%] == [%soc_name%] ( |
218 | set vid=0x1fc9& set pid=0x0129& set chip=MX8QM | 216 | set vid=0x1fc9& set pid=0x0129& set chip=MX8QM |
219 | set uboot_env_start=0x2000& set uboot_env_len=0x10 | 217 | set uboot_env_start=0x2000& set uboot_env_len=0x10 |
220 | set emmc_num=0& set sd_num=1 | 218 | set emmc_num=0& set sd_num=1 |
221 | set board=mek | 219 | set board=mek |
222 | goto :device_info_end | 220 | goto :device_info_end |
223 | ) | 221 | ) |
224 | if not [%soc_name:imx8qxp=%] == [%soc_name%] ( | 222 | if not [%soc_name:imx8qxp=%] == [%soc_name%] ( |
225 | set vid=0x1fc9& set pid=0x012f& set chip=MX8QXP | 223 | set vid=0x1fc9& set pid=0x012f& set chip=MX8QXP |
226 | set uboot_env_start=0x2000& set uboot_env_len=0x10 | 224 | set uboot_env_start=0x2000& set uboot_env_len=0x10 |
227 | set emmc_num=0& set sd_num=1 | 225 | set emmc_num=0& set sd_num=1 |
228 | set board=mek | 226 | set board=mek |
229 | goto :device_info_end | 227 | goto :device_info_end |
230 | ) | 228 | ) |
231 | if not [%soc_name:imx8mq=%] == [%soc_name%] ( | 229 | if not [%soc_name:imx8mq=%] == [%soc_name%] ( |
232 | set vid=0x1fc9& set pid=0x012b& set chip=MX8MQ | 230 | set vid=0x1fc9& set pid=0x012b& set chip=MX8MQ |
233 | set uboot_env_start=0x2000& set uboot_env_len=0x8 | 231 | set uboot_env_start=0x2000& set uboot_env_len=0x8 |
234 | set emmc_num=0& set sd_num=1 | 232 | set emmc_num=0& set sd_num=1 |
235 | if [%board%] == [] ( | 233 | if [%board%] == [] ( |
236 | set board=evk | 234 | set board=evk |
237 | ) | 235 | ) |
238 | goto :device_info_end | 236 | goto :device_info_end |
239 | ) | 237 | ) |
240 | if not [%soc_name:smarcimx8mq=%] == [%soc_name%] ( | ||
241 | set vid=0x1fc9& set pid=0x012b& set chip=MX8MQ | ||
242 | set uboot_env_start=0x2000& set uboot_env_len=0x8 | ||
243 | set emmc_num=0& set sd_num=1 | ||
244 | if [%board%] == [] ( | ||
245 | set board=smarc | ||
246 | ) | ||
247 | goto :device_info_end | ||
248 | ) | ||
249 | if not [%soc_name:imx8mm=%] == [%soc_name%] ( | 238 | if not [%soc_name:imx8mm=%] == [%soc_name%] ( |
250 | set vid=0x1fc9& set pid=00x0134& set chip=MX8MM | 239 | set vid=0x1fc9& set pid=00x0134& set chip=MX8MM |
251 | set uboot_env_start=0x2000& set uboot_env_len=0x8 | 240 | set uboot_env_start=0x2000& set uboot_env_len=0x8 |
252 | set emmc_num=2& set sd_num=1 | 241 | set emmc_num=2& set sd_num=1 |
253 | set board=evk | 242 | set board=evk |
254 | goto :device_info_end | 243 | goto :device_info_end |
255 | ) | 244 | ) |
256 | if not [%soc_name:imx8mn=%] == [%soc_name%] ( | 245 | if not [%soc_name:imx8mn=%] == [%soc_name%] ( |
257 | set vid=0x1fc9& set pid=00x013e& set chip=MX8MN | 246 | set vid=0x1fc9& set pid=00x013e& set chip=MX8MN |
258 | set uboot_env_start=0x2000& set uboot_env_len=0x8 | 247 | set uboot_env_start=0x2000& set uboot_env_len=0x8 |
259 | set emmc_num=2& set sd_num=1 | 248 | set emmc_num=2& set sd_num=1 |
260 | set board=evk | 249 | set board=evk |
261 | goto :device_info_end | 250 | goto :device_info_end |
262 | ) | 251 | ) |
263 | if not [%soc_name:imx8mp=%] == [%soc_name%] ( | 252 | if not [%soc_name:imx8mp=%] == [%soc_name%] ( |
264 | set vid=0x1fc9& set pid=00x0146& set chip=MX8MP | 253 | set vid=0x1fc9& set pid=00x0146& set chip=MX8MP |
265 | set uboot_env_start=0x2000& set uboot_env_len=0x8 | 254 | set uboot_env_start=0x2000& set uboot_env_len=0x8 |
266 | set emmc_num=2& set sd_num=1 | 255 | set emmc_num=2& set sd_num=1 |
267 | set board=evk | 256 | set board=evk |
268 | goto :device_info_end | 257 | goto :device_info_end |
269 | ) | 258 | ) |
270 | if not [%soc_name:imx7ulp=%] == [%soc_name%] ( | 259 | if not [%soc_name:imx7ulp=%] == [%soc_name%] ( |
271 | set vid=0x1fc9& set pid=0x0126& set chip=MX7ULP | 260 | set vid=0x1fc9& set pid=0x0126& set chip=MX7ULP |
272 | set uboot_env_start=0x700& set uboot_env_len=0x10 | 261 | set uboot_env_start=0x700& set uboot_env_len=0x10 |
273 | set sd_num=0 | 262 | set sd_num=0 |
274 | set board=evk | 263 | set board=evk |
275 | if [%target_dev%] == [emmc] ( | 264 | if [%target_dev%] == [emmc] ( |
276 | call :target_dev_not_support | 265 | call :target_dev_not_support |
277 | ) | 266 | ) |
278 | goto :device_info_end | 267 | goto :device_info_end |
279 | ) | 268 | ) |
280 | if not [%soc_name:imx7d=%] == [%soc_name%] ( | 269 | if not [%soc_name:imx7d=%] == [%soc_name%] ( |
281 | set vid=0x15a2& set pid=0x0076& set chip=MX7D | 270 | set vid=0x15a2& set pid=0x0076& set chip=MX7D |
282 | set uboot_env_start=0x700& set uboot_env_len=0x10 | 271 | set uboot_env_start=0x700& set uboot_env_len=0x10 |
283 | set sd_num=0 | 272 | set sd_num=0 |
284 | set board=sabresd | 273 | set board=sabresd |
285 | if [%target_dev%] == [emmc] ( | 274 | if [%target_dev%] == [emmc] ( |
286 | call :target_dev_not_support | 275 | call :target_dev_not_support |
287 | ) | 276 | ) |
288 | goto :device_info_end | 277 | goto :device_info_end |
289 | ) | 278 | ) |
290 | if not [%soc_name:imx6sx=%] == [%soc_name%] ( | 279 | if not [%soc_name:imx6sx=%] == [%soc_name%] ( |
291 | set vid=0x15a2& set pid=0x0071& set chip=MX6SX | 280 | set vid=0x15a2& set pid=0x0071& set chip=MX6SX |
292 | set uboot_env_start=0x700& set uboot_env_len=0x10 | 281 | set uboot_env_start=0x700& set uboot_env_len=0x10 |
293 | set sd_num=2 | 282 | set sd_num=2 |
294 | set board=sabresd | 283 | set board=sabresd |
295 | if [%target_dev%] == [emmc] ( | 284 | if [%target_dev%] == [emmc] ( |
296 | call :target_dev_not_support | 285 | call :target_dev_not_support |
297 | ) | 286 | ) |
298 | goto :device_info_end | 287 | goto :device_info_end |
299 | ) | 288 | ) |
300 | if not [%soc_name:imx6dl=%] == [%soc_name%] ( | 289 | if not [%soc_name:imx6dl=%] == [%soc_name%] ( |
301 | set vid=0x15a2& set pid=0x0061& set chip=MX6DL | 290 | set vid=0x15a2& set pid=0x0061& set chip=MX6DL |
302 | set uboot_env_start=0x700& set uboot_env_len=0x10 | 291 | set uboot_env_start=0x700& set uboot_env_len=0x10 |
303 | set emmc_num=2& set sd_num=1 | 292 | set emmc_num=2& set sd_num=1 |
304 | call :board_info_test | 293 | call :board_info_test |
305 | if [%target_dev%] == [emmc] ( | 294 | if [%target_dev%] == [emmc] ( |
306 | if [%board%] == [sabreauto] call :target_dev_not_support | 295 | if [%board%] == [sabreauto] call :target_dev_not_support |
307 | ) | 296 | ) |
308 | goto :device_info_end | 297 | goto :device_info_end |
309 | ) | 298 | ) |
310 | if not [%soc_name:imx6q=%] == [%soc_name%] ( | 299 | if not [%soc_name:imx6q=%] == [%soc_name%] ( |
311 | set vid=0x15a2& set pid=0x0054& set chip=MX6Q | 300 | set vid=0x15a2& set pid=0x0054& set chip=MX6Q |
312 | set uboot_env_start=0x700& set uboot_env_len=0x10 | 301 | set uboot_env_start=0x700& set uboot_env_len=0x10 |
313 | set emmc_num=2& set sd_num=1 | 302 | set emmc_num=2& set sd_num=1 |
314 | call :board_info_test | 303 | call :board_info_test |
315 | if [%target_dev%] == [emmc] ( | 304 | if [%target_dev%] == [emmc] ( |
316 | if [%board%] == [sabreauto] call :target_dev_not_support | 305 | if [%board%] == [sabreauto] call :target_dev_not_support |
317 | ) | 306 | ) |
318 | goto :device_info_end | 307 | goto :device_info_end |
319 | ) | 308 | ) |
320 | echo please check whether the soc_name you specified is correct | 309 | echo please check whether the soc_name you specified is correct |
321 | call :help & set /A error_level=1 && goto :exit | 310 | call :help & set /A error_level=1 && goto :exit |
322 | :device_info_end | 311 | :device_info_end |
323 | 312 | ||
324 | :: set target_num based on target_dev | 313 | :: set target_num based on target_dev |
325 | if [%target_dev%] == [emmc] ( | 314 | if [%target_dev%] == [emmc] ( |
326 | set target_num=%emmc_num% | 315 | set target_num=%emmc_num% |
327 | )else ( | 316 | )else ( |
328 | set target_num=%sd_num% | 317 | set target_num=%sd_num% |
329 | ) | 318 | ) |
330 | 319 | ||
331 | :: check whether provided spl/bootloader/uboot feature is legal | 320 | :: check whether provided spl/bootloader/uboot feature is legal |
332 | set uboot_feature_no_pre_hyphen=%uboot_feature:~1% | 321 | set uboot_feature_no_pre_hyphen=%uboot_feature:~1% |
333 | if not [%uboot_feature%] == [] ( | 322 | if not [%uboot_feature%] == [] ( |
334 | setlocal enabledelayedexpansion | 323 | setlocal enabledelayedexpansion |
335 | call :whether_in_array uboot_feature_no_pre_hyphen %soc_name%_uboot_feature | 324 | call :whether_in_array uboot_feature_no_pre_hyphen %soc_name%_uboot_feature |
336 | if !flag! neq 0 ( | 325 | if !flag! neq 0 ( |
337 | echo illegal parameter "%uboot_feature_no_pre_hyphen%" for "-u" option | 326 | echo illegal parameter "%uboot_feature_no_pre_hyphen%" for "-u" option |
338 | call :help & set /A error_level=1 && goto :exit | 327 | call :help & set /A error_level=1 && goto :exit |
339 | ) | 328 | ) |
340 | endlocal | 329 | endlocal |
341 | ) | 330 | ) |
342 | 331 | ||
343 | :: check whether provided dtb feature is legal | 332 | :: check whether provided dtb feature is legal |
344 | if not [%dtb_feature%] == [] ( | 333 | if not [%dtb_feature%] == [] ( |
345 | setlocal enabledelayedexpansion | 334 | setlocal enabledelayedexpansion |
346 | call :whether_in_array dtb_feature %soc_name%_dtb_feature | 335 | call :whether_in_array dtb_feature %soc_name%_dtb_feature |
347 | if !flag! neq 0 ( | 336 | if !flag! neq 0 ( |
348 | echo illegal parameter "%dtb_feature%" for "-d" option | 337 | echo illegal parameter "%dtb_feature%" for "-d" option |
349 | call :help & set /A error_level=1 && goto :exit | 338 | call :help & set /A error_level=1 && goto :exit |
350 | ) | 339 | ) |
351 | endlocal | 340 | endlocal |
352 | ) | 341 | ) |
353 | 342 | ||
354 | :: set sdp command name based on soc_name, now imx8q, imx8mp and imx8mn need to | 343 | :: set sdp command name based on soc_name, now imx8q, imx8mp and imx8mn need to |
355 | :: use SDPS. | 344 | :: use SDPS. |
356 | if not [%soc_name:imx8q=%] == [%soc_name%] goto :with_sdps | 345 | if not [%soc_name:imx8q=%] == [%soc_name%] goto :with_sdps |
357 | if [%soc_name%] == [imx8mn] goto :with_sdps | 346 | if [%soc_name%] == [imx8mn] goto :with_sdps |
358 | if [%soc_name%] == [imx8mp] goto :with_sdps | 347 | if [%soc_name%] == [imx8mp] goto :with_sdps |
359 | goto :without_sdps | 348 | goto :without_sdps |
360 | :with_sdps | 349 | :with_sdps |
361 | set sdp=SDPS | 350 | set sdp=SDPS |
362 | :without_sdps | 351 | :without_sdps |
363 | 352 | ||
364 | :: default bootloader image name | 353 | :: default bootloader image name |
365 | set bootloader_used_by_uuu=u-boot-imx8mq%uboot_feature%-uuu.imx | 354 | set bootloader_used_by_uuu=u-boot-%soc_name%-smarc_4g-uuu.imx |
366 | set bootloader_flashed_to_board=u-boot-imx8mq%uboot_feature%.imx | 355 | set bootloader_flashed_to_board=u-boot-%soc_name%%uboot_feature%.imx |
367 | 356 | ||
368 | 357 | ||
369 | :: find the names of the bootloader used by uuu | 358 | :: find the names of the bootloader used by uuu |
370 | if [%soc_name%] == [imx8mm] ( | 359 | if [%soc_name%] == [imx8mm] ( |
371 | if not [%uboot_feature_test:ddr4=%] == [%uboot_feature_test%] ( | 360 | if not [%uboot_feature_test:ddr4=%] == [%uboot_feature_test%] ( |
372 | set bootloader_used_by_uuu=u-boot-%soc_name%-ddr4-%board%-uuu.imx | 361 | set bootloader_used_by_uuu=u-boot-%soc_name%-ddr4-%board%-uuu.imx |
373 | ) else ( | 362 | ) else ( |
374 | if not [%uboot_feature_test:4g=%] == [%uboot_feature_test%] ( | 363 | if not [%uboot_feature_test:4g=%] == [%uboot_feature_test%] ( |
375 | set bootloader_used_by_uuu=u-boot-%soc_name%-4g-%board%-uuu.imx | 364 | set bootloader_used_by_uuu=u-boot-%soc_name%-4g-%board%-uuu.imx |
376 | ) | 365 | ) |
377 | ) | 366 | ) |
378 | ) | 367 | ) |
379 | 368 | ||
380 | if [%soc_name%] == [imx8mn] ( | 369 | if [%soc_name%] == [imx8mn] ( |
381 | if not [%uboot_feature_test:ddr4=%] == [%uboot_feature_test%] ( | 370 | if not [%uboot_feature_test:ddr4=%] == [%uboot_feature_test%] ( |
382 | set bootloader_used_by_uuu=u-boot-%soc_name%-ddr4-%board%-uuu.imx | 371 | set bootloader_used_by_uuu=u-boot-%soc_name%-ddr4-%board%-uuu.imx |
383 | ) | 372 | ) |
384 | ) | 373 | ) |
385 | 374 | ||
386 | if [%soc_name%] == [imx8qxp] ( | 375 | if [%soc_name%] == [imx8qxp] ( |
387 | if not [%uboot_feature_test:c0=%] == [%uboot_feature_test%] ( | 376 | if not [%uboot_feature_test:c0=%] == [%uboot_feature_test%] ( |
388 | set bootloader_used_by_uuu=u-boot-%soc_name%-%board%-c0-uuu.imx | 377 | set bootloader_used_by_uuu=u-boot-%soc_name%-%board%-c0-uuu.imx |
389 | ) | 378 | ) |
390 | ) | 379 | ) |
391 | 380 | ||
392 | ::--------------------------------------------------------------------------------- | 381 | ::--------------------------------------------------------------------------------- |
393 | :: Invoke function to flash android images | 382 | :: Invoke function to flash android images |
394 | ::--------------------------------------------------------------------------------- | 383 | ::--------------------------------------------------------------------------------- |
395 | call :uuu_load_uboot || set /A error_level=1 && goto :exit | 384 | call :uuu_load_uboot || set /A error_level=1 && goto :exit |
396 | 385 | ||
397 | call :flash_android || set /A error_level=1 && goto :exit | 386 | call :flash_android || set /A error_level=1 && goto :exit |
398 | 387 | ||
399 | :: flash yocto image along with mek_8qm auto xen images | 388 | :: flash yocto image along with mek_8qm auto xen images |
400 | if not [%yocto_image%] == [] ( | 389 | if not [%yocto_image%] == [] ( |
401 | if [%soc_name%] == [imx8qm] ( | 390 | if [%soc_name%] == [imx8qm] ( |
402 | if [%dtb_feature%] == [xen] ( | 391 | if [%dtb_feature%] == [xen] ( |
403 | setlocal enabledelayedexpansion | 392 | setlocal enabledelayedexpansion |
404 | set target_num=%sd_num% | 393 | set target_num=%sd_num% |
405 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst | 394 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst |
406 | echo FB: ucmd setenv mmcdev !target_num! >> uuu.lst | 395 | echo FB: ucmd setenv mmcdev !target_num! >> uuu.lst |
407 | echo FB: ucmd mmc dev !target_num! >> uuu.lst | 396 | echo FB: ucmd mmc dev !target_num! >> uuu.lst |
408 | :: flash the yocto image to "all" partition of SD card | 397 | :: flash the yocto image to "all" partition of SD card |
409 | echo generate lines to flash %yocto_image% to the partition of all | 398 | echo generate lines to flash %yocto_image% to the partition of all |
410 | if exist yocto_image_with_xen_support.link ( | 399 | if exist yocto_image_with_xen_support.link ( |
411 | del yocto_image_with_xen_support.link | 400 | del yocto_image_with_xen_support.link |
412 | ) | 401 | ) |
413 | cmd /c mklink yocto_image_with_xen_support.link %yocto_image% > nul | 402 | cmd /c mklink yocto_image_with_xen_support.link %yocto_image% > nul |
414 | echo FB[-t 600000]: flash -raw2sparse all yocto_image_with_xen_support.link >> uuu.lst | 403 | echo FB[-t 600000]: flash -raw2sparse all yocto_image_with_xen_support.link >> uuu.lst |
415 | :: replace uboot from yocto team with the one from android team | 404 | :: replace uboot from yocto team with the one from android team |
416 | echo generate lines to flash u-boot-imx8qm-xen-dom0.imx to the partition of bootloader0 on SD card | 405 | echo generate lines to flash u-boot-imx8qm-xen-dom0.imx to the partition of bootloader0 on SD card |
417 | if exist u-boot-imx8qm-xen-dom0.imx.link ( | 406 | if exist u-boot-imx8qm-xen-dom0.imx.link ( |
418 | del u-boot-imx8qm-xen-dom0.imx.link | 407 | del u-boot-imx8qm-xen-dom0.imx.link |
419 | ) | 408 | ) |
420 | cmd /c mklink u-boot-imx8qm-xen-dom0.imx.link %image_directory%u-boot-imx8qm-xen-dom0.imx > nul | 409 | cmd /c mklink u-boot-imx8qm-xen-dom0.imx.link %image_directory%u-boot-imx8qm-xen-dom0.imx > nul |
421 | echo FB: flash bootloader0 u-boot-imx8qm-xen-dom0.imx.link >> uuu.lst | 410 | echo FB: flash bootloader0 u-boot-imx8qm-xen-dom0.imx.link >> uuu.lst |
422 | :: write the xen spl from android team to FAT on SD card | 411 | :: write the xen spl from android team to FAT on SD card |
423 | set xen_uboot_name=spl-%soc_name%-%dtb_feature%.bin | 412 | set xen_uboot_name=spl-%soc_name%-smarc-%dtb_feature%.bin |
424 | for /f "usebackq" %%A in ('%image_directory%!xen_uboot_name!') do set xen_uboot_size_dec=%%~zA | 413 | for /f "usebackq" %%A in ('%image_directory%!xen_uboot_name!') do set xen_uboot_size_dec=%%~zA |
425 | :: directly pass the name of variable, just like pointer in C program | 414 | :: directly pass the name of variable, just like pointer in C program |
426 | call :dec_to_hex !xen_uboot_size_dec! xen_uboot_size_hex | 415 | call :dec_to_hex !xen_uboot_size_dec! xen_uboot_size_hex |
427 | echo generate lines to write spl-%soc_name%-%dtb_feature%.bin to FAT on SD card | 416 | echo generate lines to write spl-%soc_name%-smarc-%dtb_feature%.bin to FAT on SD card |
428 | if exist !xen_uboot_name!.link ( | 417 | if exist !xen_uboot_name!.link ( |
429 | del !xen_uboot_name!.link | 418 | del !xen_uboot_name!.link |
430 | ) | 419 | ) |
431 | cmd /c mklink !xen_uboot_name!.link %image_directory%!xen_uboot_name! > nul | 420 | cmd /c mklink !xen_uboot_name!.link %image_directory%!xen_uboot_name! > nul |
432 | echo FB: ucmd setenv fastboot_buffer %imx8qm_stage_base_addr% >> uuu.lst | 421 | echo FB: ucmd setenv fastboot_buffer %imx8qm_stage_base_addr% >> uuu.lst |
433 | echo FB: download -f !xen_uboot_name!.link >> uuu.lst | 422 | echo FB: download -f !xen_uboot_name!.link >> uuu.lst |
434 | echo FB: ucmd fatwrite mmc %sd_num% %imx8qm_stage_base_addr% !xen_uboot_name! 0x!xen_uboot_size_hex! >> uuu.lst | 423 | echo FB: ucmd fatwrite mmc %sd_num% %imx8qm_stage_base_addr% !xen_uboot_name! 0x!xen_uboot_size_hex! >> uuu.lst |
435 | 424 | ||
436 | set target_num=%emmc_num% | 425 | set target_num=%emmc_num% |
437 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst | 426 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst |
438 | echo FB: ucmd setenv mmcdev !target_num! >> uuu.lst | 427 | echo FB: ucmd setenv mmcdev !target_num! >> uuu.lst |
439 | echo FB: ucmd mmc dev !target_num! >> uuu.lst | 428 | echo FB: ucmd mmc dev !target_num! >> uuu.lst |
440 | endlocal | 429 | endlocal |
441 | ) | 430 | ) |
442 | ) else ( | 431 | ) else ( |
443 | echo -y option only applies for imx8qm xen images | 432 | echo -y option only applies for imx8qm xen images |
444 | call :help & exit set /A error_level=1 && goto :exit | 433 | call :help & exit set /A error_level=1 && goto :exit |
445 | ) | 434 | ) |
446 | ) | 435 | ) |
447 | 436 | ||
448 | echo FB[-t 600000]: erase misc>> uuu.lst | 437 | echo FB[-t 600000]: erase misc>> uuu.lst |
449 | 438 | ||
450 | :: make sure device is locked for boards don't use tee | 439 | :: make sure device is locked for boards don't use tee |
451 | echo FB[-t 600000]: erase presistdata>> uuu.lst | 440 | echo FB[-t 600000]: erase presistdata>> uuu.lst |
452 | echo FB[-t 600000]: erase fbmisc>> uuu.lst | 441 | echo FB[-t 600000]: erase fbmisc>> uuu.lst |
453 | echo FB[-t 600000]: erase metadata>> uuu.lst | 442 | echo FB[-t 600000]: erase metadata>> uuu.lst |
454 | 443 | ||
455 | if not [%slot%] == [] if %support_dualslot% == 1 ( | 444 | if not [%slot%] == [] if %support_dualslot% == 1 ( |
456 | echo FB: set_active %slot:~-1%>> uuu.lst | 445 | echo FB: set_active %slot:~-1%>> uuu.lst |
457 | ) | 446 | ) |
458 | 447 | ||
459 | if %erase% == 1 ( | 448 | if %erase% == 1 ( |
460 | if %support_recovery% == 1 ( | 449 | if %support_recovery% == 1 ( |
461 | echo FB[-t 600000]: erase cache>> uuu.lst | 450 | echo FB[-t 600000]: erase cache>> uuu.lst |
462 | ) | 451 | ) |
463 | echo FB[-t 600000]: erase userdata>> uuu.lst | 452 | echo FB[-t 600000]: erase userdata>> uuu.lst |
464 | ) | 453 | ) |
465 | 454 | ||
466 | echo FB: done >> uuu.lst | 455 | echo FB: done >> uuu.lst |
467 | 456 | ||
468 | if [%dryrun%] == [1] ( | 457 | if [%dryrun%] == [1] ( |
469 | goto :exit | 458 | goto :exit |
470 | ) | 459 | ) |
471 | 460 | ||
472 | echo uuu script generated, start to invoke uuu with the generated uuu script | 461 | echo uuu script generated, start to invoke uuu with the generated uuu script |
473 | 462 | ||
474 | if %daemon_mode% equ 1 ( | 463 | if %daemon_mode% equ 1 ( |
475 | uuu -d uuu.lst | 464 | uuu -d uuu.lst |
476 | ) else ( | 465 | ) else ( |
477 | uuu uuu.lst | 466 | uuu uuu.lst |
478 | ) | 467 | ) |
479 | 468 | ||
480 | 469 | ||
481 | ::--------------------------------------------------------------------------------- | 470 | ::--------------------------------------------------------------------------------- |
482 | :: The execution will end. | 471 | :: The execution will end. |
483 | ::--------------------------------------------------------------------------------- | 472 | ::--------------------------------------------------------------------------------- |
484 | goto :eof | 473 | goto :eof |
485 | 474 | ||
486 | 475 | ||
487 | ::---------------------------------------------------------------------------------- | 476 | ::---------------------------------------------------------------------------------- |
488 | :: Function definition | 477 | :: Function definition |
489 | ::---------------------------------------------------------------------------------- | 478 | ::---------------------------------------------------------------------------------- |
490 | 479 | ||
491 | :help | 480 | :help |
492 | echo. | 481 | echo. |
493 | echo Version: 1.7 | 482 | echo Version: 1.7 |
494 | echo Last change: generate super.img when flash images with dynamic partition feature | 483 | echo Last change: generate super.img when flash images with dynamic partition feature |
495 | echo currently suported platforms: evk_7ulp, evk_8mm, evk_8mq, evk_8mn, evk_8mp, aiy_8mq, mek_8q, mek_8q_car | 484 | echo currently suported platforms: evk_7ulp, evk_8mm, evk_8mq, evk_8mn, evk_8mp, aiy_8mq, mek_8q, mek_8q_car |
496 | echo. | 485 | echo. |
497 | echo eg: uuu_imx_android_flash.bat -f imx8qm -a -e -D C:\Users\user_01\images\android10\mek_8q\ -t emmc -u trusty -d mipi-panel | 486 | echo eg: uuu_imx_android_flash.bat -f imx8qm -a -e -D C:\Users\user_01\images\android10\mek_8q\ -t emmc -u trusty -d mipi-panel |
498 | echo. | 487 | echo. |
499 | echo Usage: %script_name% ^<option^> | 488 | echo Usage: %script_name% ^<option^> |
500 | echo. | 489 | echo. |
501 | echo options: | 490 | echo options: |
502 | echo -h displays this help message | 491 | echo -h displays this help message |
503 | echo -f soc_name flash android image file with soc_name | 492 | echo -f soc_name flash android image file with soc_name |
504 | echo -a only flash image to slot_a | 493 | echo -a only flash image to slot_a |
505 | echo -b only flash image to slot_b | 494 | echo -b only flash image to slot_b |
506 | echo -c card_size optional setting: 14 / 28 | 495 | echo -c card_size optional setting: 14 / 28 |
507 | echo If not set, use partition-table.img/partition-table-dual.img (default) | 496 | echo If not set, use partition-table.img/partition-table-dual.img (default) |
508 | echo If set to 14, use partition-table-14GB.img for 16GB SD card | 497 | echo If set to 14, use partition-table-14GB.img for 16GB SD card |
509 | echo If set to 28, use partition-table-28GB.img/partition-table-28GB-dual.img for 32GB SD card | 498 | echo If set to 28, use partition-table-28GB.img/partition-table-28GB-dual.img for 32GB SD card |
510 | echo Make sure the corresponding file exist for your platform | 499 | echo Make sure the corresponding file exist for your platform |
511 | echo -m flash mcu image | 500 | echo -m flash mcu image |
512 | echo -u uboot_feature flash uboot or spl&bootloader image with "uboot_feature" in their names | 501 | echo -u uboot_feature flash uboot or spl&bootloader image with "uboot_feature" in their names |
513 | echo For Standard Android: | 502 | echo For Standard Android: |
514 | echo If the parameter after "-u" option contains the string of "dual", then spl&bootloader image will be flashed, | 503 | echo If the parameter after "-u" option contains the string of "dual", then spl&bootloader image will be flashed, |
515 | echo otherwise uboot image will be flashed | 504 | echo otherwise uboot image will be flashed |
516 | echo For Android Automative: | 505 | echo For Android Automative: |
517 | echo only dual bootloader feature is supported, by default spl&bootloader image will be flashed | 506 | echo only dual bootloader feature is supported, by default spl&bootloader image will be flashed |
518 | echo Below table lists the legal value supported now based on the soc_name provided: | 507 | echo Below table lists the legal value supported now based on the soc_name provided: |
519 | echo ๅบๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆฟๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅบ | 508 | echo ๅบๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆฟๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅบ |
520 | echo ๅฒซ soc_name ๅฒซ legal parameter after "-u" ๅฒซ | 509 | echo ๅฒซ soc_name ๅฒซ legal parameter after "-u" ๅฒซ |
521 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 510 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
522 | echo ๅฒซ imx8mm ๅฒซ dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty ๅฒซ | 511 | echo ๅฒซ imx8mm ๅฒซ dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty ๅฒซ |
523 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 512 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
524 | echo ๅฒซ imx8mn ๅฒซ dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 ๅฒซ | 513 | echo ๅฒซ imx8mn ๅฒซ dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 ๅฒซ |
525 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 514 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
526 | echo ๅฒซ imx8mp ๅฒซ dual trusty-dual evk-uuu trusty-secure-unlock trusty ๅฒซ | 515 | echo ๅฒซ imx8mp ๅฒซ dual trusty-dual evk-uuu trusty-secure-unlock trusty ๅฒซ |
527 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 516 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
528 | echo ๅฒซ imx8mq ๅฒซ dual trusty-dual evk-uuu trusty-secure-unlock ๅฒซ | 517 | echo ๅฒซ imx8mq ๅฒซ smarc_2g trusty-smarc_2g trusty-dual-smarc_2g trusty-secure-unlock-smarc_2g smarc_4g trusty-smarc_4g trusty-dual-smarc_4g trusty-secure-unlock-smarc_4g ๅฒซ |
529 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 518 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
530 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 519 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
531 | echo ๅฒซ smarcimx8mq ๅฒซ smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_2g-uuu smarc_2g-trusty-secure-unlock ๅฒซ | 520 | echo ๅฒซ smarcimx8mq ๅฒซ smarc_4g-uuu smarc_4g-dual smarc_4g-trusty smarc_4g-trusty-dualsmarc_4g-trusty-secure-unlock smarc_2g-uuu smarc_2g-dual smarc_2g-trusty-secure-unlock smarc_2g-trusty smarc_2g-trusty-dual ๅฒซ |
532 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 521 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
533 | echo ๅฒซ imx8qxp ๅฒซ mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu ๅฒซ | 522 | echo ๅฒซ imx8qxp ๅฒซ mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu ๅฒซ |
534 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 523 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
535 | echo ๅฒซ imx8qm ๅฒซ mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi ๅฒซ | 524 | echo ๅฒซ imx8qm ๅฒซ mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi ๅฒซ |
536 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 525 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
537 | echo ๅฒซ imx7ulp ๅฒซ evk-uuu ๅฒซ | 526 | echo ๅฒซ imx7ulp ๅฒซ evk-uuu ๅฒซ |
538 | echo ๅผฉๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฝผ | 527 | echo ๅผฉๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฝผ |
539 | echo | 528 | echo |
540 | echo -d dtbo_feature flash dtbo, vbmeta and recovery image file with "dtb_feature" in their names | 529 | echo -d dtbo_feature flash dtbo, vbmeta and recovery image file with "dtb_feature" in their names |
541 | echo If not set, default dtbo, vbmeta and recovery image will be flashed | 530 | echo If not set, default dtbo, vbmeta and recovery image will be flashed |
542 | echo Below table lists the legal value supported now based on the soc_name provided: | 531 | echo Below table lists the legal value supported now based on the soc_name provided: |
543 | echo ๅบๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆฟๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅบ | 532 | echo ๅบๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆฟๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅบ |
544 | echo ๅฒซ soc_name ๅฒซ legal parameter after "-d" ๅฒซ | 533 | echo ๅฒซ soc_name ๅฒซ legal parameter after "-d" ๅฒซ |
545 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 534 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
546 | echo ๅฒซ imx8mm ๅฒซ ddr4 m4 mipi-panel ๅฒซ | 535 | echo ๅฒซ imx8mm ๅฒซ ddr4 m4 mipi-panel ๅฒซ |
547 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 536 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
548 | echo ๅฒซ imx8mn ๅฒซ mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg ๅฒซ | 537 | echo ๅฒซ imx8mn ๅฒซ mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg ๅฒซ |
549 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 538 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
550 | echo ๅฒซ imx8mp ๅฒซ rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 ๅฒซ | 539 | echo ๅฒซ imx8mp ๅฒซ rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 ๅฒซ |
551 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 540 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
552 | echo ๅฒซ imx8mq ๅฒซ dual mipi-panel mipi ๅฒซ | 541 | echo ๅฒซ imx8mq ๅฒซ dual mipi-panel mipi ๅฒซ |
553 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 542 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
554 | echo ๅฒซ smarcimx8mq ๅฒซ hdmi dp dcss-lvds lcdif-lvds dual-display ๅฒซ | 543 | echo ๅฒซ smarcimx8mq ๅฒซ hdmi dp dcss-lvds lcdif-lvds dual-display ๅฒซ |
555 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 544 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
556 | echo ๅฒซ imx8qxp ๅฒซ ๅฒซ | 545 | echo ๅฒซ imx8qxp ๅฒซ ๅฒซ |
557 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 546 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
558 | echo ๅฒซ imx8qm ๅฒซ hdmi mipi-panel md xen ๅฒซ | 547 | echo ๅฒซ imx8qm ๅฒซ hdmi mipi-panel md xen ๅฒซ |
559 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ | 548 | echo ๅฟตๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆ |
560 | echo ๅฒซ imx7ulp ๅฒซ evk-mipi evk mipi ๅฒซ | 549 | echo ๅฒซ imx7ulp ๅฒซ evk-mipi evk mipi ๅฒซ |
561 | echo ๅผฉๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฝผ | 550 | echo ๅผฉๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๆๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฒธๅฝผ |
562 | echo | 551 | echo |
563 | echo -e erase user data after all image files being flashed | 552 | echo -e erase user data after all image files being flashed |
564 | echo -D directory the directory of of images | 553 | echo -D directory the directory of of images |
565 | echo No need to use this option if images are in current working directory | 554 | echo No need to use this option if images are in current working directory |
566 | echo -t target_dev emmc or sd, emmc is default target_dev, make sure target device exist | 555 | echo -t target_dev emmc or sd, emmc is default target_dev, make sure target device exist |
567 | echo -p board specify board for imx6dl, imx6q, imx6qp and imx8mq, since more than one platform we maintain Android on use these chips | 556 | echo -p board specify board for imx6dl, imx6q, imx6qp and imx8mq, since more than one platform we maintain Android on use these chips |
568 | echo For imx6dl, imx6q, imx6qp, this is mandatory, it can be followed with sabresd or sabreauto | 557 | echo For imx6dl, imx6q, imx6qp, this is mandatory, it can be followed with sabresd or sabreauto |
569 | echo For imx8mq, this option is only used internally. No need for other users to use this option | 558 | echo For imx8mq, this option is only used internally. No need for other users to use this option |
570 | echo For other chips, this option doesn't work | 559 | echo For other chips, this option doesn't work |
571 | echo -y yocto_image flash yocto image together with imx8qm auto xen images. The parameter follows "-y" option should be a full path name | 560 | echo -y yocto_image flash yocto image together with imx8qm auto xen images. The parameter follows "-y" option should be a full path name |
572 | echo including the name of yocto sdcard image, this parameter could be a relative path or an absolute path | 561 | echo including the name of yocto sdcard image, this parameter could be a relative path or an absolute path |
573 | echo -i with this option used, after uboot for uuu loaded and executed to fastboot mode with target device chosen, this script will stop | 562 | echo -i with this option used, after uboot for uuu loaded and executed to fastboot mode with target device chosen, this script will stop |
574 | echo This option is for users to manually flash the images to partitions they want to | 563 | echo This option is for users to manually flash the images to partitions they want to |
575 | echo -daemon after uuu script generated, uuu will be invoked with daemon mode. It is used for flash multi boards | 564 | echo -daemon after uuu script generated, uuu will be invoked with daemon mode. It is used for flash multi boards |
576 | echo -dryrun only generate the uuu script under /tmp direcbory but not flash images | 565 | echo -dryrun only generate the uuu script under /tmp direcbory but not flash images |
577 | echo -super do not generate super.img when flash the images with dynamic partition feature enabled. | 566 | echo -super do not generate super.img when flash the images with dynamic partition feature enabled. |
578 | echo Under the condition that dynamic partition feature are enabled: | 567 | echo Under the condition that dynamic partition feature are enabled: |
579 | echo if this option is not used, super.img will be generated under current working directory and flashed to the board. | 568 | echo if this option is not used, super.img will be generated under current working directory and flashed to the board. |
580 | echo if this option is used, make sure super.img already exists together with other images. | 569 | echo if this option is used, make sure super.img already exists together with other images. |
581 | goto :eof | 570 | goto :eof |
582 | 571 | ||
583 | 572 | ||
584 | :: this function checks whether the value of first parameter is in the array value of second parameter. | 573 | :: this function checks whether the value of first parameter is in the array value of second parameter. |
585 | :: pass the name of the (array)variable to this function. the first is potential element, the second one is array, | 574 | :: pass the name of the (array)variable to this function. the first is potential element, the second one is array, |
586 | :: a global flag is used to store the result. make sure the first parameter is not empty | 575 | :: a global flag is used to store the result. make sure the first parameter is not empty |
587 | :whether_in_array | 576 | :whether_in_array |
588 | for /F "tokens=*" %%F in ('echo %%%1%%') do ( | 577 | for /F "tokens=*" %%F in ('echo %%%1%%') do ( |
589 | set potential_element=%%F | 578 | set potential_element=%%F |
590 | ) | 579 | ) |
591 | 580 | ||
592 | for /F "tokens=*" %%F in ('echo %%%2%%') do ( | 581 | for /F "tokens=*" %%F in ('echo %%%2%%') do ( |
593 | set array_passed_in=%%F | 582 | set array_passed_in=%%F |
594 | ) | 583 | ) |
595 | 584 | ||
596 | (for %%a in (%array_passed_in%) do ( | 585 | (for %%a in (%array_passed_in%) do ( |
597 | if %%a == %potential_element% ( | 586 | if %%a == %potential_element% ( |
598 | set /A flag=0 | 587 | set /A flag=0 |
599 | goto :eof | 588 | goto :eof |
600 | ) | 589 | ) |
601 | )) | 590 | )) |
602 | set /A flag=1 | 591 | set /A flag=1 |
603 | goto :eof | 592 | goto :eof |
604 | 593 | ||
605 | 594 | ||
606 | :target_dev_not_support | 595 | :target_dev_not_support |
607 | echo %soc_name%-%board% does not support %target_dev% as target device | 596 | echo %soc_name%-%board% does not support %target_dev% as target device |
608 | echo change target device automatically | 597 | echo change target device automatically |
609 | set target_dev=sd | 598 | set target_dev=sd |
610 | goto :eof | 599 | goto :eof |
611 | 600 | ||
612 | 601 | ||
613 | :: test whether board info is specified for imx6dl, imx6q and imx6qp | 602 | :: test whether board info is specified for imx6dl, imx6q and imx6qp |
614 | :board_info_test | 603 | :board_info_test |
615 | if [%board%] == [] ( | 604 | if [%board%] == [] ( |
616 | if [%dtb_feature%] == [ldo] ( | 605 | if [%dtb_feature%] == [ldo] ( |
617 | set board=sabresd | 606 | set board=sabresd |
618 | ) else ( | 607 | ) else ( |
619 | echo board info need to be specified for %soc_name% with -p option, it can be sabresd or sabreauto | 608 | echo board info need to be specified for %soc_name% with -p option, it can be sabresd or sabreauto |
620 | call :help & set /A error_level=1 && goto :exit | 609 | call :help & set /A error_level=1 && goto :exit |
621 | ) | 610 | ) |
622 | ) | 611 | ) |
623 | goto :eof | 612 | goto :eof |
624 | 613 | ||
625 | :uuu_load_uboot | 614 | :uuu_load_uboot |
626 | echo uuu_version 1.3.74 > uuu.lst | 615 | echo uuu_version 1.3.74 > uuu.lst |
627 | 616 | ||
628 | if exist %bootloader_used_by_uuu%.link ( | 617 | if exist %bootloader_used_by_uuu%.link ( |
629 | del %bootloader_used_by_uuu%.link | 618 | del %bootloader_used_by_uuu%.link |
630 | ) | 619 | ) |
631 | echo %sdp%: boot -f %bootloader_used_by_uuu% >> uuu.lst | 620 | echo %sdp%: boot -f %bootloader_used_by_uuu% >> uuu.lst |
632 | 621 | ||
633 | 622 | ||
634 | :: for uboot by uuu which enabled SPL | 623 | :: for uboot by uuu which enabled SPL |
635 | if not [%soc_name:imx8m=%] == [%soc_name%] ( | 624 | if not [%soc_name:imx8m=%] == [%soc_name%] ( |
636 | :: for images need SDPU | 625 | :: for images need SDPU |
637 | echo SDPU: delay 1000 >> uuu.lst | 626 | echo SDPU: delay 1000 >> uuu.lst |
638 | echo SDPU: write -f %bootloader_used_by_uuu% -offset 0x57c00 >> uuu.lst | 627 | echo SDPU: write -f %bootloader_used_by_uuu% -offset 0x57c00 >> uuu.lst |
639 | echo SDPU: jump >> uuu.lst | 628 | echo SDPU: jump >> uuu.lst |
640 | :: for images need SDPV | 629 | :: for images need SDPV |
641 | echo SDPV: delay 1000 >> uuu.lst | 630 | echo SDPV: delay 1000 >> uuu.lst |
642 | echo SDPV: write -f %bootloader_used_by_uuu% -skipspl >> uuu.lst | 631 | echo SDPV: write -f %bootloader_used_by_uuu% -skipspl >> uuu.lst |
643 | echo SDPV: jump >> uuu.lst | 632 | echo SDPV: jump >> uuu.lst |
644 | ) | 633 | ) |
645 | 634 | ||
646 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst | 635 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst |
647 | echo FB: ucmd setenv mmcdev %target_num% >> uuu.lst | 636 | echo FB: ucmd setenv mmcdev %target_num% >> uuu.lst |
648 | echo FB: ucmd mmc dev %target_num% >> uuu.lst | 637 | echo FB: ucmd mmc dev %target_num% >> uuu.lst |
649 | 638 | ||
650 | :: erase environment variables of uboot | 639 | :: erase environment variables of uboot |
651 | if [%target_dev%] == [emmc] ( | 640 | if [%target_dev%] == [emmc] ( |
652 | echo FB: ucmd mmc dev %target_num% 0 >> uuu.lst | 641 | echo FB: ucmd mmc dev %target_num% 0 >> uuu.lst |
653 | ) | 642 | ) |
654 | echo FB: ucmd mmc erase %uboot_env_start% %uboot_env_len% >> uuu.lst | 643 | echo FB: ucmd mmc erase %uboot_env_start% %uboot_env_len% >> uuu.lst |
655 | if [%target_dev%] == [emmc] ( | 644 | if [%target_dev%] == [emmc] ( |
656 | echo FB: ucmd mmc partconf %target_num% 1 1 1 >> uuu.lst | 645 | echo FB: ucmd mmc partconf %target_num% 1 1 1 >> uuu.lst |
657 | ) | 646 | ) |
658 | 647 | ||
659 | if %intervene% == 1 ( | 648 | if %intervene% == 1 ( |
660 | :: in fact, it's not an error, but to align the behaviour of cmd and powershell, a non-zero error value is used. | 649 | :: in fact, it's not an error, but to align the behaviour of cmd and powershell, a non-zero error value is used. |
661 | echo FB: done >> uuu.lst | 650 | echo FB: done >> uuu.lst |
662 | uuu uuu.lst | 651 | uuu uuu.lst |
663 | set /A error_level=1 && goto :exit | 652 | set /A error_level=1 && goto :exit |
664 | ) | 653 | ) |
665 | 654 | ||
666 | goto :eof | 655 | goto :eof |
667 | 656 | ||
668 | :flash_partition | 657 | :flash_partition |
669 | set partition_to_be_flashed=%1 | 658 | set partition_to_be_flashed=%1 |
670 | :: if there is slot information, delete it. | 659 | :: if there is slot information, delete it. |
671 | set local_str=%1 | 660 | set local_str=%1 |
672 | set local_str=%local_str:_a=% | 661 | set local_str=%local_str:_a=% |
673 | set local_str=%local_str:_b=% | 662 | set local_str=%local_str:_b=% |
674 | 663 | ||
675 | set img_name=%local_str%-%soc_name%.img | 664 | set img_name=%local_str%-%soc_name%-smarc.img |
676 | 665 | ||
677 | if not [%partition_to_be_flashed:bootloader_=%] == [%partition_to_be_flashed%] ( | 666 | if not [%partition_to_be_flashed:bootloader_=%] == [%partition_to_be_flashed%] ( |
678 | set img_name=%uboot_proper_to_be_flashed% | 667 | set img_name=%uboot_proper_to_be_flashed% |
679 | goto :start_to_flash | 668 | goto :start_to_flash |
680 | ) | 669 | ) |
681 | 670 | ||
682 | if not [%partition_to_be_flashed:system=%] == [%partition_to_be_flashed%] ( | 671 | if not [%partition_to_be_flashed:system=%] == [%partition_to_be_flashed%] ( |
683 | set img_name=%systemimage_file% | 672 | set img_name=%systemimage_file% |
684 | goto :start_to_flash | 673 | goto :start_to_flash |
685 | ) | 674 | ) |
686 | if not [%partition_to_be_flashed:vendor=%] == [%partition_to_be_flashed%] ( | 675 | if not [%partition_to_be_flashed:vendor=%] == [%partition_to_be_flashed%] ( |
687 | set img_name=%vendor_file% | 676 | set img_name=%vendor_file% |
688 | goto :start_to_flash | 677 | goto :start_to_flash |
689 | ) | 678 | ) |
690 | if not [%partition_to_be_flashed:product=%] == [%partition_to_be_flashed%] ( | 679 | if not [%partition_to_be_flashed:product=%] == [%partition_to_be_flashed%] ( |
691 | set img_name=%product_file% | 680 | set img_name=%product_file% |
692 | goto :start_to_flash | 681 | goto :start_to_flash |
693 | ) | 682 | ) |
694 | if not [%partition_to_be_flashed:mcu_os=%] == [%partition_to_be_flashed%] ( | 683 | if not [%partition_to_be_flashed:mcu_os=%] == [%partition_to_be_flashed%] ( |
695 | set img_name=%soc_name%_mcu_demo.img | 684 | set img_name=%soc_name%_mcu_demo.img |
696 | goto :start_to_flash | 685 | goto :start_to_flash |
697 | ) | 686 | ) |
698 | if not [%partition_to_be_flashed:vbmeta=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( | 687 | if not [%partition_to_be_flashed:vbmeta=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( |
699 | set img_name=%local_str%-%soc_name%-%dtb_feature%.img | 688 | set img_name=%local_str%-%soc_name%-smarc-%dtb_feature%.img |
700 | goto :start_to_flash | 689 | goto :start_to_flash |
701 | ) | 690 | ) |
702 | if not [%partition_to_be_flashed:dtbo=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( | 691 | if not [%partition_to_be_flashed:dtbo=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( |
703 | set img_name=%local_str%-%soc_name%-%dtb_feature%.img | 692 | set img_name=%local_str%-%soc_name%-smarc-%dtb_feature%.img |
704 | goto :start_to_flash | 693 | goto :start_to_flash |
705 | ) | 694 | ) |
706 | if not [%partition_to_be_flashed:recovery=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( | 695 | if not [%partition_to_be_flashed:recovery=%] == [%partition_to_be_flashed%] if not [%dtb_feature%] == [] ( |
707 | set img_name=%local_str%-%soc_name%-%dtb_feature%.img | 696 | set img_name=%local_str%-%soc_name%-smarc-%dtb_feature%.img |
708 | goto :start_to_flash | 697 | goto :start_to_flash |
709 | ) | 698 | ) |
710 | if not [%partition_to_be_flashed:bootloader=%] == [%partition_to_be_flashed%] ( | 699 | if not [%partition_to_be_flashed:bootloader=%] == [%partition_to_be_flashed%] ( |
711 | set img_name=%bootloader_flashed_to_board% | 700 | set img_name=%bootloader_flashed_to_board% |
712 | goto :start_to_flash | 701 | goto :start_to_flash |
713 | ) | 702 | ) |
714 | if not [%partition_to_be_flashed:super=%] == [%partition_to_be_flashed%] ( | 703 | if not [%partition_to_be_flashed:super=%] == [%partition_to_be_flashed%] ( |
715 | if %dont_generate_super% == 0 ( | 704 | if %dont_generate_super% == 0 ( |
716 | call :make_super_image | 705 | call :make_super_image |
717 | ) | 706 | ) |
718 | set img_name=%super_file% | 707 | set img_name=%super_file% |
719 | goto :start_to_flash | 708 | goto :start_to_flash |
720 | ) | 709 | ) |
721 | 710 | ||
722 | 711 | ||
723 | if %support_dtbo% == 1 ( | 712 | if %support_dtbo% == 1 ( |
724 | if not [%partition_to_be_flashed:boot=%] == [%partition_to_be_flashed%] ( | 713 | if not [%partition_to_be_flashed:boot=%] == [%partition_to_be_flashed%] ( |
725 | set img_name=%bootimage% | 714 | set img_name=%bootimage% |
726 | goto :start_to_flash | 715 | goto :start_to_flash |
727 | ) | 716 | ) |
728 | ) | 717 | ) |
729 | 718 | ||
730 | if not [%partition_to_be_flashed:gpt=%] == [%partition_to_be_flashed%] ( | 719 | if not [%partition_to_be_flashed:gpt=%] == [%partition_to_be_flashed%] ( |
731 | set img_name=%partition_file% | 720 | set img_name=%partition_file% |
732 | goto :start_to_flash | 721 | goto :start_to_flash |
733 | ) | 722 | ) |
734 | 723 | ||
735 | :start_to_flash | 724 | :start_to_flash |
736 | echo generate lines to flash %img_name% to the partition of %1 | 725 | echo generate lines to flash %img_name% to the partition of %1 |
737 | if [%img_name%] == [%super_file%] ( | 726 | if [%img_name%] == [%super_file%] ( |
738 | if %dont_generate_super% == 0 ( | 727 | if %dont_generate_super% == 0 ( |
739 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst | 728 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst |
740 | ) else ( | 729 | ) else ( |
741 | if exist %img_name% ( | 730 | if exist %img_name% ( |
742 | del %img_name% | 731 | del %img_name% |
743 | ) | 732 | ) |
744 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst | 733 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst |
745 | ) | 734 | ) |
746 | ) else ( | 735 | ) else ( |
747 | if exist %img_name%.link ( | 736 | if exist %img_name%.link ( |
748 | del %img_name%.link | 737 | del %img_name%.link |
749 | ) | 738 | ) |
750 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst | 739 | echo FB[-t 600000]: flash %1 %img_name% >> uuu.lst |
751 | ) | 740 | ) |
752 | goto :eof | 741 | goto :eof |
753 | 742 | ||
754 | 743 | ||
755 | :flash_userpartitions | 744 | :flash_userpartitions |
756 | if %support_dual_bootloader% == 1 call :flash_partition %dual_bootloader_partition% || set /A error_level=1 && goto :exit | 745 | if %support_dual_bootloader% == 1 call :flash_partition %dual_bootloader_partition% || set /A error_level=1 && goto :exit |
757 | if %support_dtbo% == 1 call :flash_partition %dtbo_partition% || set /A error_level=1 && goto :exit | 746 | if %support_dtbo% == 1 call :flash_partition %dtbo_partition% || set /A error_level=1 && goto :exit |
758 | if %support_recovery% == 1 call :flash_partition %recovery_partition% || set /A error_level=1 && goto :exit | 747 | if %support_recovery% == 1 call :flash_partition %recovery_partition% || set /A error_level=1 && goto :exit |
759 | call :flash_partition %boot_partition% || set /A error_level=1 && goto :exit | 748 | call :flash_partition %boot_partition% || set /A error_level=1 && goto :exit |
760 | if %support_dynamic_partition% == 0 ( | 749 | if %support_dynamic_partition% == 0 ( |
761 | call :flash_partition %system_partition% || set /A error_level=1 && goto :exit | 750 | call :flash_partition %system_partition% || set /A error_level=1 && goto :exit |
762 | call :flash_partition %vendor_partition% || set /A error_level=1 && goto :exit | 751 | call :flash_partition %vendor_partition% || set /A error_level=1 && goto :exit |
763 | call :flash_partition %product_partition% || set /A error_level=1 && goto :exit | 752 | call :flash_partition %product_partition% || set /A error_level=1 && goto :exit |
764 | ) | 753 | ) |
765 | call :flash_partition %vbmeta_partition% || set /A error_level=1 && goto :exit | 754 | call :flash_partition %vbmeta_partition% || set /A error_level=1 && goto :exit |
766 | goto :eof | 755 | goto :eof |
767 | 756 | ||
768 | 757 | ||
769 | :flash_partition_name | 758 | :flash_partition_name |
770 | set boot_partition=boot%1 | 759 | set boot_partition=boot%1 |
771 | set recovery_partition=recovery%1 | 760 | set recovery_partition=recovery%1 |
772 | set system_partition=system%1 | 761 | set system_partition=system%1 |
773 | set vendor_partition=vendor%1 | 762 | set vendor_partition=vendor%1 |
774 | set product_partition=product%1 | 763 | set product_partition=product%1 |
775 | set vbmeta_partition=vbmeta%1 | 764 | set vbmeta_partition=vbmeta%1 |
776 | set dtbo_partition=dtbo%1 | 765 | set dtbo_partition=dtbo%1 |
777 | if %support_dual_bootloader% == 1 set dual_bootloader_partition=bootloader%1 | 766 | if %support_dual_bootloader% == 1 set dual_bootloader_partition=bootloader%1 |
778 | goto :eof | 767 | goto :eof |
779 | 768 | ||
780 | :flash_android | 769 | :flash_android |
781 | 770 | ||
782 | :: if dual bootloader is supported, the name of the bootloader flashed to the board need to be updated | 771 | :: if dual bootloader is supported, the name of the bootloader flashed to the board need to be updated |
783 | if %support_dual_bootloader% == 1 ( | 772 | if %support_dual_bootloader% == 1 ( |
784 | set bootloader_flashed_to_board=spl-imx8mq%uboot_feature%.bin | 773 | set bootloader_flashed_to_board=spl-%soc_name%%uboot_feature%.bin |
785 | set uboot_proper_to_be_flashed=bootloader-imx8mq%uboot_feature%.img | 774 | set uboot_proper_to_be_flashed=bootloader-%soc_name%%uboot_feature%.img |
786 | :: # specially handle xen related condition | 775 | :: # specially handle xen related condition |
787 | if [%dtb_feature%] == [xen] ( | 776 | if [%dtb_feature%] == [xen] ( |
788 | if [%soc_name%] == [imx8qm] ( | 777 | if [%soc_name%] == [imx8qm] ( |
789 | set uboot_proper_to_be_flashed=bootloader-%soc_name%-%dtb_feature%.img | 778 | set uboot_proper_to_be_flashed=bootloader-%soc_name%-smarc-%dtb_feature%.img |
790 | ) | 779 | ) |
791 | ) | 780 | ) |
792 | ) | 781 | ) |
793 | 782 | ||
794 | :: for xen mode, no need to flash spl | 783 | :: for xen mode, no need to flash spl |
795 | if not [%dtb_feature%] == [xen] ( | 784 | if not [%dtb_feature%] == [xen] ( |
796 | if [%support_dualslot%] == [1] ( | 785 | if [%support_dualslot%] == [1] ( |
797 | call :flash_partition bootloader0 || set /A error_level=1 && goto :exit | 786 | call :flash_partition bootloader0 || set /A error_level=1 && goto :exit |
798 | ) else ( | 787 | ) else ( |
799 | call :flash_partition bootloader || set /A error_level=1 && goto :exit | 788 | call :flash_partition bootloader || set /A error_level=1 && goto :exit |
800 | ) | 789 | ) |
801 | ) | 790 | ) |
802 | 791 | ||
803 | call :flash_partition gpt || set /A error_level=1 && goto :exit | 792 | call :flash_partition gpt || set /A error_level=1 && goto :exit |
804 | :: force to load the gpt just flashed, since for imx6 and imx7, we use uboot from BSP team, | 793 | :: force to load the gpt just flashed, since for imx6 and imx7, we use uboot from BSP team, |
805 | :: so partition table is not automatically loaded after gpt partition is flashed. | 794 | :: so partition table is not automatically loaded after gpt partition is flashed. |
806 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst | 795 | echo FB: ucmd setenv fastboot_dev mmc >> uuu.lst |
807 | 796 | ||
808 | if %support_dualslot% == 0 ( | 797 | if %support_dualslot% == 0 ( |
809 | if not [%slot%] == [] ( | 798 | if not [%slot%] == [] ( |
810 | echo ab slot feature not supported, the slot you specified will be ignored | 799 | echo ab slot feature not supported, the slot you specified will be ignored |
811 | set slot= | 800 | set slot= |
812 | ) | 801 | ) |
813 | ) | 802 | ) |
814 | 803 | ||
815 | ::since imx7ulp use uboot for uuu from BSP team, there is no hardcoded mcu_os partition. If m4 need to be flashed, flash it here. | 804 | ::since imx7ulp use uboot for uuu from BSP team, there is no hardcoded mcu_os partition. If m4 need to be flashed, flash it here. |
816 | if [%soc_name%] == [imx7ulp] ( | 805 | if [%soc_name%] == [imx7ulp] ( |
817 | if [%flash_m4%] == [1] ( | 806 | if [%flash_m4%] == [1] ( |
818 | :: download m4 image to sdram | 807 | :: download m4 image to sdram |
819 | if exist %soc_name%_m4_demo.img.link ( | 808 | if exist %soc_name%_m4_demo.img.link ( |
820 | del %soc_name%_m4_demo.img.link | 809 | del %soc_name%_m4_demo.img.link |
821 | ) | 810 | ) |
822 | cmd /c mklink %soc_name%_m4_demo.img.link %image_directory%%soc_name%_m4_demo.img > nul | 811 | cmd /c mklink %soc_name%_m4_demo.img.link %image_directory%%soc_name%_m4_demo.img > nul |
823 | echo generate lines to flash %soc_name%_m4_demo.img to the partition of m4_os | 812 | echo generate lines to flash %soc_name%_m4_demo.img to the partition of m4_os |
824 | echo FB: ucmd setenv fastboot_buffer %imx7ulp_stage_base_addr% >> uuu.lst | 813 | echo FB: ucmd setenv fastboot_buffer %imx7ulp_stage_base_addr% >> uuu.lst |
825 | echo FB: download -f %soc_name%_m4_demo.img.link >> uuu.lst | 814 | echo FB: download -f %soc_name%_m4_demo.img.link >> uuu.lst |
826 | echo FB: ucmd sf probe >> uuu.lst | 815 | echo FB: ucmd sf probe >> uuu.lst |
827 | echo FB[-t 30000]: ucmd sf erase %imx7ulp_evk_m4_sf_start_byte% %imx7ulp_evk_m4_sf_length_byte% >> uuu.lst | 816 | echo FB[-t 30000]: ucmd sf erase %imx7ulp_evk_m4_sf_start_byte% %imx7ulp_evk_m4_sf_length_byte% >> uuu.lst |
828 | echo FB[-t 30000]: ucmd sf write %imx7ulp_stage_base_addr% %imx7ulp_evk_m4_sf_start_byte% %imx7ulp_evk_m4_sf_length_byte% >> uuu.lst | 817 | echo FB[-t 30000]: ucmd sf write %imx7ulp_stage_base_addr% %imx7ulp_evk_m4_sf_start_byte% %imx7ulp_evk_m4_sf_length_byte% >> uuu.lst |
829 | ) | 818 | ) |
830 | ) else ( | 819 | ) else ( |
831 | if %flash_mcu% == 1 call :flash_partition %mcu_os_partition% | 820 | if %flash_mcu% == 1 call :flash_partition %mcu_os_partition% |
832 | ) | 821 | ) |
833 | 822 | ||
834 | if [%slot%] == [] ( | 823 | if [%slot%] == [] ( |
835 | if %support_dualslot% == 1 ( | 824 | if %support_dualslot% == 1 ( |
836 | :: flash image to both a and b slot | 825 | :: flash image to both a and b slot |
837 | call :flash_partition_name _a || set /A error_level=1 && goto :exit | 826 | call :flash_partition_name _a || set /A error_level=1 && goto :exit |
838 | call :flash_userpartitions || set /A error_level=1 && goto :exit | 827 | call :flash_userpartitions || set /A error_level=1 && goto :exit |
839 | 828 | ||
840 | call :flash_partition_name _b || set /A error_level=1 && goto :exit | 829 | call :flash_partition_name _b || set /A error_level=1 && goto :exit |
841 | call :flash_userpartitions || set /A error_level=1 && goto :exit | 830 | call :flash_userpartitions || set /A error_level=1 && goto :exit |
842 | ) else ( | 831 | ) else ( |
843 | call :flash_partition_name || set /A error_level=1 && goto :exit | 832 | call :flash_partition_name || set /A error_level=1 && goto :exit |
844 | call :flash_userpartitions || set /A error_level=1 && goto :exit | 833 | call :flash_userpartitions || set /A error_level=1 && goto :exit |
845 | ) | 834 | ) |
846 | ) | 835 | ) |
847 | if not [%slot%] == [] ( | 836 | if not [%slot%] == [] ( |
848 | call :flash_partition_name %slot% || set /A error_level=1 && goto :exit | 837 | call :flash_partition_name %slot% || set /A error_level=1 && goto :exit |
849 | call :flash_userpartitions || set /A error_level=1 && goto :exit | 838 | call :flash_userpartitions || set /A error_level=1 && goto :exit |
850 | ) | 839 | ) |
851 | 840 | ||
852 | ::super partition does not have a/b slot, handle it individually | 841 | ::super partition does not have a/b slot, handle it individually |
853 | if %support_dynamic_partition% == 1 ( | 842 | if %support_dynamic_partition% == 1 ( |
854 | call :flash_partition %super_partition% | 843 | call :flash_partition %super_partition% |
855 | ) | 844 | ) |
856 | 845 | ||
857 | goto :eof | 846 | goto :eof |
858 | 847 | ||
859 | :dec_to_hex | 848 | :dec_to_hex |
860 | set base_num=0123456789abcdef | 849 | set base_num=0123456789abcdef |
861 | (for /f "usebackq" %%A in ('%1') do call :post_dec_to_hex %%A) > temp_hex.txt | 850 | (for /f "usebackq" %%A in ('%1') do call :post_dec_to_hex %%A) > temp_hex.txt |
862 | set /P %2=<temp_hex.txt | 851 | set /P %2=<temp_hex.txt |
863 | del temp_hex.txt | 852 | del temp_hex.txt |
864 | goto :eof | 853 | goto :eof |
865 | :post_dec_to_hex | 854 | :post_dec_to_hex |
866 | set dec=%1 | 855 | set dec=%1 |
867 | set hex= | 856 | set hex= |
868 | setlocal enabledelayedexpansion | 857 | setlocal enabledelayedexpansion |
869 | :division_modular_loop | 858 | :division_modular_loop |
870 | set /a mod = dec %% 16,dec /= 16 | 859 | set /a mod = dec %% 16,dec /= 16 |
871 | set hex=!base_num:~%mod%,1!!hex! | 860 | set hex=!base_num:~%mod%,1!!hex! |
872 | if not [!dec!] == [0] ( | 861 | if not [!dec!] == [0] ( |
873 | goto :division_modular_loop | 862 | goto :division_modular_loop |
874 | ) | 863 | ) |
875 | echo !hex! | 864 | echo !hex! |
876 | goto :eof | 865 | goto :eof |
877 | 866 | ||
878 | :: this function will invoke lpmake to create super.img, the super.img will | 867 | :: this function will invoke lpmake to create super.img, the super.img will |
879 | :: be created in current directory | 868 | :: be created in current directory |
880 | :make_super_image | 869 | :make_super_image |
881 | if exist %super_file% ( | 870 | if exist %super_file% ( |
882 | del %super_file% | 871 | del %super_file% |
883 | ) | 872 | ) |
884 | :: now dynamic partition is only enabled in dual slot condition | 873 | :: now dynamic partition is only enabled in dual slot condition |
885 | if %support_dualslot% == 1 ( | 874 | if %support_dualslot% == 1 ( |
886 | setlocal enabledelayedexpansion | 875 | setlocal enabledelayedexpansion |
887 | if [%slot%] == [_a] ( | 876 | if [%slot%] == [_a] ( |
888 | set lpmake_system_image_a=--image system_a=%image_directory%%systemimage_file% | 877 | set lpmake_system_image_a=--image system_a=%image_directory%%systemimage_file% |
889 | set lpmake_vendor_image_a=--image vendor_a=%image_directory%%vendor_file% | 878 | set lpmake_vendor_image_a=--image vendor_a=%image_directory%%vendor_file% |
890 | set lpmake_product_image_a=--image product_a=%image_directory%%product_file% | 879 | set lpmake_product_image_a=--image product_a=%image_directory%%product_file% |
891 | ) | 880 | ) |
892 | if [%slot%] == [_b] ( | 881 | if [%slot%] == [_b] ( |
893 | set lpmake_system_image_b=--image system_b=%image_directory%%systemimage_file% | 882 | set lpmake_system_image_b=--image system_b=%image_directory%%systemimage_file% |
894 | set lpmake_vendor_image_b=--image vendor_b=%image_directory%%vendor_file% | 883 | set lpmake_vendor_image_b=--image vendor_b=%image_directory%%vendor_file% |
895 | set lpmake_product_image_b=--image product_b=%image_directory%%product_file% | 884 | set lpmake_product_image_b=--image product_b=%image_directory%%product_file% |
896 | ) | 885 | ) |
897 | if [%slot%] == [] ( | 886 | if [%slot%] == [] ( |
898 | set lpmake_system_image_a=--image system_a=%image_directory%%systemimage_file% | 887 | set lpmake_system_image_a=--image system_a=%image_directory%%systemimage_file% |
899 | set lpmake_vendor_image_a=--image vendor_a=%image_directory%%vendor_file% | 888 | set lpmake_vendor_image_a=--image vendor_a=%image_directory%%vendor_file% |
900 | set lpmake_product_image_a=--image product_a=%image_directory%%product_file% | 889 | set lpmake_product_image_a=--image product_a=%image_directory%%product_file% |
901 | set lpmake_system_image_b=--image system_b=%image_directory%%systemimage_file% | 890 | set lpmake_system_image_b=--image system_b=%image_directory%%systemimage_file% |
902 | set lpmake_vendor_image_b=--image vendor_b=%image_directory%%vendor_file% | 891 | set lpmake_vendor_image_b=--image vendor_b=%image_directory%%vendor_file% |
903 | set lpmake_product_image_b=--image product_b=%image_directory%%product_file% | 892 | set lpmake_product_image_b=--image product_b=%image_directory%%product_file% |
904 | ) | 893 | ) |
905 | %image_directory%lpmake.exe --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 ^ | 894 | %image_directory%lpmake.exe --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 ^ |
906 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 ^ | 895 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 ^ |
907 | --partition system_a:readonly:0:nxp_dynamic_partitions_a !lpmake_system_image_a! ^ | 896 | --partition system_a:readonly:0:nxp_dynamic_partitions_a !lpmake_system_image_a! ^ |
908 | --partition system_b:readonly:0:nxp_dynamic_partitions_b !lpmake_system_image_b! ^ | 897 | --partition system_b:readonly:0:nxp_dynamic_partitions_b !lpmake_system_image_b! ^ |
909 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a !lpmake_vendor_image_a! ^ | 898 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a !lpmake_vendor_image_a! ^ |
910 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b !lpmake_vendor_image_b! ^ | 899 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b !lpmake_vendor_image_b! ^ |
911 | --partition product_a:readonly:0:nxp_dynamic_partitions_a !lpmake_product_image_a! ^ | 900 | --partition product_a:readonly:0:nxp_dynamic_partitions_a !lpmake_product_image_a! ^ |
912 | --partition product_b:readonly:0:nxp_dynamic_partitions_b !lpmake_product_image_b! ^ | 901 | --partition product_b:readonly:0:nxp_dynamic_partitions_b !lpmake_product_image_b! ^ |
913 | --sparse --output !super_file! | 902 | --sparse --output !super_file! |
914 | ) | 903 | ) |
915 | 904 | ||
916 | goto :eof | 905 | goto :eof |
917 | 906 | ||
918 | :exit | 907 | :exit |
919 | exit /B %error_level% | 908 | exit /B %error_level% |
920 | 909 |
imx8m/smarc_mx8mq/uuu/uuu_android_smarc_flash.sh
1 | #!/bin/bash -e | 1 | #!/bin/bash -e |
2 | 2 | ||
3 | help() { | 3 | help() { |
4 | 4 | ||
5 | bn=`basename $0` | 5 | bn=`basename $0` |
6 | cat << EOF | 6 | cat << EOF |
7 | 7 | ||
8 | Version: 1.5 | 8 | Version: 1.5 |
9 | Last change: generate super.img when flash images with dynamic partition feature | 9 | Last change: generate super.img when flash images with dynamic partition feature |
10 | 10 | ||
11 | eg: sudo ./fastboot_imx_flashall.sh -f imx8mm -a -D ~/android10/evk_8mm/ | 11 | eg: sudo ./fastboot_imx_flashall.sh -f imx8mm -a -D ~/android10/evk_8mm/ |
12 | eg: sudo ./fastboot_imx_flashall.sh -f imx7ulp -D ~/android10/evk_7ulp/ | 12 | eg: sudo ./fastboot_imx_flashall.sh -f imx7ulp -D ~/android10/evk_7ulp/ |
13 | 13 | ||
14 | Usage: $bn <option> | 14 | Usage: $bn <option> |
15 | 15 | ||
16 | options: | 16 | options: |
17 | -h displays this help message | 17 | -h displays this help message |
18 | -f soc_name flash android image file with soc_name | 18 | -f soc_name flash android image file with soc_name |
19 | -a only flash image to slot_a | 19 | -a only flash image to slot_a |
20 | -b only flash image to slot_b | 20 | -b only flash image to slot_b |
21 | -c card_size optional setting: 14 / 28 | 21 | -c card_size optional setting: 14 / 28 |
22 | If not set, use partition-table.img/partition-table-dual.img (default) | 22 | If not set, use partition-table.img/partition-table-dual.img (default) |
23 | If set to 14, use partition-table-14GB.img for 16GB SD card | 23 | If set to 14, use partition-table-14GB.img for 16GB SD card |
24 | If set to 28, use partition-table-28GB.img/partition-table-28GB-dual.img for 32GB SD card | 24 | If set to 28, use partition-table-28GB.img/partition-table-28GB-dual.img for 32GB SD card |
25 | Make sure the corresponding file exist for your platform | 25 | Make sure the corresponding file exist for your platform |
26 | -m flash mcu image | 26 | -m flash mcu image |
27 | -u uboot_feature flash uboot or spl&bootloader image with "uboot_feature" in their names | 27 | -u uboot_feature flash uboot or spl&bootloader image with "uboot_feature" in their names |
28 | For Standard Android: | 28 | For Standard Android: |
29 | If the parameter after "-u" option contains the string of "dual", then spl&bootloader image will be flashed, | 29 | If the parameter after "-u" option contains the string of "dual", then spl&bootloader image will be flashed, |
30 | otherwise uboot image will be flashed | 30 | otherwise uboot image will be flashed |
31 | For Android Automative: | 31 | For Android Automative: |
32 | only dual bootloader feature is supported, by default spl&bootloader image will be flashed | 32 | only dual bootloader feature is supported, by default spl&bootloader image will be flashed |
33 | Below table lists the legal value supported now based on the soc_name provided: | 33 | Below table lists the legal value supported now based on the soc_name provided: |
34 | โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 34 | โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
35 | โ soc_name โ legal parameter after "-u" โ | 35 | โ soc_name โ legal parameter after "-u" โ |
36 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 36 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
37 | โ imx8mm โ dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty โ | 37 | โ imx8mm โ dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty โ |
38 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 38 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
39 | โ imx8mn โ dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 โ | 39 | โ imx8mn โ dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4 โ |
40 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 40 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
41 | โ imx8mp โ dual trusty-dual evk-uuu trusty-secure-unlock trusty โ | 41 | โ imx8mp โ dual trusty-dual evk-uuu trusty-secure-unlock trusty โ |
42 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 42 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
43 | โ imx8mq โ dual trusty-dual evk-uuu trusty-secure-unlock trusty โ | 43 | โ imx8mq โ smarc_2g trusty-smarc_2g trusty-dual-smarc_2g trusty-secure-unlock-smarc_2g smarc_4g trusty-smarc_4g trusty-dual-smarc_4g trusty-secure-unlock-smarc_4g โ |
44 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 44 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
45 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 45 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
46 | โ imx8mq โ smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_2g-uuu smarc_2g-trusty-secure-unlock โ | 46 | โ imx8mq โ smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_2g-uuu smarc_2g-trusty-secure-unlock โ |
47 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 47 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
48 | โ imx8qxp โ mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu โ | 48 | โ imx8qxp โ mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu โ |
49 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 49 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
50 | โ imx8qm โ mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi โ | 50 | โ imx8qm โ mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi โ |
51 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 51 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
52 | โ imx7ulp โ evk-uuu โ | 52 | โ imx7ulp โ evk-uuu โ |
53 | โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 53 | โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
54 | 54 | ||
55 | -d dtb_feature flash dtbo, vbmeta and recovery image file with "dtb_feature" in their names | 55 | -d dtb_feature flash dtbo, vbmeta and recovery image file with "dtb_feature" in their names |
56 | If not set, default dtbo, vbmeta and recovery image will be flashed | 56 | If not set, default dtbo, vbmeta and recovery image will be flashed |
57 | Below table lists the legal value supported now based on the soc_name provided: | 57 | Below table lists the legal value supported now based on the soc_name provided: |
58 | โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 58 | โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
59 | โ soc_name โ legal parameter after "-d" โ | 59 | โ soc_name โ legal parameter after "-d" โ |
60 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 60 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
61 | โ imx8mm โ ddr4 m4 mipi-panel โ | 61 | โ imx8mm โ ddr4 m4 mipi-panel โ |
62 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 62 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
63 | โ imx8mn โ mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg โ | 63 | โ imx8mn โ mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg โ |
64 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 64 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
65 | โ imx8mq โ dual mipi-panel mipi โ | 65 | โ imx8mq โ dual mipi-panel mipi โ |
66 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 66 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
67 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 67 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
68 | โ smarcimx8mq โ hdmi dp dcss-lvds lcdif-lvds dual-display โ | 68 | โ smarcimx8mq โ hdmi dp dcss-lvds lcdif-lvds dual-display โ |
69 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 69 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
70 | โ imx8mp โ rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 โ | 70 | โ imx8mp โ rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640 โ |
71 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 71 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
72 | โ imx8qxp โ โ | 72 | โ imx8qxp โ โ |
73 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 73 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
74 | โ imx8qm โ hdmi mipi-panel md xen โ | 74 | โ imx8qm โ hdmi mipi-panel md xen โ |
75 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค | 75 | โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค |
76 | โ imx7ulp โ evk-mipi evk mipi โ | 76 | โ imx7ulp โ evk-mipi evk mipi โ |
77 | โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | 77 | โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
78 | 78 | ||
79 | -e erase user data after all image files being flashed | 79 | -e erase user data after all image files being flashed |
80 | -l lock the device after all image files being flashed | 80 | -l lock the device after all image files being flashed |
81 | -D directory the directory of images | 81 | -D directory the directory of images |
82 | No need to use this option if images are in current working directory | 82 | No need to use this option if images are in current working directory |
83 | -s ser_num the serial number of board | 83 | -s ser_num the serial number of board |
84 | If only one board connected to computer, no need to use this option | 84 | If only one board connected to computer, no need to use this option |
85 | -super do not generate super.img when flash the images with dynamic partition feature enabled. | 85 | -super do not generate super.img when flash the images with dynamic partition feature enabled. |
86 | Under the condition that dynamic partition feature are enabled: | 86 | Under the condition that dynamic partition feature are enabled: |
87 | if this option is not used, super.img will be generated under temporary directory and flashed to the board. | 87 | if this option is not used, super.img will be generated under temporary directory and flashed to the board. |
88 | if this option is used, make sure super.img already exists together with other images. | 88 | if this option is used, make sure super.img already exists together with other images. |
89 | -tmp temp_dir specify the temporary directory. Default temporary directory is "/tmp". | 89 | -tmp temp_dir specify the temporary directory. Default temporary directory is "/tmp". |
90 | EOF | 90 | EOF |
91 | 91 | ||
92 | } | 92 | } |
93 | 93 | ||
94 | # this function checks whether the value of first parameter is in the array value of second parameter | 94 | # this function checks whether the value of first parameter is in the array value of second parameter |
95 | # pass the name of the (array)variable to this function. the first is potential element, the second one is array. | 95 | # pass the name of the (array)variable to this function. the first is potential element, the second one is array. |
96 | # make sure the first parameter is not empty | 96 | # make sure the first parameter is not empty |
97 | function whether_in_array | 97 | function whether_in_array |
98 | { | 98 | { |
99 | local potential_element=`eval echo \$\{${1}\}` | 99 | local potential_element=`eval echo \$\{${1}\}` |
100 | local array=(`eval echo \$\{${2}\[\*\]\}`) | 100 | local array=(`eval echo \$\{${2}\[\*\]\}`) |
101 | local array_length=${#array[*]} | 101 | local array_length=${#array[*]} |
102 | local last_element=${array[${array_length}-1]} | 102 | local last_element=${array[${array_length}-1]} |
103 | for arg in ${array[*]} | 103 | for arg in ${array[*]} |
104 | do | 104 | do |
105 | if [ "${arg}" = "${potential_element}" ]; then | 105 | if [ "${arg}" = "${potential_element}" ]; then |
106 | result_value=0 | 106 | result_value=0 |
107 | return 0 | 107 | return 0 |
108 | fi | 108 | fi |
109 | if [ "${arg}" = "${last_element}" ]; then | 109 | if [ "${arg}" = "${last_element}" ]; then |
110 | result_value=1 | 110 | result_value=1 |
111 | return 0 | 111 | return 0 |
112 | fi | 112 | fi |
113 | done | 113 | done |
114 | } | 114 | } |
115 | 115 | ||
116 | function flash_partition | 116 | function flash_partition |
117 | { | 117 | { |
118 | if [ ${support_dual_bootloader} -eq 1 ] && [ "$(echo ${1} | grep "bootloader_")" != "" ]; then | 118 | if [ ${support_dual_bootloader} -eq 1 ] && [ "$(echo ${1} | grep "bootloader_")" != "" ]; then |
119 | img_name=${uboot_proper_to_be_flashed} | 119 | img_name=${uboot_proper_to_be_flashed} |
120 | elif [ "$(echo ${1} | grep "system")" != "" ]; then | 120 | elif [ "$(echo ${1} | grep "system")" != "" ]; then |
121 | img_name=${systemimage_file} | 121 | img_name=${systemimage_file} |
122 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then | 122 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then |
123 | img_name=${vendor_file} | 123 | img_name=${vendor_file} |
124 | elif [ "$(echo ${1} | grep "product")" != "" ]; then | 124 | elif [ "$(echo ${1} | grep "product")" != "" ]; then |
125 | img_name=${product_file} | 125 | img_name=${product_file} |
126 | elif [ "$(echo ${1} | grep "bootloader")" != "" ]; then | 126 | elif [ "$(echo ${1} | grep "bootloader")" != "" ]; then |
127 | img_name=${bootloader_flashed_to_board} | 127 | img_name=${bootloader_flashed_to_board} |
128 | elif [ ${support_dtbo} -eq 1 ] && [ "$(echo ${1} | grep "boot")" != "" ]; then | 128 | elif [ ${support_dtbo} -eq 1 ] && [ "$(echo ${1} | grep "boot")" != "" ]; then |
129 | img_name="boot.img" | 129 | img_name="boot.img" |
130 | elif [ "$(echo ${1} | grep `echo ${mcu_os_partition}`)" != "" ]; then | 130 | elif [ "$(echo ${1} | grep `echo ${mcu_os_partition}`)" != "" ]; then |
131 | if [ "${soc_name}" = "imx7ulp" ]; then | 131 | if [ "${soc_name}" = "imx7ulp" ]; then |
132 | img_name="${soc_name}_m4_demo.img" | 132 | img_name="${soc_name}_m4_demo.img" |
133 | else | 133 | else |
134 | img_name="${soc_name}_mcu_demo.img" | 134 | img_name="${soc_name}_mcu_demo.img" |
135 | fi | 135 | fi |
136 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then | 136 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then |
137 | img_name="${1%_*}-${soc_name}-${dtb_feature}.img" | 137 | img_name="${1%_*}-${soc_name}-smarc-${dtb_feature}.img" |
138 | elif [ "$(echo ${1} | grep "gpt")" != "" ]; then | 138 | elif [ "$(echo ${1} | grep "gpt")" != "" ]; then |
139 | img_name=${partition_file} | 139 | img_name=${partition_file} |
140 | elif [ "$(echo ${1} | grep "super")" != "" ]; then | 140 | elif [ "$(echo ${1} | grep "super")" != "" ]; then |
141 | if [ ${dont_generate_super} -eq 0 ]; then | 141 | if [ ${dont_generate_super} -eq 0 ]; then |
142 | make_super_image | 142 | make_super_image |
143 | fi | 143 | fi |
144 | img_name=${super_file} | 144 | img_name=${super_file} |
145 | else | 145 | else |
146 | img_name="${1%_*}-${soc_name}.img" | 146 | img_name="${1%_*}-${soc_name}.img" |
147 | fi | 147 | fi |
148 | 148 | ||
149 | echo -e flash the file of ${GREEN}${img_name}${STD} to the partition of ${GREEN}${1}${STD} | 149 | echo -e flash the file of ${GREEN}${img_name}${STD} to the partition of ${GREEN}${1}${STD} |
150 | if [ "${img_name}" = "${super_file}" ] && [ ${dont_generate_super} -eq 0 ]; then | 150 | if [ "${img_name}" = "${super_file}" ] && [ ${dont_generate_super} -eq 0 ]; then |
151 | ${fastboot_tool} flash ${1} "${temp_dir}${img_name}" | 151 | ${fastboot_tool} flash ${1} "${temp_dir}${img_name}" |
152 | else | 152 | else |
153 | ${fastboot_tool} flash ${1} "${image_directory}${img_name}" | 153 | ${fastboot_tool} flash ${1} "${image_directory}${img_name}" |
154 | fi | 154 | fi |
155 | } | 155 | } |
156 | 156 | ||
157 | function flash_userpartitions | 157 | function flash_userpartitions |
158 | { | 158 | { |
159 | if [ ${support_dtbo} -eq 1 ]; then | 159 | if [ ${support_dtbo} -eq 1 ]; then |
160 | flash_partition ${dtbo_partition} | 160 | flash_partition ${dtbo_partition} |
161 | fi | 161 | fi |
162 | 162 | ||
163 | flash_partition ${boot_partition} | 163 | flash_partition ${boot_partition} |
164 | 164 | ||
165 | if [ ${support_recovery} -eq 1 ]; then | 165 | if [ ${support_recovery} -eq 1 ]; then |
166 | flash_partition ${recovery_partition} | 166 | flash_partition ${recovery_partition} |
167 | fi | 167 | fi |
168 | 168 | ||
169 | if [ ${support_dynamic_partition} -eq 0 ]; then | 169 | if [ ${support_dynamic_partition} -eq 0 ]; then |
170 | flash_partition ${system_partition} | 170 | flash_partition ${system_partition} |
171 | flash_partition ${vendor_partition} | 171 | flash_partition ${vendor_partition} |
172 | flash_partition ${product_partition} | 172 | flash_partition ${product_partition} |
173 | fi | 173 | fi |
174 | flash_partition ${vbmeta_partition} | 174 | flash_partition ${vbmeta_partition} |
175 | } | 175 | } |
176 | 176 | ||
177 | function flash_partition_name | 177 | function flash_partition_name |
178 | { | 178 | { |
179 | boot_partition="boot"${1} | 179 | boot_partition="boot"${1} |
180 | recovery_partition="recovery"${1} | 180 | recovery_partition="recovery"${1} |
181 | system_partition="system"${1} | 181 | system_partition="system"${1} |
182 | vendor_partition="vendor"${1} | 182 | vendor_partition="vendor"${1} |
183 | product_partition="product"${1} | 183 | product_partition="product"${1} |
184 | vbmeta_partition="vbmeta"${1} | 184 | vbmeta_partition="vbmeta"${1} |
185 | dtbo_partition="dtbo"${1} | 185 | dtbo_partition="dtbo"${1} |
186 | } | 186 | } |
187 | 187 | ||
188 | function flash_android | 188 | function flash_android |
189 | { | 189 | { |
190 | # a precondition: the location of gpt partition and the partition for uboot or spl(in dual bootloader condition) | 190 | # a precondition: the location of gpt partition and the partition for uboot or spl(in dual bootloader condition) |
191 | # should be the same for the u-boot just boot up the board and the on to be flashed to the board | 191 | # should be the same for the u-boot just boot up the board and the on to be flashed to the board |
192 | flash_partition "gpt" | 192 | flash_partition "gpt" |
193 | 193 | ||
194 | ${fastboot_tool} getvar all 2>${temp_dir}fastboot_var.log | 194 | ${fastboot_tool} getvar all 2>${temp_dir}fastboot_var.log |
195 | grep -q "bootloader_a" ${temp_dir}fastboot_var.log && support_dual_bootloader=1 | 195 | grep -q "bootloader_a" ${temp_dir}fastboot_var.log && support_dual_bootloader=1 |
196 | grep -q "dtbo" ${temp_dir}fastboot_var.log && support_dtbo=1 | 196 | grep -q "dtbo" ${temp_dir}fastboot_var.log && support_dtbo=1 |
197 | grep -q "recovery" ${temp_dir}fastboot_var.log && support_recovery=1 | 197 | grep -q "recovery" ${temp_dir}fastboot_var.log && support_recovery=1 |
198 | # use boot_b to check whether current gpt support a/b slot | 198 | # use boot_b to check whether current gpt support a/b slot |
199 | grep -q "boot_b" ${temp_dir}fastboot_var.log && support_dualslot=1 | 199 | grep -q "boot_b" ${temp_dir}fastboot_var.log && support_dualslot=1 |
200 | grep -q "super" ${temp_dir}fastboot_var.log && support_dynamic_partition=1 | 200 | grep -q "super" ${temp_dir}fastboot_var.log && support_dynamic_partition=1 |
201 | 201 | ||
202 | # some partitions are hard-coded in uboot, flash the uboot first and then reboot to check these partitions | 202 | # some partitions are hard-coded in uboot, flash the uboot first and then reboot to check these partitions |
203 | 203 | ||
204 | # uboot or spl&bootloader | 204 | # uboot or spl&bootloader |
205 | if [ ${support_dual_bootloader} -eq 1 ]; then | 205 | if [ ${support_dual_bootloader} -eq 1 ]; then |
206 | bootloader_flashed_to_board="spl-imx8mq${uboot_feature}.bin" | 206 | bootloader_flashed_to_board="spl-${soc_name}${uboot_feature}.bin" |
207 | uboot_proper_to_be_flashed="bootloader-imx8mq${uboot_feature}.img" | 207 | uboot_proper_to_be_flashed="bootloader-${soc_name}${uboot_feature}.img" |
208 | else | 208 | else |
209 | bootloader_flashed_to_board="u-boot-imx8mq${uboot_feature}.imx" | 209 | bootloader_flashed_to_board="u-boot-${soc_name}${uboot_feature}.imx" |
210 | fi | 210 | fi |
211 | 211 | ||
212 | # in the source code, if AB slot feature is supported, uboot partition name is bootloader0, otherwise it's bootloader | 212 | # in the source code, if AB slot feature is supported, uboot partition name is bootloader0, otherwise it's bootloader |
213 | if [ ${support_dualslot} -eq 1 ]; then | 213 | if [ ${support_dualslot} -eq 1 ]; then |
214 | flash_partition "bootloader0" | 214 | flash_partition "bootloader0" |
215 | else | 215 | else |
216 | flash_partition "bootloader" | 216 | flash_partition "bootloader" |
217 | fi | 217 | fi |
218 | 218 | ||
219 | # if a platform doesn't support dual slot but a slot is selected, ignore it. | 219 | # if a platform doesn't support dual slot but a slot is selected, ignore it. |
220 | if [ ${support_dualslot} -eq 0 ] && [ "${slot}" != "" ]; then | 220 | if [ ${support_dualslot} -eq 0 ] && [ "${slot}" != "" ]; then |
221 | slot="" | 221 | slot="" |
222 | fi | 222 | fi |
223 | 223 | ||
224 | 224 | ||
225 | #if dual-bootloader feature is supported, we need to flash the u-boot proper then reboot to get hard-coded partition info | 225 | #if dual-bootloader feature is supported, we need to flash the u-boot proper then reboot to get hard-coded partition info |
226 | if [ ${support_dual_bootloader} -eq 1 ]; then | 226 | if [ ${support_dual_bootloader} -eq 1 ]; then |
227 | if [ "${slot}" != "" ]; then | 227 | if [ "${slot}" != "" ]; then |
228 | dual_bootloader_partition="bootloader"${slot} | 228 | dual_bootloader_partition="bootloader"${slot} |
229 | flash_partition ${dual_bootloader_partition} | 229 | flash_partition ${dual_bootloader_partition} |
230 | ${fastboot_tool} set_active ${slot#_} | 230 | ${fastboot_tool} set_active ${slot#_} |
231 | else | 231 | else |
232 | dual_bootloader_partition="bootloader_a" | 232 | dual_bootloader_partition="bootloader_a" |
233 | flash_partition ${dual_bootloader_partition} | 233 | flash_partition ${dual_bootloader_partition} |
234 | dual_bootloader_partition="bootloader_b" | 234 | dual_bootloader_partition="bootloader_b" |
235 | flash_partition ${dual_bootloader_partition} | 235 | flash_partition ${dual_bootloader_partition} |
236 | ${fastboot_tool} set_active a | 236 | ${fastboot_tool} set_active a |
237 | fi | 237 | fi |
238 | fi | 238 | fi |
239 | 239 | ||
240 | # full uboot is flashed to the board and active slot is set, reboot to u-boot fastboot boot command | 240 | # full uboot is flashed to the board and active slot is set, reboot to u-boot fastboot boot command |
241 | ${fastboot_tool} reboot bootloader | 241 | ${fastboot_tool} reboot bootloader |
242 | sleep 5 | 242 | sleep 5 |
243 | 243 | ||
244 | ${fastboot_tool} getvar all 2>${temp_dir}fastboot_var.log | 244 | ${fastboot_tool} getvar all 2>${temp_dir}fastboot_var.log |
245 | grep -q `echo ${mcu_os_partition}` ${temp_dir}fastboot_var.log && support_mcu_os=1 | 245 | grep -q `echo ${mcu_os_partition}` ${temp_dir}fastboot_var.log && support_mcu_os=1 |
246 | 246 | ||
247 | if [ ${flash_mcu} -eq 1 -a ${support_mcu_os} -eq 1 ]; then | 247 | if [ ${flash_mcu} -eq 1 -a ${support_mcu_os} -eq 1 ]; then |
248 | flash_partition ${mcu_os_partition} | 248 | flash_partition ${mcu_os_partition} |
249 | fi | 249 | fi |
250 | 250 | ||
251 | if [ "${slot}" = "" ] && [ ${support_dualslot} -eq 1 ]; then | 251 | if [ "${slot}" = "" ] && [ ${support_dualslot} -eq 1 ]; then |
252 | #flash image to a and b slot | 252 | #flash image to a and b slot |
253 | flash_partition_name "_a" | 253 | flash_partition_name "_a" |
254 | flash_userpartitions | 254 | flash_userpartitions |
255 | 255 | ||
256 | flash_partition_name "_b" | 256 | flash_partition_name "_b" |
257 | flash_userpartitions | 257 | flash_userpartitions |
258 | else | 258 | else |
259 | flash_partition_name ${slot} | 259 | flash_partition_name ${slot} |
260 | flash_userpartitions | 260 | flash_userpartitions |
261 | fi | 261 | fi |
262 | # super partition does not have a/b slot, handle it individually | 262 | # super partition does not have a/b slot, handle it individually |
263 | if [ ${support_dynamic_partition} -eq 1 ]; then | 263 | if [ ${support_dynamic_partition} -eq 1 ]; then |
264 | flash_partition ${super_partition} | 264 | flash_partition ${super_partition} |
265 | fi | 265 | fi |
266 | } | 266 | } |
267 | 267 | ||
268 | # this function will invoke lpmake to create super.img, the super.img will | 268 | # this function will invoke lpmake to create super.img, the super.img will |
269 | # be created in temporary directory, make sure that there is enouth space | 269 | # be created in temporary directory, make sure that there is enouth space |
270 | function make_super_image | 270 | function make_super_image |
271 | { | 271 | { |
272 | rm -rf ${temp_dir}${super_file} | 272 | rm -rf ${temp_dir}${super_file} |
273 | # now dynamic partition is only enabled in dual slot condition | 273 | # now dynamic partition is only enabled in dual slot condition |
274 | if [ ${support_dualslot} -eq 1 ]; then | 274 | if [ ${support_dualslot} -eq 1 ]; then |
275 | if [ "${slot}" == "_a" ]; then | 275 | if [ "${slot}" == "_a" ]; then |
276 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 276 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
277 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 277 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
278 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 278 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
279 | elif [ "${slot}" == "_b" ]; then | 279 | elif [ "${slot}" == "_b" ]; then |
280 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 280 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
281 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 281 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
282 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 282 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
283 | else | 283 | else |
284 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 284 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
285 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 285 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
286 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 286 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
287 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 287 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
288 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 288 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
289 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 289 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
290 | fi | 290 | fi |
291 | fi | 291 | fi |
292 | 292 | ||
293 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ | 293 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ |
294 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ | 294 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ |
295 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ | 295 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ |
296 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ | 296 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ |
297 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ | 297 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ |
298 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ | 298 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ |
299 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ | 299 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ |
300 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ | 300 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ |
301 | --sparse --output ${temp_dir}${super_file} | 301 | --sparse --output ${temp_dir}${super_file} |
302 | } | 302 | } |
303 | 303 | ||
304 | 304 | ||
305 | # parse command line | 305 | # parse command line |
306 | soc_name="" | 306 | soc_name="" |
307 | uboot_feature="" | 307 | uboot_feature="" |
308 | dtb_feature="" | 308 | dtb_feature="" |
309 | card_size=0 | 309 | card_size=0 |
310 | slot="" | 310 | slot="" |
311 | systemimage_file="system.img" | 311 | systemimage_file="system.img" |
312 | vendor_file="vendor.img" | 312 | vendor_file="vendor.img" |
313 | product_file="product.img" | 313 | product_file="product.img" |
314 | partition_file="partition-table.img" | 314 | partition_file="partition-table.img" |
315 | super_file="super.img" | 315 | super_file="super.img" |
316 | support_dtbo=0 | 316 | support_dtbo=0 |
317 | support_recovery=0 | 317 | support_recovery=0 |
318 | support_dualslot=0 | 318 | support_dualslot=0 |
319 | support_mcu_os=0 | 319 | support_mcu_os=0 |
320 | support_dual_bootloader=0 | 320 | support_dual_bootloader=0 |
321 | support_dynamic_partition=0 | 321 | support_dynamic_partition=0 |
322 | dual_bootloader_partition="" | 322 | dual_bootloader_partition="" |
323 | bootloader_flashed_to_board="" | 323 | bootloader_flashed_to_board="" |
324 | uboot_proper_to_be_flashed="" | 324 | uboot_proper_to_be_flashed="" |
325 | boot_partition="boot" | 325 | boot_partition="boot" |
326 | recovery_partition="recovery" | 326 | recovery_partition="recovery" |
327 | system_partition="system" | 327 | system_partition="system" |
328 | vendor_partition="vendor" | 328 | vendor_partition="vendor" |
329 | product_partition="product" | 329 | product_partition="product" |
330 | vbmeta_partition="vbmeta" | 330 | vbmeta_partition="vbmeta" |
331 | dtbo_partition="dtbo" | 331 | dtbo_partition="dtbo" |
332 | mcu_os_partition="mcu_os" | 332 | mcu_os_partition="mcu_os" |
333 | super_partition="super" | 333 | super_partition="super" |
334 | flash_mcu=0 | 334 | flash_mcu=0 |
335 | lock=0 | 335 | lock=0 |
336 | erase=0 | 336 | erase=0 |
337 | image_directory="" | 337 | image_directory="" |
338 | ser_num="" | 338 | ser_num="" |
339 | fastboot_tool="fastboot" | 339 | fastboot_tool="fastboot" |
340 | RED='\033[0;31m' | 340 | RED='\033[0;31m' |
341 | STD='\033[0;0m' | 341 | STD='\033[0;0m' |
342 | GREEN='\033[0;32m' | 342 | GREEN='\033[0;32m' |
343 | lpmake_system_image_a="" | 343 | lpmake_system_image_a="" |
344 | lpmake_system_image_b="" | 344 | lpmake_system_image_b="" |
345 | lpmake_vendor_image_a="" | 345 | lpmake_vendor_image_a="" |
346 | lpmake_vendor_image_b="" | 346 | lpmake_vendor_image_b="" |
347 | lpmake_product_image_a="" | 347 | lpmake_product_image_a="" |
348 | lpmake_product_image_b="" | 348 | lpmake_product_image_b="" |
349 | result_value=0 | 349 | result_value=0 |
350 | dont_generate_super=0 | 350 | dont_generate_super=0 |
351 | temp_dir="/tmp/" | 351 | temp_dir="/tmp/" |
352 | 352 | ||
353 | 353 | ||
354 | # We want to detect illegal feature input to some extent. Here it's based on SoC names. Since an SoC may be on a | 354 | # We want to detect illegal feature input to some extent. Here it's based on SoC names. Since an SoC may be on a |
355 | # board running different set of images(android and automative for a example), so misuse the features of one set of | 355 | # board running different set of images(android and automative for a example), so misuse the features of one set of |
356 | # images when flash another set of images can not be detect early with this scenario. | 356 | # images when flash another set of images can not be detect early with this scenario. |
357 | imx8mm_uboot_feature=(dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty) | 357 | imx8mm_uboot_feature=(dual trusty-dual 4g-evk-uuu 4g ddr4-evk-uuu ddr4 evk-uuu trusty-4g trusty-secure-unlock trusty) |
358 | imx8mn_uboot_feature=(dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4) | 358 | imx8mn_uboot_feature=(dual trusty-dual evk-uuu trusty-secure-unlock trusty ddr4-evk-uuu ddr4) |
359 | imx8mq_uboot_feature=(dual trusty-dual evk-uuu trusty-secure-unlock trusty) | 359 | imx8mq_uboot_feature=(smarc_2g smarc_2g-dp trusty-smarc_2g trustu-dual-smarc_2g trusty-secure-unlock-smarc_2g smarc_4g smarc_4g-dp trusty-smarc_4g trustu-dual-smarc_4g trusty-secure-unlock-smarc_4g) |
360 | smarcimx8mq_uboot_feature=(smarc_4g smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_4g-trusty smarc_2g smarc_2g-uuu smarc_2g-trusty-secure-unlock smarc_2g-trusty) | 360 | smarcimx8mq_uboot_feature=(smarc_4g smarc_4g-uuu smarc_4g-trusty-secure-unlock smarc_4g-trusty smarc_2g smarc_2g-uuu smarc_2g-trusty-secure-unlock smarc_2g-trusty) |
361 | imx8mp_uboot_feature=(dual trusty-dual evk-uuu trusty-secure-unlock trusty) | 361 | imx8mp_uboot_feature=(dual trusty-dual evk-uuu trusty-secure-unlock trusty) |
362 | imx8qxp_uboot_feature=(mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu) | 362 | imx8qxp_uboot_feature=(mek-uuu trusty-secure-unlock trusty secure-unlock c0 trusty-c0 mek-c0-uuu) |
363 | imx8qm_uboot_feature=(mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi) | 363 | imx8qm_uboot_feature=(mek-uuu trusty-secure-unlock trusty secure-unlock md hdmi) |
364 | imx7ulp_uboot_feature=(evk-uuu) | 364 | imx7ulp_uboot_feature=(evk-uuu) |
365 | 365 | ||
366 | imx8mm_dtb_feature=(ddr4 m4 mipi-panel) | 366 | imx8mm_dtb_feature=(ddr4 m4 mipi-panel) |
367 | imx8mn_dtb_feature=(mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg) | 367 | imx8mn_dtb_feature=(mipi-panel rpmsg ddr4 ddr4-mipi-panel ddr4-rpmsg) |
368 | imx8mq_dtb_feature=(dual mipi-panel mipi) | 368 | imx8mq_dtb_feature=(hdmi dcss-lvds lcdif-lvds dp dual-display) |
369 | smarcimx8mq_dtb_feature=(hdmi dcss-lvds lcdif-lvds dp dual-display) | ||
370 | imx8mp_dtb_feature=(rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640) | 369 | imx8mp_dtb_feature=(rpmsg hdmi lvds-panel lvds mipi-panel basler ov5640) |
371 | imx8qxp_dtb_feature=() | 370 | imx8qxp_dtb_feature=() |
372 | imx8qm_dtb_feature=(hdmi mipi-panel md xen) | 371 | imx8qm_dtb_feature=(hdmi mipi-panel md xen) |
373 | imx7ulp_dtb_feature=(evk-mipi evk mipi) | 372 | imx7ulp_dtb_feature=(evk-mipi evk mipi) |
374 | 373 | ||
375 | # an array to collect the supported soc_names | 374 | # an array to collect the supported soc_names |
376 | supported_soc_names=(imx8qm imx8qxp imx8mq smarcimx8mq imx8mm imx8mn imx8mp imx7ulp) | 375 | supported_soc_names=(imx8qm imx8qxp imx8mq smarcimx8mq imx8mm imx8mn imx8mp imx7ulp) |
377 | 376 | ||
378 | if [ $# -eq 0 ]; then | 377 | if [ $# -eq 0 ]; then |
379 | echo -e ${RED}no parameter specified, will directly exit after displaying help message${STD} | 378 | echo -e ${RED}no parameter specified, will directly exit after displaying help message${STD} |
380 | help; exit 1; | 379 | help; exit 1; |
381 | fi | 380 | fi |
382 | while [ $# -gt 0 ]; do | 381 | while [ $# -gt 0 ]; do |
383 | case $1 in | 382 | case $1 in |
384 | -h) help; exit ;; | 383 | -h) help; exit ;; |
385 | -f) soc_name=$2; shift;; | 384 | -f) soc_name=$2; shift;; |
386 | -c) card_size=$2; shift;; | 385 | -c) card_size=$2; shift;; |
387 | -u) uboot_feature=-$2; shift;; | 386 | -u) uboot_feature=-$2; shift;; |
388 | -d) dtb_feature=$2; shift;; | 387 | -d) dtb_feature=$2; shift;; |
389 | -a) slot="_a" ;; | 388 | -a) slot="_a" ;; |
390 | -b) slot="_b" ;; | 389 | -b) slot="_b" ;; |
391 | -m) flash_mcu=1 ;; | 390 | -m) flash_mcu=1 ;; |
392 | -e) erase=1 ;; | 391 | -e) erase=1 ;; |
393 | -l) lock=1 ;; | 392 | -l) lock=1 ;; |
394 | -D) image_directory=$2; shift;; | 393 | -D) image_directory=$2; shift;; |
395 | -s) ser_num=$2; shift;; | 394 | -s) ser_num=$2; shift;; |
396 | -super) dont_generate_super=1 ;; | 395 | -super) dont_generate_super=1 ;; |
397 | -tmp) temp_dir=$2; shift;; | 396 | -tmp) temp_dir=$2; shift;; |
398 | *) echo -e ${RED}$1${STD} is not an illegal option | 397 | *) echo -e ${RED}$1${STD} is not an illegal option |
399 | help; exit;; | 398 | help; exit;; |
400 | esac | 399 | esac |
401 | shift | 400 | shift |
402 | done | 401 | done |
403 | 402 | ||
404 | # check whether the soc_name is legal or not | 403 | # check whether the soc_name is legal or not |
405 | if [ -n "${soc_name}" ]; then | 404 | if [ -n "${soc_name}" ]; then |
406 | whether_in_array soc_name supported_soc_names | 405 | whether_in_array soc_name supported_soc_names |
407 | if [ ${result_value} != 0 ]; then | 406 | if [ ${result_value} != 0 ]; then |
408 | echo -e >&2 ${RED}illegal soc_name \"${soc_name}\"${STD} | 407 | echo -e >&2 ${RED}illegal soc_name \"${soc_name}\"${STD} |
409 | help; exit 1; | 408 | help; exit 1; |
410 | fi | 409 | fi |
411 | else | 410 | else |
412 | echo -e >&2 ${RED}use \"-f\" option to specify the soc name${STD} | 411 | echo -e >&2 ${RED}use \"-f\" option to specify the soc name${STD} |
413 | fi | 412 | fi |
414 | 413 | ||
415 | 414 | ||
416 | # Process of the uboot_feature parameter | 415 | # Process of the uboot_feature parameter |
417 | if [[ "${uboot_feature}" = *"dual"* ]]; then | 416 | if [[ "${uboot_feature}" = *"dual"* ]]; then |
418 | support_dual_bootloader=1; | 417 | support_dual_bootloader=1; |
419 | fi | 418 | fi |
420 | 419 | ||
421 | # if card_size is not correctly set, exit. | 420 | # if card_size is not correctly set, exit. |
422 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then | 421 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then |
423 | help; exit 1; | 422 | help; exit 1; |
424 | fi | 423 | fi |
425 | 424 | ||
426 | # Android Automative by default support dual bootloader, no "dual" in its partition table name | 425 | # Android Automative by default support dual bootloader, no "dual" in its partition table name |
427 | if [ ${support_dual_bootloader} -eq 1 ]; then | 426 | if [ ${support_dual_bootloader} -eq 1 ]; then |
428 | if [ ${card_size} -gt 0 ]; then | 427 | if [ ${card_size} -gt 0 ]; then |
429 | partition_file="partition-table-${card_size}GB-dual.img"; | 428 | partition_file="partition-table-${card_size}GB-dual.img"; |
430 | 429 | ||
431 | else | 430 | else |
432 | partition_file="partition-table-dual.img"; | 431 | partition_file="partition-table-dual.img"; |
433 | fi | 432 | fi |
434 | else | 433 | else |
435 | if [ ${card_size} -gt 0 ]; then | 434 | if [ ${card_size} -gt 0 ]; then |
436 | partition_file="partition-table-${card_size}GB.img"; | 435 | partition_file="partition-table-${card_size}GB.img"; |
437 | else | 436 | else |
438 | partition_file="partition-table.img"; | 437 | partition_file="partition-table.img"; |
439 | fi | 438 | fi |
440 | fi | 439 | fi |
441 | 440 | ||
442 | if [[ "${temp_dir}" != "" ]]; then | 441 | if [[ "${temp_dir}" != "" ]]; then |
443 | temp_dir="${temp_dir%/}/"; | 442 | temp_dir="${temp_dir%/}/"; |
444 | mkdir -p ${temp_dir} | 443 | mkdir -p ${temp_dir} |
445 | fi | 444 | fi |
446 | 445 | ||
447 | # if directory is specified, make sure there is a slash at the end | 446 | # if directory is specified, make sure there is a slash at the end |
448 | if [[ "${image_directory}" = "" ]]; then | 447 | if [[ "${image_directory}" = "" ]]; then |
449 | image_directory=`pwd` | 448 | image_directory=`pwd` |
450 | fi | 449 | fi |
451 | image_directory="${image_directory%/}/" | 450 | image_directory="${image_directory%/}/" |
452 | 451 | ||
453 | if [[ "${ser_num}" != "" ]]; then | 452 | if [[ "${ser_num}" != "" ]]; then |
454 | fastboot_tool="fastboot -s ${ser_num}" | 453 | fastboot_tool="fastboot -s ${ser_num}" |
455 | fi | 454 | fi |
456 | 455 | ||
457 | # check whether provided spl/bootloader/uboot feature is legal | 456 | # check whether provided spl/bootloader/uboot feature is legal |
458 | if [ -n "${uboot_feature}" ]; then | 457 | if [ -n "${uboot_feature}" ]; then |
459 | uboot_feature_no_pre_hyphen=${uboot_feature#-} | 458 | uboot_feature_no_pre_hyphen=${uboot_feature#-} |
460 | whether_in_array uboot_feature_no_pre_hyphen ${soc_name}_uboot_feature | 459 | whether_in_array uboot_feature_no_pre_hyphen ${soc_name}_uboot_feature |
461 | if [ ${result_value} != 0 ]; then | 460 | if [ ${result_value} != 0 ]; then |
462 | echo -e >&2 ${RED}illegal parameter \"${uboot_feature_no_pre_hyphen}\" for \"-u\" option${STD} | 461 | echo -e >&2 ${RED}illegal parameter \"${uboot_feature_no_pre_hyphen}\" for \"-u\" option${STD} |
463 | help; exit 1; | 462 | help; exit 1; |
464 | fi | 463 | fi |
465 | fi | 464 | fi |
466 | 465 | ||
467 | # check whether provided dtb feature is legal | 466 | # check whether provided dtb feature is legal |
468 | if [ -n "${dtb_feature}" ]; then | 467 | if [ -n "${dtb_feature}" ]; then |
469 | dtb_feature_no_pre_hyphen=${dtb_feature#-} | 468 | dtb_feature_no_pre_hyphen=${dtb_feature#-} |
470 | whether_in_array dtb_feature_no_pre_hyphen ${soc_name}_dtb_feature | 469 | whether_in_array dtb_feature_no_pre_hyphen ${soc_name}_dtb_feature |
471 | if [ ${result_value} != 0 ]; then | 470 | if [ ${result_value} != 0 ]; then |
472 | echo -e >&2 ${RED}illegal parameter \"${dtb_feature}\" for \"-d\" option${STD} | 471 | echo -e >&2 ${RED}illegal parameter \"${dtb_feature}\" for \"-d\" option${STD} |
473 | help; exit 1; | 472 | help; exit 1; |
474 | fi | 473 | fi |
475 | fi | 474 | fi |
476 | 475 | ||
477 | flash_android | 476 | flash_android |
478 | 477 | ||
479 | if [ ${erase} -eq 1 ]; then | 478 | if [ ${erase} -eq 1 ]; then |
480 | if [ ${support_dualslot} -eq 0 ] ; then | 479 | if [ ${support_dualslot} -eq 0 ] ; then |
481 | ${fastboot_tool} erase cache | 480 | ${fastboot_tool} erase cache |
482 | fi | 481 | fi |
483 | ${fastboot_tool} erase misc | 482 | ${fastboot_tool} erase misc |
484 | ${fastboot_tool} erase metadata | 483 | ${fastboot_tool} erase metadata |
485 | ${fastboot_tool} erase userdata | 484 | ${fastboot_tool} erase userdata |
486 | fi | 485 | fi |
487 | 486 | ||
488 | if [ ${lock} -eq 1 ]; then | 487 | if [ ${lock} -eq 1 ]; then |
489 | ${fastboot_tool} oem lock | 488 | ${fastboot_tool} oem lock |
490 | fi | 489 | fi |
491 | 490 | ||
492 | if [ ${support_dualslot} -eq 1 ] && [ "${slot}" != "" ]; then | 491 | if [ ${support_dualslot} -eq 1 ] && [ "${slot}" != "" ]; then |
493 | ${fastboot_tool} set_active ${slot#_} | 492 | ${fastboot_tool} set_active ${slot#_} |
494 | fi | 493 | fi |
495 | 494 | ||
496 | echo | 495 | echo |
497 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" | 496 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" |
498 | 497 | ||
499 | exit 0 | 498 | exit 0 |
500 | 499 | ||
501 | 500 |
scripts/sh/smarc-mkemmc.sh
1 | #!/bin/bash -e | 1 | #!/bin/bash -e |
2 | 2 | ||
3 | help() { | 3 | help() { |
4 | 4 | ||
5 | bn=`basename $0` | 5 | bn=`basename $0` |
6 | cat << EOF | 6 | cat << EOF |
7 | 7 | ||
8 | Version: 1.6 | 8 | Version: 1.6 |
9 | Last change: generate super.img when flash images with dynamic partition feature | 9 | Last change: generate super.img when flash images with dynamic partition feature |
10 | V1.4 change: add support imx8mn chips | 10 | V1.4 change: add support imx8mn chips |
11 | 11 | ||
12 | Usage: $bn <option> device_node | 12 | Usage: $bn <option> device_node |
13 | 13 | ||
14 | options: | 14 | options: |
15 | -h displays this help message | 15 | -h displays this help message |
16 | -s only get partition size | 16 | -s only get partition size |
17 | -np not partition. | 17 | -np not partition. |
18 | -f soc_name flash android image file with soc_name. Below table lists soc_name values and bootloader offset. | 18 | -f soc_name flash android image file with soc_name. Below table lists soc_name values and bootloader offset. |
19 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ | 19 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ |
20 | โ soc_name โ offset โ | 20 | โ soc_name โ offset โ |
21 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 21 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
22 | โ imx6dl/imx6q/imx6qp โ 1k โ | 22 | โ imx6dl/imx6q/imx6qp โ 1k โ |
23 | โ imx6sx/imx7d/imx7ulp โ โ | 23 | โ imx6sx/imx7d/imx7ulp โ โ |
24 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 24 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
25 | โ imx8mm/imx8mq โ 33k โ | 25 | โ imx8mm/imx8mq โ 33k โ |
26 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 26 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
27 | โimx8qm/imx8qxp/imx8mn/imx8mpโ 32k โ | 27 | โimx8qm/imx8qxp/imx8mn/imx8mpโ 32k โ |
28 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ | 28 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ |
29 | -a only flash image to slot_a | 29 | -a only flash image to slot_a |
30 | -b only flash image to slot_b | 30 | -b only flash image to slot_b |
31 | -c card_size optional setting: 7 / 14 / 28 | 31 | -c card_size optional setting: 7 / 14 / 28 |
32 | If not set, use partition-table.img (default) | 32 | If not set, use partition-table.img (default) |
33 | If set to 7, use partition-table-7GB.img for 8GB SD card | 33 | If set to 7, use partition-table-7GB.img for 8GB SD card |
34 | If set to 14, use partition-table-14GB.img for 16GB SD card | 34 | If set to 14, use partition-table-14GB.img for 16GB SD card |
35 | If set to 28, use partition-table-28GB.img for 32GB SD card | 35 | If set to 28, use partition-table-28GB.img for 32GB SD card |
36 | Make sure the corresponding file exist for your platform. | 36 | Make sure the corresponding file exist for your platform. |
37 | -u uboot_feature flash uboot or spl&bootloader image files with "uboot_feature" in their names. | 37 | -u uboot_feature flash uboot or spl&bootloader image files with "uboot_feature" in their names. |
38 | -d dtb_feature flash dtbo, recovery and vbmeta image files with "dtb_feature" in their names. | 38 | -d dtb_feature flash dtbo, recovery and vbmeta image files with "dtb_feature" in their names. |
39 | -D directory specify the directory which contains the images to be flashed. | 39 | -D directory specify the directory which contains the images to be flashed. |
40 | -m flash mcu image | 40 | -m flash mcu image |
41 | -o force_offset force set uboot offset | 41 | -o force_offset force set uboot offset |
42 | -super do not generate super.img when flash the images with dynamic partition feature enabled. | 42 | -super do not generate super.img when flash the images with dynamic partition feature enabled. |
43 | Under the condition that dynamic partition feature are enabled: | 43 | Under the condition that dynamic partition feature are enabled: |
44 | if this option is not used, super.img will be generated under "/tmp" and flashed to the board. | 44 | if this option is not used, super.img will be generated under "/tmp" and flashed to the board. |
45 | if this option is used, make sure super.img already exists together with other images. | 45 | if this option is used, make sure super.img already exists together with other images. |
46 | EOF | 46 | EOF |
47 | 47 | ||
48 | } | 48 | } |
49 | 49 | ||
50 | # this function will invoke lpmake to create super.img, the super.img will | 50 | # this function will invoke lpmake to create super.img, the super.img will |
51 | # be created in /tmp, make sure that there is enouth space | 51 | # be created in /tmp, make sure that there is enouth space |
52 | function make_super_image | 52 | function make_super_image |
53 | { | 53 | { |
54 | rm -rf /tmp/${super_file} | 54 | rm -rf /tmp/${super_file} |
55 | # now dynamic partition is only enabled in dual slot condition | 55 | # now dynamic partition is only enabled in dual slot condition |
56 | if [ ${support_dualslot} -eq 1 ]; then | 56 | if [ ${support_dualslot} -eq 1 ]; then |
57 | if [ "${slot}" == "_a" ]; then | 57 | if [ "${slot}" == "_a" ]; then |
58 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 58 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
59 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 59 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
60 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 60 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
61 | elif [ "${slot}" == "_b" ]; then | 61 | elif [ "${slot}" == "_b" ]; then |
62 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 62 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
63 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 63 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
64 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 64 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
65 | else | 65 | else |
66 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 66 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
67 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 67 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
68 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 68 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
69 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 69 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
70 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 70 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
71 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 71 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
72 | fi | 72 | fi |
73 | fi | 73 | fi |
74 | 74 | ||
75 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ | 75 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ |
76 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ | 76 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ |
77 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ | 77 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ |
78 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ | 78 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ |
79 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ | 79 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ |
80 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ | 80 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ |
81 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ | 81 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ |
82 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ | 82 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ |
83 | --sparse --output /tmp/${super_file} | 83 | --sparse --output /tmp/${super_file} |
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | ||
87 | # parse command line | 87 | # parse command line |
88 | moreoptions=1 | 88 | moreoptions=1 |
89 | node="na" | 89 | node="na" |
90 | soc_name="" | 90 | soc_name="" |
91 | force_offset="" | 91 | force_offset="" |
92 | cal_only=0 | 92 | cal_only=0 |
93 | card_size=0 | 93 | card_size=0 |
94 | bootloader_offset=1 | 94 | bootloader_offset=1 |
95 | mcu_image_offset=5120 | 95 | mcu_image_offset=5120 |
96 | vaild_gpt_size=17 | 96 | vaild_gpt_size=17 |
97 | not_partition=0 | 97 | not_partition=0 |
98 | slot="" | 98 | slot="" |
99 | systemimage_file="system.img" | 99 | systemimage_file="system.img" |
100 | vendor_file="vendor.img" | 100 | vendor_file="vendor.img" |
101 | product_file="product.img" | 101 | product_file="product.img" |
102 | partition_file="partition-table.img" | 102 | partition_file="partition-table.img" |
103 | super_file="super.img" | 103 | super_file="super.img" |
104 | g_sizes=0 | 104 | g_sizes=0 |
105 | support_dtbo=0 | 105 | support_dtbo=0 |
106 | flash_mcu=0 | 106 | flash_mcu=0 |
107 | RED='\033[0;31m' | 107 | RED='\033[0;31m' |
108 | STD='\033[0;0m' | 108 | STD='\033[0;0m' |
109 | 109 | ||
110 | image_directory="" | 110 | image_directory="" |
111 | dtb_feature="" | 111 | dtb_feature="" |
112 | uboot_feature="" | 112 | uboot_feature="" |
113 | support_dual_bootloader=0 | 113 | support_dual_bootloader=0 |
114 | support_dualslot=0 | 114 | support_dualslot=0 |
115 | support_dynamic_partition=0 | 115 | support_dynamic_partition=0 |
116 | lpmake_system_image_a="" | 116 | lpmake_system_image_a="" |
117 | lpmake_system_image_b="" | 117 | lpmake_system_image_b="" |
118 | lpmake_vendor_image_a="" | 118 | lpmake_vendor_image_a="" |
119 | lpmake_vendor_image_b="" | 119 | lpmake_vendor_image_b="" |
120 | lpmake_product_image_a="" | 120 | lpmake_product_image_a="" |
121 | lpmake_product_image_b="" | 121 | lpmake_product_image_b="" |
122 | dont_generate_super=0 | 122 | dont_generate_super=0 |
123 | node_device_major="" | 123 | node_device_major="" |
124 | node_device_minor=0 | 124 | node_device_minor=0 |
125 | current_device_major="" | 125 | current_device_major="" |
126 | current_device_minor=0 | 126 | current_device_minor=0 |
127 | minor_difference=0 | 127 | minor_difference=0 |
128 | current_device_base_name="" | 128 | current_device_base_name="" |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | while [ "$moreoptions" = 1 -a $# -gt 0 ]; do | 132 | while [ "$moreoptions" = 1 -a $# -gt 0 ]; do |
133 | case $1 in | 133 | case $1 in |
134 | -h) help; exit ;; | 134 | -h) help; exit ;; |
135 | -s) cal_only=1 ;; | 135 | -s) cal_only=1 ;; |
136 | -f) soc_name=$2; shift;; | 136 | -f) soc_name=$2; shift;; |
137 | -c) card_size=$2; shift;; | 137 | -c) card_size=$2; shift;; |
138 | -np) not_partition=1 ;; | 138 | -np) not_partition=1 ;; |
139 | -a) slot="_a" ;; | 139 | -a) slot="_a" ;; |
140 | -b) slot="_b" ;; | 140 | -b) slot="_b" ;; |
141 | -m) flash_mcu=1 ;; | 141 | -m) flash_mcu=1 ;; |
142 | -o) force_offset=$2; shift;; | 142 | -o) force_offset=$2; shift;; |
143 | -u) uboot_feature=-$2; shift;; | 143 | -u) uboot_feature=-$2; shift;; |
144 | -d) dtb_feature=$2; shift;; | 144 | -d) dtb_feature=$2; shift;; |
145 | -D) image_directory=$2; shift;; | 145 | -D) image_directory=$2; shift;; |
146 | -super) dont_generate_super=1 ;; | 146 | -super) dont_generate_super=1 ;; |
147 | *) moreoptions=0; node=$1 ;; | 147 | *) moreoptions=0; node=$1 ;; |
148 | esac | 148 | esac |
149 | [ "$moreoptions" = 0 ] && [ $# -gt 1 ] && help && exit | 149 | [ "$moreoptions" = 0 ] && [ $# -gt 1 ] && help && exit |
150 | [ "$moreoptions" = 1 ] && shift | 150 | [ "$moreoptions" = 1 ] && shift |
151 | done | 151 | done |
152 | 152 | ||
153 | # check required applications are installed | 153 | # check required applications are installed |
154 | command -v hdparm >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing hdparm app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } | 154 | command -v hdparm >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing hdparm app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } |
155 | command -v gdisk >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing gdisk app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } | 155 | command -v gdisk >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing gdisk app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } |
156 | 156 | ||
157 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then | 157 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then |
158 | help; exit 1; | 158 | help; exit 1; |
159 | fi | 159 | fi |
160 | 160 | ||
161 | # imx8qxp RevB0 chips, imx8qm RevB0 chips, imx8mp and imx8mn chips, bootloader offset is 32KB on SD card | 161 | # imx8qxp RevB0 chips, imx8qm RevB0 chips, imx8mp and imx8mn chips, bootloader offset is 32KB on SD card |
162 | if [ "${soc_name}" = "imx8qxp" -o "${soc_name}" = "imx8qm" -o "${soc_name}" = "imx8mn" -o "${soc_name}" = "imx8mp" ]; then | 162 | if [ "${soc_name}" = "imx8qxp" -o "${soc_name}" = "imx8qm" -o "${soc_name}" = "imx8mn" -o "${soc_name}" = "imx8mp" ]; then |
163 | bootloader_offset=32 | 163 | bootloader_offset=32 |
164 | fi | 164 | fi |
165 | 165 | ||
166 | # imx8mq chips and imx8mm chips, bootloader offset is 33KB on SD card | 166 | # imx8mq chips and imx8mm chips, bootloader offset is 33KB on SD card |
167 | if [ "${soc_name}" = "imx8mq" -o "${soc_name}" = "imx8mm" -o "${soc_name}" = "smarcimx8mq" ]; then | 167 | if [ "${soc_name}" = "imx8mq" -o "${soc_name}" = "imx8mm" ]; then |
168 | bootloader_offset=33 | 168 | bootloader_offset=33 |
169 | fi | 169 | fi |
170 | 170 | ||
171 | if [ "${force_offset}" != "" ]; then | 171 | if [ "${force_offset}" != "" ]; then |
172 | bootloader_offset=${force_offset} | 172 | bootloader_offset=${force_offset} |
173 | fi | 173 | fi |
174 | 174 | ||
175 | # exit if the block device file specified by ${node} doesn't exist | 175 | # exit if the block device file specified by ${node} doesn't exist |
176 | if [ ! -e ${node} ]; then | 176 | if [ ! -e ${node} ]; then |
177 | help | 177 | help |
178 | exit 1 | 178 | exit 1 |
179 | fi | 179 | fi |
180 | 180 | ||
181 | # Process of the uboot_feature parameter | 181 | # Process of the uboot_feature parameter |
182 | if [[ "${uboot_feature}" = *"trusty"* ]] || [[ "${uboot_feature}" = *"secure"* ]]; then | 182 | if [[ "${uboot_feature}" = *"trusty"* ]] || [[ "${uboot_feature}" = *"secure"* ]]; then |
183 | echo -e >&2 ${RED}Do not flash the image with Trusty OS to SD card${STD} | 183 | echo -e >&2 ${RED}Do not flash the image with Trusty OS to SD card${STD} |
184 | help | 184 | help |
185 | exit 1 | 185 | exit 1 |
186 | fi | 186 | fi |
187 | if [[ "${uboot_feature}" = *"dual"* ]]; then | 187 | if [[ "${uboot_feature}" = *"dual"* ]]; then |
188 | support_dual_bootloader=1; | 188 | support_dual_bootloader=1; |
189 | fi | 189 | fi |
190 | 190 | ||
191 | 191 | ||
192 | # dual bootloader support will use different gpt. Android Automative only boot from eMMC, judgement here is complete | 192 | # dual bootloader support will use different gpt. Android Automative only boot from eMMC, judgement here is complete |
193 | if [ ${support_dual_bootloader} -eq 1 ]; then | 193 | if [ ${support_dual_bootloader} -eq 1 ]; then |
194 | if [ ${card_size} -gt 0 ]; then | 194 | if [ ${card_size} -gt 0 ]; then |
195 | partition_file="partition-table-${card_size}GB-dual.img"; | 195 | partition_file="partition-table-${card_size}GB-dual.img"; |
196 | else | 196 | else |
197 | partition_file="partition-table-dual.img"; | 197 | partition_file="partition-table-dual.img"; |
198 | fi | 198 | fi |
199 | else | 199 | else |
200 | if [ ${card_size} -gt 0 ]; then | 200 | if [ ${card_size} -gt 0 ]; then |
201 | partition_file="partition-table-${card_size}GB.img"; | 201 | partition_file="partition-table-${card_size}GB.img"; |
202 | else | 202 | else |
203 | partition_file="partition-table.img"; | 203 | partition_file="partition-table.img"; |
204 | fi | 204 | fi |
205 | fi | 205 | fi |
206 | 206 | ||
207 | 207 | ||
208 | # for specified directory, make sure there is a slash at the end | 208 | # for specified directory, make sure there is a slash at the end |
209 | if [[ "${image_directory}" = "" ]]; then | 209 | if [[ "${image_directory}" = "" ]]; then |
210 | image_directory=`pwd`; | 210 | image_directory=`pwd`; |
211 | fi | 211 | fi |
212 | image_directory="${image_directory%/}/"; | 212 | image_directory="${image_directory%/}/"; |
213 | 213 | ||
214 | if [ ! -f "${image_directory}${partition_file}" ]; then | 214 | if [ ! -f "${image_directory}${partition_file}" ]; then |
215 | echo -e >&2 "${RED}File ${partition_file} not found. Please check. Exiting${STD}" | 215 | echo -e >&2 "${RED}File ${partition_file} not found. Please check. Exiting${STD}" |
216 | return 1 | 216 | return 1 |
217 | fi | 217 | fi |
218 | 218 | ||
219 | 219 | ||
220 | # dump partitions | 220 | # dump partitions |
221 | if [ "${cal_only}" -eq "1" ]; then | 221 | if [ "${cal_only}" -eq "1" ]; then |
222 | gdisk -l ${node} 2>/dev/null | grep -A 20 "Number " | 222 | gdisk -l ${node} 2>/dev/null | grep -A 20 "Number " |
223 | exit 0 | 223 | exit 0 |
224 | fi | 224 | fi |
225 | 225 | ||
226 | function get_partition_size | 226 | function get_partition_size |
227 | { | 227 | { |
228 | start_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $2}'` | 228 | start_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $2}'` |
229 | end_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $3}'` | 229 | end_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $3}'` |
230 | # 1 sector = 512 bytes. This will change unit from sector to MBytes. | 230 | # 1 sector = 512 bytes. This will change unit from sector to MBytes. |
231 | let "g_sizes=($end_sector - $start_sector + 1) / 2048" | 231 | let "g_sizes=($end_sector - $start_sector + 1) / 2048" |
232 | } | 232 | } |
233 | 233 | ||
234 | function get_current_device_base_name | 234 | function get_current_device_base_name |
235 | { | 235 | { |
236 | if [ -z ${current_device_base_name} ]; then | 236 | if [ -z ${current_device_base_name} ]; then |
237 | #get the minor number of the node | 237 | #get the minor number of the node |
238 | node_device_major=`ls -l ${node} | awk '{print $5}'` | 238 | node_device_major=`ls -l ${node} | awk '{print $5}'` |
239 | node_device_minor=`ls -l ${node} | awk '{print $6}'` | 239 | node_device_minor=`ls -l ${node} | awk '{print $6}'` |
240 | all_device_info=`ls -l ${node}*` | 240 | all_device_info=`ls -l ${node}*` |
241 | 241 | ||
242 | # use '\n' as delimiter | 242 | # use '\n' as delimiter |
243 | OLDIFS=$IFS | 243 | OLDIFS=$IFS |
244 | IFS=$'\n' | 244 | IFS=$'\n' |
245 | # find the first partition, and retrieve the base name | 245 | # find the first partition, and retrieve the base name |
246 | for current_device_info in $all_device_info ; do | 246 | for current_device_info in $all_device_info ; do |
247 | current_device_major=`echo ${current_device_info} | awk '{print $5}'` | 247 | current_device_major=`echo ${current_device_info} | awk '{print $5}'` |
248 | current_device_minor=`echo ${current_device_info} | awk '{print $6}'` | 248 | current_device_minor=`echo ${current_device_info} | awk '{print $6}'` |
249 | minor_difference=$[$current_device_minor - $node_device_minor] | 249 | minor_difference=$[$current_device_minor - $node_device_minor] |
250 | if [ ${node_device_major} = ${current_device_major} ]; then | 250 | if [ ${node_device_major} = ${current_device_major} ]; then |
251 | if [ 1 -eq $minor_difference ]; then | 251 | if [ 1 -eq $minor_difference ]; then |
252 | current_device_base_name=`echo ${current_device_info} | awk '{print $10}'` | 252 | current_device_base_name=`echo ${current_device_info} | awk '{print $10}'` |
253 | current_device_base_name=${current_device_base_name%1} | 253 | current_device_base_name=${current_device_base_name%1} |
254 | IFS=$OLDIFS | 254 | IFS=$OLDIFS |
255 | return 0 | 255 | return 0 |
256 | fi | 256 | fi |
257 | fi | 257 | fi |
258 | done | 258 | done |
259 | # restore the delimeter | 259 | # restore the delimeter |
260 | IFS=$OLDIFS | 260 | IFS=$OLDIFS |
261 | echo -e >&2 "${RED}Failed to find the first partition on ${node}.${STD}" | 261 | echo -e >&2 "${RED}Failed to find the first partition on ${node}.${STD}" |
262 | exit 1 | 262 | exit 1 |
263 | fi | 263 | fi |
264 | } | 264 | } |
265 | 265 | ||
266 | function format_partition | 266 | function format_partition |
267 | { | 267 | { |
268 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` | 268 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` |
269 | if [ ${num} -gt 0 ] 2>/dev/null; then | 269 | if [ ${num} -gt 0 ] 2>/dev/null; then |
270 | get_current_device_base_name | 270 | get_current_device_base_name |
271 | echo "format_partition: $1:${current_device_base_name}p${num} ext4" | 271 | echo "format_partition: $1:${current_device_base_name}p${num} ext4" |
272 | mkfs.ext4 -F ${current_device_base_name}p${num} -L$1 | 272 | mkfs.ext4 -F ${current_device_base_name}p${num} -L$1 |
273 | fi | 273 | fi |
274 | } | 274 | } |
275 | 275 | ||
276 | function erase_partition | 276 | function erase_partition |
277 | { | 277 | { |
278 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` | 278 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` |
279 | if [ ${num} -gt 0 ] 2>/dev/null; then | 279 | if [ ${num} -gt 0 ] 2>/dev/null; then |
280 | get_current_device_base_name | 280 | get_current_device_base_name |
281 | get_partition_size $1 | 281 | get_partition_size $1 |
282 | echo "erase_partition: $1 : ${current_device_base_name}p${num} ${g_sizes}M" | 282 | echo "erase_partition: $1 : ${current_device_base_name}p${num} ${g_sizes}M" |
283 | dd if=/dev/zero of=${current_device_base_name}p${num} bs=1048576 conv=fsync,nocreat count=$g_sizes | 283 | dd if=/dev/zero of=${current_device_base_name}p${num} bs=1048576 conv=fsync,nocreat count=$g_sizes |
284 | fi | 284 | fi |
285 | } | 285 | } |
286 | 286 | ||
287 | function flash_partition | 287 | function flash_partition |
288 | { | 288 | { |
289 | for num in `gdisk -l ${node} | grep -E -w "$1|$1_a|$1_b" | awk '{print $1}'` | 289 | for num in `gdisk -l ${node} | grep -E -w "$1|$1_a|$1_b" | awk '{print $1}'` |
290 | do | 290 | do |
291 | if [ $? -eq 0 ]; then | 291 | if [ $? -eq 0 ]; then |
292 | if [ "$(echo ${1} | grep "bootloader_")" != "" ]; then | 292 | if [ "$(echo ${1} | grep "bootloader_")" != "" ]; then |
293 | img_name=${uboot_proper_file} | 293 | img_name=${uboot_proper_file} |
294 | elif [ "$(echo ${1} | grep "system")" != "" ]; then | 294 | elif [ "$(echo ${1} | grep "system")" != "" ]; then |
295 | img_name=${systemimage_file} | 295 | img_name=${systemimage_file} |
296 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then | 296 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then |
297 | img_name=${vendor_file} | 297 | img_name=${vendor_file} |
298 | elif [ "$(echo ${1} | grep "product")" != "" ]; then | 298 | elif [ "$(echo ${1} | grep "product")" != "" ]; then |
299 | img_name=${product_file} | 299 | img_name=${product_file} |
300 | elif [ ${support_dtbo} -eq 1 ] && [ $(echo ${1} | grep "boot") != "" ] 2>/dev/null; then | 300 | elif [ ${support_dtbo} -eq 1 ] && [ $(echo ${1} | grep "boot") != "" ] 2>/dev/null; then |
301 | img_name="boot.img" | 301 | img_name="boot.img" |
302 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then | 302 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then |
303 | img_name="${1%_*}-${soc_name}${dtb_feature}.img" | 303 | img_name="${1%_*}-${soc_name}-smarc-${dtb_feature}.img" |
304 | elif [ "$(echo ${1} | grep "super")" != "" ]; then | 304 | elif [ "$(echo ${1} | grep "super")" != "" ]; then |
305 | if [ ${dont_generate_super} -eq 0 ]; then | 305 | if [ ${dont_generate_super} -eq 0 ]; then |
306 | make_super_image | 306 | make_super_image |
307 | fi | 307 | fi |
308 | img_name=${super_file} | 308 | img_name=${super_file} |
309 | else | 309 | else |
310 | img_name="${1%_*}-${soc_name}.img" | 310 | img_name="${1%_*}-${soc_name}.img" |
311 | fi | 311 | fi |
312 | # check whether the image files to be flashed exist or not | 312 | # check whether the image files to be flashed exist or not |
313 | if [ "$(echo ${1} | grep "super")" = "" ] || [ ${dont_generate_super} -eq 1 ]; then | 313 | if [ "$(echo ${1} | grep "super")" = "" ] || [ ${dont_generate_super} -eq 1 ]; then |
314 | if [ ! -f "${image_directory}${img_name}" ]; then | 314 | if [ ! -f "${image_directory}${img_name}" ]; then |
315 | echo -e >&2 "${RED}File ${img_name} not found. Please check. Exiting${STD}" | 315 | echo -e >&2 "${RED}File ${img_name} not found. Please check. Exiting${STD}" |
316 | return 1 | 316 | return 1 |
317 | fi | 317 | fi |
318 | fi | 318 | fi |
319 | get_current_device_base_name | 319 | get_current_device_base_name |
320 | echo "flash_partition: ${img_name} ---> ${current_device_base_name}p${num}" | 320 | echo "flash_partition: ${img_name} ---> ${current_device_base_name}p${num}" |
321 | 321 | ||
322 | if [ "$(echo ${1} | grep "system")" != "" ] || [ "$(echo ${1} | grep "vendor")" != "" ] || \ | 322 | if [ "$(echo ${1} | grep "system")" != "" ] || [ "$(echo ${1} | grep "vendor")" != "" ] || \ |
323 | [ "$(echo ${1} | grep "product")" != "" ]; then | 323 | [ "$(echo ${1} | grep "product")" != "" ]; then |
324 | elif [ "$(echo ${1} | grep "super")" != "" ]; then | 324 | elif [ "$(echo ${1} | grep "super")" != "" ]; then |
325 | if [ ${dont_generate_super} -eq 0 ]; then | 325 | if [ ${dont_generate_super} -eq 0 ]; then |
326 | else | 326 | else |
327 | fi | 327 | fi |
328 | else | 328 | else |
329 | dd if=${image_directory}${img_name} of=${current_device_base_name}p${num} bs=10M conv=fsync,nocreat | 329 | dd if=${image_directory}${img_name} of=${current_device_base_name}p${num} bs=10M conv=fsync,nocreat |
330 | fi | 330 | fi |
331 | fi | 331 | fi |
332 | done | 332 | done |
333 | } | 333 | } |
334 | 334 | ||
335 | function format_android | 335 | function format_android |
336 | { | 336 | { |
337 | echo "formating android images" | 337 | echo "formating android images" |
338 | format_partition metadata | 338 | format_partition metadata |
339 | format_partition cache | 339 | format_partition cache |
340 | erase_partition presistdata | 340 | erase_partition presistdata |
341 | erase_partition fbmisc | 341 | erase_partition fbmisc |
342 | erase_partition misc | 342 | erase_partition misc |
343 | format_partition userdata | 343 | format_partition userdata |
344 | } | 344 | } |
345 | 345 | ||
346 | function make_partition | 346 | function make_partition |
347 | { | 347 | { |
348 | echo "make gpt partition for android: ${partition_file}" | 348 | echo "make gpt partition for android: ${partition_file}" |
349 | dd if=${image_directory}${partition_file} of=${node} bs=1k count=${vaild_gpt_size} conv=fsync | 349 | dd if=${image_directory}${partition_file} of=${node} bs=1k count=${vaild_gpt_size} conv=fsync |
350 | } | 350 | } |
351 | 351 | ||
352 | function flash_android | 352 | function flash_android |
353 | { | 353 | { |
354 | boot_partition="boot"${slot} | 354 | boot_partition="boot"${slot} |
355 | recovery_partition="recovery"${slot} | 355 | recovery_partition="recovery"${slot} |
356 | system_partition="system"${slot} | 356 | system_partition="system"${slot} |
357 | vendor_partition="vendor"${slot} | 357 | vendor_partition="vendor"${slot} |
358 | product_partition="product"${slot} | 358 | product_partition="product"${slot} |
359 | vbmeta_partition="vbmeta"${slot} | 359 | vbmeta_partition="vbmeta"${slot} |
360 | dtbo_partition="dtbo"${slot} | 360 | dtbo_partition="dtbo"${slot} |
361 | super_partition="super" | 361 | super_partition="super" |
362 | gdisk -l ${node} 2>/dev/null | grep -q "dtbo" && support_dtbo=1 | 362 | gdisk -l ${node} 2>/dev/null | grep -q "dtbo" && support_dtbo=1 |
363 | gdisk -l ${node} 2>/dev/null | grep -q "super" && support_dynamic_partition=1 | 363 | gdisk -l ${node} 2>/dev/null | grep -q "super" && support_dynamic_partition=1 |
364 | 364 | ||
365 | if [ ${support_dual_bootloader} -eq 1 ]; then | 365 | if [ ${support_dual_bootloader} -eq 1 ]; then |
366 | bootloader_file=spl-imx8mq${uboot_feature}.bin | 366 | bootloader_file=spl-${soc_name}${uboot_feature}.bin |
367 | uboot_proper_file=bootloader-imx8mq${uboot_feature}.img | 367 | uboot_proper_file=bootloader-${soc_name}${uboot_feature}.img |
368 | bootloader_partition="bootloader"${slot} | 368 | bootloader_partition="bootloader"${slot} |
369 | flash_partition ${bootloader_partition} || exit 1 | 369 | flash_partition ${bootloader_partition} || exit 1 |
370 | else | 370 | else |
371 | bootloader_file=u-boot-imx8mq${uboot_feature}.imx | 371 | bootloader_file=u-boot-${soc_name}${uboot_feature}.imx |
372 | fi | 372 | fi |
373 | 373 | ||
374 | if [ "${support_dtbo}" -eq "1" ] ; then | 374 | if [ "${support_dtbo}" -eq "1" ] ; then |
375 | flash_partition ${dtbo_partition} || exit 1 | 375 | flash_partition ${dtbo_partition} || exit 1 |
376 | fi | 376 | fi |
377 | flash_partition ${boot_partition} || exit 1 | 377 | flash_partition ${boot_partition} || exit 1 |
378 | flash_partition ${recovery_partition} || exit 1 | 378 | flash_partition ${recovery_partition} || exit 1 |
379 | if [ ${support_dynamic_partition} -eq 0 ]; then | 379 | if [ ${support_dynamic_partition} -eq 0 ]; then |
380 | flash_partition ${system_partition} || exit 1 | 380 | flash_partition ${system_partition} || exit 1 |
381 | flash_partition ${vendor_partition} || exit 1 | 381 | flash_partition ${vendor_partition} || exit 1 |
382 | flash_partition ${product_partition} || exit 1 | 382 | flash_partition ${product_partition} || exit 1 |
383 | else | 383 | else |
384 | flash_partition ${super_partition} || exit 1 | 384 | flash_partition ${super_partition} || exit 1 |
385 | fi | 385 | fi |
386 | flash_partition ${vbmeta_partition} || exit 1 | 386 | flash_partition ${vbmeta_partition} || exit 1 |
387 | echo "erase_partition: uboot : ${node}" | 387 | echo "erase_partition: uboot : ${node}" |
388 | echo "flash_partition: ${bootloader_file} ---> ${node}" | 388 | echo "flash_partition: ${bootloader_file} ---> ${node}" |
389 | first_partition_offset=`gdisk -l ${node} | grep ' 1 ' | awk '{print $2}'` | 389 | first_partition_offset=`gdisk -l ${node} | grep ' 1 ' | awk '{print $2}'` |
390 | # the unit of first_partition_offset is sector size which is 512 Byte. | 390 | # the unit of first_partition_offset is sector size which is 512 Byte. |
391 | count_bootloader=`expr ${first_partition_offset} / 2 - ${bootloader_offset}` | 391 | count_bootloader=`expr ${first_partition_offset} / 2 - ${bootloader_offset}` |
392 | echo "the bootloader partition size: ${count_bootloader}" | 392 | echo "the bootloader partition size: ${count_bootloader}" |
393 | dd if=/dev/zero of=${node} bs=1k seek=${bootloader_offset} conv=fsync count=${count_bootloader} | 393 | dd if=/dev/zero of=${node} bs=1k seek=${bootloader_offset} conv=fsync count=${count_bootloader} |
394 | dd if=${image_directory}${bootloader_file} of=${node} bs=1k seek=${bootloader_offset} conv=fsync | 394 | dd if=${image_directory}${bootloader_file} of=${node} bs=1k seek=${bootloader_offset} conv=fsync |
395 | if [ "${flash_mcu}" -eq "1" ] ; then | 395 | if [ "${flash_mcu}" -eq "1" ] ; then |
396 | if [ "${soc_name}" = "imx7ulp" ]; then | 396 | if [ "${soc_name}" = "imx7ulp" ]; then |
397 | echo -e >&2 "${RED}Caution:${STD}" | 397 | echo -e >&2 "${RED}Caution:${STD}" |
398 | echo -e >&2 " mcu image for imx7ulp_evk is in SPI flash on board, not in SD card, use uboot commands to flash it." | 398 | echo -e >&2 " mcu image for imx7ulp_evk is in SPI flash on board, not in SD card, use uboot commands to flash it." |
399 | else | 399 | else |
400 | mcu_image=${soc_name#*-}"_mcu_demo.img" | 400 | mcu_image=${soc_name#*-}"_mcu_demo.img" |
401 | echo "flash_partition: ${mcu_image} ---> ${node}" | 401 | echo "flash_partition: ${mcu_image} ---> ${node}" |
402 | dd if=${image_directory}${mcu_image} of=${node} bs=1k seek=${mcu_image_offset} conv=fsync | 402 | dd if=${image_directory}${mcu_image} of=${node} bs=1k seek=${mcu_image_offset} conv=fsync |
403 | fi | 403 | fi |
404 | fi | 404 | fi |
405 | } | 405 | } |
406 | 406 | ||
407 | if [ "${not_partition}" -ne "1" ] ; then | 407 | if [ "${not_partition}" -ne "1" ] ; then |
408 | # invoke make_partition to write first 17KB in partition table image to sdcard start | 408 | # invoke make_partition to write first 17KB in partition table image to sdcard start |
409 | make_partition || exit 1 | 409 | make_partition || exit 1 |
410 | # unmount partitions and then force to re-read the partition table of the specified device | 410 | # unmount partitions and then force to re-read the partition table of the specified device |
411 | sleep 3 | 411 | sleep 3 |
412 | for i in `cat /proc/mounts | grep "${node}" | awk '{print $2}'`; do umount $i; done | 412 | for i in `cat /proc/mounts | grep "${node}" | awk '{print $2}'`; do umount $i; done |
413 | hdparm -z ${node} | 413 | hdparm -z ${node} |
414 | # backup the GPT table to last LBA for sd card. execute "gdisk ${node}" with the input characters | 414 | # backup the GPT table to last LBA for sd card. execute "gdisk ${node}" with the input characters |
415 | # redirect standard OUTPUT to /dev/null to reduce some ouput | 415 | # redirect standard OUTPUT to /dev/null to reduce some ouput |
416 | echo -e 'r\ne\nY\nw\nY\nY' | gdisk ${node} 1>/dev/null | 416 | echo -e 'r\ne\nY\nw\nY\nY' | gdisk ${node} 1>/dev/null |
417 | 417 | ||
418 | # use "boot_b" to check whether dual slot is supported | 418 | # use "boot_b" to check whether dual slot is supported |
419 | gdisk -l ${node} | grep -E -w "boot_b" 2>&1 > /dev/null && support_dualslot=1 | 419 | gdisk -l ${node} | grep -E -w "boot_b" 2>&1 > /dev/null && support_dualslot=1 |
420 | 420 | ||
421 | format_android | 421 | format_android |
422 | fi | 422 | fi |
423 | 423 | ||
424 | flash_android || exit 1 | 424 | flash_android || exit 1 |
425 | 425 | ||
426 | if [ "${slot}" = "_b" ]; then | 426 | if [ "${slot}" = "_b" ]; then |
427 | echo -e >&2 "${RED}Caution:${STD}" | 427 | echo -e >&2 "${RED}Caution:${STD}" |
428 | echo -e >&2 " This script can't generate metadata to directly boot from b slot, fastboot command may need to be used to boot from b slot." | 428 | echo -e >&2 " This script can't generate metadata to directly boot from b slot, fastboot command may need to be used to boot from b slot." |
429 | fi | 429 | fi |
430 | 430 | ||
431 | echo | 431 | echo |
432 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" | 432 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" |
433 | 433 | ||
434 | exit 0 | 434 | exit 0 |
435 | 435 | ||
436 | # For MFGTool Notes: | 436 | # For MFGTool Notes: |
437 | # MFGTool use mksdcard-android.tar store this script | 437 | # MFGTool use mksdcard-android.tar store this script |
438 | # if you want change it. | 438 | # if you want change it. |
439 | # do following: | 439 | # do following: |
440 | # tar xf mksdcard-android.sh.tar | 440 | # tar xf mksdcard-android.sh.tar |
441 | # vi mksdcard-android.sh | 441 | # vi mksdcard-android.sh |
442 | # [ edit want you want to change ] | 442 | # [ edit want you want to change ] |
443 | # rm mksdcard-android.sh.tar; tar cf mksdcard-android.sh.tar mksdcard-android.sh | 443 | # rm mksdcard-android.sh.tar; tar cf mksdcard-android.sh.tar mksdcard-android.sh |
444 | 444 |
scripts/sh/smarc-mksdcard.sh
1 | #!/bin/bash -e | 1 | #!/bin/bash -e |
2 | 2 | ||
3 | help() { | 3 | help() { |
4 | 4 | ||
5 | bn=`basename $0` | 5 | bn=`basename $0` |
6 | cat << EOF | 6 | cat << EOF |
7 | 7 | ||
8 | Version: 1.6 | 8 | Version: 1.6 |
9 | Last change: generate super.img when flash images with dynamic partition feature | 9 | Last change: generate super.img when flash images with dynamic partition feature |
10 | V1.4 change: add support imx8mn chips | 10 | V1.4 change: add support imx8mn chips |
11 | 11 | ||
12 | Usage: $bn <option> device_node | 12 | Usage: $bn <option> device_node |
13 | 13 | ||
14 | options: | 14 | options: |
15 | -h displays this help message | 15 | -h displays this help message |
16 | -s only get partition size | 16 | -s only get partition size |
17 | -np not partition. | 17 | -np not partition. |
18 | -f soc_name flash android image file with soc_name. Below table lists soc_name values and bootloader offset. | 18 | -f soc_name flash android image file with soc_name. Below table lists soc_name values and bootloader offset. |
19 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ | 19 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ |
20 | โ soc_name โ offset โ | 20 | โ soc_name โ offset โ |
21 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 21 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
22 | โ imx6dl/imx6q/imx6qp โ 1k โ | 22 | โ imx6dl/imx6q/imx6qp โ 1k โ |
23 | โ imx6sx/imx7d/imx7ulp โ โ | 23 | โ imx6sx/imx7d/imx7ulp โ โ |
24 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 24 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
25 | โ imx8mm/imx8mq โ 33k โ | 25 | โ imx8mm/imx8mq โ 33k โ |
26 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค | 26 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโค |
27 | โimx8qm/imx8qxp/imx8mn/imx8mpโ 32k โ | 27 | โimx8qm/imx8qxp/imx8mn/imx8mpโ 32k โ |
28 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ | 28 | โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ |
29 | -a only flash image to slot_a | 29 | -a only flash image to slot_a |
30 | -b only flash image to slot_b | 30 | -b only flash image to slot_b |
31 | -c card_size optional setting: 7 / 14 / 28 | 31 | -c card_size optional setting: 7 / 14 / 28 |
32 | If not set, use partition-table.img (default) | 32 | If not set, use partition-table.img (default) |
33 | If set to 7, use partition-table-7GB.img for 8GB SD card | 33 | If set to 7, use partition-table-7GB.img for 8GB SD card |
34 | If set to 14, use partition-table-14GB.img for 16GB SD card | 34 | If set to 14, use partition-table-14GB.img for 16GB SD card |
35 | If set to 28, use partition-table-28GB.img for 32GB SD card | 35 | If set to 28, use partition-table-28GB.img for 32GB SD card |
36 | Make sure the corresponding file exist for your platform. | 36 | Make sure the corresponding file exist for your platform. |
37 | -u uboot_feature flash uboot or spl&bootloader image files with "uboot_feature" in their names. | 37 | -u uboot_feature flash uboot or spl&bootloader image files with "uboot_feature" in their names. |
38 | -d dtb_feature flash dtbo, recovery and vbmeta image files with "dtb_feature" in their names. | 38 | -d dtb_feature flash dtbo, recovery and vbmeta image files with "dtb_feature" in their names. |
39 | -D directory specify the directory which contains the images to be flashed. | 39 | -D directory specify the directory which contains the images to be flashed. |
40 | -m flash mcu image | 40 | -m flash mcu image |
41 | -o force_offset force set uboot offset | 41 | -o force_offset force set uboot offset |
42 | -super do not generate super.img when flash the images with dynamic partition feature enabled. | 42 | -super do not generate super.img when flash the images with dynamic partition feature enabled. |
43 | Under the condition that dynamic partition feature are enabled: | 43 | Under the condition that dynamic partition feature are enabled: |
44 | if this option is not used, super.img will be generated under "/tmp" and flashed to the board. | 44 | if this option is not used, super.img will be generated under "/tmp" and flashed to the board. |
45 | if this option is used, make sure super.img already exists together with other images. | 45 | if this option is used, make sure super.img already exists together with other images. |
46 | EOF | 46 | EOF |
47 | 47 | ||
48 | } | 48 | } |
49 | 49 | ||
50 | # this function will invoke lpmake to create super.img, the super.img will | 50 | # this function will invoke lpmake to create super.img, the super.img will |
51 | # be created in /tmp, make sure that there is enouth space | 51 | # be created in /tmp, make sure that there is enouth space |
52 | function make_super_image | 52 | function make_super_image |
53 | { | 53 | { |
54 | rm -rf /tmp/${super_file} | 54 | rm -rf /tmp/${super_file} |
55 | # now dynamic partition is only enabled in dual slot condition | 55 | # now dynamic partition is only enabled in dual slot condition |
56 | if [ ${support_dualslot} -eq 1 ]; then | 56 | if [ ${support_dualslot} -eq 1 ]; then |
57 | if [ "${slot}" == "_a" ]; then | 57 | if [ "${slot}" == "_a" ]; then |
58 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 58 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
59 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 59 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
60 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 60 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
61 | elif [ "${slot}" == "_b" ]; then | 61 | elif [ "${slot}" == "_b" ]; then |
62 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 62 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
63 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 63 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
64 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 64 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
65 | else | 65 | else |
66 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" | 66 | lpmake_system_image_a="--image system_a=${image_directory}${systemimage_file}" |
67 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" | 67 | lpmake_vendor_image_a="--image vendor_a=${image_directory}${vendor_file}" |
68 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" | 68 | lpmake_product_image_a="--image product_a=${image_directory}${product_file}" |
69 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" | 69 | lpmake_system_image_b="--image system_b=${image_directory}${systemimage_file}" |
70 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" | 70 | lpmake_vendor_image_b="--image vendor_b=${image_directory}${vendor_file}" |
71 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" | 71 | lpmake_product_image_b="--image product_b=${image_directory}${product_file}" |
72 | fi | 72 | fi |
73 | fi | 73 | fi |
74 | 74 | ||
75 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ | 75 | ${image_directory}lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --device super:7516192768 \ |
76 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ | 76 | --group nxp_dynamic_partitions_a:3747610624 --group nxp_dynamic_partitions_b:3747610624 \ |
77 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ | 77 | --partition system_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_system_image_a} \ |
78 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ | 78 | --partition system_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_system_image_b} \ |
79 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ | 79 | --partition vendor_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_vendor_image_a} \ |
80 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ | 80 | --partition vendor_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_vendor_image_b} \ |
81 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ | 81 | --partition product_a:readonly:0:nxp_dynamic_partitions_a ${lpmake_product_image_a} \ |
82 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ | 82 | --partition product_b:readonly:0:nxp_dynamic_partitions_b ${lpmake_product_image_b} \ |
83 | --sparse --output /tmp/${super_file} | 83 | --sparse --output /tmp/${super_file} |
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | ||
87 | # parse command line | 87 | # parse command line |
88 | moreoptions=1 | 88 | moreoptions=1 |
89 | node="na" | 89 | node="na" |
90 | soc_name="" | 90 | soc_name="" |
91 | force_offset="" | 91 | force_offset="" |
92 | cal_only=0 | 92 | cal_only=0 |
93 | card_size=0 | 93 | card_size=0 |
94 | bootloader_offset=1 | 94 | bootloader_offset=1 |
95 | mcu_image_offset=5120 | 95 | mcu_image_offset=5120 |
96 | vaild_gpt_size=17 | 96 | vaild_gpt_size=17 |
97 | not_partition=0 | 97 | not_partition=0 |
98 | slot="" | 98 | slot="" |
99 | systemimage_file="system.img" | 99 | systemimage_file="system.img" |
100 | vendor_file="vendor.img" | 100 | vendor_file="vendor.img" |
101 | product_file="product.img" | 101 | product_file="product.img" |
102 | partition_file="partition-table.img" | 102 | partition_file="partition-table.img" |
103 | super_file="super.img" | 103 | super_file="super.img" |
104 | g_sizes=0 | 104 | g_sizes=0 |
105 | support_dtbo=0 | 105 | support_dtbo=0 |
106 | flash_mcu=0 | 106 | flash_mcu=0 |
107 | RED='\033[0;31m' | 107 | RED='\033[0;31m' |
108 | STD='\033[0;0m' | 108 | STD='\033[0;0m' |
109 | 109 | ||
110 | image_directory="" | 110 | image_directory="" |
111 | dtb_feature="" | 111 | dtb_feature="" |
112 | uboot_feature="" | 112 | uboot_feature="" |
113 | support_dual_bootloader=0 | 113 | support_dual_bootloader=0 |
114 | support_dualslot=0 | 114 | support_dualslot=0 |
115 | support_dynamic_partition=0 | 115 | support_dynamic_partition=0 |
116 | lpmake_system_image_a="" | 116 | lpmake_system_image_a="" |
117 | lpmake_system_image_b="" | 117 | lpmake_system_image_b="" |
118 | lpmake_vendor_image_a="" | 118 | lpmake_vendor_image_a="" |
119 | lpmake_vendor_image_b="" | 119 | lpmake_vendor_image_b="" |
120 | lpmake_product_image_a="" | 120 | lpmake_product_image_a="" |
121 | lpmake_product_image_b="" | 121 | lpmake_product_image_b="" |
122 | dont_generate_super=0 | 122 | dont_generate_super=0 |
123 | node_device_major="" | 123 | node_device_major="" |
124 | node_device_minor=0 | 124 | node_device_minor=0 |
125 | current_device_major="" | 125 | current_device_major="" |
126 | current_device_minor=0 | 126 | current_device_minor=0 |
127 | minor_difference=0 | 127 | minor_difference=0 |
128 | current_device_base_name="" | 128 | current_device_base_name="" |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | while [ "$moreoptions" = 1 -a $# -gt 0 ]; do | 132 | while [ "$moreoptions" = 1 -a $# -gt 0 ]; do |
133 | case $1 in | 133 | case $1 in |
134 | -h) help; exit ;; | 134 | -h) help; exit ;; |
135 | -s) cal_only=1 ;; | 135 | -s) cal_only=1 ;; |
136 | -f) soc_name=$2; shift;; | 136 | -f) soc_name=$2; shift;; |
137 | -c) card_size=$2; shift;; | 137 | -c) card_size=$2; shift;; |
138 | -np) not_partition=1 ;; | 138 | -np) not_partition=1 ;; |
139 | -a) slot="_a" ;; | 139 | -a) slot="_a" ;; |
140 | -b) slot="_b" ;; | 140 | -b) slot="_b" ;; |
141 | -m) flash_mcu=1 ;; | 141 | -m) flash_mcu=1 ;; |
142 | -o) force_offset=$2; shift;; | 142 | -o) force_offset=$2; shift;; |
143 | -u) uboot_feature=-$2; shift;; | 143 | -u) uboot_feature=-$2; shift;; |
144 | -d) dtb_feature=$2; shift;; | 144 | -d) dtb_feature=$2; shift;; |
145 | -D) image_directory=$2; shift;; | 145 | -D) image_directory=$2; shift;; |
146 | -super) dont_generate_super=1 ;; | 146 | -super) dont_generate_super=1 ;; |
147 | *) moreoptions=0; node=$1 ;; | 147 | *) moreoptions=0; node=$1 ;; |
148 | esac | 148 | esac |
149 | [ "$moreoptions" = 0 ] && [ $# -gt 1 ] && help && exit | 149 | [ "$moreoptions" = 0 ] && [ $# -gt 1 ] && help && exit |
150 | [ "$moreoptions" = 1 ] && shift | 150 | [ "$moreoptions" = 1 ] && shift |
151 | done | 151 | done |
152 | 152 | ||
153 | # check required applications are installed | 153 | # check required applications are installed |
154 | command -v simg2img >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing simg2img app. Please run: sudo apt-get install android-tools-fsutils${STD}" ; exit 1 ; } | 154 | command -v simg2img >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing simg2img app. Please run: sudo apt-get install android-tools-fsutils${STD}" ; exit 1 ; } |
155 | command -v hdparm >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing hdparm app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } | 155 | command -v hdparm >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing hdparm app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } |
156 | command -v gdisk >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing gdisk app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } | 156 | command -v gdisk >/dev/null 2>&1 || { echo -e >&2 "${RED}Missing gdisk app. Please make sure it is installed. Exiting.${STD}" ; exit 1 ; } |
157 | 157 | ||
158 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then | 158 | if [ ${card_size} -ne 0 ] && [ ${card_size} -ne 7 ] && [ ${card_size} -ne 14 ] && [ ${card_size} -ne 28 ]; then |
159 | help; exit 1; | 159 | help; exit 1; |
160 | fi | 160 | fi |
161 | 161 | ||
162 | # imx8qxp RevB0 chips, imx8qm RevB0 chips, imx8mp and imx8mn chips, bootloader offset is 32KB on SD card | 162 | # imx8qxp RevB0 chips, imx8qm RevB0 chips, imx8mp and imx8mn chips, bootloader offset is 32KB on SD card |
163 | if [ "${soc_name}" = "imx8qxp" -o "${soc_name}" = "imx8qm" -o "${soc_name}" = "imx8mn" -o "${soc_name}" = "imx8mp" ]; then | 163 | if [ "${soc_name}" = "imx8qxp" -o "${soc_name}" = "imx8qm" -o "${soc_name}" = "imx8mn" -o "${soc_name}" = "imx8mp" ]; then |
164 | bootloader_offset=32 | 164 | bootloader_offset=32 |
165 | fi | 165 | fi |
166 | 166 | ||
167 | # imx8mq chips and imx8mm chips, bootloader offset is 33KB on SD card | 167 | # imx8mq chips and imx8mm chips, bootloader offset is 33KB on SD card |
168 | if [ "${soc_name}" = "imx8mq" -o "${soc_name}" = "imx8mm" -o "${soc_name}" = "smarcimx8mq" ]; then | 168 | if [ "${soc_name}" = "imx8mq" -o "${soc_name}" = "imx8mm" ]; then |
169 | bootloader_offset=33 | 169 | bootloader_offset=33 |
170 | fi | 170 | fi |
171 | 171 | ||
172 | if [ "${force_offset}" != "" ]; then | 172 | if [ "${force_offset}" != "" ]; then |
173 | bootloader_offset=${force_offset} | 173 | bootloader_offset=${force_offset} |
174 | fi | 174 | fi |
175 | 175 | ||
176 | # exit if the block device file specified by ${node} doesn't exist | 176 | # exit if the block device file specified by ${node} doesn't exist |
177 | if [ ! -e ${node} ]; then | 177 | if [ ! -e ${node} ]; then |
178 | help | 178 | help |
179 | exit 1 | 179 | exit 1 |
180 | fi | 180 | fi |
181 | 181 | ||
182 | # Process of the uboot_feature parameter | 182 | # Process of the uboot_feature parameter |
183 | if [[ "${uboot_feature}" = *"trusty"* ]] || [[ "${uboot_feature}" = *"secure"* ]]; then | 183 | if [[ "${uboot_feature}" = *"trusty"* ]] || [[ "${uboot_feature}" = *"secure"* ]]; then |
184 | echo -e >&2 ${RED}Do not flash the image with Trusty OS to SD card${STD} | 184 | echo -e >&2 ${RED}Do not flash the image with Trusty OS to SD card${STD} |
185 | help | 185 | help |
186 | exit 1 | 186 | exit 1 |
187 | fi | 187 | fi |
188 | if [[ "${uboot_feature}" = *"dual"* ]]; then | 188 | if [[ "${uboot_feature}" = *"dual"* ]]; then |
189 | support_dual_bootloader=1; | 189 | support_dual_bootloader=1; |
190 | fi | 190 | fi |
191 | 191 | ||
192 | 192 | ||
193 | # dual bootloader support will use different gpt. Android Automative only boot from eMMC, judgement here is complete | 193 | # dual bootloader support will use different gpt. Android Automative only boot from eMMC, judgement here is complete |
194 | if [ ${support_dual_bootloader} -eq 1 ]; then | 194 | if [ ${support_dual_bootloader} -eq 1 ]; then |
195 | if [ ${card_size} -gt 0 ]; then | 195 | if [ ${card_size} -gt 0 ]; then |
196 | partition_file="partition-table-${card_size}GB-dual.img"; | 196 | partition_file="partition-table-${card_size}GB-dual.img"; |
197 | else | 197 | else |
198 | partition_file="partition-table-dual.img"; | 198 | partition_file="partition-table-dual.img"; |
199 | fi | 199 | fi |
200 | else | 200 | else |
201 | if [ ${card_size} -gt 0 ]; then | 201 | if [ ${card_size} -gt 0 ]; then |
202 | partition_file="partition-table-${card_size}GB.img"; | 202 | partition_file="partition-table-${card_size}GB.img"; |
203 | else | 203 | else |
204 | partition_file="partition-table.img"; | 204 | partition_file="partition-table.img"; |
205 | fi | 205 | fi |
206 | fi | 206 | fi |
207 | 207 | ||
208 | 208 | ||
209 | # for specified directory, make sure there is a slash at the end | 209 | # for specified directory, make sure there is a slash at the end |
210 | if [[ "${image_directory}" = "" ]]; then | 210 | if [[ "${image_directory}" = "" ]]; then |
211 | image_directory=`pwd`; | 211 | image_directory=`pwd`; |
212 | fi | 212 | fi |
213 | image_directory="${image_directory%/}/"; | 213 | image_directory="${image_directory%/}/"; |
214 | 214 | ||
215 | if [ ! -f "${image_directory}${partition_file}" ]; then | 215 | if [ ! -f "${image_directory}${partition_file}" ]; then |
216 | echo -e >&2 "${RED}File ${partition_file} not found. Please check. Exiting${STD}" | 216 | echo -e >&2 "${RED}File ${partition_file} not found. Please check. Exiting${STD}" |
217 | return 1 | 217 | return 1 |
218 | fi | 218 | fi |
219 | 219 | ||
220 | 220 | ||
221 | # dump partitions | 221 | # dump partitions |
222 | if [ "${cal_only}" -eq "1" ]; then | 222 | if [ "${cal_only}" -eq "1" ]; then |
223 | gdisk -l ${node} 2>/dev/null | grep -A 20 "Number " | 223 | gdisk -l ${node} 2>/dev/null | grep -A 20 "Number " |
224 | exit 0 | 224 | exit 0 |
225 | fi | 225 | fi |
226 | 226 | ||
227 | function get_partition_size | 227 | function get_partition_size |
228 | { | 228 | { |
229 | start_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $2}'` | 229 | start_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $2}'` |
230 | end_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $3}'` | 230 | end_sector=`gdisk -l ${node} | grep -w $1 | awk '{print $3}'` |
231 | # 1 sector = 512 bytes. This will change unit from sector to MBytes. | 231 | # 1 sector = 512 bytes. This will change unit from sector to MBytes. |
232 | let "g_sizes=($end_sector - $start_sector + 1) / 2048" | 232 | let "g_sizes=($end_sector - $start_sector + 1) / 2048" |
233 | } | 233 | } |
234 | 234 | ||
235 | function get_current_device_base_name | 235 | function get_current_device_base_name |
236 | { | 236 | { |
237 | if [ -z ${current_device_base_name} ]; then | 237 | if [ -z ${current_device_base_name} ]; then |
238 | #get the minor number of the node | 238 | #get the minor number of the node |
239 | node_device_major=`ls -l ${node} | awk '{print $5}'` | 239 | node_device_major=`ls -l ${node} | awk '{print $5}'` |
240 | node_device_minor=`ls -l ${node} | awk '{print $6}'` | 240 | node_device_minor=`ls -l ${node} | awk '{print $6}'` |
241 | all_device_info=`ls -l ${node}*` | 241 | all_device_info=`ls -l ${node}*` |
242 | 242 | ||
243 | # use '\n' as delimiter | 243 | # use '\n' as delimiter |
244 | OLDIFS=$IFS | 244 | OLDIFS=$IFS |
245 | IFS=$'\n' | 245 | IFS=$'\n' |
246 | # find the first partition, and retrieve the base name | 246 | # find the first partition, and retrieve the base name |
247 | for current_device_info in $all_device_info ; do | 247 | for current_device_info in $all_device_info ; do |
248 | current_device_major=`echo ${current_device_info} | awk '{print $5}'` | 248 | current_device_major=`echo ${current_device_info} | awk '{print $5}'` |
249 | current_device_minor=`echo ${current_device_info} | awk '{print $6}'` | 249 | current_device_minor=`echo ${current_device_info} | awk '{print $6}'` |
250 | minor_difference=$[$current_device_minor - $node_device_minor] | 250 | minor_difference=$[$current_device_minor - $node_device_minor] |
251 | if [ ${node_device_major} = ${current_device_major} ]; then | 251 | if [ ${node_device_major} = ${current_device_major} ]; then |
252 | if [ 1 -eq $minor_difference ]; then | 252 | if [ 1 -eq $minor_difference ]; then |
253 | current_device_base_name=`echo ${current_device_info} | awk '{print $10}'` | 253 | current_device_base_name=`echo ${current_device_info} | awk '{print $10}'` |
254 | current_device_base_name=${current_device_base_name%1} | 254 | current_device_base_name=${current_device_base_name%1} |
255 | IFS=$OLDIFS | 255 | IFS=$OLDIFS |
256 | return 0 | 256 | return 0 |
257 | fi | 257 | fi |
258 | fi | 258 | fi |
259 | done | 259 | done |
260 | # restore the delimeter | 260 | # restore the delimeter |
261 | IFS=$OLDIFS | 261 | IFS=$OLDIFS |
262 | echo -e >&2 "${RED}Failed to find the first partition on ${node}.${STD}" | 262 | echo -e >&2 "${RED}Failed to find the first partition on ${node}.${STD}" |
263 | exit 1 | 263 | exit 1 |
264 | fi | 264 | fi |
265 | } | 265 | } |
266 | 266 | ||
267 | function format_partition | 267 | function format_partition |
268 | { | 268 | { |
269 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` | 269 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` |
270 | if [ ${num} -gt 0 ] 2>/dev/null; then | 270 | if [ ${num} -gt 0 ] 2>/dev/null; then |
271 | get_current_device_base_name | 271 | get_current_device_base_name |
272 | echo "format_partition: $1:${current_device_base_name}${num} ext4" | 272 | echo "format_partition: $1:${current_device_base_name}${num} ext4" |
273 | mkfs.ext4 -F ${current_device_base_name}${num} -L$1 | 273 | mkfs.ext4 -F ${current_device_base_name}${num} -L$1 |
274 | fi | 274 | fi |
275 | } | 275 | } |
276 | 276 | ||
277 | function erase_partition | 277 | function erase_partition |
278 | { | 278 | { |
279 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` | 279 | num=`gdisk -l ${node} | grep -w $1 | awk '{print $1}'` |
280 | if [ ${num} -gt 0 ] 2>/dev/null; then | 280 | if [ ${num} -gt 0 ] 2>/dev/null; then |
281 | get_current_device_base_name | 281 | get_current_device_base_name |
282 | get_partition_size $1 | 282 | get_partition_size $1 |
283 | echo "erase_partition: $1 : ${current_device_base_name}${num} ${g_sizes}M" | 283 | echo "erase_partition: $1 : ${current_device_base_name}${num} ${g_sizes}M" |
284 | dd if=/dev/zero of=${current_device_base_name}${num} bs=1048576 conv=fsync,nocreat count=$g_sizes | 284 | dd if=/dev/zero of=${current_device_base_name}${num} bs=1048576 conv=fsync,nocreat count=$g_sizes |
285 | fi | 285 | fi |
286 | } | 286 | } |
287 | 287 | ||
288 | function flash_partition | 288 | function flash_partition |
289 | { | 289 | { |
290 | for num in `gdisk -l ${node} | grep -E -w "$1|$1_a|$1_b" | awk '{print $1}'` | 290 | for num in `gdisk -l ${node} | grep -E -w "$1|$1_a|$1_b" | awk '{print $1}'` |
291 | do | 291 | do |
292 | if [ $? -eq 0 ]; then | 292 | if [ $? -eq 0 ]; then |
293 | if [ "$(echo ${1} | grep "bootloader_")" != "" ]; then | 293 | if [ "$(echo ${1} | grep "bootloader_")" != "" ]; then |
294 | img_name=${uboot_proper_file} | 294 | img_name=${uboot_proper_file} |
295 | elif [ "$(echo ${1} | grep "system")" != "" ]; then | 295 | elif [ "$(echo ${1} | grep "system")" != "" ]; then |
296 | img_name=${systemimage_file} | 296 | img_name=${systemimage_file} |
297 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then | 297 | elif [ "$(echo ${1} | grep "vendor")" != "" ]; then |
298 | img_name=${vendor_file} | 298 | img_name=${vendor_file} |
299 | elif [ "$(echo ${1} | grep "product")" != "" ]; then | 299 | elif [ "$(echo ${1} | grep "product")" != "" ]; then |
300 | img_name=${product_file} | 300 | img_name=${product_file} |
301 | elif [ ${support_dtbo} -eq 1 ] && [ $(echo ${1} | grep "boot") != "" ] 2>/dev/null; then | 301 | elif [ ${support_dtbo} -eq 1 ] && [ $(echo ${1} | grep "boot") != "" ] 2>/dev/null; then |
302 | img_name="boot.img" | 302 | img_name="boot.img" |
303 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then | 303 | elif [ "$(echo ${1} | grep -E "dtbo|vbmeta|recovery")" != "" -a "${dtb_feature}" != "" ]; then |
304 | img_name="${1%_*}-${soc_name}${dtb_feature}.img" | 304 | img_name="${1%_*}-${soc_name}-smarc-${dtb_feature}.img" |
305 | elif [ "$(echo ${1} | grep "super")" != "" ]; then | 305 | elif [ "$(echo ${1} | grep "super")" != "" ]; then |
306 | if [ ${dont_generate_super} -eq 0 ]; then | 306 | if [ ${dont_generate_super} -eq 0 ]; then |
307 | make_super_image | 307 | make_super_image |
308 | fi | 308 | fi |
309 | img_name=${super_file} | 309 | img_name=${super_file} |
310 | else | 310 | else |
311 | img_name="${1%_*}-${soc_name}.img" | 311 | img_name="${1%_*}-${soc_name}.img" |
312 | fi | 312 | fi |
313 | # check whether the image files to be flashed exist or not | 313 | # check whether the image files to be flashed exist or not |
314 | if [ "$(echo ${1} | grep "super")" = "" ] || [ ${dont_generate_super} -eq 1 ]; then | 314 | if [ "$(echo ${1} | grep "super")" = "" ] || [ ${dont_generate_super} -eq 1 ]; then |
315 | if [ ! -f "${image_directory}${img_name}" ]; then | 315 | if [ ! -f "${image_directory}${img_name}" ]; then |
316 | echo -e >&2 "${RED}File ${img_name} not found. Please check. Exiting${STD}" | 316 | echo -e >&2 "${RED}File ${img_name} not found. Please check. Exiting${STD}" |
317 | return 1 | 317 | return 1 |
318 | fi | 318 | fi |
319 | fi | 319 | fi |
320 | get_current_device_base_name | 320 | get_current_device_base_name |
321 | echo "flash_partition: ${img_name} ---> ${current_device_base_name}${num}" | 321 | echo "flash_partition: ${img_name} ---> ${current_device_base_name}${num}" |
322 | 322 | ||
323 | if [ "$(echo ${1} | grep "system")" != "" ] || [ "$(echo ${1} | grep "vendor")" != "" ] || \ | 323 | if [ "$(echo ${1} | grep "system")" != "" ] || [ "$(echo ${1} | grep "vendor")" != "" ] || \ |
324 | [ "$(echo ${1} | grep "product")" != "" ]; then | 324 | [ "$(echo ${1} | grep "product")" != "" ]; then |
325 | simg2img ${image_directory}${img_name} ${current_device_base_name}${num} | 325 | simg2img ${image_directory}${img_name} ${current_device_base_name}${num} |
326 | elif [ "$(echo ${1} | grep "super")" != "" ]; then | 326 | elif [ "$(echo ${1} | grep "super")" != "" ]; then |
327 | if [ ${dont_generate_super} -eq 0 ]; then | 327 | if [ ${dont_generate_super} -eq 0 ]; then |
328 | simg2img /tmp/${img_name} ${current_device_base_name}${num} | 328 | simg2img /tmp/${img_name} ${current_device_base_name}${num} |
329 | else | 329 | else |
330 | simg2img ${image_directory}${img_name} ${current_device_base_name}${num} | 330 | simg2img ${image_directory}${img_name} ${current_device_base_name}${num} |
331 | fi | 331 | fi |
332 | else | 332 | else |
333 | dd if=${image_directory}${img_name} of=${current_device_base_name}${num} bs=10M conv=fsync,nocreat | 333 | dd if=${image_directory}${img_name} of=${current_device_base_name}${num} bs=10M conv=fsync,nocreat |
334 | fi | 334 | fi |
335 | fi | 335 | fi |
336 | done | 336 | done |
337 | } | 337 | } |
338 | 338 | ||
339 | function format_android | 339 | function format_android |
340 | { | 340 | { |
341 | echo "formating android images" | 341 | echo "formating android images" |
342 | format_partition metadata | 342 | format_partition metadata |
343 | format_partition cache | 343 | format_partition cache |
344 | erase_partition presistdata | 344 | erase_partition presistdata |
345 | erase_partition fbmisc | 345 | erase_partition fbmisc |
346 | erase_partition misc | 346 | erase_partition misc |
347 | format_partition userdata | 347 | format_partition userdata |
348 | } | 348 | } |
349 | 349 | ||
350 | function make_partition | 350 | function make_partition |
351 | { | 351 | { |
352 | echo "make gpt partition for android: ${partition_file}" | 352 | echo "make gpt partition for android: ${partition_file}" |
353 | dd if=${image_directory}${partition_file} of=${node} bs=1k count=${vaild_gpt_size} conv=fsync | 353 | dd if=${image_directory}${partition_file} of=${node} bs=1k count=${vaild_gpt_size} conv=fsync |
354 | } | 354 | } |
355 | 355 | ||
356 | function flash_android | 356 | function flash_android |
357 | { | 357 | { |
358 | boot_partition="boot"${slot} | 358 | boot_partition="boot"${slot} |
359 | recovery_partition="recovery"${slot} | 359 | recovery_partition="recovery"${slot} |
360 | system_partition="system"${slot} | 360 | system_partition="system"${slot} |
361 | vendor_partition="vendor"${slot} | 361 | vendor_partition="vendor"${slot} |
362 | product_partition="product"${slot} | 362 | product_partition="product"${slot} |
363 | vbmeta_partition="vbmeta"${slot} | 363 | vbmeta_partition="vbmeta"${slot} |
364 | dtbo_partition="dtbo"${slot} | 364 | dtbo_partition="dtbo"${slot} |
365 | super_partition="super" | 365 | super_partition="super" |
366 | gdisk -l ${node} 2>/dev/null | grep -q "dtbo" && support_dtbo=1 | 366 | gdisk -l ${node} 2>/dev/null | grep -q "dtbo" && support_dtbo=1 |
367 | gdisk -l ${node} 2>/dev/null | grep -q "super" && support_dynamic_partition=1 | 367 | gdisk -l ${node} 2>/dev/null | grep -q "super" && support_dynamic_partition=1 |
368 | 368 | ||
369 | if [ ${support_dual_bootloader} -eq 1 ]; then | 369 | if [ ${support_dual_bootloader} -eq 1 ]; then |
370 | bootloader_file=spl-imx8mq${uboot_feature}.bin | 370 | bootloader_file=spl-${soc_name}${uboot_feature}.bin |
371 | uboot_proper_file=bootloader-imx8mq${uboot_feature}.img | 371 | uboot_proper_file=bootloader-${soc_name}${uboot_feature}.img |
372 | bootloader_partition="bootloader"${slot} | 372 | bootloader_partition="bootloader"${slot} |
373 | flash_partition ${bootloader_partition} || exit 1 | 373 | flash_partition ${bootloader_partition} || exit 1 |
374 | else | 374 | else |
375 | bootloader_file=u-boot-imx8mq${uboot_feature}.imx | 375 | bootloader_file=u-boot-${soc_name}${uboot_feature}.imx |
376 | fi | 376 | fi |
377 | 377 | ||
378 | if [ "${support_dtbo}" -eq "1" ] ; then | 378 | if [ "${support_dtbo}" -eq "1" ] ; then |
379 | flash_partition ${dtbo_partition} || exit 1 | 379 | flash_partition ${dtbo_partition} || exit 1 |
380 | fi | 380 | fi |
381 | flash_partition ${boot_partition} || exit 1 | 381 | flash_partition ${boot_partition} || exit 1 |
382 | flash_partition ${recovery_partition} || exit 1 | 382 | flash_partition ${recovery_partition} || exit 1 |
383 | if [ ${support_dynamic_partition} -eq 0 ]; then | 383 | if [ ${support_dynamic_partition} -eq 0 ]; then |
384 | flash_partition ${system_partition} || exit 1 | 384 | flash_partition ${system_partition} || exit 1 |
385 | flash_partition ${vendor_partition} || exit 1 | 385 | flash_partition ${vendor_partition} || exit 1 |
386 | flash_partition ${product_partition} || exit 1 | 386 | flash_partition ${product_partition} || exit 1 |
387 | else | 387 | else |
388 | flash_partition ${super_partition} || exit 1 | 388 | flash_partition ${super_partition} || exit 1 |
389 | fi | 389 | fi |
390 | flash_partition ${vbmeta_partition} || exit 1 | 390 | flash_partition ${vbmeta_partition} || exit 1 |
391 | echo "erase_partition: uboot : ${node}" | 391 | echo "erase_partition: uboot : ${node}" |
392 | echo "flash_partition: ${bootloader_file} ---> ${node}" | 392 | echo "flash_partition: ${bootloader_file} ---> ${node}" |
393 | first_partition_offset=`gdisk -l ${node} | grep ' 1 ' | awk '{print $2}'` | 393 | first_partition_offset=`gdisk -l ${node} | grep ' 1 ' | awk '{print $2}'` |
394 | # the unit of first_partition_offset is sector size which is 512 Byte. | 394 | # the unit of first_partition_offset is sector size which is 512 Byte. |
395 | count_bootloader=`expr ${first_partition_offset} / 2 - ${bootloader_offset}` | 395 | count_bootloader=`expr ${first_partition_offset} / 2 - ${bootloader_offset}` |
396 | echo "the bootloader partition size: ${count_bootloader}" | 396 | echo "the bootloader partition size: ${count_bootloader}" |
397 | dd if=/dev/zero of=${node} bs=1k seek=${bootloader_offset} conv=fsync count=${count_bootloader} | 397 | dd if=/dev/zero of=${node} bs=1k seek=${bootloader_offset} conv=fsync count=${count_bootloader} |
398 | dd if=${image_directory}${bootloader_file} of=${node} bs=1k seek=${bootloader_offset} conv=fsync | 398 | dd if=${image_directory}${bootloader_file} of=${node} bs=1k seek=${bootloader_offset} conv=fsync |
399 | if [ "${flash_mcu}" -eq "1" ] ; then | 399 | if [ "${flash_mcu}" -eq "1" ] ; then |
400 | if [ "${soc_name}" = "imx7ulp" ]; then | 400 | if [ "${soc_name}" = "imx7ulp" ]; then |
401 | echo -e >&2 "${RED}Caution:${STD}" | 401 | echo -e >&2 "${RED}Caution:${STD}" |
402 | echo -e >&2 " mcu image for imx7ulp_evk is in SPI flash on board, not in SD card, use uboot commands to flash it." | 402 | echo -e >&2 " mcu image for imx7ulp_evk is in SPI flash on board, not in SD card, use uboot commands to flash it." |
403 | else | 403 | else |
404 | mcu_image=${soc_name#*-}"_mcu_demo.img" | 404 | mcu_image=${soc_name#*-}"_mcu_demo.img" |
405 | echo "flash_partition: ${mcu_image} ---> ${node}" | 405 | echo "flash_partition: ${mcu_image} ---> ${node}" |
406 | dd if=${image_directory}${mcu_image} of=${node} bs=1k seek=${mcu_image_offset} conv=fsync | 406 | dd if=${image_directory}${mcu_image} of=${node} bs=1k seek=${mcu_image_offset} conv=fsync |
407 | fi | 407 | fi |
408 | fi | 408 | fi |
409 | } | 409 | } |
410 | 410 | ||
411 | if [ "${not_partition}" -ne "1" ] ; then | 411 | if [ "${not_partition}" -ne "1" ] ; then |
412 | # invoke make_partition to write first 17KB in partition table image to sdcard start | 412 | # invoke make_partition to write first 17KB in partition table image to sdcard start |
413 | make_partition || exit 1 | 413 | make_partition || exit 1 |
414 | # unmount partitions and then force to re-read the partition table of the specified device | 414 | # unmount partitions and then force to re-read the partition table of the specified device |
415 | sleep 3 | 415 | sleep 3 |
416 | for i in `cat /proc/mounts | grep "${node}" | awk '{print $2}'`; do umount $i; done | 416 | for i in `cat /proc/mounts | grep "${node}" | awk '{print $2}'`; do umount $i; done |
417 | hdparm -z ${node} | 417 | hdparm -z ${node} |
418 | # backup the GPT table to last LBA for sd card. execute "gdisk ${node}" with the input characters | 418 | # backup the GPT table to last LBA for sd card. execute "gdisk ${node}" with the input characters |
419 | # redirect standard OUTPUT to /dev/null to reduce some ouput | 419 | # redirect standard OUTPUT to /dev/null to reduce some ouput |
420 | echo -e 'r\ne\nY\nw\nY\nY' | gdisk ${node} 1>/dev/null | 420 | echo -e 'r\ne\nY\nw\nY\nY' | gdisk ${node} 1>/dev/null |
421 | 421 | ||
422 | # use "boot_b" to check whether dual slot is supported | 422 | # use "boot_b" to check whether dual slot is supported |
423 | gdisk -l ${node} | grep -E -w "boot_b" 2>&1 > /dev/null && support_dualslot=1 | 423 | gdisk -l ${node} | grep -E -w "boot_b" 2>&1 > /dev/null && support_dualslot=1 |
424 | 424 | ||
425 | format_android | 425 | format_android |
426 | fi | 426 | fi |
427 | 427 | ||
428 | flash_android || exit 1 | 428 | flash_android || exit 1 |
429 | 429 | ||
430 | if [ "${slot}" = "_b" ]; then | 430 | if [ "${slot}" = "_b" ]; then |
431 | echo -e >&2 "${RED}Caution:${STD}" | 431 | echo -e >&2 "${RED}Caution:${STD}" |
432 | echo -e >&2 " This script can't generate metadata to directly boot from b slot, fastboot command may need to be used to boot from b slot." | 432 | echo -e >&2 " This script can't generate metadata to directly boot from b slot, fastboot command may need to be used to boot from b slot." |
433 | fi | 433 | fi |
434 | 434 | ||
435 | echo | 435 | echo |
436 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" | 436 | echo ">>>>>>>>>>>>>> Flashing successfully completed <<<<<<<<<<<<<<" |
437 | 437 | ||
438 | exit 0 | 438 | exit 0 |
439 | 439 | ||
440 | # For MFGTool Notes: | 440 | # For MFGTool Notes: |
441 | # MFGTool use mksdcard-android.tar store this script | 441 | # MFGTool use mksdcard-android.tar store this script |
442 | # if you want change it. | 442 | # if you want change it. |
443 | # do following: | 443 | # do following: |
444 | # tar xf mksdcard-android.sh.tar | 444 | # tar xf mksdcard-android.sh.tar |
445 | # vi mksdcard-android.sh | 445 | # vi mksdcard-android.sh |
446 | # [ edit want you want to change ] | 446 | # [ edit want you want to change ] |
447 | # rm mksdcard-android.sh.tar; tar cf mksdcard-android.sh.tar mksdcard-android.sh | 447 | # rm mksdcard-android.sh.tar; tar cf mksdcard-android.sh.tar mksdcard-android.sh |
448 | 448 |