Device Tree(六)Kernel 启动之 FIT-uImage

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/JerryGou/article/details/85170949

一、uImage

编译kernel之后,会生成Image或者压缩过的zImage。但是这两种镜像的格式并没有办法提供给uboot的足够的信息来进行load、jump或者验证操作等等。因此,uboot提供了mkimage工具,来将kernel制作为uboot可以识别的格式,将生成的文件称之为uImage。
uboot支持两种类型的uImage。

  • Legacy-uImage
    在kernel镜像的基础上,加上64Byte的信息提供给uboot使用。

  • FIT-uImage
    以类似FDT的方式,将kernel、fdt、ramdisk等等镜像打包到一个image file中,并且加上一些需要的信息(属性)。uboot只要获得了这个image file,就可以得到kernel、fdt、ramdisk等等镜像的具体信息和内容。

Legacy-uImage实现较为简单,并且长度较小。但是实际上使用较为麻烦,需要在启动kernel的命令中额外添加fdt、ramdisk的加载信息。
而FIT-uImage实现较为复杂,但是使用起来较为简单,兼容性较好,(可以兼容多种配置)。但是需要的额外信息也较长。

二、Legacy-uImage

1、使能需要打开的宏

CONFIG_IMAGE_FORMAT_LEGACY=y

注意,这个宏在自动生成的autoconf.mk中会自动配置,不需要额外配置。

2、如何制作 & 使用

(1)工具mkimage
编译完uboot之后会在uboot的tools目录下生成mkimage可执行文件
(2)命令

mkimage -A arm -O linux -C none -T kernel -a 0x20008000 -e 0x20008040 -n Linux_Image -d zImage uImage 

各个参数意义如下
Usage: mkimage -l image
          -l ==> list image header information
       mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image
          -A ==> set architecture to 'arch'  // 体系
          -O ==> set operating system to 'os' // 操作系统
          -T ==> set image type to 'type' // 镜像类型
          -C ==> set compression type 'comp' // 压缩类型
          -a ==> set load address to 'addr' (hex) // 加载地址
          -e ==> set entry point to 'ep' (hex) // 入口地址
          -n ==> set image name to 'name' // 镜像名称,注意不能超过32B
          -d ==> use image data from 'datafile' // 输入文件
          -x ==> set XIP (execute in place) 

(3)使用
将生成的Legacy-uImage下载到参数中指定的load address中,使用bootm ‘实际load address’命令跳转到kernel中。
但是注意,如果使用Legacy-uImage后面还需要跟上文件系统的ram地址以及dtb的ram地址,否则可能会导致bootm失败。
格式如下:

bootm Legacy-uImage加载地址 ramdisk加载地址 dtb加载地址

3、和zImage的区别

-rw-rw-rw-  1 hlos hlos 1560120 Dec  5 14:46 uImage
-rwxrwxrwx  1 hlos hlos 1560056 Nov 30 15:42 zImage*

可以看出uImage比zImage多了64Byte,通过对比可以发现这64Byte的数据是加载zImage的头部的。
直接查看这64Byte的数据,通过od命令查看如下:

hlos@node4:boot$ od -tx1 -tc -Ax -N64 uImage
000000  27  05  19  56  5a  f3  f7  8e  58  45  0d  3d  00  17  cd  f8
         ' 005 031   V   Z 363 367 216   X   E  \r   =  \0 027 315 370
000010  20  00  80  00  20  00  80  40  e2  4b  43  b6  05  02  02  00
            \0 200  \0      \0 200   @ 342   K   C 266 005 002 002  \0
000020  4c  69  6e  75  78  5f  49  6d  61  67  65  00  00  00  00  00
         L   i   n   u   x   _   I   m   a   g   e  \0  \0  \0  \0  \0
000030  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
        \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

Legacy-uImage是在zImage的基础上加上64Byte的头部。
下面通过Legacy-uImage的头部数据结构来解析这串数据。

4、格式头说明

uboot用image_header来表示Legacy-uImage的头部

