Added
Link Here
|
1 |
diff -upr uboot-rockchip/Makefile uboot-rockchip.this-works-for-me/Makefile |
2 |
--- Makefile.orig 2021-05-18 07:09:57.530309000 +0000 |
3 |
+++ Makefile 2021-05-16 20:26:02.365328000 +0000 |
4 |
@@ -251,7 +251,7 @@ export KCONFIG_CONFIG |
5 |
|
6 |
# SHELL used by kbuild |
7 |
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
8 |
- else if [ -x /bin/bash ]; then echo /bin/bash; \ |
9 |
+ else if [ -x /usr/local/bin/bash ]; then echo /usr/local/bin/bash; \ |
10 |
else echo sh; fi ; fi) |
11 |
|
12 |
HOSTCC = cc |
13 |
diff -upr uboot-rockchip/arch/arm/dts/Makefile uboot-rockchip.this-works-for-me/arch/arm/dts/Makefile |
14 |
--- arch/arm/dts/Makefile.orig 2021-05-18 07:09:57.578863000 +0000 |
15 |
+++ arch/arm/dts/Makefile 2021-05-16 20:49:21.649428000 +0000 |
16 |
@@ -28,6 +28,14 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ |
17 |
exynos5422-odroidxu3.dtb |
18 |
dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb |
19 |
dtb-$(CONFIG_ARCH_ROCKCHIP) += \ |
20 |
+ rk3399-evb.dtb \ |
21 |
+ rk3399-firefly.dtb \ |
22 |
+ rk3399-puma-ddr1333.dtb \ |
23 |
+ rk3399-puma-ddr1600.dtb \ |
24 |
+ rk3399-puma-ddr1866.dtb \ |
25 |
+ rk3399-nanopi4.dtb |
26 |
+ |
27 |
+disabled-FOO= \ |
28 |
rk3036-sdk.dtb \ |
29 |
rk3066a-mk808.dtb \ |
30 |
rk3126-evb.dtb \ |
31 |
@@ -52,12 +60,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ |
32 |
rk3368-sheep.dtb \ |
33 |
rk3368-geekbox.dtb \ |
34 |
rk3368-px5-evb.dtb \ |
35 |
- rk3399-evb.dtb \ |
36 |
- rk3399-firefly.dtb \ |
37 |
- rk3399-puma-ddr1333.dtb \ |
38 |
- rk3399-puma-ddr1600.dtb \ |
39 |
- rk3399-puma-ddr1866.dtb \ |
40 |
- rk3399-nanopi4.dtb \ |
41 |
rv1108-evb.dtb |
42 |
dtb-$(CONFIG_ARCH_MESON) += \ |
43 |
meson-gxbb-odroidc2.dtb |
44 |
diff -upr uboot-rockchip/arch/arm/mach-rockchip/boot_rkimg.c uboot-rockchip.this-works-for-me/arch/arm/mach-rockchip/boot_rkimg.c |
45 |
--- arch/arm/mach-rockchip/boot_rkimg.c.orig 2021-05-18 07:09:57.870669000 +0000 |
46 |
+++ arch/arm/mach-rockchip/boot_rkimg.c 2021-05-18 06:47:19.528484000 +0000 |
47 |
@@ -446,8 +446,6 @@ static int rockchip_read_distro_dtb(void *fdt_addr) |
48 |
char devnum_part[12]; |
49 |
char fdt_hex_str[19]; |
50 |
char *fs_argv[5]; |
51 |
- int size; |
52 |
- int ret; |
53 |
|
54 |
if (!rockchip_get_bootdev() || !fdt_addr) |
55 |
return -ENODEV; |
56 |
@@ -516,7 +514,7 @@ int rockchip_read_dtb_file(void *fdt_addr) |
57 |
} |
58 |
#endif |
59 |
if (ret) { |
60 |
- printf("Failed to load DTB\n"); |
61 |
+ printf("Failed to load DTB: %d\n", ret); |
62 |
return ret; |
63 |
} |
64 |
|
65 |
diff -upr uboot-rockchip/arch/arm/mach-rockchip/fit.c uboot-rockchip.this-works-for-me/arch/arm/mach-rockchip/fit.c |
66 |
--- arch/arm/mach-rockchip/fit.c.orig 2021-05-18 07:09:57.872486000 +0000 |
67 |
+++ arch/arm/mach-rockchip/fit.c 2021-05-17 17:02:18.256666000 +0000 |
68 |
@@ -437,7 +437,7 @@ int rockchip_read_fit_dtb(void *fdt_addr, char **hash, |
69 |
|
70 |
ret = part_get_info_by_name(dev_desc, part_name, &part); |
71 |
if (ret < 0) { |
72 |
- FIT_I("No %s partition\n", part_name); |
73 |
+ FIT_I("No %s partition: %d\n", part_name, ret); |
74 |
return ret; |
75 |
} |
76 |
|
77 |
diff -upr uboot-rockchip/board/rockchip/nanopi4/board.c uboot-rockchip.this-works-for-me/board/rockchip/nanopi4/board.c |
78 |
--- board/rockchip/nanopi4/board.c.orig 2021-05-18 07:09:58.412022000 +0000 |
79 |
+++ board/rockchip/nanopi4/board.c 2021-05-17 15:02:44.338282000 +0000 |
80 |
@@ -344,7 +344,12 @@ void set_dtb_name(void) |
81 |
#endif |
82 |
|
83 |
snprintf(info, ARRAY_SIZE(info), |
84 |
+#if 0 |
85 |
"rk3399-nanopi4-rev%02x.dtb", get_board_rev()); |
86 |
+#else |
87 |
+ "rk3399-nanopc-t4.dtb"); |
88 |
+ env_set("fdtfile", info); |
89 |
+#endif |
90 |
env_set("dtb_name", info); |
91 |
} |
92 |
|
93 |
diff -upr uboot-rockchip/configs/nanopi4_defconfig uboot-rockchip.this-works-for-me/configs/nanopi4_defconfig |
94 |
--- configs/nanopi4_defconfig.orig 2021-05-18 07:09:58.670987000 +0000 |
95 |
+++ configs/nanopi4_defconfig 2021-05-18 06:51:25.139867000 +0000 |
96 |
@@ -1,5 +1,8 @@ |
97 |
CONFIG_ARM=y |
98 |
CONFIG_ARCH_ROCKCHIP=y |
99 |
+CONFIG_SMBIOS_MANUFACTURER="FriendlyElec" |
100 |
+CONFIG_SMBIOS_PRODUCT_NAME="NanoPC-T4" |
101 |
+CONFIG_SYS_CONFIG_NAME="nanopc-t4" |
102 |
CONFIG_SPL_LIBCOMMON_SUPPORT=y |
103 |
CONFIG_SPL_LIBGENERIC_SUPPORT=y |
104 |
CONFIG_SYS_MALLOC_F_LEN=0x4000 |
105 |
@@ -11,11 +14,18 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-nanopi4" |
106 |
CONFIG_DEBUG_UART=y |
107 |
CONFIG_FIT=y |
108 |
CONFIG_SPL_LOAD_FIT=y |
109 |
-CONFIG_BOOTDELAY=1 |
110 |
-CONFIG_SYS_CONSOLE_INFO_QUIET=y |
111 |
+CONFIG_DISPLAY_BOARDINFO=y |
112 |
+CONFIG_REVISION_TAG=y |
113 |
+CONFIG_BOOTDELAY=3 |
114 |
+#CONFIG_ROCKCHIP_FIT_IMAGE=y |
115 |
+#CONFIG_ROCKCHIP_UIMAGE=y |
116 |
+CONFIG_ROCKCHIP_EARLY_DISTRO_DTB=y |
117 |
+CONFIG_ROCKCHIP_EARLY_DISTRO_DTB_PATH="/dtb/rockchip/rk3399-nanopc-t4.dtb" |
118 |
+#CONFIG_ROCKCHIP_RESOURCE_IMAGE=y |
119 |
+#CONFIG_SYS_CONSOLE_INFO_QUIET=y |
120 |
# CONFIG_DISPLAY_CPUINFO is not set |
121 |
-CONFIG_ANDROID_BOOTLOADER=y |
122 |
-CONFIG_ANDROID_AVB=y |
123 |
+CONFIG_ANDROID_BOOTLOADER=n |
124 |
+CONFIG_ANDROID_AVB=n |
125 |
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set |
126 |
# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set |
127 |
CONFIG_SPL_STACK_R=y |
128 |
@@ -25,13 +35,14 @@ CONFIG_SPL_CRYPTO_SUPPORT=y |
129 |
CONFIG_SPL_HASH_SUPPORT=y |
130 |
CONFIG_SPL_ATF=y |
131 |
CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y |
132 |
-CONFIG_FASTBOOT_BUF_ADDR=0x00800800 |
133 |
-CONFIG_FASTBOOT_BUF_SIZE=0x04000000 |
134 |
-CONFIG_FASTBOOT_FLASH=y |
135 |
-CONFIG_FASTBOOT_FLASH_MMC_DEV=0 |
136 |
+CONFIG_ANDROID_BOOT_IMAGE=n |
137 |
+#CONFIG_FASTBOOT_BUF_ADDR=0x00800800 |
138 |
+#CONFIG_FASTBOOT_BUF_SIZE=0x04000000 |
139 |
+#CONFIG_FASTBOOT_FLASH=y |
140 |
+#CONFIG_FASTBOOT_FLASH_MMC_DEV=0 |
141 |
CONFIG_CMD_BOOTZ=y |
142 |
# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set |
143 |
-CONFIG_CMD_DTIMG=y |
144 |
+#CONFIG_CMD_DTIMG=y |
145 |
# CONFIG_CMD_ELF is not set |
146 |
# CONFIG_CMD_IMI is not set |
147 |
# CONFIG_CMD_IMLS is not set |
148 |
@@ -43,7 +54,7 @@ CONFIG_CMD_DTIMG=y |
149 |
CONFIG_CMD_GPT=y |
150 |
# CONFIG_CMD_LOADB is not set |
151 |
# CONFIG_CMD_LOADS is not set |
152 |
-CONFIG_CMD_BOOT_ANDROID=y |
153 |
+CONFIG_CMD_BOOT_ANDROID=n |
154 |
CONFIG_CMD_BOOT_ROCKCHIP=y |
155 |
CONFIG_CMD_MMC=y |
156 |
CONFIG_CMD_USB=y |
157 |
@@ -51,6 +62,13 @@ CONFIG_CMD_USB_MASS_STORAGE=y |
158 |
# CONFIG_CMD_ITEST is not set |
159 |
# CONFIG_CMD_SETEXPR is not set |
160 |
# CONFIG_CMD_MISC is not set |
161 |
+CONFIG_CMD_SAVEENV=y |
162 |
+CONFIG_ENV_IS_NOWHERE=n |
163 |
+CONFIG_ENV_IS_IN_FAT=y |
164 |
+#CONFIG_ENV_IS_IN_MMC=y |
165 |
+CONFIG_ENV_FAT_INTERFACE="mmc" |
166 |
+CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" |
167 |
+CONFIG_ENV_FAT_FILE="uboot.env" |
168 |
# CONFIG_SPL_DOS_PARTITION is not set |
169 |
# CONFIG_ISO_PARTITION is not set |
170 |
CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=64 |
171 |
@@ -58,6 +76,7 @@ CONFIG_RKPARM_PARTITION=y |
172 |
CONFIG_SPL_OF_CONTROL=y |
173 |
CONFIG_OF_LIVE=y |
174 |
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" |
175 |
+CONFIG_NET_RANDOM_ETHADDR=y |
176 |
# CONFIG_NET_TFTP_VARS is not set |
177 |
CONFIG_REGMAP=y |
178 |
CONFIG_SPL_REGMAP=y |
179 |
@@ -133,11 +152,11 @@ CONFIG_USE_TINY_PRINTF=y |
180 |
CONFIG_LIB_RAND=y |
181 |
CONFIG_SPL_TINY_MEMSET=y |
182 |
CONFIG_ERRNO_STR=y |
183 |
-CONFIG_AVB_LIBAVB=y |
184 |
-CONFIG_AVB_LIBAVB_AB=y |
185 |
-CONFIG_AVB_LIBAVB_ATX=y |
186 |
-CONFIG_AVB_LIBAVB_USER=y |
187 |
-CONFIG_RK_AVB_LIBAVB_USER=y |
188 |
+#CONFIG_AVB_LIBAVB=y |
189 |
+#CONFIG_AVB_LIBAVB_AB=y |
190 |
+#CONFIG_AVB_LIBAVB_ATX=y |
191 |
+#CONFIG_AVB_LIBAVB_USER=y |
192 |
+#CONFIG_RK_AVB_LIBAVB_USER=y |
193 |
CONFIG_OPTEE_CLIENT=y |
194 |
CONFIG_OPTEE_V1=y |
195 |
CONFIG_OPTEE_ALWAYS_USE_SECURITY_PARTITION=y |
196 |
diff -upr uboot-rockchip/include/config_distro_bootcmd.h uboot-rockchip.this-works-for-me/include/config_distro_bootcmd.h |
197 |
--- include/config_distro_bootcmd.h.orig 2021-05-18 07:09:59.247560000 +0000 |
198 |
+++ include/config_distro_bootcmd.h 2021-05-17 13:02:07.234804000 +0000 |
199 |
@@ -124,7 +124,7 @@ |
200 |
"load ${devtype} ${devnum}:${distro_bootpart} " \ |
201 |
"${fdt_addr_r} ${prefix}${efi_fdtfile}\0" \ |
202 |
\ |
203 |
- "efi_dtb_prefixes=/ /dtb/ /dtb/current/\0" \ |
204 |
+ "efi_dtb_prefixes=/ /dtb/ /dtb/current/ /dtb/rockchip/\0" \ |
205 |
"scan_dev_for_efi=" \ |
206 |
"setenv efi_fdtfile ${fdtfile}; " \ |
207 |
BOOTENV_EFI_SET_FDTFILE_FALLBACK \ |
208 |
diff -upr uboot-rockchip/include/configs/nanopi4.h uboot-rockchip.this-works-for-me/include/configs/nanopi4.h |
209 |
--- include/configs/nanopi4.h.orig 2021-05-18 07:09:59.309355000 +0000 |
210 |
+++ include/configs/nanopi4.h 2021-05-17 15:46:05.780420000 +0000 |
211 |
@@ -34,7 +34,7 @@ |
212 |
|
213 |
/* Monitor Command Prompt */ |
214 |
#undef CONFIG_SYS_PROMPT |
215 |
-#define CONFIG_SYS_PROMPT "nanopi4# " |
216 |
+#define CONFIG_SYS_PROMPT "U-Boot# " |
217 |
|
218 |
/*--------------------------------------------------------------- |
219 |
* ENV settings |
220 |
diff -upr uboot-rockchip/include/configs/rk3399_common.h uboot-rockchip.this-works-for-me/include/configs/rk3399_common.h |
221 |
--- include/configs/rk3399_common.h.orig 2021-05-18 07:09:59.322891000 +0000 |
222 |
+++ include/configs/rk3399_common.h 2021-05-17 16:34:08.190665000 +0000 |
223 |
@@ -61,8 +61,12 @@ |
224 |
"kernel_addr_r=0x00280000\0" \ |
225 |
"ramdisk_addr_r=0x0a200000\0" |
226 |
|
227 |
+#define ENV_ETHACT_SETTINGS \ |
228 |
+ "ethact=ethernet@fe300000\0" |
229 |
+ |
230 |
#include <config_distro_bootcmd.h> |
231 |
#define CONFIG_EXTRA_ENV_SETTINGS \ |
232 |
+ ENV_ETHACT_SETTINGS \ |
233 |
ENV_MEM_LAYOUT_SETTINGS \ |
234 |
"partitions=" PARTS_DEFAULT \ |
235 |
ROCKCHIP_DEVICE_SETTINGS \ |
236 |
diff -upr uboot-rockchip/make.sh uboot-rockchip.this-works-for-me/make.sh |
237 |
--- make.sh.orig 2021-05-18 07:09:59.513696000 +0000 |
238 |
+++ make.sh 2021-05-17 17:28:54.866848000 +0000 |
239 |
@@ -1,4 +1,4 @@ |
240 |
-#!/bin/bash |
241 |
+#!/usr/local/bin/bash |
242 |
# |
243 |
# Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd |
244 |
# |
245 |
@@ -6,7 +6,9 @@ |
246 |
# |
247 |
|
248 |
set -e |
249 |
-JOB=`sed -n "N;/processor/p" /proc/cpuinfo|wc -l` |
250 |
+#set -x |
251 |
+#JOB=`sed -n "N;/processor/p" /proc/cpuinfo|wc -l` |
252 |
+JOB=`sysctl -n hw.ncpu` |
253 |
SUPPORT_LIST=`ls configs/*[r,p][x,v,k][0-9][0-9]*_defconfig` |
254 |
|
255 |
# @LOADER: map to $RKCHIP_LOADER for loader ini |
256 |
@@ -64,17 +66,25 @@ CHIP_TPL_MAGIC_TABLE=( |
257 |
RKBIN_TOOLS=../rkbin/tools |
258 |
|
259 |
# User's GCC toolchain and relative path |
260 |
-ADDR2LINE_ARM32=arm-linux-gnueabihf-addr2line |
261 |
-ADDR2LINE_ARM64=aarch64-linux-gnu-addr2line |
262 |
-OBJ_ARM32=arm-linux-gnueabihf-objdump |
263 |
-OBJ_ARM64=aarch64-linux-gnu-objdump |
264 |
-GCC_ARM32=arm-linux-gnueabihf- |
265 |
-GCC_ARM64=aarch64-linux-gnu- |
266 |
-TOOLCHAIN_ARM32=../prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin |
267 |
-TOOLCHAIN_ARM64=../prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin |
268 |
+#ADDR2LINE_ARM32=arm-linux-gnueabihf-addr2line |
269 |
+#ADDR2LINE_ARM64=aarch64-linux-gnu-addr2line |
270 |
+ADDR2LINE_ARM32=arm-none-eabi-addr2line |
271 |
+ADDR2LINE_ARM64=aarch64-none-elf-addr2line |
272 |
+#OBJ_ARM32=arm-linux-gnueabihf-objdump |
273 |
+#OBJ_ARM64=aarch64-linux-gnu-objdump |
274 |
+OBJ_ARM32=arm-none-eabi-objdump |
275 |
+OBJ_ARM64=aarch64-none-elf-objdump |
276 |
+#GCC_ARM32=arm-linux-gnueabihf- |
277 |
+#GCC_ARM64=aarch64-linux-gnu- |
278 |
+GCC_ARM32=arm-none-eabi- |
279 |
+GCC_ARM64=aarch64-none-elf- |
280 |
+#TOOLCHAIN_ARM32=../prebuilts/gcc/linux-x86/arm/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/bin |
281 |
+#TOOLCHAIN_ARM64=../prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin |
282 |
+TOOLCHAIN_ARM32=/usr/local/bin |
283 |
+TOOLCHAIN_ARM64=/usr/local/bin |
284 |
|
285 |
########################################### User not touch ############################################# |
286 |
-RKTOOLS=./tools |
287 |
+RKTOOLS=`pwd`/tools |
288 |
|
289 |
# Declare global INI file searching index name for every chip, update in select_chip_info() |
290 |
RKCHIP="-" |
291 |
@@ -217,7 +227,7 @@ function process_args() |
292 |
shift ${NUM} |
293 |
continue |
294 |
# FUNC address |
295 |
- elif [ -z $(echo $1 | sed 's/[0-9,a-f,A-F,x,X,-]//g') ]; then |
296 |
+ elif [ -z $(echo $1 | gsed 's/[0-9,a-f,A-F,x,X,-]//g') ]; then |
297 |
ARG_FUNCADDR=$1 |
298 |
# xxx_defconfig |
299 |
else |
300 |
@@ -227,8 +237,8 @@ function process_args() |
301 |
echo "ERROR: No configs/${ARG_BOARD}_defconfig" |
302 |
exit 1 |
303 |
else |
304 |
- echo "make for ${ARG_BOARD}_defconfig by -j${JOB}" |
305 |
- make ${ARG_BOARD}_defconfig |
306 |
+ echo "gmake for ${ARG_BOARD}_defconfig by -j${JOB}" |
307 |
+ gmake ${ARG_BOARD}_defconfig |
308 |
fi |
309 |
fi |
310 |
shift 1 |
311 |
@@ -355,7 +365,7 @@ function sub_commands() |
312 |
;; |
313 |
|
314 |
env) |
315 |
- make CROSS_COMPILE=${TOOLCHAIN_GCC} envtools |
316 |
+ gmake CROSS_COMPILE=${TOOLCHAIN_GCC} envtools |
317 |
exit 0 |
318 |
;; |
319 |
|
320 |
@@ -368,13 +378,13 @@ function sub_commands() |
321 |
FUNCADDR=${ARG_FUNCADDR} |
322 |
RELOC_OFF=${FUNCADDR#*-} |
323 |
FUNCADDR=${FUNCADDR%-*} |
324 |
- if [ -z $(echo ${FUNCADDR} | sed 's/[0-9,a-f,A-F,x,X,-]//g') ] && [ ${FUNCADDR} ]; then |
325 |
+ if [ -z $(echo ${FUNCADDR} | gsed 's/[0-9,a-f,A-F,x,X,-]//g') ] && [ ${FUNCADDR} ]; then |
326 |
# With prefix: '0x' or '0X' |
327 |
- if [ `echo ${FUNCADDR} | sed -n "/0[x,X]/p" | wc -l` -ne 0 ]; then |
328 |
+ if [ `echo ${FUNCADDR} | gsed -n "/0[x,X]/p" | wc -l` -ne 0 ]; then |
329 |
FUNCADDR=`echo ${FUNCADDR} | awk '{ print strtonum($0) }'` |
330 |
FUNCADDR=`echo "obase=16;${FUNCADDR}"|bc |tr '[A-Z]' '[a-z]'` |
331 |
fi |
332 |
- if [ `echo ${RELOC_OFF} | sed -n "/0[x,X]/p" | wc -l` -ne 0 ] && [ ${RELOC_OFF} ]; then |
333 |
+ if [ `echo ${RELOC_OFF} | gsed -n "/0[x,X]/p" | wc -l` -ne 0 ] && [ ${RELOC_OFF} ]; then |
334 |
RELOC_OFF=`echo ${RELOC_OFF} | awk '{ print strtonum($0) }'` |
335 |
RELOC_OFF=`echo "obase=16;${RELOC_OFF}"|bc |tr '[A-Z]' '[a-z]'` |
336 |
fi |
337 |
@@ -389,7 +399,7 @@ function sub_commands() |
338 |
fi |
339 |
|
340 |
echo |
341 |
- sed -n "/${FUNCADDR}/p" ${sym} |
342 |
+ gsed -n "/${FUNCADDR}/p" ${sym} |
343 |
${TOOLCHAIN_ADDR2LINE} -e ${elf} ${FUNCADDR} |
344 |
exit 0 |
345 |
fi |
346 |
@@ -539,13 +549,13 @@ function pack_uboot_image() |
347 |
fi |
348 |
|
349 |
# Pack |
350 |
- uboot_load_addr=`sed -n "/CONFIG_SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" include/autoconf.mk|tr -d '\r'` |
351 |
+ uboot_load_addr=`gsed -n "/CONFIG_SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" include/autoconf.mk|tr -d '\r'` |
352 |
if [ -z ${uboot_load_addr} ]; then |
353 |
echo "ERROR: No CONFIG_SYS_TEXT_BASE for u-boot"; |
354 |
exit 1 |
355 |
fi |
356 |
${RKTOOLS}/loaderimage --pack --uboot u-boot.bin uboot.img ${uboot_load_addr} ${PLATFORM_UBOOT_SIZE} |
357 |
- rm u-boot.img u-boot-dtb.img -rf |
358 |
+ rm -f u-boot.img u-boot-dtb.img |
359 |
echo "pack uboot okay! Input: u-boot.bin" |
360 |
} |
361 |
|
362 |
@@ -558,13 +568,13 @@ function pack_uboot_itb_image() |
363 |
fi |
364 |
|
365 |
if [ "${ARM64_TRUSTZONE}" == "y" ]; then |
366 |
- bl31=`sed -n '/_bl31_/s/PATH=//p' ${ini} |tr -d '\r'` |
367 |
+ bl31=`gsed -n '/_bl31_/s/PATH=//p' ${ini} |tr -d '\r'` |
368 |
cp ${RKBIN}/${bl31} bl31.elf |
369 |
- make CROSS_COMPILE=${TOOLCHAIN_GCC} u-boot.itb |
370 |
+ gmake CROSS_COMPILE=${TOOLCHAIN_GCC} u-boot.itb |
371 |
echo "pack u-boot.itb okay! Input: ${ini}" |
372 |
else |
373 |
- tos_image=`sed -n "/TOS=/s/TOS=//p" ${ini} |tr -d '\r'` |
374 |
- tosta_image=`sed -n "/TOSTA=/s/TOSTA=//p" ${ini} |tr -d '\r'` |
375 |
+ tos_image=`gsed -n "/TOS=/s/TOS=//p" ${ini} |tr -d '\r'` |
376 |
+ tosta_image=`gsed -n "/TOSTA=/s/TOSTA=//p" ${ini} |tr -d '\r'` |
377 |
if [ ${tosta_image} ]; then |
378 |
cp ${RKBIN}/${tosta_image} tee.bin |
379 |
elif [ ${tos_image} ]; then |
380 |
@@ -574,7 +584,7 @@ function pack_uboot_itb_image() |
381 |
exit 1 |
382 |
fi |
383 |
|
384 |
- tee_offset=`sed -n "/ADDR=/s/ADDR=//p" ${ini} |tr -d '\r'` |
385 |
+ tee_offset=`gsed -n "/ADDR=/s/ADDR=//p" ${ini} |tr -d '\r'` |
386 |
if [ "${tee_offset}" == "" ]; then |
387 |
tee_offset=0x8400000 |
388 |
fi |
389 |
@@ -586,12 +596,13 @@ function pack_uboot_itb_image() |
390 |
cp ${RKBIN}/${mcu_image} mcu.bin |
391 |
fi |
392 |
|
393 |
- SPL_FIT_SOURCE=`sed -n "/CONFIG_SPL_FIT_SOURCE=/s/CONFIG_SPL_FIT_SOURCE=//p" .config | tr -d '""'` |
394 |
+ SPL_FIT_SOURCE=`gsed -n "/CONFIG_SPL_FIT_SOURCE=/s/CONFIG_SPL_FIT_SOURCE=//p" .config | tr -d '""'` |
395 |
if [ ! -z ${SPL_FIT_SOURCE} ]; then |
396 |
cp ${SPL_FIT_SOURCE} u-boot.its |
397 |
else |
398 |
- SPL_FIT_GENERATOR=`sed -n "/CONFIG_SPL_FIT_GENERATOR=/s/CONFIG_SPL_FIT_GENERATOR=//p" .config | tr -d '""'` |
399 |
- ${SPL_FIT_GENERATOR} ${tee_offset} ${mcu_offset} > u-boot.its |
400 |
+ SPL_FIT_GENERATOR=`gsed -n "/CONFIG_SPL_FIT_GENERATOR=/s/CONFIG_SPL_FIT_GENERATOR=//p" .config | tr -d '""'` |
401 |
+ #${SPL_FIT_GENERATOR} ${tee_offset} ${mcu_offset} > u-boot.its |
402 |
+ ${SPL_FIT_GENERATOR} ${tee_offset} ${mcu_offset} arch/arm/dts/rk3399-nanopi4.dtb > u-boot.its |
403 |
fi |
404 |
./tools/mkimage -f u-boot.its -E u-boot.itb |
405 |
echo "pack u-boot.itb okay! Input: ${ini}" |
406 |
@@ -620,39 +631,39 @@ function pack_spl_loader_image() |
407 |
done |
408 |
|
409 |
if [ -z ${header} ]; then |
410 |
- header=`sed -n '/NAME=/s/NAME=//p' ${ini}` |
411 |
+ header=`gsed -n '/NAME=/s/NAME=//p' ${ini}` |
412 |
fi |
413 |
|
414 |
# Prepare files |
415 |
- rm ${tmpdir} -rf && mkdir ${tmpdir} -p |
416 |
+ rm -rf ${tmpdir} && mkdir ${tmpdir} -p |
417 |
cp spl/u-boot-spl.bin ${tmpdir}/ && cp ${ini} ${tmpini} |
418 |
|
419 |
if [ "${mode}" == "tpl-spl" ]; then # pack tpl+spl |
420 |
label="TPL+SPL" |
421 |
cp tpl/u-boot-tpl.bin ${tmpdir}/ |
422 |
dd if=${tmpdir}/u-boot-tpl.bin of=${tmpdir}/tpl.bin bs=1 skip=4 |
423 |
- sed -i "1s/^/${header:0:4}/" ${tmpdir}/tpl.bin |
424 |
- sed -i "s/FlashData=.*$/FlashData=.\/tmp\/tpl.bin/" ${tmpini} |
425 |
- sed -i "0,/Path1=.*/s/Path1=.*$/Path1=.\/tmp\/tpl.bin/" ${tmpini} |
426 |
- sed -i "s/FlashBoot=.*$/FlashBoot=.\/tmp\/u-boot-spl.bin/" ${tmpini} |
427 |
+ gsed -i "1s/^/${header:0:4}/" ${tmpdir}/tpl.bin |
428 |
+ gsed -i "s/FlashData=.*$/FlashData=.\/tmp\/tpl.bin/" ${tmpini} |
429 |
+ gsed -i "0,/Path1=.*/s/Path1=.*$/Path1=.\/tmp\/tpl.bin/" ${tmpini} |
430 |
+ gsed -i "s/FlashBoot=.*$/FlashBoot=.\/tmp\/u-boot-spl.bin/" ${tmpini} |
431 |
elif [ "${mode}" == "tpl" ]; then # pack tpl |
432 |
label="TPL" |
433 |
cp tpl/u-boot-tpl.bin ${tmpdir}/ |
434 |
dd if=${tmpdir}/u-boot-tpl.bin of=${tmpdir}/tpl.bin bs=1 skip=4 |
435 |
- sed -i "1s/^/${header:0:4}/" ${tmpdir}/tpl.bin |
436 |
- sed -i "s/FlashData=.*$/FlashData=.\/tmp\/tpl.bin/" ${tmpini} |
437 |
- sed -i "0,/Path1=.*/s/Path1=.*$/Path1=.\/tmp\/tpl.bin/" ${tmpini} |
438 |
+ gsed -i "1s/^/${header:0:4}/" ${tmpdir}/tpl.bin |
439 |
+ gsed -i "s/FlashData=.*$/FlashData=.\/tmp\/tpl.bin/" ${tmpini} |
440 |
+ gsed -i "0,/Path1=.*/s/Path1=.*$/Path1=.\/tmp\/tpl.bin/" ${tmpini} |
441 |
else |
442 |
label="SPL" |
443 |
- sed -i "s/FlashBoot=.*$/FlashBoot=.\/tmp\/u-boot-spl.bin/" ${tmpini} |
444 |
+ gsed -i "s/FlashBoot=.*$/FlashBoot=.\/tmp\/u-boot-spl.bin/" ${tmpini} |
445 |
fi |
446 |
|
447 |
# Pack |
448 |
cd ${RKBIN} |
449 |
${RKTOOLS}/boot_merger ${tmpini} |
450 |
|
451 |
- rm ${tmpdir} -rf && cd - |
452 |
- rm *_loader_*.bin -rf && mv ${RKBIN}/*_loader_*.bin ./ |
453 |
+ rm -rf ${tmpdir} && cd - |
454 |
+ rm -rf *_loader_*.bin && mv ${RKBIN}/*_loader_*.bin ./ |
455 |
filename=`basename *_loader_*.bin` |
456 |
if [[ ${filename} != *spl* ]]; then |
457 |
rename 's/loader_/spl_loader_/' *_loader_*.bin |
458 |
@@ -668,10 +679,10 @@ function pack_loader_image() |
459 |
return |
460 |
fi |
461 |
|
462 |
- rm *_loader_*.bin -rf |
463 |
+ rm -rf *_loader_*.bin |
464 |
numline=`cat ${ini} | wc -l` |
465 |
if [ ${numline} -eq 1 ]; then |
466 |
- image=`sed -n "/PATH=/p" ${ini} | tr -d '\r' | cut -d '=' -f 2` |
467 |
+ image=`gsed -n "/PATH=/p" ${ini} | tr -d '\r' | cut -d '=' -f 2` |
468 |
cp ${RKBIN}/${image} ./ |
469 |
else |
470 |
cd ${RKBIN} |
471 |
@@ -686,19 +697,19 @@ function pack_loader_image() |
472 |
function pack_arm32_trust_image() |
473 |
{ |
474 |
ini=$1 |
475 |
- tos_image=`sed -n "/TOS=/s/TOS=//p" ${ini} |tr -d '\r'` |
476 |
- tosta_image=`sed -n "/TOSTA=/s/TOSTA=//p" ${ini} |tr -d '\r'` |
477 |
- tee_output=`sed -n "/OUTPUT=/s/OUTPUT=//p" ${ini} |tr -d '\r'` |
478 |
+ tos_image=`gsed -n "/TOS=/s/TOS=//p" ${ini} |tr -d '\r'` |
479 |
+ tosta_image=`gsed -n "/TOSTA=/s/TOSTA=//p" ${ini} |tr -d '\r'` |
480 |
+ tee_output=`gsed -n "/OUTPUT=/s/OUTPUT=//p" ${ini} |tr -d '\r'` |
481 |
if [ "${tee_output}" == "" ]; then |
482 |
tee_output="./trust.img" |
483 |
fi |
484 |
- tee_offset=`sed -n "/ADDR=/s/ADDR=//p" ${ini} |tr -d '\r'` |
485 |
+ tee_offset=`gsed -n "/ADDR=/s/ADDR=//p" ${ini} |tr -d '\r'` |
486 |
if [ "${tee_offset}" == "" ]; then |
487 |
tee_offset=0x8400000 |
488 |
fi |
489 |
|
490 |
# OP-TEE is 132M(0x8400000) offset from DRAM base. |
491 |
- dram_base=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" include/autoconf.mk|tr -d '\r'` |
492 |
+ dram_base=`gsed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" include/autoconf.mk|tr -d '\r'` |
493 |
tee_load_addr=$((dram_base+tee_offset)) |
494 |
tee_load_addr=$(echo "obase=16;${tee_load_addr}"|bc) # Convert Dec to Hex |
495 |
|
496 |
@@ -728,7 +739,7 @@ function pack_trust_image() |
497 |
return |
498 |
fi |
499 |
|
500 |
- rm trust*.img -rf |
501 |
+ rm -rf trust*.img |
502 |
ini=${INI_TRUST} |
503 |
if [ ! -f ${INI_TRUST} ]; then |
504 |
echo "pack trust failed! Can't find: ${INI_TRUST}" |
505 |
@@ -737,7 +748,7 @@ function pack_trust_image() |
506 |
|
507 |
numline=`cat ${ini} | wc -l` |
508 |
if [ ${numline} -eq 1 ]; then |
509 |
- image=`sed -n "/PATH=/p" ${ini} | tr -d '\r' | cut -d '=' -f 2` |
510 |
+ image=`gsed -n "/PATH=/p" ${ini} | tr -d '\r' | cut -d '=' -f 2` |
511 |
cp ${RKBIN}/${image} ./trust.img |
512 |
echo "pack trust okay! Input: ${ini}" |
513 |
return; |
514 |
@@ -753,14 +764,14 @@ function pack_trust_image() |
515 |
function pack_fit_image() |
516 |
{ |
517 |
if [ "${ARG_NO_UBOOT}" == "y" ]; then |
518 |
- rm u-boot-nodtb.bin u-boot.dtb -rf |
519 |
+ rm -f u-boot-nodtb.bin u-boot.dtb |
520 |
touch u-boot-nodtb.bin u-boot.dtb |
521 |
fi |
522 |
|
523 |
if grep -q '^CONFIG_FIT_SIGNATURE=y' .config ; then |
524 |
./scripts/fit-mkimg.sh --uboot-itb --boot-itb ${ARG_LIST_FIT} |
525 |
else |
526 |
- rm uboot.img trust*.img -rf |
527 |
+ rm -f uboot.img trust*.img |
528 |
./scripts/fit-mkimg.sh --uboot-itb --no-vboot --no-rebuild ${ARG_LIST_FIT} |
529 |
echo "pack uboot.img okay! Input: ${INI_TRUST}" |
530 |
fi |
531 |
@@ -781,7 +792,7 @@ function pack_images() |
532 |
|
533 |
function clean_files() |
534 |
{ |
535 |
- rm spl/u-boot-spl.dtb tpl/u-boot-tpl.dtb u-boot.dtb -rf |
536 |
+ rm -f spl/u-boot-spl.dtb tpl/u-boot-tpl.dtb u-boot.dtb |
537 |
} |
538 |
|
539 |
function finish() |
540 |
@@ -790,7 +801,7 @@ function finish() |
541 |
if [ "${ARG_BOARD}" == "" ]; then |
542 |
echo "Platform ${RKCHIP_LABEL} is build OK, with exist .config" |
543 |
else |
544 |
- echo "Platform ${RKCHIP_LABEL} is build OK, with new .config(make ${ARG_BOARD}_defconfig)" |
545 |
+ echo "Platform ${RKCHIP_LABEL} is build OK, with new .config(gmake ${ARG_BOARD}_defconfig)" |
546 |
fi |
547 |
} |
548 |
|
549 |
@@ -803,7 +814,11 @@ select_ini_file |
550 |
handle_args_late |
551 |
sub_commands |
552 |
clean_files |
553 |
-make CROSS_COMPILE=${TOOLCHAIN_GCC} all --jobs=${JOB} |
554 |
+gmake CROSS_COMPILE=${TOOLCHAIN_GCC} all --jobs=${JOB} |
555 |
pack_images |
556 |
finish |
557 |
+ |
558 |
+./tools/mkimage -n rk3399 -T rksd -d /root/rkbin/bin/rk33/rk3399_ddr_800MHz_v1.24.bin idbloader.img |
559 |
+cat /root/rkbin/bin/rk33/rk3399_miniloader_v1.26.bin >> idbloader.img |
560 |
+ |
561 |
|
562 |
diff -upr uboot-rockchip/net/eth-uclass.c uboot-rockchip.this-works-for-me/net/eth-uclass.c |
563 |
--- net/eth-uclass.c.orig 2021-05-18 07:09:59.515757000 +0000 |
564 |
+++ net/eth-uclass.c 2021-05-17 16:36:08.649866000 +0000 |
565 |
@@ -263,7 +263,7 @@ int eth_init(void) |
566 |
if (!current) { |
567 |
current = eth_get_dev(); |
568 |
if (!current) { |
569 |
- printf("No ethernet found.\n"); |
570 |
+ printf("No ethernet found..\n"); |
571 |
return -ENODEV; |
572 |
} |
573 |
} |
574 |
@@ -399,7 +399,7 @@ int eth_initialize(void) |
575 |
*/ |
576 |
uclass_first_device(UCLASS_ETH, &dev); |
577 |
if (!dev) { |
578 |
- printf("No ethernet found.\n"); |
579 |
+ printf("%s: No ethernet found.\n", __func__); |
580 |
bootstage_error(BOOTSTAGE_ID_NET_ETH_START); |
581 |
} else { |
582 |
char *ethprime = env_get("ethprime"); |
583 |
diff -upr uboot-rockchip/scripts/build-whitelist.sh uboot-rockchip.this-works-for-me/scripts/build-whitelist.sh |
584 |
--- scripts/build-whitelist.sh.orig 2021-05-18 07:09:59.528188000 +0000 |
585 |
+++ scripts/build-whitelist.sh 2021-05-16 21:00:52.555902000 +0000 |
586 |
@@ -24,21 +24,21 @@ export LC_ALL=C LC_COLLATE=C |
587 |
# Kconfig and defconfig files. |
588 |
# |
589 |
( |
590 |
-git grep CONFIG_SYS_EXTRA_OPTIONS |sed -n \ |
591 |
+git grep CONFIG_SYS_EXTRA_OPTIONS |gsed -n \ |
592 |
's/.*CONFIG_SYS_EXTRA_OPTIONS="\(.*\)"/\1/ p' \ |
593 |
| tr , '\n' \ |
594 |
- | sed 's/ *\([A-Za-z0-9_]*\).*/CONFIG_\1/' |
595 |
+ | gsed 's/ *\([A-Za-z0-9_]*\).*/CONFIG_\1/' |
596 |
|
597 |
git grep CONFIG_ | \ |
598 |
egrep -vi "(Kconfig:|defconfig:|README|\.py|\.pl:)" \ |
599 |
| tr ' \t' '\n\n' \ |
600 |
- | sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |
601 |
+ | gsed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |
602 |
) \ |
603 |
|sort |uniq >scripts/config_whitelist.txt.tmp1; |
604 |
|
605 |
# Finally, we need a list of the valid Kconfig options to exclude these from |
606 |
# the whitelist. |
607 |
-cat `find . -name "Kconfig*"` |sed -n \ |
608 |
+cat `find . -name "Kconfig*"` |gsed -n \ |
609 |
-e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ |
610 |
-e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ |
611 |
|sort |uniq >scripts/config_whitelist.txt.tmp2 |
612 |
diff -upr uboot-rockchip/scripts/check-config.sh uboot-rockchip.this-works-for-me/scripts/check-config.sh |
613 |
--- scripts/check-config.sh.orig 2021-05-18 07:09:59.528293000 +0000 |
614 |
+++ scripts/check-config.sh 2021-05-16 21:00:32.905820000 +0000 |
615 |
@@ -27,12 +27,12 @@ new_adhoc="${path}.adhoc" |
616 |
export LC_ALL=C |
617 |
export LC_COLLATE=C |
618 |
|
619 |
-cat ${path} |sed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \ |
620 |
+cat ${path} |gsed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \ |
621 |
>${configs} |
622 |
|
623 |
comm -23 ${configs} ${whitelist} > ${suspects} |
624 |
|
625 |
-cat `find ${srctree} -name "Kconfig*"` |sed -n \ |
626 |
+cat `find ${srctree} -name "Kconfig*"` |gsed -n \ |
627 |
-e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ |
628 |
-e 's/^\s*menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ |
629 |
|sort |uniq > ${ok} |
630 |
diff -upr uboot-rockchip/scripts/fit-mkimg.sh uboot-rockchip.this-works-for-me/scripts/fit-mkimg.sh |
631 |
--- scripts/fit-mkimg.sh.orig 2021-05-18 07:09:59.544406000 +0000 |
632 |
+++ scripts/fit-mkimg.sh 2021-05-16 20:14:38.167821000 +0000 |
633 |
@@ -1,4 +1,4 @@ |
634 |
-#!/bin/bash |
635 |
+#!/usr/local/bin/bash |
636 |
# |
637 |
# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd |
638 |
# |
639 |
diff -upr uboot-rockchip/scripts/fit-resign.sh uboot-rockchip.this-works-for-me/scripts/fit-resign.sh |
640 |
--- scripts/fit-resign.sh.orig 2021-05-18 07:09:59.544512000 +0000 |
641 |
+++ scripts/fit-resign.sh 2021-05-16 20:14:43.645367000 +0000 |
642 |
@@ -1,4 +1,4 @@ |
643 |
-#!/bin/bash |
644 |
+#!/usr/local/bin/bash |
645 |
# |
646 |
# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd |
647 |
# |
648 |
diff -upr uboot-rockchip/scripts/fit-unpack.sh uboot-rockchip.this-works-for-me/scripts/fit-unpack.sh |
649 |
--- scripts/fit-unpack.sh.orig 2021-05-18 07:09:59.544614000 +0000 |
650 |
+++ scripts/fit-unpack.sh 2021-05-16 20:14:49.519291000 +0000 |
651 |
@@ -1,4 +1,4 @@ |
652 |
-#!/bin/bash |
653 |
+#!/usr/local/bin/bash |
654 |
# |
655 |
# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd |
656 |
# |
657 |
diff -upr uboot-rockchip/scripts/rkpatch.sh uboot-rockchip.this-works-for-me/scripts/rkpatch.sh |
658 |
--- scripts/rkpatch.sh.orig 2021-05-18 07:09:59.557044000 +0000 |
659 |
+++ scripts/rkpatch.sh 2021-05-16 21:00:15.428525000 +0000 |
660 |
@@ -33,74 +33,74 @@ case $1 in |
661 |
&& echo " CONFIG_ROCKCHIP_CRASH_DUMP" |
662 |
;; |
663 |
1) |
664 |
- sed -i 's/\<debug\>/printf/g' lib/initcall.c |
665 |
- sed -i 's/ifdef DEBUG/if 1/g' lib/initcall.c |
666 |
+ gsed -i 's/\<debug\>/printf/g' lib/initcall.c |
667 |
+ gsed -i 's/ifdef DEBUG/if 1/g' lib/initcall.c |
668 |
echo "DEBUG [1]: lib/initcall.c debug() -> printf()" |
669 |
;; |
670 |
2) |
671 |
- sed -i 's/\<debug\>/printf/g' ./common/board_f.c |
672 |
- sed -i 's/\<debug\>/printf/g' ./common/board_r.c |
673 |
+ gsed -i 's/\<debug\>/printf/g' ./common/board_f.c |
674 |
+ gsed -i 's/\<debug\>/printf/g' ./common/board_r.c |
675 |
echo "DEBUG [2]: common/board_r.c and common/board_f.c debug() -> printf()" |
676 |
;; |
677 |
3) |
678 |
- sed -i '$i \#define DEBUG\' include/configs/rockchip-common.h |
679 |
+ gsed -i '$i \#define DEBUG\' include/configs/rockchip-common.h |
680 |
echo "DEBUG [3]: global #define DEBUG" |
681 |
;; |
682 |
4) |
683 |
- sed -i 's/\# CONFIG_ROCKCHIP_DEBUGGER is not set/CONFIG_ROCKCHIP_DEBUGGER=y/g' .config |
684 |
+ gsed -i 's/\# CONFIG_ROCKCHIP_DEBUGGER is not set/CONFIG_ROCKCHIP_DEBUGGER=y/g' .config |
685 |
echo "DEBUG [4]: CONFIG_ROCKCHIP_DEBUGGER is enabled" |
686 |
;; |
687 |
5) |
688 |
- sed -i 's/\# CONFIG_ROCKCHIP_CRC is not set/CONFIG_ROCKCHIP_CRC=y/g' .config |
689 |
+ gsed -i 's/\# CONFIG_ROCKCHIP_CRC is not set/CONFIG_ROCKCHIP_CRC=y/g' .config |
690 |
echo "DEBUG [5]: CONFIG_ROCKCHIP_CRC is enabled" |
691 |
;; |
692 |
6) |
693 |
- sed -i 's/\# CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP is not set/CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP=y/g' .config |
694 |
+ gsed -i 's/\# CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP is not set/CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP=y/g' .config |
695 |
echo "DEBUG [6]: CONFIG_BOOTSTAGE_PRINTF_TIMESTAMP is enabled" |
696 |
;; |
697 |
7) |
698 |
- sed -i 's/\# CONFIG_ROCKCHIP_CRASH_DUMP is not set/CONFIG_ROCKCHIP_CRASH_DUMP=y/g' .config |
699 |
+ gsed -i 's/\# CONFIG_ROCKCHIP_CRASH_DUMP is not set/CONFIG_ROCKCHIP_CRASH_DUMP=y/g' .config |
700 |
echo "DEBUG [7]: CONFIG_ROCKCHIP_CRASH_DUMP is enabled" |
701 |
;; |
702 |
8) |
703 |
- sed -i 's/^CONFIG_BOOTDELAY=0/CONFIG_BOOTDELAY=5/g' .config |
704 |
+ gsed -i 's/^CONFIG_BOOTDELAY=0/CONFIG_BOOTDELAY=5/g' .config |
705 |
echo "DEBUG [8]: CONFIG_BOOTDELAY is 5s" |
706 |
;; |
707 |
9) |
708 |
- sed -i '/save_boot_params_ret:/a\ldr r0, =CONFIG_DEBUG_UART_BASE\nmov r1, #100\nloop:\nmov r2, #0x55\nstr r2, [r0]\nsub r1, r1, #1\ncmp r1, #0\nbne loop\ndsb' \ |
709 |
+ gsed -i '/save_boot_params_ret:/a\ldr r0, =CONFIG_DEBUG_UART_BASE\nmov r1, #100\nloop:\nmov r2, #0x55\nstr r2, [r0]\nsub r1, r1, #1\ncmp r1, #0\nbne loop\ndsb' \ |
710 |
./arch/arm/cpu/armv7/start.S |
711 |
echo "DEBUG [9]: armv7 start.S entry warning 'UUUU...'" |
712 |
;; |
713 |
10) |
714 |
- sed -i '/save_boot_params_ret:/a\ldr x0, =CONFIG_DEBUG_UART_BASE\nmov x1, #100\nloop:\nmov x2, #0x55\nstr x2, [x0]\nsub x1, x1, #1\ncmp x1, #0\nb.ne loop\ndsb sy' \ |
715 |
+ gsed -i '/save_boot_params_ret:/a\ldr x0, =CONFIG_DEBUG_UART_BASE\nmov x1, #100\nloop:\nmov x2, #0x55\nstr x2, [x0]\nsub x1, x1, #1\ncmp x1, #0\nb.ne loop\ndsb sy' \ |
716 |
./arch/arm/cpu/armv8/start.S |
717 |
echo "DEBUG [10]: armv8 start.S entry warning 'UUUU...'" |
718 |
;; |
719 |
11) |
720 |
- sed -i 's/\<debug\>/printf/g' common/fdt_support.c |
721 |
- sed -i 's/\<debug\>/printf/g' common/image-fdt.c |
722 |
- sed -i 's/\<debug\>/printf/g' common/image.c |
723 |
- sed -i 's/\<debug\>/printf/g' arch/arm/lib/bootm.c |
724 |
- sed -i 's/\<debug\>/printf/g' common/bootm.c |
725 |
- sed -i 's/\<debug\>/printf/g' common/image.c |
726 |
- sed -i 's/\<debug\>/printf/g' common/image-android.c |
727 |
- sed -i 's/\<debug\>/printf/g' common/android_bootloader.c |
728 |
+ gsed -i 's/\<debug\>/printf/g' common/fdt_support.c |
729 |
+ gsed -i 's/\<debug\>/printf/g' common/image-fdt.c |
730 |
+ gsed -i 's/\<debug\>/printf/g' common/image.c |
731 |
+ gsed -i 's/\<debug\>/printf/g' arch/arm/lib/bootm.c |
732 |
+ gsed -i 's/\<debug\>/printf/g' common/bootm.c |
733 |
+ gsed -i 's/\<debug\>/printf/g' common/image.c |
734 |
+ gsed -i 's/\<debug\>/printf/g' common/image-android.c |
735 |
+ gsed -i 's/\<debug\>/printf/g' common/android_bootloader.c |
736 |
echo "DEBUG [11]: firmware bootflow debug() -> printf()" |
737 |
;; |
738 |
12) |
739 |
- sed -i '$a\CONFIG_BOOTSTAGE=y\' .config |
740 |
- sed -i '$a\CONFIG_BOOTSTAGE_REPORT=y\' .config |
741 |
- sed -i '$a\CONFIG_CMD_BOOTSTAGE=y\' .config |
742 |
+ gsed -i '$a\CONFIG_BOOTSTAGE=y\' .config |
743 |
+ gsed -i '$a\CONFIG_BOOTSTAGE_REPORT=y\' .config |
744 |
+ gsed -i '$a\CONFIG_CMD_BOOTSTAGE=y\' .config |
745 |
echo "DEBUG [12]: bootstage timing report" |
746 |
;; |
747 |
13) |
748 |
- sed -i 's/\# CONFIG_ROCKCHIP_DEBUGGER is not set/CONFIG_ROCKCHIP_DEBUGGER=y/g' .config |
749 |
- sed -i '/br x4/i\b .' arch/arm/cpu/armv8/transition.S |
750 |
- sed -i 's/announce_and_cleanup(fake);/if (0)announce_and_cleanup(fake);/g' arch/arm/lib/bootm.c |
751 |
- sed -i '/announce_and_cleanup(fake)/a\enable_interrupts()\;' arch/arm/lib/bootm.c |
752 |
- sed -i '/kernel_entry(0, machid, r2)/i\printf("#### Jump to kernel!!")\;' arch/arm/lib/bootm.c |
753 |
- sed -i '/kernel_entry(0, machid, r2)/i\__asm("b .")\;' arch/arm/lib/bootm.c |
754 |
- sed -i 's/\<debug\>/printf/g' arch/arm/lib/bootm.c |
755 |
+ gsed -i 's/\# CONFIG_ROCKCHIP_DEBUGGER is not set/CONFIG_ROCKCHIP_DEBUGGER=y/g' .config |
756 |
+ gsed -i '/br x4/i\b .' arch/arm/cpu/armv8/transition.S |
757 |
+ gsed -i 's/announce_and_cleanup(fake);/if (0)announce_and_cleanup(fake);/g' arch/arm/lib/bootm.c |
758 |
+ gsed -i '/announce_and_cleanup(fake)/a\enable_interrupts()\;' arch/arm/lib/bootm.c |
759 |
+ gsed -i '/kernel_entry(0, machid, r2)/i\printf("#### Jump to kernel!!")\;' arch/arm/lib/bootm.c |
760 |
+ gsed -i '/kernel_entry(0, machid, r2)/i\__asm("b .")\;' arch/arm/lib/bootm.c |
761 |
+ gsed -i 's/\<debug\>/printf/g' arch/arm/lib/bootm.c |
762 |
echo "DEBUG [13]: starting kernel halt dump" |
763 |
;; |
764 |
*) |