gpt4 book ai didi

linux-kernel - U-boot 起始地址?和 u-boot.imx 文件包含?

转载 作者:行者123 更新时间:2023-12-05 09:18:03 25 4
gpt4 key购买 nike

我试图了解嵌入式 Linux 原理,但无法在 u-boot 输出中找出地址。

如何找到U-boot的起始地址?

例如,我有基于 i.MX6 四核处理器的 MX6-SabreSD 板,我从 U-Boot 得到以下输出:

U-Boot 2015.10-rc3 (Aug 10 2017 - 13:33:34)

CPU: Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: MX6-SabreSD
DRAM: 1 GiB
MMC: FSL_SDHC: 0
No panel detected: default to LDB-WVGA
Display: LDB-WVGA (800x480)
In: serial
Out: serial
Err: serial
Net: using phy at 6
FEC [PRIME]
Warning: FEC MAC addresses don't match:
Address in SROM is 00:c0:08:88:a5:e6
Address in environment is 00:c0:08:88:9c:ce

Hit any key to stop autoboot: 0
Booting from mmc ...
4788388 bytes read in 303 ms (15.1 MiB/s)
## Booting kernel from Legacy Image at 12000000 ...
Image Name: Linux-3.0.35
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4788324 Bytes = 4.6 MiB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... OK
Loading Kernel Image ... OK

Starting kernel ...

最佳答案

U-boot start address?

U-Boot 的起始地址使用符号CONFIG_SYS_TEXT_BASE 指定,通常定义在开发板的配置头文件中,即include/configs/.h
对于 i.MX6 板,此值通常为 0x17800000。
但是可执行文件将自己重新定位到上层 RAM。
如果您有构建文件,可以通过查看 System.mapu-boot.map 文件来确认起始地址。

and u-boot.imx file contains?

u-boot.imx 文件是 i.MX SoC 的 ROM 引导代码使用的二进制镜像。
它由标准的 u-boot.bin 可执行文件组成,但前面加上一个 0xC00 字节的 header 。
详细信息在 U-Boot 文档文件中 doc/README.imximage ,它描述了如何构建二进制文件并将其写入媒体。

How can i find the starting address of U-boot?

起始地址似乎存储在 u-boot.imx 文件的偏移量 0x4(加载地址为 0x14)(尽管我无法找到确认信息)。

u-boot.imx 文件存储在您的 SD 卡上,从第三个扇区开始(即字节偏移 0x400)。
参见 embedded linux ARM booting address与将二进制文件写入 SD 卡有关。

关于linux-kernel - U-boot 起始地址?和 u-boot.imx 文件包含?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45631141/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com