typedef struct image_header {
    __be32      ih_magic;   /* Image Header Magic Number    */   // 幻数头,用来校验是否是一个Legacy-uImage
    __be32      ih_hcrc;    /* Image Header CRC Checksum    */ // 头部的CRC校验值
    __be32      ih_time;    /* Image Creation Timestamp */ // 镜像创建的时间戳
    __be32      ih_size;    /* Image Data Size      */ // 镜像数据长度
    __be32      ih_load;    /* Data  Load  Address      */ // 加载地址
    __be32      ih_ep;      /* Entry Point Address      */ // 入口地址
    __be32      ih_dcrc;    /* Image Data CRC Checksum  */ // 镜像的CRC校验
    uint8_t     ih_os;      /* Operating System     */ // 操作系统类型
    uint8_t     ih_arch;    /* CPU architecture     */ // 体系 
    uint8_t     ih_type;    /* Image Type           */ // 镜像类型
    uint8_t     ih_comp;    /* Compression Type     */ // 压缩类型
    uint8_t     ih_name[IH_NMLEN];  /* Image Name       */ // 镜像名
} image_header_t;
#define IH_NMLEN        32  /* Image Name Length        */

可以发现这个头部就是64Byte。根据上述3来说明一下这个数据结构

  • ih_magic
    27 05 19 56
    头部幻数,用来判断这个是否是Legacy-uImage的头部。为0x27051956则表示是一个Legacy-uImage。
  • ih_size
    00 17 cd f8
    数据镜像长度。这里是0x17cdf8,也就是1560056,和我们前面测得的zImage的长度一致。
  • ih_load
    20 00 80 00
    加载地址,也就是0x20008000, 和我们执行mkimage使用的参数一致。
  • ih_ep
    20 00 80 40
    入口地址,也就是0x20008040, 和我们执行mkimage使用的参数一致。

三、FIT-uImage

0、原理说明

flattened image tree,类似于FDT(flattened device tree)的一种实现机制。其通过一定语法和格式将一些需要使用到的镜像(例如kernel、dtb以及文件系统)组合到一起生成一个image文件。其主要使用四个组件。

  • its文件
    image source file,类似于dts文件,负责描述要声称的image的的信息。需要自行进行构造。
  • itb文件
    最终得到的image文件,类似于dtb文件,也就是uboot可以直接对其进行识别和解析的FIT-uImage。
  • mkimage
    mkimage则负责dtc的角色,用于通过解析its文件、获取对应的镜像,最终生成一个uboot可以直接进行识别和解析的itb文件。
  • image data file
    实际使用到的镜像文件。

mkimage将its文件以及对应的image data file,打包成一个itb文件,也就是uboot可以识别的image file(FIT-uImage)。我们将这个文件下载到么memory中,使用bootm命令就可以执行了。

1、使能需要打开的宏

CONFIG_FIT=y

2、如何制作 & 使用

(1)its文件制作
因为mkimage是根据its文件中的描述来打包镜像生成itb文件(FIT-uImage),所以首先需要制作一个its文件,在its文件中描述需要被打包的镜像,主要是kernel镜像,dtb文件,ramdisk镜像。
简单的例子如下:

kernel_fdt.its

/*
 * U-Boot uImage source file for "X project"
 */

/dts-v1/;

