u-boot/linux가 "Booting Linux..." 후에 중단됩니다.

u-boot/linux가 "Booting Linux..." 후에 중단됩니다.

추가 디버깅 방법에 대한 몇 가지 지침이 필요합니다.

내 설정은 다음과 같습니다.

  • 하드웨어: CM3
  • Pi 펌웨어는 FIT 이미지를 로드하고 부팅해야 하는 u-boot를 부팅합니다.
  • FIT 이미지에는 커널(압축되지 않음, ~7MB), 장치 트리, 램디스크(~2.5MB)가 포함됩니다.
  • 커널은 5.15이고 u-boot는 2022.01입니다.

FIT 이미지가 제대로 로드되고 검증되었으며, bootargs가 설정되었으며 모든 것이 작동해야 한다고 말할 수 있습니다. 이 문제는 커널을 4.19에서 5.15로 업데이트한 후에 발생합니다(Yocto 업데이트를 통해 이미지 크기가 약 3MB 증가함). Earlyprintk를 활성화하려고 시도했지만 아무것도 수행되지 않았거나 아직 거기까지 도달하지도 못했습니다.

시작 스크립트의 관련 부분(그 안에 관련 없는 내용이 있기를 바랍니다):

load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image


# "ramdisk_addr_r" is 0x02700000
# "fit_conf" is #conf-bcm2710-rpi-cm3.dtb#conf-overlays_i2c-ds1307.dtbo#conf-overlays_audio-on.dtbo#conf-overlays_gpio43-reset.dtbo#conf-overlays_mmc-non-removable.dtbo#conf-overlays_spi.dtbo
bootm "${ramdisk_addr_r}${fit_conf}"

시작 매개변수(일부 관련 없는 항목이 제거됨):

console=ttyAMA0,115200 earlyprintk 8250.nr_uarts=1 bcm2708_fb.fbwidth=480 bcm2708_fb.fbheight=800 bcm2708_fb.fbswap=1 dwc_otg.lpm_enable=0 usbhid.mousepoll=0 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 cma=512M fbcon=vc:2-4 logo.nologo video=HDMI-A-1:480x800MR-24@60 dwc_otg.microframe_schedule=1 smsc95xx.turbo_mode=N root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=10

찾을 수 있는 모든 디버그 옵션이 포함된 로그(첫 번째 부분은 rpi 펌웨어입니다):

Raspberry Pi Bootcode

Found SD card, config.txt = 1, start.elf = 1, recovery.elf = 0, timeout = 0
Read File: config.txt, 36655 (bytes)




Raspberry Pi Bootcode
Read File: config.txt, 36655
Read File: start.elf, 2973536 (bytes)
Read File: fixup.dat, 7262 (bytes)
MESS:00:00:03.766632:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:03.790677:0: brfs: File read: 36655 bytes
MESS:00:00:03.824492:0: brfs: File read: /mfs/sd/edid.dat
MESS:00:00:03.828906:0: brfs: File read: 128 bytes
MESS:00:00:03.833665:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:03.838028:0: gpioman: gpioman_get_pin_num: pin FLASH_0_ENABLE not defined
MESS:00:00:03.845480:0: gpioman: gpioman_get_pin_num: pin FLASH_0_INDICATOR not defined
piSS:00:00:03.853227:0: gpioman: gpioman_get_pin_num: pin FMISEPLSAYS_S:0D0:A00 :0n3.o85t82 98d:0e: fgpiionmaen:d g
_goman
  MEeSSt:0_0:p00i:0n3._86n43u16m:0::  gppioimann:  gFpiLomAanSH__0g_IeNDtIC_ATpORi nnot_ dnefuMm:E pSinS L:ED0S_0PW:R_0OK0 n:ot0 d3ef.in8ed7
2n2ed1
9:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:03.896414:0: gpioman: gpioman_get_pin_num: pin BT_ON not defined
MESS:00:00:03.901684:0: gpioman: gpioman_get_pin_num: pin WL_ON not defined
MESS:00:00:03.935160:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:03.940993:0: *** Restart logging
MESS:00:00:03.944864:0: brfs: File read: 36655 bytes
MESS:00:00:03.970043:0: HDMI0: hdmi_pixel_encoding: 162000000
MESS:00:00:03.974816:0: gpioman: gpioman_get_pin_num: pin CAMERA_0_I2C_PORT not defined
MESS:00:00:03.981831:0: dtb_file 'bcm2710-rpi-cm3.dtb'
MESS:00:00:03.990825:0: brfs: File read: /mfs/sd/bcm2710-rpi-cm3.dtb
MESS:00:00:03.995486:0: Loaded 'bcm2710-rpi-cm3.dtb' to 0x100 size 0x75b2
MESS:00:00:04.015999:0: brfs: File read: 30130 bytes
MESS:00:00:04.096779:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:04.123208:0: dtparam: i2c1=on
MESS:00:00:04.134136:0: dtparam: i2c_arm=on
MESS:00:00:04.145334:0: brfs: File read: 36655 bytes
MESS:00:00:04.148795:0: Failed to load overlay 'vc4-kms-v3d'
MESS:00:00:04.154137:0: dtparam: audio=on
MESS:00:00:04.168070:0: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d.dtbo
MESS:00:00:04.179270:0: brfs: File read: /mfs/sd/cmdline.txt
MESS:00:00:04.183258:0: Read command line from file 'cmdline.txt':
MESS:00:00:04.189134:0: 'dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait'
MESS:00:00:04.973468:0: gpioman: gpioman_get_pin_num: pin WL_ON not defined
MESS:00:00:04.987033:0: brfs: File read: 89 bytes
MESS:00:00:05.038864:0: brfs: File read: /mfs/sd/kernel7.img
MESS:00:00:05.042831:0: Loaded 'kernel7.img' to 0x8000 size 0x85f1c
MESS:00:00:05.048833:0: Device tree loaded to 0x2eff8400 (size 0x7b09)
MESS:00:00:05.056422:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:05.062784:0: uart: Baud rate change done...
MESS:00:00:05.066216:0: uart: Baud rate change done...
MESS:00:00:05.073531:0: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined


