我花了几天时间试图理解,但我被困住了。在我的 STM32F429I-DISC1 板上输入“bootm 8100000”后,我只收到“正在启动内核...”消息。
在我将 uboot 从 2011 年更新到 2016 年之前,它是“正在启动内核...”+ UNHANDED EXCEPTION HARDFAULT,但现在我只有“正在启动内核...”消息。
MCU是一个stm32F429,2MB Flash + ext。8MB 内存。
Flash start addr 是0x08000000 (uboot addr),我把内核放在第二个 flash bank 的开头 0x08100000。
外部 8MB RAM 的开始是0xD0000000
u-boot-2016.11 似乎在那块板上运行得很好,bdi 给我:
U-Boot > bdi
arch_number = 0x00000000
boot_params = 0xD0000100
DRAM bank = 0x00000000
-> start = 0xD0000000
-> size = 0x00800000
current eth = unknown
ip_addr = <NULL>
baudrate = 115200 bps
relocaddr = 0xD07D6000
reloc off = 0xC87D6000
irq_sp = 0xD05D3EE0
sp start = 0xD05D3ED0
Early malloc usage: e0 / 400
这就是我构建内核的方式:
make CROSS_COMPILE=arm-none-eabi- ARCH=arm uImage LOADADDR=08100000 -B
这是 bootm 命令的完整输出:
U-Boot > bootm 8100000
## Booting kernel from Legacy Image at 08100000 ...
Image Name: Linux-4.9.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 839872 Bytes = 820.2 KiB
Load Address: 08100000
Entry Point: 08100000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting kernel ...
使用“robutest”/“emcraft”内核/配置文件,我得到了相同的日志,除非入口点看起来更正确,因为它是 08100001。
在 robutest/emcraft 内核上,我尝试激活板子的 LCD 屏幕,但没有任何反应。
在我所有的测试中,我激活了内核配置“early printk”和“DEBUG_LL_xxx”的东西。
这是我的 .config 文件的链接:http: //pastebin.com/gBNYx3Gs
PS:我尝试使用 uCLinux emcraft/robutest 试图找出发生了什么,但我的主要目标是运行 Linux 4.9。
谢谢你读我!!!
编辑:我试图通过 dtb“旧方式”,但结果相同:
U-Boot > bootm 08100000 - 08040000
## Booting kernel from Legacy Image at 08100000 ...
Image Name: Linux-4.9.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 805744 Bytes = 786.9 KiB
Load Address: 08100000
Entry Point: 08100000
Verifying Checksum ... OK
## Flattened Device Tree blob at 08040000
Booting using the fdt blob at 0x8040000
Loading Kernel Image ... OK
Loading Device Tree to d05ce000, end d05d2a9f ... OK
Starting kernel ...
我很绝望,欢迎任何想法:'(
EDIT2:我尝试用 u-boot 解压内核,结果是一样的:
U-Boot > bootm 8100000 - 8040000
## Booting kernel from Legacy Image at 08100000 ...
Image Name: uImage
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 940696 Bytes = 918.6 KiB
Load Address: d0008000
Entry Point: d0008001
Verifying Checksum ... OK
## Flattened Device Tree blob at 08040000
Booting using the fdt blob at 0x8040000
Uncompressing Kernel Image ... OK
Loading Device Tree to d05ce000, end d05d2a9f ... OK
Starting kernel ...
EDIT3:我检查了 dtb 中的内存/USART1 地址,没关系。为什么我没有内核的消息?
EDIT4:使用 uxipImage:
U-Boot > bootm 08060000 - 08040000
## Booting kernel from Legacy Image at 08060000 ...
Image Name: uxipImage
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1497396 Bytes = 1.4 MiB
Load Address: 08060000
Entry Point: 08060041
Verifying Checksum ... OK
## Flattened Device Tree blob at 08040000
Booting using the fdt blob at 0x8040000
Loading Kernel Image ... OK
Loading Device Tree to d05ce000, end d05d2a9f ... OK
Starting kernel ...
我尝试了不同的入口点,08060000、08060040 和 08060041。