arch/arm/boot/uImage 是 make uImage 过程中 自动生成的
bash ./scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x50008000-e 0x50008000-n 'Linux-5.11.0-00004-g2b88cbadf5c-dirty'-d arch/arm/boot/zImage arch/arm/boot/uImage
镜像加载执行
// 加载 arch/arm/boot/uImage , 并 bootm
bootcmd=tftp 0x50008000 uImage;bootm 0x50008000// 打印信息=> tftp 0x50008000 uImage
dm9000 i/o:0x18000300, id:0x90000a46
DM9000: running in 16 bit mode
MAC: e2:7c:ef:97:da:b4
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 10.10.11.59; our IP address is 10.10.11.120
Filename 'uImage'.
Load address:0x50008000
Loading: #################################################################
#################################################################
#################################################################
####
1 MiB/s
done
Bytes transferred =2913360(2c7450 hex)=> bootm 0x50008000
## Booting kernel from Legacy Image at 50008000...
Image Name: Linux-5.11.0-00004-g2b88cbadf5c-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size:2913296 Bytes =2.8 MiB
Load Address:50008000
Entry Point:50008000
Verifying Checksum ... OK
Loading Kernel Image
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 5.11.0-00004-g2b88cbadf5c-dirty (suws@ubuntu)(arm-linux-gnueabi-gcc (Linaro GCC 7.4-2019.02)7.4.120181213[linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4], GNU ld (Linaro_Binutils-2019.02)2.28.2.20170706) #44 Fri Apr 1614:06:43 CST 2021
CPU: ARMv6-compatible processor [410fb766] revision 6(ARMv7), cr=00c5387d
镜像Image的执行
镜像制作
将 arch/arm/boot/Image 直接 加个 uImage头,生成 arch/arm/boot/uImage2
bash ./scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x50008000-e 0x50008000-n 'Linux-5.11.0-00004-g2b88cbadf5c-dirty'-d arch/arm/boot/Image arch/arm/boot/uImage2
镜像加载执行
// 问题及 问题的解决=> bootm 0x50008000
## Booting kernel from Legacy Image at 50008000...
Image Name: Linux-5.11.0-00004-g2b88cbadf5c-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size:8938664 Bytes =8.5 MiB
Load Address:50008000
Entry Point:50008000
Verifying Checksum ... OK
Loading Kernel Image
Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
resetting ...
reset...// 解决方案
diff --git a/include/configs/ok6410a.h b/include/configs/ok6410a.h
index 2808281..66d1c41 100755--- a/include/configs/ok6410a.h
+++ b/include/configs/ok6410a.h
@@ -213,5+213,6 @@
#undef CONFIG_DEBUG_UART_CLOCK#define CONFIG_DEBUG_UART_CLOCK get_uart_clk(0)+#define CONFIG_SYS_BOOTM_LEN SZ_64M
#endif/* __CONFIG_H */
=> tftp 0x50008000 uImage2
dm9000 i/o:0x18000300, id:0x90000a46
DM9000: running in 16 bit mode
MAC: e2:7c:ef:97:da:b4
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 10.10.11.59; our IP address is 10.10.11.120
Filename 'uImage2'.
Load address:0x50008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
########################
1.2 MiB/s
done
Bytes transferred =8938728(8864e8 hex)=> bootm 0x50008000
## Booting kernel from Legacy Image at 50008000...
Image Name: Linux-5.11.0-00004-g2b88cbadf5c-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size:8938664 Bytes =8.5 MiB
Load Address:50008000
Entry Point:50008000
Verifying Checksum ... OK
Loading Kernel Image
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 5.11.0-00004-g2b88cbadf5c-dirty (suws@ubuntu)(arm-linux-gnueabi-gcc (Linaro GCC 7.4-2019.02)7.4.120181213[linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4], GNU ld (Linaro_Binutils-2019.02)2.28.2.20170706) #44 Fri Apr 1614:06:43 CST 2021
CPU: ARMv6-compatible processor [410fb766] revision 6(ARMv7), cr=00c5387d
不能直接执行的镜像
镜像arch/arm/boot/compressed/vmlinux的执行
bash ./scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x50008000-e 0x50008000-n 'Linux-5.11.0-00004-g2b88cbadf5c-dirty'-d arch/arm/boot/compressed/vmlinux arch/arm/boot/uImage3
=> tftp 0x50008000 uImage3
dm9000 i/o:0x18000300, id:0x90000a46
DM9000: running in 16 bit mode
MAC: e2:7c:ef:97:da:b4
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 10.10.11.59; our IP address is 10.10.11.120
Filename 'uImage3'.
Load address:0x50008000
Loading: #################################################################
#################################################################
#################################################################
#########
1.2 MiB/s
done
Bytes transferred =2985716(2d8ef4 hex)=> bootm 0x50008000
## Booting kernel from Legacy Image at 50008000...
Image Name: Linux-5.11.0-00004-g2b88cbadf5c-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size:2985652 Bytes =2.8 MiB
Load Address:50008000
Entry Point:50008000
Verifying Checksum ... OK
Loading Kernel Image
Starting kernel ...
data abort
pc :[<50008024>] lr :[<5ff30e5c>]
reloc pc :[<4fbd8024>] lr :[<5fb00e5c>]
sp :5fe2eca0 ip :00000024 fp :00000001
r10:00000001 r9 :5fe2fee0 r8 :5fe2eca0
r7 :00000000 r6 :50008000 r5 :5ff6a4e4 r4 :00000000
r3 :5fe2ffb0 r2 :50000100 r1 :0000065a r0 :00000000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code:000000010000000000000034002d8c5c (05000200)
Resetting CPU ...
resetting ...
reset...
镜像vmlinux的执行
bash ./scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x50008000-e 0x50008000-n 'Linux-5.11.0-00004-g2b88cbadf5c-dirty'-d vmlinux arch/arm/boot/uImage4
=> tftp 0x50008000 uImage4
dm9000 i/o:0x18000300, id:0x90000a46
DM9000: running in 16 bit mode
MAC: e2:7c:ef:97:da:b4
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 10.10.11.59; our IP address is 10.10.11.120
Filename 'uImage4'.
Load address:0x50008000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
########
1.2 MiB/s
done
Bytes transferred =7743116(76268c hex)=> bootm 0x50008000
## Booting kernel from Legacy Image at 50008000...
Image Name: Linux-5.11.0-00004-g2b88cbadf5c-
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size:7743052 Bytes =7.4 MiB
Load Address:50008000
Entry Point:50008000
Verifying Checksum ... OK
Loading Kernel Image
Starting kernel ...
undefined instruction
pc :[<5000809c>] lr :[<5ff30e5c>]
reloc pc :[<4fbd809c>] lr :[<5fb00e5c>]
sp :5fe2eca0 ip :00000024 fp :00000001
r10:00000001 r9 :5fe2fee0 r8 :00000400
r7 :00000000 r6 :50008000 r5 :5ff6a4e4 r4 :00000000
r3 :5fe2ffb0 r2 : afff8000 r1 :0000065a r0 :00000000
Flags: Nzcv IRQs off FIQs off Mode SVC_32
Code:00000006000100000000000100530000(ffff0000)
Resetting CPU ...
resetting ...
reset...