在 fitImage 中使用 zImage 启动有效,但在 fitImage 中使用 Image 启动失败

问题描述 投票:0回答:1

我可以在我的 i.mx6UL 板上成功启动带有 zImage 的 fitImage:

U-Boot 2022.10+yocto (Apr 20 2023 - 21:44:39 +0000)

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 43C
Reset cause: WDOG
Board: unknown (version=0x0)
DRAM:  512 MiB
Core:  37 devices, 18 uclasses, devicetree: separate
WDT:   Started watchdog with servicing (128s timeout)
NAND:  512 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Unsupported board variant!
Net:   eth0: ethernet@2188000
Normal Boot
Hit any key to stop autoboot:  0
Booting fitImage from mmc0 ...
switch to partitions #0, OK
mmc0 is current device
4846904 bytes read in 214 ms (21.6 MiB/s)
## Loading kernel from FIT Image at 82000000 ...
No configuration specified, trying default...
Found default configuration: 'conf-map55-com.dtb'
   Using 'conf-map55-com.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8200011c
     Data Size:    4809104 Bytes = 4.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x83000000
     Entry Point:  0x83000000
     Hash node:    'hash-1'
     Hash algo:    sha256
     Hash value:   3edf87645b091fcb00d877f9ea851b2e8893aad196fc39a4588728ac6cf93d4d
     Hash len:     32
   Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [8200011c, 824962dc]
+ OK
   kernel data at 0x8200011c, len = 0x00496190 (4809104)
*  ramdisk: using config 'conf-map55-com.dtb' from image at 0x82000000
*  ramdisk: no 'ramdisk' in config
*  fdt: using config 'conf-map55-com.dtb' from image at 0x82000000
## Checking for 'FDT'/'FDT Image' at 82000000
## Loading fdt from FIT Image at 82000000 ...
   Using 'conf-map55-com.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'fdt-map55-com.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x824963b8
     Data Size:    35867 Bytes = 35 KiB
     Architecture: ARM
Can't get 'load' property from FIT 0x82000000, node: offset 4809524, name fdt-map55-com.dtb (FDT_ERR_NOTFOUND)
     Hash node:    'hash-1'
     Hash algo:    sha256
     Hash value:   74d2031e5bdb030bcc137dfb013b01acb253dcc14e0153ab63d5e65e41a0caab
     Hash len:     32
   Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [824963b8, 8249eff8]
+ OK
Can't get 'load' property from FIT 0x82000000, node: offset 4809524, name fdt-map55-com.dtb (FDT_ERR_NOTFOUND)
fit_uname=fdt-map55-com.dtb, fit_uname_config=conf-map55-com.dtb
   Booting using the fdt blob at 0x824963b8
   of_flat_tree at 0x824963b8 size 0x00008c1b
   Loading Kernel Image
   @ comp: 0, load: 0x83000000, start: 0x8200011c, type: 2
   @ load_buf: 0x83000000, image_buf: 0x8200011c, image_len: 4809104, unc_len: 33554432, load_end: 9df546ac
   @ load: 0x83000000, load_end: 0x9df546ac, image_len: 4809104
   kernel loaded at 0x83000000, end = 0x83496190
using: FDT
   Using Device Tree in place at 824963b8, end 824a1fd2
## Transferring control to Linux (at address 83000000)...

Starting kernel ...

## Last log before kernel_entry(machid=0x0,r2=0x824963b8)
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0

我想用fitImage中的未压缩图像启动,所以我使用同一构建中的

Image
文件替换zImage来创建fitImage,切换内核后它被卡住了,如下(永远卡在最后):

U-Boot 2022.10+yocto (Apr 20 2023 - 21:44:39 +0000)

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 43C
Reset cause: WDOG
Board: unknown (version=0x0)
DRAM:  512 MiB
Core:  37 devices, 18 uclasses, devicetree: separate
WDT:   Started watchdog with servicing (128s timeout)
NAND:  512 MiB
MMC:   FSL_SDHC: 0
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Unsupported board variant!
Net:   eth0: ethernet@2188000
Normal Boot
Hit any key to stop autoboot:  0
Booting fitImage from mmc0 ...
switch to partitions #0, OK
mmc0 is current device
13356892 bytes read in 585 ms (21.8 MiB/s)
## Loading kernel from FIT Image at 82000000 ...
No configuration specified, trying default...
Found default configuration: 'conf-map55-com.dtb'
   Using 'conf-map55-com.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8200011c
     Data Size:    13319092 Bytes = 12.7 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x83000000
     Entry Point:  0x83000000
     Hash node:    'hash-1'
     Hash algo:    sha256
     Hash value:   f4250bf9ec13b505ab828da74fdb33ea67138de09dc861dd186ea4e9d29e4b80
     Hash len:     32
   Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [8200011c, 82cb3cdc]
+ OK
   kernel data at 0x8200011c, len = 0x00cb3bb4 (13319092)
*  ramdisk: using config 'conf-map55-com.dtb' from image at 0x82000000
*  ramdisk: no 'ramdisk' in config
*  fdt: using config 'conf-map55-com.dtb' from image at 0x82000000
## Checking for 'FDT'/'FDT Image' at 82000000
## Loading fdt from FIT Image at 82000000 ...
   Using 'conf-map55-com.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'fdt-map55-com.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x82cb3ddc
     Data Size:    35867 Bytes = 35 KiB
     Architecture: ARM
Can't get 'load' property from FIT 0x82000000, node: offset 13319512, name fdt-map55-com.dtb (FDT_ERR_NOTFOUND)
     Hash node:    'hash-1'
     Hash algo:    sha256
     Hash value:   74d2031e5bdb030bcc137dfb013b01acb253dcc14e0153ab63d5e65e41a0caab
     Hash len:     32
   Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [82cb3ddc, 82cbca1c]
+ OK
Can't get 'load' property from FIT 0x82000000, node: offset 13319512, name fdt-map55-com.dtb (FDT_ERR_NOTFOUND)
fit_uname=fdt-map55-com.dtb, fit_uname_config=conf-map55-com.dtb
   Booting using the fdt blob at 0x82cb3ddc
   of_flat_tree at 0x82cb3ddc size 0x00008c1b
   Loading Kernel Image
   @ comp: 0, load: 0x83000000, start: 0x8200011c, type: 2
   @ load_buf: 0x83000000, image_buf: 0x8200011c, image_len: 13319092, unc_len: 33554432, load_end: 9df546ac
   @ load: 0x83000000, load_end: 0x9df546ac, image_len: 13319092
   kernel loaded at 0x83000000, end = 0x83cb3bb4
using: FDT
   Using Device Tree in place at 82cb3ddc, end 82cbf9f6
## Transferring control to Linux (at address 83000000)...

Starting kernel ...

## Last log before kernel_entry(machid=0x0,r2=0x82cb3ddc)

u-boot 有 CONFIG_SYS_BOOTM_LEN,默认值为 0x1000000 (16 MB)。虽然我的未压缩图像是 12.7 MB,但我也尝试将其更改为 0x2000000(32 MB)。

有人对此有任何想法或提示吗?非常感谢。

linux-kernel embedded-linux yocto u-boot
1个回答
0
投票

感谢@sawdust 的提示。问题通过将加载地址更改为 0x80008000 来解决,因为 TEXT_OFFSET 是 0x8000 并且 i.mx6ul 物理内存从 0x80000000 开始。

© www.soinside.com 2019 - 2024. All rights reserved.