u-boot 및 FIT(평면화된 이미지 트리)를 사용하여 Linux를 부팅할 수 없습니다.

u-boot 및 FIT(평면화된 이미지 트리)를 사용하여 Linux를 부팅할 수 없습니다.

이 질문은 다음과 관련이 있습니다.잃어버린 소년 문제. 게시글에서 답변을 찾을 수 없으니 다시 질문해주세요.

FIT에는 서명된 커널 이미지(zImage)와 FDT가 포함됩니다. 대상은 기본 BSP와 잘 어울리는 Jetson-TK1입니다.

그 밖에 무엇을 확인해야 하는지 알려주실 수 있나요?

여기에 ITS 파일과 콘솔 로그를 다음과 같이 첨부합니다.

/dts-v1/;

/ {
    description = "OS kernel image with one or more FDT blobs";
    #address-cells = <1>;

    images {
        kernel@1 {
                        description = "Kernel";
            data = /incbin/("./zImage");
            type = "kernel";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0x81008000>;
            entry = <0x81008000>;
            kernel-version = <1>;
            hash@1 {
                algo = "sha1";
            };
        };
        fdt@1 {
            description = "Device Tree";
            data = /incbin/("./tegra124-jetson_tk1-pm375-000-c00-00.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
            fdt-version = <1>;
            hash@1 {
                algo = "sha1";
            };
        };
    };
    configurations {
        default = "conf@1";
        conf@1 {
            description = "Linux Kernel, FDT blob.";
            kernel = "kernel@1";
            fdt = "fdt@1";
            signature@1 {
                algo = "sha1,rsa2048";
                key-name-hint = "dev";
                sign-images = "fdt", "kernel";
            };
        };
    };
};

콘솔이 반환됩니다.

Tegra124 (Jetson TK1) # ext2load mmc 0 0x90000000 /boot/zImage_rsa_signed.img
6099545 bytes read in 462 ms (12.6 MiB/s)
Tegra124 (Jetson TK1) # bootm 0x90000000
## Loading kernel from FIT Image at 90000000 ...
   Using 'conf@1' configuration
   Verifying Hash Integrity ... sha1,rsa2048:dev+ OK
   Trying 'kernel@1' kernel subimage
     Description:  Kernel
     Created:      2017-05-23   5:41:43 UTC
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x900000e4
     Data Size:    6037416 Bytes = 5.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x81008000
     Entry Point:  0x81008000
     Hash algo:    sha1
     Hash value:   f88f771a166e767b449744e6a23a46c29cb544de
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 90000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  Device Tree
     Created:      2017-05-23   5:41:43 UTC
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x905c2188
     Data Size:    59661 Bytes = 58.3 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   2684084a852a74579900ab37d30fd7dc54bb5e27
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x905c2188
   Loading Kernel Image ... OK
   Loading Device Tree to 8efee000, end 8efff90c ... OK

Starting kernel ...

타겟이 여기에 걸려있습니다.

기본 시작 extlinux.conf는 다음과 같습니다.

TIMEOUT 30
DEFAULT primary

MENU TITLE Jetson-TK1 eMMC boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/zImage_rsa_signed.img
      FDT /boot/tegra124-jetson_tk1-pm375-000-c00-00.dtb
      APPEND console=ttyS0,115200n8 console=tty1 no_console_suspend=1 lp0_vec=2064@0xf46ff000 mem=20
15M@2048M memtype=255 ddr_die=2048M@2048M section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 tsec=32
M@3913M otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150 core_ed
p_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter audio_codec=rt5640 modem_i
d=0 android.kerneltype=normal fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_
max_dvfs=0 touch_id=0@0 board_info=0x0177:0x0000:0x02:0x43:0x00 net.ifnames=0 root=/dev/mmcblk0p1 rw
 rootwait tegraboot=sdmmc gpt

수정되었습니다....

Tegra124 (Jetson TK1) # printenv
arch=arm
baudrate=115200
board=jetson-tk1
board_name=jetson-tk1
boot_a_script=load ${devtype} ${devnum}:${bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 mmc0 usb0 pxe dhcp
bootcmd=setenv usb_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootcmd_dhcp=run usb_init; if dhcp ${scriptaddr} boot.scr.uimg; then source ${scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run usb_init; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootpart=1
cpu=armv7
ethact=RTL8169#0
ethaddr=00:04:4b:25:b9:15
fdt_addr_r=0x82000000
fdt_high=ffffffff
initrd_high=ffffffff
kernel_addr_r=0x81000000
loadaddr=0x80408000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot; fi
pxefile_addr_r=0x90100000
ramdisk_addr_r=0x82100000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x90000000
soc=tegra124
stderr=serial
stdin=serial
stdout=serial
usb_boot=run usb_init; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot; fi
usb_init=if ${usb_need_init}; then setenv usb_need_init false; usb start 0; fi
vendor=nvidia

Environment size: 1997/8188 bytes

답변1

여기서 문제는 bootargs가 설정되지 않았다는 것입니다. 우리가 보면문서화 예이 예에서는 다른 명령을 실행하여 먼저 bootargs를 설정한 다음 FIT를 로드하고 시작하는 것을 볼 수 있습니다. extlinux.conf 파일의 APPEND 라인은 bootargs에 배치되어야 하며 Linux 부팅이 표시되어야 합니다.

관련 정보