O Linux não pode inicializar com o u-boot e o FIT (achatar a árvore de imagens)

0

Esta questão é exatamente idêntica a o problema de Lostboy . Como não consigo encontrar uma resposta do post, pergunte novamente.

O FIT inclui uma imagem de kernel assinada (zImage) e FDT. O alvo é o Jetson-TK1, e funciona muito bem com o BSP básico.

Você poderia me informar o que eu verifico novamente?

Aqui, anexei meu arquivo ITS e o registro do console da seguinte forma:

/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";
            };
        };
    };
};

e retornos do console,

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 ...

O alvo trava aqui.

O extlinux.conf padrão para inicializar é o seguinte:

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

modificado ....

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
    
por yw_in_k 24.05.2017 / 05:18

1 resposta

1

O problema aqui é que nada está definindo bootargs. Se olharmos para o exemplo de documentação podemos ver que primeiro ainda definimos bootargs, nesse exemplo executando algum outro comando, então carregamos o FIT e o inicializamos. A linha APPEND do seu arquivo extlinux.conf precisa ser colocada em bootargs e então você deve ver o início do Linux.

    
por 27.05.2017 / 14:35

Tags