【迅为iMX6Q】开发板 Linux version 6.6.3 SD卡 启动

2024-04-10 03:52

本文主要是介绍【迅为iMX6Q】开发板 Linux version 6.6.3 SD卡 启动,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

开发环境

  • win10 64位
  • VMware Workstation Pro 16
  • ubuntu 22.04
  • 【迅为imx6q】开发板, 2G DDR

linux-imx 下载

  • 使用 NXP 官方提供的 linux-imx,代码地址为: https://github.com/nxp-imx/linux-imx

  • 使用 git 下载 linux-imxgit clone https://github.com/nxp-imx/linux-imx

  • 切换到想要的分支,我切换到:lf-6.6.y,也就是较新的 Linux version 6.6.3 版本,算是当前比较新的版本了

  • 切换 linux-imx 代码 分支 git checkout -b lf-6.6.y origin/lf-6.6.y,切换到 lf-6.6.y 分支后,可以根据使用的开发板,基于 lf-6.6.y 分支,再切换一个新的分支,比如 imx6q_topeet

  • gcc 交叉编译工具链推荐:gcc-linaro-13.0.0-2022.10-x86_64_arm-linux-gnueabihf,这个可以在 https://snapshots.linaro.org/gnu-toolchain/ 网站下载,较老或者较新的 gcc 版本,可能编译会报错

  • 【备注】nxp imx6q 属于 ARM32 平台,也就是 arm 的gcc 交叉编译工具链。区别于 ARM 64 位(aarch64)平台

新建 imx6q-topeet 设备树文件

  • 当前新版本Linux 开发,不再需要创建一个 board 目录,而是通过创建 相应的设备树文件的方式,适配硬件电路板

  • 新建一份 迅为 imx6q 开发板 自己的 设备树文件: imx6q-topeet.dts imx6qdl-topeet.dtsi,可以拷贝一份,如

$ cp arch/arm/boot/dts/imx6q-sabresd.dts arch/arm/boot/dts/imx6q-topeet.dts
$ cp arch/arm/boot/dts/imx6qdl-sabresd.dtsi arch/arm/boot/dts/imx6qdl-topeet.dtsi

相关修改

