• 根文件系统制作并启动 Linux


    Linux+SD卡(rootfs)

    busybox 下载链接:https://busybox.net/
    下载

    wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2
    
    • 1

    解压

     tar -vxf busybox-1.36.1.tar.bz2 
    
    • 1

    并进入其根目录

    export ARCH=arm
    export CROSS_COMPILE=arm-none-linux-gnueabihf-
    make defconfig
    make menuconfig
    #   勾选  Settings-> [*] Build static binary (no shared libs)
    make -j6
    make install
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7

    上述步骤执行完后在 busybox 根目录生成了一个 _install 文件夹。
    随便找一个目录,来创建 linux 的根文件系统

    # 随便找一个目录,创建 linux 的根文件系统
    cd rootfs
    
    # 将 _install 的所有文件拷贝到 rootfs 文件夹中
    cp -r /home/tyustli/code/open_source/busybox/busybox-1.36.1/_install/* ./
    
    # 复制库文件
    mkdir lib
    cp -r /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/lib/* lib/
    
    # 创建设备节点
    mkdir dev
    cd dev
    # 创建多个 tty 设备,注意子设备号不要重复
    sudo mknod -m 666 tty1 c 4 1
    sudo mknod -m 666 tty2 c 4 2
    sudo mknod -m 666 tty3 c 4 3
    sudo mknod -m 666 tty4 c 4 4
    sudo mknod -m 666 tty5 c 4 5
    sudo mknod -m 666 tty6 c 4 6
    # 创建一个控制台节点
    sudo mknod -m 666 console c 5 1
    # 创建一个空节点
    sudo mknod -m 666 null c 1 3
    
    cd ../../
    # 生成虚拟 SD 卡系统镜像
    sudo dd if=/dev/zero of=rootfs.ext3 bs=1M count=32
    # 格式化镜像
    sudo mkfs.ext3 rootfs.ext3
    
    #将根文件系统中的文件复制到镜像中
    sudo mkdir tmpfs # 创建一个临时目录
    sudo mount -t ext3 rootfs.ext3 tmpfs/ -o loop # 将 rootfs.ext3 镜像挂载到 tmpfs 目录下
    sudo cp -r rootfs/*  tmpfs/ # 将  rootfs 目录下所有文件拷贝到 tmpfs 目录下,即拷贝的到 rootfs.ext3 镜像中
    sudo umount tmpfs # 将临时挂载的文件系统卸载掉
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36

    上面的步骤执行完后,rootfs.ext3 镜像中就包含了 rootfs 目录下的所有内容,此时linux的根文件系统就已经制作完成,下一步就是使用这个 rootfs.ext3 镜像来启动 linux 内核

    linux 启动文件

    sudo qemu-system-arm -M vexpress-a9 -m 512M -kernel arch/arm/boot/zImage -dtb arch/arm/boot/dts/arm/vexpress-v2p-ca9.dtb -nographic \
    -append "root=/dev/mmcblk0 rw console=ttyAMA0" -sd /home/tyustli/code/open_source/busybox/rootfs.ext3
    
    • 1
    • 2

    这里比之前多指定了一个 sd 镜像。
    linux 启动日志

     #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 37
    input: ImExPS/2 Generic Explorer Mouse as /devices/platform/bus@40000000/bus@40000000:motherboard-bus@40000000/bus@40000000:motherboard-bus@40000000:iofpga@7,00000000/10007000.kmi/serio1/input/input2
    drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    EXT4-fs (mmcblk0): mounting ext3 file system using the ext4 subsystem
    EXT4-fs (mmcblk0): mounted filesystem b28f1697-44d3-4ac5-879c-fffa4116c9cc r/w with ordered data mode. Quota mode: disabled.
    VFS: Mounted root (ext3 filesystem) on device 179:0.
    Freeing unused kernel image (initmem) memory: 1024K
    Run /sbin/init as init process
    random: crng init done
    can't run '/etc/init.d/rcS': No such file or directory
    
    Please press Enter to activate this console. 
    ~ # drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    amba 1000f000.wdt: deferred probe pending
    amba 10020000.clcd: deferred probe pending
    amba 100e0000.memory-controller: deferred probe pending
    amba 100e1000.memory-controller: deferred probe pending
    amba 100e5000.watchdog: deferred probe pending
    i2c 0-0039: deferred probe pending
    
    ~ # ls
    bin         lib         lost+found  usr
    dev         linuxrc     sbin
    ~ # 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26

    报错一

    can't run '/etc/init.d/rcS': No such file or directory
    
    • 1

    解决

    mkdir etc
    cd etc
    mkdir init.d
    cd init.d
    touch rcS
    chmod 777 rcS
    
    # 向文件中写入内容
    cat > rcS <<EOF
    #!/bin/sh
    ATH=/sbin:/bin:/usr/sbin:/usr/bin
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib
    export PATH LD_LIBRARY_PATH runlevel
    mount -a
    mkdir /dev/pts
    mount -t devpts devpts /dev/pts
    mdev -s
    EOF
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18

    报错二

    can't run '/etc/init.d/rcS': Permission denied
    
    • 1

    解决

    chmod 777 rcS
    
    • 1

    创建好文件 /etc/init.d/rcS 以后一定要给其可执行权限!

    报错三

    mount: can't read '/etc/fstab': No such file or directory
    /etc/init.d/rcS: line 8: can't create /proc/sys/kernel/hotplug: nonexistent directory
    mdev: /sys/dev: No such file or directory
    
    • 1
    • 2
    • 3

    解决

    cd etc
    touch fstab
    # 向文件中写入内容
    cat > fstab <<EOF
    #   
    proc  /proc proc  defaults 00
    tmpfs /tmp  tmpfs defaults 00
    sysfs /sys  sysfs defaults 00
    EOF
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    附录:根文件系统制作完整脚本

    cd rootfs
    
    cp -r /home/tyustli/code/open_source/busybox/busybox-1.36.1/_install/* ./
    
    ########################### 复制库文件
    mkdir lib
    cp -r /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/lib/* lib/
    cp -r /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/lib/* lib/
    
    # 这个文件为软链接,需要删除重新 copy 一下
    ls lib/ld-linux-armhf.so.3 -l
    rm lib/ld-linux-armhf.so.3
    cp /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3  lib/
    ls lib/ld-linux-armhf.so.3 -l
    
    ############################ copy usr 库文件
    mkdir usr/lib
    cp -r /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/*so* usr/lib/
    cp -r /home/tyustli/cross_tool/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/*.a usr/lib/
    
    # 查看库文件大小
    du ./lib/ ./usr/lib/ -sh
    
    ############################ 创建设备节点
    mkdir dev
    cd dev
    sudo mknod -m 666 tty1 c 4 1
    sudo mknod -m 666 tty2 c 4 2
    sudo mknod -m 666 tty3 c 4 3
    sudo mknod -m 666 tty4 c 4 4
    sudo mknod -m 666 tty5 c 4 5
    sudo mknod -m 666 tty6 c 4 6
    # 创建一个控制台节点
    sudo mknod -m 666 console c 5 1
    # 创建一个空节点
    sudo mknod -m 666 null c 1 3
    
    cd ../
    mkdir etc
    mkdir proc
    mkdir tmp
    mkdir sys
    mkdir lib/modules
    mkdir lib/modules/6.5.7+
    cd etc
    touch fstab
    # 向文件中写入内容
    cat > fstab <<EOF
    #   
    proc  /proc proc  defaults 00
    tmpfs /tmp  tmpfs defaults 00
    sysfs /sys  sysfs defaults 00
    EOF
    
    touch inittab
    cat > inittab<<EOF
    #etc/inittab
    ::sysinit:/etc/init.d/rcS
    console::askfirst:-/bin/sh
    ::restart:/sbin/init
    ::ctrlaltdel:/sbin/reboot
    ::shutdown:/bin/umount -a -r
    ::shutdown:/sbin/swapoff -a
    EOF
    
    mkdir init.d
    cd init.d
    touch rcS
    chmod 777 rcS
    
    # 向文件中写入内容
    cat > rcS <<EOF
    #!/bin/sh
    ATH=/sbin:/bin:/usr/sbin:/usr/bin
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib
    export PATH LD_LIBRARY_PATH runlevel
    mount -a
    mkdir /dev/pts
    mount -t devpts devpts /dev/pts
    # echo /sbin/mdev >/proc/sys/kernel/hotplug
    mdev -s
    EOF
    
    cd ../../../
    # 生成虚拟 SD 卡系统镜像
    sudo dd if=/dev/zero of=rootfs.ext3 bs=1M count=128
    # 格式化镜像
    sudo mkfs.ext3 rootfs.ext3
    
    #将文件复制到镜像中
    sudo mkdir tmpfs_rootfs
    sudo mount -t ext3 rootfs.ext3 tmpfs_rootfs/ -o loop
    sudo cp -r rootfs/*  tmpfs_rootfs/
    sudo umount tmpfs_rootfs
    rmdir tmpfs_rootfs
    
    # 启动 kernel
    sudo qemu-system-arm -M vexpress-a9 -m 512M \
    -kernel /home/tyustli/code/open_source/kernel/linux-6.5.7/arch/arm/boot/zImage \
    -dtb /home/tyustli/code/open_source/kernel/linux-6.5.7/arch/arm/boot/dts/arm/vexpress-v2p-ca9.dtb -nographic \
    -append "root=/dev/mmcblk0 rw console=ttyAMA0" \
    -sd /home/tyustli/code/open_source/busybox/rootfs.ext3
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103

    linux 内核启动完整日志

    WARNING: Image format was not specified for '/home/tyustli/code/open_source/busybox/rootfs.ext3' and probing guessed raw.
             Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
             Specify the 'raw' format explicitly to remove the restrictions.
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
    alsa: Could not initialize DAC
    alsa: Failed to open `default':
    alsa: Reason: No such file or directory
    audio: Failed to create voice `lm4549.out'
    Booting Linux on physical CPU 0x0
    Linux version 6.5.7 (tyustli@tyustli-machine) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #3 SMP Sun Oct 15 20:44:33 CST 2023
    CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
    OF: fdt: Machine model: V2P-CA9
    Memory policy: Data cache writeback
    Reserved memory: created DMA memory pool at 0x4c000000, size 8 MiB
    OF: reserved mem: initialized node vram@4c000000, compatible id shared-dma-pool
    OF: reserved mem: 0x4c000000..0x4c7fffff (8192 KiB) nomap non-reusable vram@4c000000
    cma: Reserved 16 MiB at 0x7f000000
    Zone ranges:
      Normal   [mem 0x0000000060000000-0x000000007fffffff]
    Movable zone start for each node
    Early memory node ranges
      node   0: [mem 0x0000000060000000-0x000000007fffffff]
    Initmem setup node 0 [mem 0x0000000060000000-0x000000007fffffff]
    CPU: All CPU(s) started in SVC mode.
    percpu: Embedded 16 pages/cpu s34516 r8192 d22828 u65536
    Kernel command line: root=/dev/mmcblk0 rw console=ttyAMA0
    printk: log_buf_len individual max cpu contribution: 4096 bytes
    printk: log_buf_len total cpu_extra contributions: 12288 bytes
    printk: log_buf_len min size: 16384 bytes
    printk: log_buf_len: 32768 bytes
    printk: early log buf free: 14824(90%)
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
    Built 1 zonelists, mobility grouping on.  Total pages: 130048
    mem auto-init: stack:off, heap alloc:off, heap free:off
    Memory: 488696K/524288K available (9216K kernel code, 685K rwdata, 2052K rodata, 1024K init, 178K bss, 19208K reserved, 16384K cma-reserved)
    SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    trace event string verifier disabled
    rcu: Hierarchical RCU implementation.
    rcu:    RCU event tracing is enabled.
    rcu:    RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
    rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    GIC CPU mask not found - kernel will fail to boot.
    GIC CPU mask not found - kernel will fail to boot.
    L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
    L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
    L2C-310 enabling early BRESP for Cortex-A9
    L2C-310 full line of zeros enabled for Cortex-A9
    L2C-310 dynamic clock gating disabled, standby mode disabled
    L2C-310 cache controller enabled, 8 ways, 128 kB
    L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001
    rcu: srcu_init: Setting srcu_struct sizes based on contention.
    sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
    smp_twd: clock not found -2
    Console: colour dummy device 80x30
    Calibrating local timer... 90.94MHz.
    Calibrating delay loop... 489.06 BogoMIPS (lpj=2445312)
    CPU: Testing write buffer coherency: ok
    CPU0: Spectre v2: using BPIALL workaround
    pid_max: default: 32768 minimum: 301
    Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x60100000 - 0x60100060
    rcu: Hierarchical SRCU implementation.
    rcu:    Max phase no-delay instances is 1000.
    smp: Bringing up secondary CPUs ...
    smp: Brought up 1 node, 1 CPU
    SMP: Total of 1 processors activated (489.06 BogoMIPS).
    CPU: All CPU(s) started in SVC mode.
    devtmpfs: initialized
    VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
    clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    NET: Registered PF_NETLINK/PF_ROUTE protocol family
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    hw-breakpoint: debug architecture 0x4 unsupported.
    Serial: AMBA PL011 UART driver
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    i2c 0-0039: Fixed dependency cycle(s) with /bus@40000000/motherboard-bus@40000000/iofpga@7,00000000/clcd@1f000/port/endpoint
    i2c 0-0039: Fixed dependency cycle(s) with /clcd@10020000/port/endpoint
    pps_core: LinuxPPS API ver. 1 registered
    pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    PTP clock support registered
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm,sp804
    NET: Registered PF_INET protocol family
    IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
    tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
    Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
    TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
    TCP: Hash tables configured (established 4096 bind 4096)
    UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
    UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
    NET: Registered PF_UNIX/PF_LOCAL protocol family
    RPC: Registered named UNIX socket transport module.
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp-with-tls transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 5 counters available
    workingset: timestamp_bits=30 max_order=17 bucket_order=0
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    9p: Installing v9fs 9p2000 file system support
    io scheduler mq-deadline registered
    io scheduler kyber registered
    io scheduler bfq registered
    OF: graph: no port node found in /bus@40000000/motherboard-bus@40000000/iofpga@7,00000000/i2c@16000/dvi-transmitter@60
    sii902x 0-0060: supply iovcc not found, using dummy regulator
    sii902x 0-0060: supply cvcc12 not found, using dummy regulator
    simple-pm-bus bus@40000000:motherboard-bus@40000000:iofpga@7,00000000: Failed to create device link (0x180) with dcc:tcrefclk
    simple-pm-bus bus@40000000:motherboard-bus@40000000:iofpga@7,00000000: Failed to create device link (0x180) with dcc:tcrefclk
    physmap-flash 40000000.flash: physmap platform flash device: [mem 0x40000000-0x43ffffff]
    40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
    Intel/Sharp Extended Query Table at 0x0031
    Using buffer write method
    physmap-flash 40000000.flash: physmap platform flash device: [mem 0x44000000-0x47ffffff]
    40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
    Intel/Sharp Extended Query Table at 0x0031
    Using buffer write method
    Concatenating MTD devices:
    (0): "40000000.flash"
    (1): "40000000.flash"
    into device "40000000.flash"
    physmap-flash 48000000.psram: physmap platform flash device: [mem 0x48000000-0x49ffffff]
    smsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56
    isp1760 4f000000.usb: isp1760 bus width: 32, oc: digital
    isp1760 4f000000.usb: NXP ISP1760 USB Host Controller
    isp1760 4f000000.usb: new USB bus registered, assigned bus number 1
    isp1760 4f000000.usb: Scratch test failed. 0x00000000
    isp1760 4f000000.usb: can't setup: -19
    isp1760 4f000000.usb: USB bus 1 deregistered
    usbcore: registered new interface driver usb-storage
    rtc-pl031 10017000.rtc: registered as rtc0
    rtc-pl031 10017000.rtc: setting system clock to 2023-10-25T13:07:54 UTC (1698239274)
    mmci-pl18x 10005000.mmci: Got CD GPIO
    mmci-pl18x 10005000.mmci: Got WP GPIO
    mmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 35,36 (pio)
    ledtrig-cpu: registered to indicate activity on CPUs
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    input: AT Raw Set 2 keyboard as /devices/platform/bus@40000000/bus@40000000:motherboard-bus@40000000/bus@40000000:motherboard-bus@40000000:iofpga@7,00000000/10006000.kmi/serio0/input/input0
    mmc0: new SD card at address 4567
    mmcblk0: mmc0:4567 QEMU! 32.0 MiB
    aaci-pl041 10004000.aaci: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 37
    aaci-pl041 10004000.aaci: FIFO 512 entries
    NET: Registered PF_PACKET protocol family
    9pnet: Installing 9P2000 support
    Registering SWP/SWPB emulation handler
    10009000.serial: ttyAMA0 at MMIO 0x10009000 (irq = 38, base_baud = 0) is a PL011 rev1
    printk: console [ttyAMA0] enabled
    1000a000.serial: ttyAMA1 at MMIO 0x1000a000 (irq = 39, base_baud = 0) is a PL011 rev1
    1000b000.serial: ttyAMA2 at MMIO 0x1000b000 (irq = 40, base_baud = 0) is a PL011 rev1
    1000c000.serial: ttyAMA3 at MMIO 0x1000c000 (irq = 41, base_baud = 0) is a PL011 rev1
    drm-clcd-pl111 1001f000.clcd: assigned reserved memory node vram@4c000000
    drm-clcd-pl111 1001f000.clcd: using device-specific reserved memory
    drm-clcd-pl111 1001f000.clcd: core tile graphics present
    drm-clcd-pl111 1001f000.clcd: this device will be deactivated
    drm-clcd-pl111 1001f000.clcd: Versatile Express init failed - -19
    drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    clk: Disabling unused clocks
    ALSA device list:
      #0: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 37
    input: ImExPS/2 Generic Explorer Mouse as /devices/platform/bus@40000000/bus@40000000:motherboard-bus@40000000/bus@40000000:motherboard-bus@40000000:iofpga@7,00000000/10007000.kmi/serio1/input/input2
    drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    EXT4-fs (mmcblk0): mounting ext3 file system using the ext4 subsystem
    EXT4-fs (mmcblk0): recovery complete
    EXT4-fs (mmcblk0): mounted filesystem dee5646e-fd03-47fb-9a70-e1714f5b4c73 r/w with ordered data mode. Quota mode: disabled.
    VFS: Mounted root (ext3 filesystem) on device 179:0.
    Freeing unused kernel image (initmem) memory: 1024K
    Run /sbin/init as init process
    random: crng init done
    mkdir: can't create directory '/dev/pts': File exists
    
    Please press Enter to activate this console. drm-clcd-pl111 10020000.clcd: DVI muxed to daughterboard 1 (core tile) CLCD
    drm-clcd-pl111 10020000.clcd: initializing Versatile Express PL111
    amba 1000f000.wdt: deferred probe pending
    amba 10020000.clcd: deferred probe pending
    amba 100e0000.memory-controller: deferred probe pending
    amba 100e1000.memory-controller: deferred probe pending
    amba 100e5000.watchdog: deferred probe pending
    i2c 0-0039: deferred probe pending
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281

    参考

    • https://zhuanlan.zhihu.com/p/112128390
  • 相关阅读:
    DevEco Hvigor高效编译,构建过程新秘籍
    Java内存模型(JMM)
    未将对象引用设置到对象实例
    MongoDB基础知识~
    7. 吴恩达机器学习-PCA
    光泽正在褪去,所以我们又回到了人工智能领域。
    Android判断应用是否在前台运行
    Kettle REST Client获取token调用接口解析JSON入文件实战
    Linux——网络配置
    20240229金融读报:央行阿拉善创新融资模式与碳排放权交易条例实施,新春政策聚焦新生产力及金融风险防范
  • 原文地址:https://blog.csdn.net/tyustli/article/details/133870487