U-Boot 2022.01 (Jan 01 2000 - 00:00:00 +0000)

DRAM:  960 MiB
RPI Compute Module 3+ (0xa02100)
MMC:   mmc@7e202000: 0
Loading Environment from FAT... WARNING at drivers/mmc/bcm2835_sdhost.c:414/bcm2835_send_command()!
WARNING at drivers/mmc/bcm2835_sdhost.c:414/bcm2835_send_command()!
Unable to read "uboot.env" from mmc0:1... 
In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   No ethernet found.
Hit any key to stop autoboot:  0
WARNING at drivers/mmc/bcm2835_sdhost.c:414/bcm2835_send_command()!
WARNING at drivers/mmc/bcm2835_sdhost.c:414/bcm2835_send_command()!
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
177 bytes read in 1 ms (172.9 KiB/s)
## Executing script at 02400000
1551 bytes read in 1 ms (1.5 MiB/s)
Saving Environment to FAT... OK
669 bytes read in 1 ms (653.3 KiB/s)
ostree_root=/ostree/boot.1/poky/2b3c8673ae53eb1a02210e627c06ac617b0e758fbf71afa0c7e91a8ff5931aeb/0
215 bytes read in 5 ms (42 KiB/s)
9269132 bytes read in 387 ms (22.8 MiB/s)
## Loading kernel from FIT Image at 02700000 ...
   Using 'conf-bcm2710-rpi-cm3.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x02700110
     Data Size:    6631488 Bytes = 6.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00080000
     Hash algo:    sha256
     Hash value:   6ff211d7430e5179b546ad46e3783fbe797e036302c9d55a0adaf09b03a7ad40
   Verifying Hash Integrity ... sha256+ OK
## Loading ramdisk from FIT Image at 02700000 ...
   Using 'conf-bcm2710-rpi-cm3.dtb' configuration
   Trying 'ramdisk-1' ramdisk subimage
     Description:  initramfs-ostree-image
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x02d5be80
     Data Size:    2599324 Bytes = 2.5 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha256
     Hash value:   f10f8afa25b5416fdf6f2790c087661999c5502260ec8e2e3caff5d9d9a48632
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-bcm2710-rpi-cm3.dtb' configuration
   Trying 'fdt-bcm2710-rpi-cm3.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d53260
     Data Size:    30130 Bytes = 29.4 KiB
     Architecture: ARM
     Load Address: 0x05000000
     Hash algo:    sha256
     Hash value:   50c601276d58a4a1daded000c4d8a7a5ef917436a9e483675ff8e93265d6c294
   Verifying Hash Integrity ... sha256+ OK
   Loading fdt from 0x02d53260 to 0x05000000
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-overlays_i2c-ds1307.dtbo' configuration
   Trying 'fdt-overlays_i2c-ds1307.dtbo' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d5a908
     Data Size:    508 Bytes = 508 Bytes
     Architecture: ARM
     Load Address: 0x06000000
     Hash algo:    sha256
     Hash value:   2efdf54d40f36118a2f771de7b412bcdcb56819bfd646719a429b1580a9b67bd
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-overlays_audio-on.dtbo' configuration
   Trying 'fdt-overlays_audio-on.dtbo' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d5abf4
     Data Size:    263 Bytes = 263 Bytes
     Architecture: ARM
     Load Address: 0x06000000
     Hash algo:    sha256
     Hash value:   c5dfd7893d0248f2c966995fe332cdb075771d398326c0c997e43120c793b818
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-overlays_gpio43-reset.dtbo' configuration
   Trying 'fdt-overlays_gpio43-reset.dtbo' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d5adf0
     Data Size:    1340 Bytes = 1.3 KiB
     Architecture: ARM
     Load Address: 0x06000000
     Hash algo:    sha256
     Hash value:   c9fc421b77391ae8323147007cef422c1c80246aa8606927a93fe1ecb122fdbd
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-overlays_mmc-non-removable.dtbo' configuration
   Trying 'fdt-overlays_mmc-non-removable.dtbo' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d5b424
     Data Size:    263 Bytes = 263 Bytes
     Architecture: ARM
     Load Address: 0x06000000
     Hash algo:    sha256
     Hash value:   06a9b23fac0a5d75e671107fcecbf556ababc4d4fe25218ba47d1803024aa751
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 02700000 ...
   Using 'conf-overlays_spi.dtbo' configuration
   Trying 'fdt-overlays_spi.dtbo' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x02d5b618
     Data Size:    1930 Bytes = 1.9 KiB
     Architecture: ARM
     Load Address: 0x06000000
     Hash algo:    sha256
     Hash value:   024bf878c83abe13ecb49273611177a1b72f0975377a34ad077977f023c1bb79
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x5000000
   Loading Kernel Image
   Using Device Tree in place at 05000000, end 0500ad04

Starting kernel ...

출시를 방해하는 요인이 무엇인지 어떻게 알 수 있나요?

답변1

U-Boot 출력에 따르면 커널 시작부터 커널 실행 주소까지 비정상적인 오프셋 0x78000이 있습니다.

 Load Address: 0x00008000
 Entry Point:  0x00080000

일반적으로 이미지 시작 부분에서 커널로 이동하므로 두 주소 중 하나에 0이 하나 초과되거나 하나가 누락될 수 있습니다(내 의견에 대한 답변에서 확인했듯이).

관련 정보