/ {
    description = "U-Boot uImage source file for X project";
    #address-cells = <1>;

    images {
        kernel@tiny210 {
            description = "Unify(TODO) Linux kernel for project-x";
            data = /incbin/("/home/hlos/code/xys/temp/project-x/build/out/linux/arch/arm/boot/zImage");
            type = "kernel";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0x20008000>;
            entry = <0x20008000>;
        };
        fdt@tiny210 {
            description = "Flattened Device Tree blob for project-x";
            data = /incbin/("/home/hlos/code/xys/temp/project-x/build/out/linux/arch/arm/boot/dts/s5pv210-tiny210.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
        };
        ramdisk@tiny210 {
            description = "Ramdisk for project-x";
            data = /incbin/("/home/hlos/code/xys/temp/project-x/build/out/rootfs/initramfs.gz");
            type = "ramdisk";
            arch = "arm";
            os = "linux";
            compression = "gzip";
        };
    };

    configurations {
        default = "conf@tiny210";
        conf@tiny210 {
            description = "Boot Linux kernel with FDT blob";
            kernel = "kernel@tiny210";
            fdt = "fdt@tiny210";
            ramdisk = "ramdisk@tiny210";
        };
    };
};

/*
 * U-Boot uImage source file for "LOUIS210"
 */

/dts-v1/;

/ {
    description = "U-Boot uImage source file for LOUIS210";
    #address-cells = <1>;

    images {
        kernel@Louis210 {
            description = "Unify(TODO) Linux kernel for LOUIS210";
            data = /incbin/("/root/code/linux-4.19.10/arch/arm/boot/zImage");
            type = "kernel";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0x20008000>;
            entry = <0x20008000>;
        };
        fdt@Louis210 {
            description = "Flattened Device Tree blob for LOUIS210";
            data = /incbin/("/root/code/linux-4.19.10/arch/arm/boot/dts/s5pv210-smdkv210.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
        };
    };

    configurations {
        default = "conf@Louis210";
        conf@Louis210 {
            description = "Boot Linux kernel with FDT blob";
            kernel = "kernel@Louis210";
            fdt = "fdt@Louis210";
        };
    };
};

语法可以参考蜗窝科技的u-boot FIT image介绍
注意,可以有多个kernel节点或者fdt节点等等,兼容性更强。同时,可以有多种configurations,来对kernel、fdt、ramdisk来进行组合,使FIT-uImage可以兼容于多种板子,而无需重新进行编译烧写。

(2)生成FIT-uImage
生成的命令相对Legacy-uImage较为简单,因为信息都在its文件里面描述了

mkimage -f ITS文件 要生成的ITB文件,如下:
${UBOOT_OUT_DIR}/tools/mkimage -f ${UIMAGE_ITS_FILE} ${UIMAGE_ITB_FILE}

mkimage -f kernel_fdt.its kernel_fdt.itb

最终生成了kernel_fdt.itb,这就是我们需要的FIT-uImage文件。

(3)使用
将生成的FIT-uImage下载到参数中指定的load address中,使用bootm ‘实际load address’命令跳转到kernel中。
uboot会自动解析出FIT-uImage中,kernel、ramdisk、dtb的信息,使用起来相当方便。

tftp 40000000 kernel_fdt.itb;bootm 40000000

运行日志:

U-Boot 2018.01 (Dec 08 2018 - 19:17:31 -0800) for Louis210

Name : Louis
Email: [email protected]
CPU:   S5PV210 @ 1 GHz
Model: Samsung Louis210 based on S5PV210
Board:  Louis210
DRAM:  1 GiB
NAND:  1024 MiB

NAND read: device 0 offset 0x200000, size 0x300000
 3145728 bytes read: OK
There is no valid bmp file at the given address
In:    serial@e2900000
Out:   serial
Err:   serial
Net:   dm9000

  *** U-Boot Boot Menu ***

     start Kernel
     update u-boot(u-boot-a.bin)
     update log(log.bmp)
     U-Boot console


  Press UP/DOWN to move, ENTER to select
Louis210 # tftp 40000000 kernel_fdt.itb;bootm 40000000
dm9000 i/o: 0x88000000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 1a:2a:3a:4a:5a:6a
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.5.136; our IP address is 192.168.5.187
Filename 'kernel_fdt.itb'.
Load address: 0x40000000
Loading: #################################################################
         #################################################################
         #################################################################
         ##############################################################
         1.3 MiB/s
done
Bytes transferred = 3766759 (3979e7 hex)
## Current stack ends at 0x5fb0f0e8 *  kernel: cmdline image address = 0x40000000
## Loading kernel from FIT Image at 40000000 ...
   Using 'conf@Louis210' configuration
   Trying 'kernel@Louis210' kernel subimage
     Description:  Unify(TODO) Linux kernel for LOUIS210
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x400000f4
     Data Size:    3740096 Bytes = 3.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x20008000
     Entry Point:  0x20008000
   Verifying Hash Integrity ... OK
   kernel data at 0x400000f4, len = 0x003911c0 (3740096)
## Checking for 'FDT'/'FDT Image' at 40000000
## Loading fdt from FIT Image at 40000000 ...
   Using 'conf@Louis210' configuration
   Trying 'fdt@Louis210' fdt subimage
     Description:  Flattened Device Tree blob for LOUIS210
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x40391378
     Data Size:    25401 Bytes = 24.8 KiB
     Architecture: ARM
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0x40391378
   of_flat_tree at 0x40391378 size 0x00006339
   Loading Kernel Image ... OK
   kernel loaded at 0x20008000, end = 0x203991c0
## initrd_high = 0x60000000, copy_to_ram = 1
   ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
using: FDT
## device tree at 40391378 ... 403976b0 (len=37689 [0x9339])
   Loading Device Tree to 5fb04000, end 5fb0d338 ... OK
## Transferring control to Linux (at address 20008000)...

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.10 (root@ubuntu) (gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04)) #2 PREEMPT Thu Dec 20 19:22:01 PST 2018
[    0.000000] CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Samsung Louis210 based on S5PV210
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] random: get_random_bytes called from start_kernel+0x9c/0x3f8 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260096
[    0.000000] Kernel command line: root=/dev/nfs nfsroot=192.168.5.136:/root/code/rootfs ip=192.168.5.187 init=/init console=ttySAC0,115200 rw
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1029752K/1048576K available (6144K kernel code, 213K rwdata, 1528K rodata, 1024K init, 248K bss, 18824K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc0800000 - 0xff800000   (1008 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 214 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 249 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] VIC @(ptrval): id 0x00041192, vendor 0x41
[    0.000000] VIC @(ptrval): id 0x00041192, vendor 0x41
[    0.000000] VIC @(ptrval): id 0x00041192, vendor 0x41
[    0.000000] VIC @(ptrval): id 0x00041192, vendor 0x41
[    0.000000] S5PV210 clocks: mout_apll = 1000000000, mout_mpll = 667000000
[    0.000000]  mout_epll = 96000000, mout_vpll = 54000000
[    0.000017] sched_clock: 32 bits at 33MHz, resolution 29ns, wraps every 64392313329ns
[    0.000042] clocksource: samsung_clocksource_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 57309158834 ns
[    0.000234] Console: colour dummy device 80x30
[    0.000283] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.090042] pid_max: default: 32768 minimum: 301
[    0.090216] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.090238] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.090877] CPU: Testing write buffer coherency: ok
[    0.090948] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.091945] Setting up static identity map for 0x20100000 - 0x20100060
[    0.092203] rcu: Hierarchical SRCU implementation.
[    0.094141] devtmpfs: initialized
[    0.102114] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
[    0.102693] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.102723] futex hash table entries: 256 (order: 0, 7168 bytes)
[    0.102859] pinctrl core: initialized pinctrl subsystem
[    0.103627] NET: Registered protocol family 16
[    0.104270] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.197144] SCSI subsystem initialized
[    0.197303] usbcore: registered new interface driver usbfs
[    0.197386] usbcore: registered new interface driver hub
[    0.198241] usbcore: registered new device driver usb
[    0.201341] clocksource: Switched to clocksource samsung_clocksource_timer
[    0.241211] NET: Registered protocol family 2
[    0.242841] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 12288 bytes)
[    0.242882] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.242968] TCP bind hash table entries: 8192 (order: 5, 163840 bytes)
[    0.243140] TCP: Hash tables configured (established 8192 bind 8192)
[    0.243299] UDP hash table entries: 512 (order: 2, 24576 bytes)
[    0.243354] UDP-Lite hash table entries: 512 (order: 2, 24576 bytes)
[    0.243613] NET: Registered protocol family 1
[    0.244259] RPC: Registered named UNIX socket transport module.
[    0.244279] RPC: Registered udp transport module.
[    0.244288] RPC: Registered tcp transport module.
[    0.244295] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.245568] Initialise system trusted keyrings
[    0.246854] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.268694] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
[    0.272170] Key type asymmetric registered
[    0.272192] Asymmetric key parser 'x509' registered
[    0.272229] io scheduler noop registered
[    0.272240] io scheduler deadline registered
[    0.272612] io scheduler cfq registered (default)
[    0.272631] io scheduler mq-deadline registered
[    0.272642] io scheduler kyber registered
[    0.512819] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.515541] e2900000.serial: ttySAC0 at MMIO 0xe2900000 (irq = 58, base_baud = 0) is a S3C6400/10
[    0.977815] console [ttySAC0] enabled
[    0.982208] e2900400.serial: ttySAC1 at MMIO 0xe2900400 (irq = 59, base_baud = 0) is a S3C6400/10
[    0.991246] e2900800.serial: ttySAC2 at MMIO 0xe2900800 (irq = 60, base_baud = 0) is a S3C6400/10
[    1.000203] e2900c00.serial: ttySAC3 at MMIO 0xe2900c00 (irq = 61, base_baud = 0) is a S3C6400/10
[    1.010709] exynos4-fb f8000000.fimd: failed to get system register.
[    1.015177] OF: graph: no port node found in /soc/fimd@f8000000
[    1.021545] [drm] Exynos DRM: using f8000000.fimd device for DMA mapping operations
[    1.027950] exynos-drm exynos-drm: bound f8000000.fimd (ops fimd_component_ops)
[    1.035563] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.041712] [drm] No driver support for vblank timestamp query.
[    1.062279] Console: switching to colour frame buffer device 100x30
[    1.069360] exynos-drm exynos-drm: fb0:  frame buffer device
[    1.070719] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
[    1.094364] brd: module loaded
[    1.107043] loop: module loaded
[    1.108888] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xd3
[    1.108954] nand: AMD/Spansion S34ML08G1
[    1.108992] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.109075] Scanning device for bad blocks
[    1.351351] random: fast init done
[    1.927274] 3 fixed-partitions partitions found on MTD device b0e00000.nand
[    1.927341] Creating 3 MTD partitions on "b0e00000.nand":
[    1.927397] 0x000000000000-0x000000040000 : "boot"
[    1.928305] 0x000000040000-0x000000340000 : "kernel"
[    1.929190] 0x000000340000-0x000040000000 : "rootfs"
[    1.944899] dm9000 88000000.ethernet: 88000000.ethernet supply vcc not found, using dummy regulator
[    1.945013] dm9000 88000000.ethernet: Linked as a consumer to regulator.0
[    1.947919] dm9000 88000000.ethernet: enable clock 'sromc'
[    1.954874] eth0: dm9000b at (ptrval),(ptrval) IRQ 144 MAC: 00:00:de:ad:be:ef (platform data)
[    1.963162] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.968225] ehci-exynos: EHCI EXYNOS driver
[    1.973229] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.978536] ohci-exynos: OHCI EXYNOS driver
[    1.984595] sdhci: Secure Digital Host Controller Interface driver
[    1.988843] sdhci: Copyright(c) Pierre Ossman
[    1.994656] s3c-sdhci eb000000.sdhci: clock source 0: mmc_busclk.0 (133400000 Hz)
[    2.000671] s3c-sdhci eb000000.sdhci: clock source 2: mmc_busclk.2 (96000000 Hz)
[    2.033998] mmc0: SDHCI controller on samsung-hsmmc [eb000000.sdhci] using ADMA
[    2.034596] s3c-sdhci eb100000.sdhci: clock source 0: mmc_busclk.0 (133400000 Hz)
[    2.034691] s3c-sdhci eb100000.sdhci: clock source 2: mmc_busclk.2 (96000000 Hz)
[    2.060744] mmc1: SDHCI controller on samsung-hsmmc [eb100000.sdhci] using ADMA
[    2.061478] s3c-sdhci eb200000.sdhci: clock source 0: mmc_busclk.0 (133400000 Hz)
[    2.061576] s3c-sdhci eb200000.sdhci: clock source 2: mmc_busclk.2 (96000000 Hz)
[    2.087570] mmc2: SDHCI controller on samsung-hsmmc [eb200000.sdhci] using ADMA
[    2.088194] s3c-sdhci eb300000.sdhci: clock source 0: mmc_busclk.0 (133400000 Hz)
[    2.088294] s3c-sdhci eb300000.sdhci: clock source 3: mmc_busclk.3 (96000000 Hz)
[    2.121448] mmc3: Internal clock never stabilised.
[    2.121503] mmc3: sdhci: ============ SDHCI REGISTER DUMP ===========
[    2.121557] mmc3: sdhci: Sys addr:  0x00000000 | Version:  0x00002401
[    2.121609] mmc3: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[    2.123225] mmc3: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[    2.129626] mmc3: sdhci: Present:   0x01fa0000 | Host ctl: 0x00000000
[    2.136121] mmc3: sdhci: Power:     0x0000000e | Blk gap:  0x00000000
[    2.142604] mmc3: sdhci: Wake-up:   0x00000000 | Clock:    0x00008001
[    2.148869] mmc3: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[    2.155362] mmc3: sdhci: Int enab:  0x00ff0043 | Sig enab: 0x00ff0043
[    2.161768] mmc3: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[    2.168110] mmc3: sdhci: Caps:      0x05e80080 | Caps_1:   0x00000000
[    2.174557] mmc3: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[    2.180930] mmc3: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[    2.187376] mmc3: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[    2.193784] mmc3: sdhci: Host ctl2: 0x00000000
[    2.198174] mmc3: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x00000000
[    2.204615] mmc3: sdhci: ============================================
[    2.223605] mmc3: SDHCI controller on samsung-hsmmc [eb300000.sdhci] using ADMA
[    2.227389] usbcore: registered new interface driver usbhid
[    2.227450] usbhid: USB HID core driver
[    2.232248] NET: Registered protocol family 10
[    2.233728] Segment Routing with IPv6
[    2.235815] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.242900] NET: Registered protocol family 17
[    2.248208] Loading compiled-in X.509 certificates
[    2.252545] hctosys: unable to open rtc device (rtc0)
[    2.401396] dm9000 88000000.ethernet eth0: link down
[    2.431387] dm9000 88000000.ethernet eth0: link down
[    2.431590] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.051410] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    4.081528] IP-Config: Guessing netmask 255.255.255.0
[    4.081583] IP-Config: Complete:
[    4.081621]      device=eth0, hwaddr=00:00:de:ad:be:ef, ipaddr=192.168.5.187, mask=255.255.255.0, gw=255.255.255.255
[    4.081703]      host=192.168.5.187, domain=, nis-domain=(none)
[    4.083913]      bootserver=255.255.255.255, rootserver=192.168.5.136, rootpath=
[    4.091431] dm9000 88000000.ethernet eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[    4.121090] VFS: Mounted root (nfs filesystem) on device 0:12.
[    4.122176] devtmpfs: mounted
[    4.123648] Freeing unused kernel memory: 1024K
[    4.124049] Run /init as init process
init started: BusyBox v1.21.1 (2014-06-28 16:54:15 CST)
/dev/watchdog: No such file or directory
[    6.456939] random: sshd: uninitialized urandom read (32 bytes read)

Please press Enter to activate this console.
Processing /etc/profile...
Done
[root@Louis210: /]#

3、简单说明

FIT-uImage的格式类似于DTB。uboot会去解析出FIT-uImage中的configurations节点,根据节点选择出需要的kernel、dtb、rootfs。因此,在节点的基础上,添加很多节点信息,提供uboot使用。

猜你喜欢

转载自blog.csdn.net/JerryGou/article/details/85170949
今日推荐