一、 修改 `arch/arm/boot/dts/imx6q-topeet.dts``

  • 主要是更改 include 文件,#include "imx6qdl-sabresd.dtsi" 改为 #include "imx6qdl-topeet.dtsi"
       model = "Freescale i.MX6 Quad SABRE Smart Device Board";compatible = "fsl,imx6q-sabresd", "fsl,imx6q";

改为

       model = "Freescale i.MX6 Quad Topeet Smart Device Board";compatible = "fsl,imx6q-topeet", "fsl,imx6q";

二、修改 arch/arm/boot/dts/imx6qdl-topeet.dtsi 文件

  • 主要是 SD 卡的 cd 与 wp 引脚的修改

在这里插入图片描述

  • cd 引脚改为 cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;

  • 迅为imx6q 开发板 SD 卡没有 wp 写保护引脚,所以注释掉 wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;

&usdhc2 {pinctrl-names = "default";pinctrl-0 = <&pinctrl_usdhc2>;bus-width = <8>;cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;status = "okay";
};

改为

&usdhc2 {pinctrl-names = "default";pinctrl-0 = <&pinctrl_usdhc2>;bus-width = <8>;cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;//wp-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;status = "okay";
};

三、修改 arch/arm/boot/dts/Makefile

  • arch/arm/boot/dts/nxp/imx/Makefile 中 添加 生成开发板设备树 dtb : imx6q-topeet.dtb

在这里插入图片描述

编译

  • 编译方法比较的简单,编写 env_arm.sh 用于设置交叉编译工具链的路径(环境变量)
#!/bin/bashexport PATH=$PATH:/home/zhangsz/tools/gcc-linaro-13.0.0-2022.10-x86_64_arm-linux-gnueabihf/bin
  • chmod 777 env_arm.sh 脚本添加可执行权限

  • source env_arm.sh 使能环境变量设置

  • 编写 mk.sh 脚本

#!/bin/bashmake O=build ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- $1 $2 $3 $4 $5 $6 $7 $8
  • 编译脚本 增加 执行权限 :chmod 777 mk.sh

  • 编译命令如下:

./mk.sh imx_v7_defconfig
./mk.sh -j8
  • 编译生成的产物:
build/arch/arm/boot/zImage
build/arch/arm/boot/dts/imx6q-topeet.dtb
  • 注意编译时,可以使用 O=build,编译的目标文件等都集中 放在 build 目录下,不影响内核代码

烧写到 sd 卡

  • 首先 sd 卡需要分区,注意分区时,sd 卡前面预留一些空间,如 8MB,可以创建多个分区,并且使用 ext4 格式化

  • 分区可以使用 ubuntu fdisk

  • 如 32 G sd 卡分区如下

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sdc1         16384    81919    65536   32M 83 Linux
/dev/sdc2         81920   147455    65536   32M 83 Linux
/dev/sdc3        147456  8536063  8388608    4G 83 Linux
/dev/sdc4       8536064 62333951 53797888 25.7G 83 Linux
  • 注意第一个分区: start 不是 0 开始,而是:16384 个 块,每个 块大小为 512,也就是 8M 预留空间

  • 分区使用 mkfs.ext4 进行格式化,重新拔插 sd 卡,分区会挂载到 ubuntu 中的 /media 目录下,如

  • 如果没有自动挂载,可以手动使用 mkidr sdcard + sudo mount /dev/sdc1 sdcard 挂载 sd 卡分区,用于拷贝内核镜像到 sd 卡分区


zhangsz@zhangsz-virtual-machine:~/linux/imx6q/linux-imx_5.15.71$ df -l
Filesystem     1K-blocks      Used Available Use% Mounted on
tmpfs             810584      2180    808404   1% /run
/dev/sda3      308001632  71477756 220805272  25% /
tmpfs            4052904         0   4052904   0% /dev/shm
tmpfs               5120         0      5120   0% /run/lock
vmhgfs-fuse    904497148 801675128 102822020  89% /mnt/hgfs
/dev/sda2         524252      5364    518888   2% /boot/efi
tmpfs             810580      2412    808168   1% /run/user/1000
/dev/sr0          129778    129778         0 100% /media/zhangsz/CDROM
/dev/sdc2          26596      8848     15460  37% /media/zhangsz/455d8c51-6af5-44ec-8060-a8ae8a85f2fc
/dev/sdc4       26299884     26472  24912084   1% /media/zhangsz/16729114-d269-46f5-8370-50e5b3a1971b
/dev/sdc1          26596      9504     14804  40% /media/zhangsz/d9f5098f-78b4-43c1-81f2-c558ef1fcffe
/dev/sdc3        4046560     26492   3793972   1% /media/zhangsz/ac8ba6b4-4928-40ff-9c42-8869cb0d123a

在这里插入图片描述

  • 只需要 把 Linux 编译的产物:
build/arch/arm/boot/zImage
build/arch/arm/boot/dts/imx6q-topeet.dtb

分别复制到 第一个分区 , /dev/sdc1 用于放置内核镜像 zImage 与 设备树 dtb 文件

# 创建挂载目录
zhangsz@zhangsz:~/imx6q/linux-imx$ mkdir sdcard# 挂载 sd 卡分区
zhangsz@zhangsz:~/imx6q/linux-imx$ sudo mount /dev/sdc1 sdcard/zhangsz@zhangsz:~/imx6q/linux-imx$ ls sdcard/
imx6q-topeet.dtb  lost+found  zImage# 拷贝 内核镜像
zhangsz@zhangsz:~/imx6q/linux-imx$ sudo cp build/arch/arm/boot/zImage sdcard/# 拷贝 设备树 dtb
zhangsz@zhangsz:~/imx6q/linux-imx$ sudo cp build/arch/arm/boot/dts/nxp/imx/imx6q-topeet.dtb sdcard/# 取消 SD 卡分区挂载
zhangsz@zhangsz:~/imx6q/linux-imx$ sudo umount sdcard

创建 根文件系统

  • 使用 busybox 创建根文件系统,后面再写一篇,创建的方法其实大同小异

  • 根文件系统创建后,把所有的文件,这里拷贝到 sd 的 第三个分区,也就是 /dev/sdc3 中即可

  • 备注:没有根文件系统,Linux 系统启动后不久,最终会卡住,无法使用 串口 shell

启动Linux

  • u-boot 使用 u-boot 2023.04,u-boot 的编译可以参考 【迅为iMX6Q】开发板 u-boot 2022.04 SD卡 启动

  • 设置 u-boot env 启动选项,重新开机或按重启按钮,回车进入 u-boot 命令行

/* 设置  bootargs,注意根文件系统 放置的分区, mmcblk1p3, blk1 表示 sd 卡设备号 1, 3代表 第三个分区 */
setenv bootargs 'console=ttymxc0,115200 root=/dev/mmcblk1p3 rootwait rw'/* 设置  bootcmd ,注意linux zImage 与 设备树 dtb 存放的分区 mmc 1:1  */
setenv bootcmd 'ext4load mmc 1:1 0x18000000 imx6q-topeet.dtb; ext4load mmc 1:1  0x12000000 zImage; bootz 0x12000000 - 0x18000000'/* 保存 env */
saveenv/* 重启 */
reset

启动Linux 信息

  • 正确读取设备树文件 imx6q-topeet.dtb 与 Linux 内核文件 zImage 后,就可以 通过 bootz 0x12000000 - 0x18000000 成功引导 Linux

  • 如果把根文件系统也放置到 sd 卡的 分区,就可以成功进入 Linux shell 终端了

U-Boot 2023.04-00002-g7a116559bc-dirty (Mar 10 2024 - 09:17:04 +0800)CPU:   i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 23C
Reset cause: POR
Model: i.MX6 Quad Topeet Device Board
DRAM:  2 GiB
Core:  91 devices, 23 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3
Loading Environment from MMC... OK
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   Could not get PHY for FEC0: addr 1
Could not get PHY for FEC0: addr 1
No ethernet found.Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
53625 bytes read in 6 ms (8.5 MiB/s)
9443232 bytes read in 455 ms (19.8 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x9017a0 ]
## Flattened Device Tree blob at 18000000Booting using the fdt blob at 0x18000000
Working FDT set to 18000000Using Device Tree in place at 18000000, end 18010178
Working FDT set to 18000000Starting kernel ...[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.3-gde53a20b9bab (zhangsz@zhangsz) (arm-linux-gnueabihf-gcc (GCC) 13.0.0 20221001 (experimental) [master revision 5299155bb80e90df822e1eebc9f9a0c8e4505a46], GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP PREEMPT Tue Apr  9 22:03:51 CST 2024
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX6 Quad Topeet Device Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x7c000000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x7c000000..0x8fffffff (327680 KiB) map reusable linux,cma
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000010000000-0x000000007fffffff]
[    0.000000]   HighMem  [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000010000000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000010000000-0x000000008fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s18900 r8192 d22060 u49152
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p3 rootwait rw
[    0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 520256
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 1727668K/2097152K available (13312K kernel code, 1375K rwdata, 4472K rodata, 1024K init, 424K bss, 41804K reserved, 327680K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 errata 752271 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76470001
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000001] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000026] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001615] Console: colour dummy device 80x30
[    0.001657] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.001673] CPU: Testing write buffer coherency: ok
[    0.001711] CPU0: Spectre v2: using BPIALL workaround
[    0.001719] pid_max: default: 32768 minimum: 301
[    0.001911] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.001946] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.002888] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004194] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.004390] Setting up static identity map for 0x10100000 - 0x10100060
[    0.004595] rcu: Hierarchical SRCU implementation.
[    0.004601] rcu:     Max phase no-delay instances is 1000.
[    0.005408] smp: Bringing up secondary CPUs ...
[    0.006335] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.006354] CPU1: Spectre v2: using BPIALL workaround
[    0.007368] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.007386] CPU2: Spectre v2: using BPIALL workaround
[    0.008357] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.008373] CPU3: Spectre v2: using BPIALL workaround
[    0.008498] smp: Brought up 1 node, 4 CPUs
[    0.008511] SMP: Total of 4 processors activated (24.00 BogoMIPS).
[    0.008522] CPU: All CPU(s) started in SVC mode.
[    0.009757] devtmpfs: initialized
[    0.021138] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.021431] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.021455] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.096879] cma: CMA area linux,cma could not be activated
[    0.097087] pinctrl core: initialized pinctrl subsystem
[    0.098794] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.099046] DMA: failed to allocate 256 KiB pool for atomic coherent allocation
[    0.100292] thermal_sys: Registered thermal governor 'step_wise'
[    0.100367] cpuidle: using governor menu
[    0.100544] CPU identified as i.MX6Q, silicon rev 1.5
[    0.112720] platform soc: Fixed dependency cycle(s) with /soc/bus@2000000/gpc@20dc000
[    0.120513] mxs_phy 20c9000.usbphy: supply phy-3p0 not found, using dummy regulator
[    0.121077] mxs_phy 20ca000.usbphy: supply phy-3p0 not found, using dummy regulator
[    0.123645] platform 20e0000.pinctrl: Fixed dependency cycle(s) with /soc/bus@2000000/pinctrl@20e0000/imx6qdl-sabresd/hoggrp
[    0.129502] platform 21dc000.mipi: Fixed dependency cycle(s) with /soc/bus@2000000/iomuxc-gpr@20e0000/ipu2_csi1_mux/port@0/endpoint
[    0.129564] platform 21dc000.mipi: Fixed dependency cycle(s) with /soc/bus@2000000/iomuxc-gpr@20e0000/ipu1_csi0_mux/port@0/endpoint
[    0.130301] platform 2400000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@1/port@1/endpoint
[    0.130345] platform 2400000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@0/port@1/endpoint
[    0.130382] platform 2400000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21e0000/ports/port@1/endpoint
[    0.130428] platform 2400000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@1/port@0/endpoint
[    0.130463] platform 2400000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@0/port@0/endpoint
[    0.130495] platform 2400000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21e0000/ports/port@0/endpoint
[    0.130546] platform 2400000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21dc000/port@2/endpoint
[    0.130587] platform 2400000.ipu: Fixed dependency cycle(s) with /soc/bus@2000000/iomuxc-gpr@20e0000/ipu1_csi0_mux/port@2/endpoint
[    0.132048] platform 2800000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@1/port@3/endpoint
[    0.132242] platform 2800000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@0/port@3/endpoint
[    0.132392] platform 2800000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21e0000/ports/port@3/endpoint
[    0.132588] platform 2800000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@1/port@2/endpoint
[    0.132773] platform 2800000.ipu: Fixed dependency cycle(s) with /ldb/lvds-channel@0/port@2/endpoint
[    0.132916] platform 2800000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21e0000/ports/port@2/endpoint
[    0.133058] platform 2800000.ipu: Fixed dependency cycle(s) with /soc/bus@2000000/iomuxc-gpr@20e0000/ipu2_csi1_mux/port@2/endpoint
[    0.133200] platform 2800000.ipu: Fixed dependency cycle(s) with /soc/bus@2100000/mipi@21dc000/port@3/endpoint
[    0.139406] No ATAGs?
[    0.139562] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.139574] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.140647] imx6q-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[    0.145022] imx mu driver is registered.
[    0.145496] imx rpmsg driver is registered.
[    0.147583] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.149314] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.151502] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.153403] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.155327] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.157234] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.159184] gpio gpiochip5: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.161169] gpio gpiochip6: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.165661] SCSI subsystem initialized
[    0.166931] usbcore: registered new interface driver usbfs
[    0.166973] usbcore: registered new interface driver hub
[    0.167031] usbcore: registered new device driver usb
[    0.167169] usb_phy_generic usbphynop1: dummy supplies not allowed for exclusive requests
[    0.167320] usb_phy_generic usbphynop2: dummy supplies not allowed for exclusive requests
[    0.168983] gpio-155 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.169133] i2c i2c-0: using pinctrl states for GPIO recovery
[    0.170150] i2c i2c-0: IMX I2C adapter registered
[    0.171134] gpio-108 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.171270] i2c i2c-1: using pinctrl states for GPIO recovery
[    0.172441] i2c i2c-1: IMX I2C adapter registered
[    0.173215] gpio-3 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.173347] i2c i2c-2: using pinctrl states for GPIO recovery
[    0.174324] i2c i2c-2: IMX I2C adapter registered
[    0.175116] mc: Linux media interface: v0.10
[    0.175189] videodev: Linux video capture interface: v2.00
[    0.175257] pps_core: LinuxPPS API ver. 1 registered
[    0.175265] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.175287] PTP clock support registered
[    0.178714] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
[    0.179429] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 driver probed
[    0.179439] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 dphy version is 0x3130302a
[    0.179874] MIPI CSI2 driver module loaded
[    0.179921] Advanced Linux Sound Architecture Driver Initialized.
[    0.181338] Bluetooth: Core ver 2.22
[    0.181379] NET: Registered PF_BLUETOOTH protocol family
[    0.181386] Bluetooth: HCI device and connection manager initialized
[    0.181401] Bluetooth: HCI socket layer initialized
[    0.181410] Bluetooth: L2CAP socket layer initialized
[    0.181430] Bluetooth: SCO socket layer initialized
[    0.182415] vgaarb: loaded
[    0.182993] clocksource: Switched to clocksource mxc_timer1
[    0.183270] VFS: Disk quotas dquot_6.6.0
[    0.183331] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.194635] NET: Registered PF_INET protocol family
[    0.195333] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.198959] tcp_listen_portaddr_hash hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.198999] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.199018] TCP established hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.199181] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[    0.199793] TCP: Hash tables configured (established 16384 bind 16384)
[    0.200049] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.200139] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.200403] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.201063] RPC: Registered named UNIX socket transport module.
[    0.201074] RPC: Registered udp transport module.
[    0.201079] RPC: Registered tcp transport module.
[    0.201083] RPC: Registered tcp-with-tls transport module.
[    0.201088] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.202607] PCI: CLS 0 bytes, default 64
[    0.203037] armv7-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    0.203504] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.206317] Bus freq driver module loaded
[    0.207508] Initialise system trusted keyrings
[    0.207773] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    0.208519] NFS: Registering the id_resolver key type
[    0.208560] Key type id_resolver registered
[    0.208566] Key type id_legacy registered
[    0.208599] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.208609] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.208645] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.208939] fuse: init (API version 7.39)
[    0.332250] jitterentropy: Initialization failed with host not compliant with requirements: 9
[    0.332264] Key type asymmetric registered
[    0.332272] Asymmetric key parser 'x509' registered
[    0.332373] bounce: pool size: 64 pages
[    0.332406] io scheduler mq-deadline registered
[    0.332414] io scheduler kyber registered
[    0.332445] io scheduler bfq registered
[    0.343027] mxc_hdmi 20e0000.hdmi_video: supply HDMI not found, using dummy regulator
[    0.345787] mxc_sdc_fb fb@0: registered mxc display driver ldb
[    0.345987] mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1
[    0.346017] fbcvt: 1920x1080@60: CVT Name - 2.073M9
[    0.346128] mxc_sdc_fb fb@1: registered mxc display driver hdmi
[    0.346248] mxc_sdc_fb fb@2: registered mxc display driver lcd
[    0.346322] mxc_sdc_fb fb@3: registered mxc display driver ldb
[    0.348002] imx-sdma: probe of 20ec000.dma-controller failed with error -12
[    0.349628] mxs-dma 110000.dma-controller: initialized
[    0.354981] pfuze100-regulator 1-0008: unrecognized pfuze chip ID!
[    0.355745] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 282, base_baud = 5000000) is a IMX
[    0.355803] printk: console [ttymxc0] enabled
[    1.627253] imx sema4 driver is registered.
[    1.647033] brd: module loaded
[    1.658645] loop: module loaded
[    1.664253] ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
[    1.672190] ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
[    1.680234] ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
[    1.688449] ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
[    1.696207] ahci-imx 2200000.sata: supply ahci not found, using dummy regulator
[    1.703703] ahci-imx 2200000.sata: supply phy not found, using dummy regulator
[    1.711005] ahci-imx 2200000.sata: supply target not found, using dummy regulator
[    1.721841] ahci-imx: probe of 2200000.sata failed with error -12
[    1.734201] tun: Universal TUN/TAP device driver, 1.6
[    1.739519] CAN device driver interface
[    1.745340] e1000e: Intel(R) PRO/1000 Network Driver
[    1.750314] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.756737] usbcore: registered new device driver r8152-cfgselector
[    1.763077] usbcore: registered new interface driver r8152
[    1.768603] usbcore: registered new interface driver lan78xx
[    1.774316] usbcore: registered new interface driver asix
[    1.779753] usbcore: registered new interface driver ax88179_178a
[    1.785905] usbcore: registered new interface driver cdc_ether
[    1.791777] usbcore: registered new interface driver smsc95xx
[    1.797579] usbcore: registered new interface driver net1080
[    1.803315] usbcore: registered new interface driver cdc_subset
[    1.809282] usbcore: registered new interface driver zaurus
[    1.814911] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.822370] usbcore: registered new interface driver cdc_ncm
[    1.828091] usbcore: registered new interface driver r8153_ecm
[    1.834071] usbcore: registered new interface driver usb-storage
[    1.845828] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    1.851960] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:00 UTC (0)
[    1.861173] i2c_dev: i2c /dev entries driver
[    1.871960] Bluetooth: HCI UART driver ver 2.3
[    1.876445] Bluetooth: HCI UART protocol H4 registered
[    1.881593] Bluetooth: HCI UART protocol BCSP registered
[    1.886965] Bluetooth: HCI UART protocol LL registered
[    1.892140] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.898466] Bluetooth: HCI UART protocol Marvell registered
[    1.904107] usbcore: registered new interface driver btusb
[    1.910689] sdhci: Secure Digital Host Controller Interface driver
[    1.916894] sdhci: Copyright(c) Pierre Ossman
[    1.921257] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.929424] usbcore: registered new interface driver usbhid
[    1.933967] sdhci-esdhc-imx 2194000.mmc: Got CD GPIO
[    1.935077] usbhid: USB HID core driver
[    1.935995] sdhci-esdhc-imx 2198000.mmc: Got CD GPIO
[    1.936040] sdhci-esdhc-imx 2198000.mmc: Got WP GPIO
[    1.936129] mmc2: Unable to allocate ADMA buffers - falling back to standard DMA
[    1.936680] mmc2 bounce up to 128 segments into one, max segment size 65536 bytes
[    1.937686] mmc3: Unable to allocate ADMA buffers - falling back to standard DMA
[    1.938410] mmc3 bounce up to 128 segments into one, max segment size 65536 bytes
[    1.940109] mmc1: Unable to allocate ADMA buffers - falling back to standard DMA
[    1.945484] mma8452 0-001c: mounting matrix not found: using identity...
[    1.949348] mmc1 bounce up to 128 segments into one, max segment size 65536 bytes
[    1.962519] isl29018 2-0044: No cache defaults, reading back from HW
[    1.969309] mmc2: SDHCI controller on 2198000.mmc [2198000.mmc] using DMA
[    1.969657] mmc3: SDHCI controller on 219c000.mmc [219c000.mmc] using DMA
[    1.976871] isl29018 2-0044: Failed to read 1: -6
[    2.000254] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using DMA
[    2.005280] isl29018 2-0044: regmap initialization fails: -6
[    2.016161] mxc_hdmi_cec soc:hdmi_cec@120000: hdmi_cec:No HDMI irq line provided
[    2.037765] mmc3: new DDR MMC card at address 0001
[    2.046036] wm8962 0-001a: Failed to read ID register
[    2.050888] mmcblk3: mmc3:0001 AJTD4R 14.6 GiB
[    2.056212] mmc1: host does not support reading read-only switch, assuming write-enable
[    2.059901] fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
[    2.066193]  mmcblk3: p1 p2
[    2.068986] mmc1: new high speed SDHC card at address aaaa
[    2.074348] fsl-hdmi-dai soc:hdmi_audio@120000: failed to probe. Load HDMI-video first.
[    2.080239] mmcblk1: mmc1:aaaa SD32G 29.7 GiB
[    2.080728] mmcblk3boot0: mmc3:0001 AJTD4R 4.00 MiB
[    2.083331] mmcblk3boot1: mmc3:0001 AJTD4R 4.00 MiB
[    2.084963] imx6qdl-audio-hdmi sound-hdmi: initialize HDMI-audio failed. load HDMI-video first!
[    2.085164] NET: Registered PF_LLC protocol family
[    2.085804] NET: Registered PF_INET6 protocol family
[    2.086990] Segment Routing with IPv6
[    2.087065] In-situ OAM (IOAM) with IPv6
[    2.087163] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.087958] NET: Registered PF_PACKET protocol family
[    2.091777]  mmcblk1: p1 p2 p3 p4
[    2.097647] mmcblk3rpmb: mmc3:0001 AJTD4R 4.00 MiB, chardev (239:0)
[    2.100074] can: controller area network core
[    2.160971] NET: Registered PF_CAN protocol family
[    2.165799] can: raw protocol
[    2.168784] can: broadcast manager protocol
[    2.173021] can: netlink gateway - max_hops=1
[    2.177651] Bluetooth: RFCOMM TTY layer initialized
[    2.182553] Bluetooth: RFCOMM socket layer initialized
[    2.187815] Bluetooth: RFCOMM ver 1.11
[    2.191583] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.196918] Bluetooth: BNEP filters: protocol multicast
[    2.202159] Bluetooth: BNEP socket layer initialized
[    2.207147] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.213093] Bluetooth: HIDP socket layer initialized
[    2.218334] lib80211: common routines for IEEE802.11 drivers
[    2.224124] Key type dns_resolver registered
[    2.229492] Registering SWP/SWPB emulation handler
[    2.256027] Loading compiled-in X.509 certificates
[    2.323068] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[    2.363088] imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[    2.373102] mxc_mipi_dsi 21e0000.mipi: i.MX MIPI DSI driver probed
[    2.379843] mxc_sdc_fb fb@0: registered mxc display driver ldb
[    2.385761] mxc_sdc_fb fb@0: Unable to allocate framebuffer memory
[    2.385770] detected fb_set_par error, error code: -12
[    2.397117] mxc_sdc_fb fb@0: Error fb_set_var ret:-12
[    2.402186] mxc_sdc_fb: probe of fb@0 failed with error -12
[    2.408451] mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1
[    2.416251] fbcvt: 1920x1080@60: CVT Name - 2.073M9
[    2.421194] mxc_sdc_fb fb@1: registered mxc display driver hdmi
[    2.427174] mxc_sdc_fb fb@1: Unable to allocate framebuffer memory
[    2.427181] detected fb_set_par error, error code: -12
[    2.438524] mxc_sdc_fb fb@1: Error fb_set_var ret:-12
[    2.443632] mxc_sdc_fb: probe of fb@1 failed with error -12
[    2.449734] mxc_sdc_fb fb@2: registered mxc display driver lcd
[    2.455625] mxc_sdc_fb fb@2: Unable to allocate framebuffer memory
[    2.455633] detected fb_set_par error, error code: -12
[    2.466973] mxc_sdc_fb fb@2: Error fb_set_var ret:-12
[    2.472038] mxc_sdc_fb: probe of fb@2 failed with error -12
[    2.478142] mxc_sdc_fb fb@3: registered mxc display driver ldb
[    2.484047] mxc_sdc_fb fb@3: Unable to allocate framebuffer memory
[    2.484055] detected fb_set_par error, error code: -12
[    2.495401] mxc_sdc_fb fb@3: Error fb_set_var ret:-12
[    2.500466] mxc_sdc_fb: probe of fb@3 failed with error -12
[    2.509456] pps pps0: new PPS source ptp0
[    2.514181] fec: probe of 2188000.ethernet failed with error -12
[    2.526808] fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
[    2.534017] fsl-ssi-dai 202c000.ssi: Unbalanced pm_runtime_enable!
[    2.540929] fsl-hdmi-dai soc:hdmi_audio@120000: failed to probe. Load HDMI-video first.
[    2.549563] imx6qdl-audio-hdmi sound-hdmi: initialize HDMI-audio failed. load HDMI-video first!
[    2.567657] fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
[    2.574882] fsl-ssi-dai 202c000.ssi: Unbalanced pm_runtime_enable!
[    2.581769] fsl-hdmi-dai soc:hdmi_audio@120000: failed to probe. Load HDMI-video first.
[    2.590409] imx6qdl-audio-hdmi sound-hdmi: initialize HDMI-audio failed. load HDMI-video first!
[    2.605767] gpio-keys gpio-keys: error -EBUSY: failed to get gpio
[    2.611879] gpio-keys: probe of gpio-keys failed with error -16
[    2.618437] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.629838] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.635657] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.643026] clk: Disabling unused clocks
[    2.644311] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    2.648526] ALSA device list:
[    2.658940]   No soundcards found.
[    2.715858] EXT4-fs (mmcblk1p3): recovery complete
[    2.721844] EXT4-fs (mmcblk1p3): mounted filesystem e888ce0d-56d5-4eb7-aaa3-12d9d0e4485d r/w with ordered data mode. Quota mode: none.
[    2.734070] VFS: Mounted root (ext4 filesystem) on device 179:11.
[    2.742363] devtmpfs: mounted
[    2.747905] Freeing unused kernel image (initmem) memory: 1024K
[    2.783499] Run /sbin/init as init processPlease press Enter to activate this console.
~ #
~ # [   12.679172] galcore 130000.gpu: deferred probe timeout, ignoring dependency
[   12.687505] galcore: probe of 130000.gpu failed with error -110
[   12.696811] mxc_vpu 2040000.vpu_fsl: deferred probe timeout, ignoring dependency
[   12.704622] mxc_vpu: probe of 2040000.vpu_fsl failed with error -110
[   12.729644] fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
[   12.740911] fsl-ssi-dai 202c000.ssi: Unbalanced pm_runtime_enable!
[   12.759706] fsl-hdmi-dai soc:hdmi_audio@120000: failed to probe. Load HDMI-video first.
[   12.772610] imx6qdl-audio-hdmi sound-hdmi: initialize HDMI-audio failed. load HDMI-video first!
[   12.831691] platform v4l2_out: deferred probe pending
[   12.838619] platform 20c8000.anatop:tempmon: deferred probe pending
[   12.845305] platform sound: deferred probe pending
[   12.850465] platform 202c000.ssi: deferred probe pending
[   12.856321] platform soc:hdmi_audio@120000: deferred probe pending
[   12.862638] platform sound-hdmi: deferred probe pending
[   12.868041] platform imx6q-cpufreq: deferred probe pending
[   12.876583] platform imx-pgc-power-domain.1: deferred probe pending
[   12.883294] platform 2008000.spi: deferred probe pending
[   12.888789] platform 2184000.usb: deferred probe pending
[   12.894374] platform 20c8000.anatop:regulator-1p1: deferred probe pending
[   12.901264] platform 20c8000.anatop:regulator-2p5: deferred probe pending
[   12.908228] platform 20c8000.anatop:regulator-vddcore: deferred probe pending
[   12.915520] platform 20c8000.anatop:regulator-vddpu: deferred probe pending
[   12.922599] platform 20c8000.anatop:regulator-vddsoc: deferred probe pending
[   12.929801] platform 2184200.usb: deferred probe pending
[   12.935238] platform regulator-usb-otg-vbus: deferred probe pending
[   12.941572] platform regulator-usb-h1-vbus: deferred probe pending
[   12.947795] platform regulator-hdmi: deferred probe pending
[   64.477470] cfg80211: failed to load regulatory.db
[  462.213446] random: crng init done~ #
~ # ls
bin         etc         linuxrc     proc        sys         var
boot        home        lost+found  root        tmp
dev         lib         mnt         sbin        usr
~ #
  • 【迅为iMX6Q】开发板 Linux version 6.6.3 SD卡 启动 成功

小结

  • 【迅为iMX6Q】开发板 Linux version 6.6.3 SD卡 启动比较的简单,主要是修改了 sd 卡的 cd 与 wp 引脚

  • 注意 sd 卡分区,ext4 格式化,分区挂载(mount)与 内核镜像文件、设备树 dtb 文件拷贝

  • 默认配置,开发板的一些驱动,如触摸屏、LCD、以太网等还没有正常的启动,需要继续适配,或者暂时关闭相关的选项,以免产生一些错误的驱动打印信息

  • 修改 默认配置后,可以使用 ./mk.sh savedefconfig 生成 默认配置,可以复制 defconfig 到 单独的开发板配置,比如 cp build/defconfig arch/arm/configs/imx6q_topeet_defconfig,这样下次编译时,使用

./mk.sh imx6q_topeet_defconfig
./mk.sh -j8

这篇关于【迅为iMX6Q】开发板 Linux version 6.6.3 SD卡 启动的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/890000

相关文章

linux生产者,消费者问题

pthread_cond_wait() :用于阻塞当前线程,等待别的线程使用pthread_cond_signal()或pthread_cond_broadcast来唤醒它。 pthread_cond_wait() 必须与pthread_mutex 配套使用。pthread_cond_wait()函数一进入wait状态就会自动release mutex。当其他线程通过pthread

Linux 安装、配置Tomcat 的HTTPS

Linux 安装 、配置Tomcat的HTTPS 安装Tomcat 这里选择的是 tomcat 10.X ,需要Java 11及更高版本 Binary Distributions ->Core->选择 tar.gz包 下载、上传到内网服务器 /opt 目录tar -xzf 解压将解压的根目录改名为 tomat-10 并移动到 /opt 下, 形成个人习惯的路径 /opt/tomcat-10

RedHat运维-Linux文本操作基础-AWK进阶

你不用整理,跟着敲一遍,有个印象,然后把它保存到本地,以后要用再去看,如果有了新东西,你自个再添加。这是我参考牛客上的shell编程专项题,只不过换成了问答的方式而已。不用背,就算是我自己亲自敲,我现在好多也记不住。 1. 输出nowcoder.txt文件第5行的内容 2. 输出nowcoder.txt文件第6行的内容 3. 输出nowcoder.txt文件第7行的内容 4. 输出nowcode

【Linux进阶】UNIX体系结构分解——操作系统,内核,shell

1.什么是操作系统? 从严格意义上说,可将操作系统定义为一种软件,它控制计算机硬件资源,提供程序运行环境。我们通常将这种软件称为内核(kerel),因为它相对较小,而且位于环境的核心。  从广义上说,操作系统包括了内核和一些其他软件,这些软件使得计算机能够发挥作用,并使计算机具有自己的特生。这里所说的其他软件包括系统实用程序(system utility)、应用程序、shell以及公用函数库等

Windows/macOS/Linux 安装 Redis 和 Redis Desktop Manager 可视化工具

本文所有安装都在macOS High Sierra 10.13.4进行,Windows安装相对容易些,Linux安装与macOS类似,文中会做区分讲解 1. Redis安装 1.下载Redis https://redis.io/download 把下载的源码更名为redis-4.0.9-source,我喜欢跟maven、Tomcat放在一起,就放到/Users/zhan/Documents

Linux系统稳定性的奥秘:探究其背后的机制与哲学

在计算机操作系统的世界里,Linux以其卓越的稳定性和可靠性著称,成为服务器、嵌入式系统乃至个人电脑用户的首选。那么,是什么造就了Linux如此之高的稳定性呢?本文将深入解析Linux系统稳定性的几个关键因素,揭示其背后的技术哲学与实践。 1. 开源协作的力量Linux是一个开源项目,意味着任何人都可以查看、修改和贡献其源代码。这种开放性吸引了全球成千上万的开发者参与到内核的维护与优化中,形成了

Linux 下的Vim命令宝贝

vim 命令详解(转自:https://www.cnblogs.com/usergaojie/p/4583796.html) vi: Visual Interface 可视化接口 vim: VI iMproved VI增强版 全屏编辑器,模式化编辑器 vim模式: 编辑模式(命令模式)输入模式末行模式 模式转换: 编辑-->输入: i: 在当前光标所在字符的前面,转为输入模式

Linux和Mac分卷压缩

使用 zip 命令压缩文件 使用 zip 命令压缩文件,并结合 split 命令来分卷: zip - largefile | split -b 500k 举例: zip - ./tomcat.dmg |split -b 500k 上述命令将文件 largefile 压缩成 zip 包并分卷成不超过 500k 的文件,分解后文件名默认是 x* ,后缀为 2 位a-z 字母,如 aa、ab。

Docker启动异常

报错信息: failed to start daemon: Error initializing network controller: error creating default "bridge" network: cannot create network b8fd8c684f0ba865d4a13d36e5282fd694bbd37b243c7ec6c9cd29416db98d4b (d

Linux文本三剑客sed

sed和awk grep就是查找文本当中的内容,最强大的功能就是使用扩展正则表达式 sed sed是一种流编辑器,一次处理一行内容。 如果只是展示,会放在缓冲区(模式空间),展示结束后,会从模式空间把结果删除 一行行处理,处理完当前行,才会处理下一行。直到文件的末尾。 sed的命令格式和操作选项: sed -e '操作符 ' -e '操作符' 文件1 文件2 -e表示可以跟多个操作