Linux内核在引导时无法从SD卡检测到rootfs

时间:2019-11-01 14:00:39

标签: linux linux-kernel arm embedded-linux boot

我正在尝试手动构建主线内核并在Pine64_Plus板上启动。 Linux内核无法挂载引导分区。而且,它不会在启动日志中的可用分区下显示任何分区。 我做了以下步骤。 克隆了Linux主线git repo

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth=1

安装了交叉编译器工具链。

然后..

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j4 Image

生成了dtb

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j4 dtbs

生成内核模块

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 modules
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=ker_mod_temp_dir make modules modules_install

按如下所示对SD卡进行分区 enter image description here

我将MLO,Uboot和固件文件保留在引导分区中。

我从here下载了ArchLinux rootfs

我将下载的rootfs复制到了SD卡的ROOTFS分区中。

sudo cp -rT <path-to-downloaded-rootfs> /media/user/ROOTFS

我将Linux映像和dts文件夹从/ arch / arm64 / boot复制到rootfs中的引导文件夹。

我将内核模块复制到了根目录

sudo cp -rT ker_mod_temp_dir /media/user/ROOTFS/lib

enter image description here

我试图用SD卡引导板。 Uboot成功启动。我在Uboot中提供了以下命令来加载内核。

setenv kernel_addr_r 0x42000000
setenv dtb_addr_r 0x48000000
ext4load mmc 0:2 $kernel_addr_r /boot/Image
ext4load mmc 0:2 $dtb_addr_r /boot/dts/allwinner/sun50i-a64-pine64-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk ignore_loglevel root=/dev/mmcblk0p2 rootfstype=ext4 rw
booti $kernel_addr_r - $dtb_addr_r

Linux内核启动,但以错误结尾-[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

启动日志

sunxi#booti $kernel_addr_r - $dtb_addr_r
## Flattened Device Tree blob at 48000000
   Booting using the fdt blob at 0x48000000
   Loading Device Tree to 44ff7000, end 44fffba9 ... OK

Starting kernel ...

[mmc]: MMC Device 2 not found
[mmc]: mmc 2 not find, so not exit
INFO:    BL3-1: Next image address = 0x41080000
INFO:    BL3-1: Next image spsr = 0x3c9
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.4.0-rc3 (janani@janani-Vostro-2520) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #2 SMP PREEMPT Fri Nov 1 13:01:35 IST 2019
[    0.000000] Machine model: Pine64+
[    0.000000] printk: debug: ignoring loglevel setting.
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000041000000-0x000000007fffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x7dde6800-0x7dde7fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000041000000-0x000000007fffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000041000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000041000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 258048
[    0.000000]   DMA32 zone: 4032 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 258048 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 22 pages/cpu s52952 r8192 d28968 u90112
[    0.000000] pcpu-alloc: s52952 r8192 d28968 u90112 alloc=22*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 254016
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk ignore_loglevel root=/dev/mmcblk0p2 rootfstype=ext4 rw
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 952956K/1032192K available (12156K kernel code, 1860K rwdata, 6420K rodata, 5056K init, 452K bss, 46468K reserved, 32768K cma-reserved)
[    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 restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x2b8/0x458 with crng_init=0
[    0.000000] arch_timer: Enabling global workaround for Allwinner erratum UNKNOWN1
[    0.000000] arch_timer: CPU0: Trapping CNTVCT access
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000656] Console: colour dummy device 80x25
[    0.000738] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.000748] pid_max: default: 32768 minimum: 301
[    0.000829] LSM: Security Framework initializing
[    0.000889] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000903] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.024021] ASID allocator initialised with 32768 entries
[    0.032014] rcu: Hierarchical SRCU implementation.
[    0.041639] EFI services will not be available.
[    0.048045] smp: Bringing up secondary CPUs ...
[    5.092138] CPU1: failed to come online
[    5.092145] CPU1: failed in unknown state : 0x0
[   10.216301] CPU2: failed to come online
[   10.216308] CPU2: failed in unknown state : 0x0
[   15.340451] CPU3: failed to come online
[   15.340457] CPU3: failed in unknown state : 0x0
[   15.340505] smp: Brought up 1 node, 1 CPU
[   15.340510] SMP: Total of 1 processors activated.
[   15.340521] CPU features: detected: 32-bit EL0 Support
[   15.340531] CPU features: detected: CRC32 instructions
[   15.346286] CPU: All CPU(s) started at EL2
[   15.346311] alternatives: patching kernel code
[   15.347526] devtmpfs: initialized
[   15.353004] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[   15.353025] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[   15.354219] pinctrl core: initialized pinctrl subsystem
[   15.355443] DMI not present or invalid.
[   15.355817] NET: Registered protocol family 16
[   15.357162] DMA: preallocated 256 KiB pool for atomic allocations
[   15.357176] audit: initializing netlink subsys (disabled)
[   15.358361] cpuidle: using governor menu
[   15.358626] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[   15.359812] Serial: AMBA PL011 UART driver
[   15.364601] audit: type=2000 audit(15.344:1): state=initialized audit_enabled=0 res=1
[   15.380908] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[   15.380920] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[   15.380926] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[   15.380933] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[   15.388682] cryptd: max_cpu_qlen set to 1000
[   15.401330] ACPI: Interpreter disabled.
[   15.404770] iommu: Default domain type: Translated 
[   15.404955] vgaarb: loaded
[   15.405266] SCSI subsystem initialized
[   15.408762] libata version 3.00 loaded.
[   15.409025] usbcore: registered new interface driver usbfs
[   15.409065] usbcore: registered new interface driver hub
[   15.409108] usbcore: registered new device driver usb
[   15.409680] pps_core: LinuxPPS API ver. 1 registered
[   15.409686] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[   15.409701] PTP clock support registered
[   15.409802] EDAC MC: Ver: 3.0.0
[   15.416828] FPGA manager framework
[   15.416910] Advanced Linux Sound Architecture Driver Initialized.
[   15.417650] clocksource: Switched to clocksource arch_sys_counter
[   15.417813] VFS: Disk quotas dquot_6.6.0
[   15.417869] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[   15.418051] pnp: PnP ACPI: disabled
[   15.423643] thermal_sys: Registered thermal governor 'step_wise'
[   15.423647] thermal_sys: Registered thermal governor 'power_allocator'
[   15.423942] NET: Registered protocol family 2
[   15.424316] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[   15.424342] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[   15.424417] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[   15.424565] TCP: Hash tables configured (established 8192 bind 8192)
[   15.424669] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[   15.424699] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[   15.424834] NET: Registered protocol family 1
[   15.437311] RPC: Registered named UNIX socket transport module.
[   15.437317] RPC: Registered udp transport module.
[   15.437322] RPC: Registered tcp transport module.
[   15.437326] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   15.437338] PCI: CLS 0 bytes, default 64
[   15.438134] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[   15.438351] kvm [1]: IPA Size Limit: 40bits
[   15.439050] kvm [1]: vgic interrupt IRQ1
[   15.439134] kvm [1]: Hyp mode initialized successfully
[   15.445931] Initialise system trusted keyrings
[   15.446070] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[   15.453479] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[   15.458294] NFS: Registering the id_resolver key type
[   15.458319] Key type id_resolver registered
[   15.458323] Key type id_legacy registered
[   15.458335] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   15.458518] 9p: Installing v9fs 9p2000 file system support
[   15.474148] Key type asymmetric registered
[   15.474156] Asymmetric key parser 'x509' registered
[   15.474191] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[   15.474198] io scheduler mq-deadline registered
[   15.474204] io scheduler kyber registered
[   15.475689] sun50i-de2-bus 1000000.bus: Error couldn't map SRAM to device
[   15.476383] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy
[   15.482035] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[   15.489405] EINJ: ACPI disabled.
[   15.502212] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[   15.504391] SuperH (H)SCI(F) driver initialized
[   15.504889] msm_serial: driver initialized
[   15.513007] loop: module loaded
[   15.517237] libphy: Fixed MDIO Bus: probed
[   15.517519] tun: Universal TUN/TAP device driver, 1.6
[   15.518323] thunder_xcv, ver 1.0
[   15.518361] thunder_bgx, ver 1.0
[   15.518396] nicpf, ver 1.0
[   15.518923] hclge is initializing
[   15.518930] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[   15.518935] hns3: Copyright (c) 2017 Huawei Corporation.
[   15.518990] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[   15.518994] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[   15.519031] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[   15.519036] igb: Copyright (c) 2007-2014 Intel Corporation.
[   15.519073] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[   15.519079] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[   15.519367] sky2: driver version 1.30
[   15.519963] VFIO - User Level meta-driver version: 0.3
[   15.525385] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.525393] ehci-pci: EHCI PCI platform driver
[   15.525431] ehci-platform: EHCI generic platform driver
[   15.525709] ehci-platform 1c1a000.usb: EHCI Host Controller
[   15.525733] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[   15.525833] ehci-platform 1c1a000.usb: irq 17, io mem 0x01c1a000
[   15.541660] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[   15.542245] hub 1-0:1.0: USB hub found
[   15.542273] hub 1-0:1.0: 1 port detected
[   15.542788] ehci-orion: EHCI orion driver
[   15.542933] ehci-exynos: EHCI EXYNOS driver
[   15.543017] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   15.543039] ohci-pci: OHCI PCI platform driver
[   15.543101] ohci-platform: OHCI generic platform driver
[   15.543243] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[   15.543262] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[   15.543356] ohci-platform 1c1a400.usb: irq 18, io mem 0x01c1a400
[   15.606146] hub 2-0:1.0: USB hub found
[   15.606173] hub 2-0:1.0: 1 port detected
[   15.606637] ohci-exynos: OHCI EXYNOS driver
[   15.607181] usbcore: registered new interface driver usb-storage
[   15.610102] sun6i-rtc 1f00000.rtc: registered as rtc0
[   15.610111] sun6i-rtc 1f00000.rtc: RTC enabled
[   15.610335] i2c /dev entries driver
[   15.614705] sdhci: Secure Digital Host Controller Interface driver
[   15.614711] sdhci: Copyright(c) Pierre Ossman
[   15.615069] Synopsys Designware Multimedia Card Interface Driver
[   15.615953] sdhci-pltfm: SDHCI platform and OF driver helper
[   15.617242] ledtrig-cpu: registered to indicate activity on CPUs
[   15.618422] usbcore: registered new interface driver usbhid
[   15.618428] usbhid: USB HID core driver
[   15.624090] NET: Registered protocol family 17
[   15.624260] 9pnet: Installing 9P2000 support
[   15.624313] Key type dns_resolver registered
[   15.624694] registered taskstats version 1
[   15.624700] Loading compiled-in X.509 certificates
[   15.637906] sun50i-a64-r-pinctrl 1f02c00.pinctrl: 1f02c00.pinctrl supply vcc-pl not found, using dummy regulator
[   15.638123] sunxi-rsb 1f03400.rsb: RSB running at 3030303 Hz
[   15.638499] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP803 found
[   15.650253] dcdc1: supplied by regulator-dummy
[   15.650589] dcdc2: supplied by regulator-dummy
[   15.650808] dcdc4: supplied by regulator-dummy
[   15.651048] dcdc5: supplied by regulator-dummy
[   15.651111] vcc-dram: Bringing 1500000uV into 1360000-1360000uV
[   15.651308] dcdc6: supplied by regulator-dummy
[   15.651509] dc1sw: supplied by regulator-dummy
[   15.651697] aldo1: supplied by regulator-dummy
[   15.651903] aldo2: supplied by regulator-dummy
[   15.652139] aldo3: supplied by regulator-dummy
[   15.652380] dldo1: supplied by regulator-dummy
[   15.652598] dldo2: supplied by regulator-dummy
[   15.652814] dldo3: supplied by regulator-dummy
[   15.653048] dldo4: supplied by regulator-dummy
[   15.653277] eldo1: supplied by regulator-dummy
[   15.653506] eldo2: supplied by regulator-dummy
[   15.653768] eldo3: supplied by regulator-dummy
[   15.653995] fldo1: supplied by regulator-dummy
[   15.654231] fldo2: supplied by regulator-dummy
[   15.654484] rtc-ldo: supplied by regulator-dummy
[   15.654666] ldo-io0: supplied by regulator-dummy
[   15.654876] ldo-io1: supplied by regulator-dummy
[   15.655073] axp20x-rsb sunxi-rsb-3a3: AXP20X driver loaded
[   15.659737] sun50i-a64-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[   15.660680] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[   15.661132] printk: console [ttyS0] disabled
[   15.681709] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 26, base_baud = 1500000) is a U6_16550A
[   16.928325] printk: console [ttyS0] enabled
[   16.934096] ehci-platform 1c1b000.usb: EHCI Host Controller
[   16.939689] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[   16.947533] ehci-platform 1c1b000.usb: irq 19, io mem 0x01c1b000
[   16.965665] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[   16.972292] hub 3-0:1.0: USB hub found
[   16.976092] hub 3-0:1.0: 1 port detected
[   16.981558] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[   16.988223] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[   16.996091] ohci-platform 1c1b400.usb: irq 20, io mem 0x01c1b400
[   17.066206] hub 4-0:1.0: USB hub found
[   17.069997] hub 4-0:1.0: 1 port detected
[   17.075561] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[   17.086998] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[   17.092774] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[   17.101105] hub 5-0:1.0: USB hub found
[   17.104901] hub 5-0:1.0: 1 port detected
[   17.111036] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[   17.123109] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[   17.133728] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[   17.163428] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[   17.172748] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:01:49 UTC (109)
[   17.181341] ALSA device list:
[   17.184340]   No soundcards found.
[   17.188171] VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
[   17.195947] Please append a correct "root=" boot option; here are the available partitions:
[   17.204326] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   17.212579] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc3 #2
[   17.218748] Hardware name: Pine64+ (DT)
[   17.222577] Call trace:
[   17.225026]  dump_backtrace+0x0/0x150
[   17.228685]  show_stack+0x14/0x20
[   17.231997]  dump_stack+0xb0/0xf8
[   17.235308]  panic+0x16c/0x37c
[   17.238360]  mount_block_root+0x1b0/0x2a8
[   17.242362]  mount_root+0x144/0x178
[   17.245845]  prepare_namespace+0x138/0x19c
[   17.249935]  kernel_init_freeable+0x22c/0x24c
[   17.254287]  kernel_init+0x10/0x108
[   17.257772]  ret_from_fork+0x10/0x18
[   17.261348] Kernel Offset: disabled
[   17.264831] CPU features: 0x0002,24002004
[   17.268832] Memory Limit: none
[   17.271888] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

下面一行

Please append a correct "root=" boot option; here are the available partitions:

不显示任何分区。可能是什么原因?

在配置中选择

mmc驱动程序,如下所示 CONFIG_MMC_BLOCK = y和CONFIG_MMC_SUNXI = y

我在做什么错了?

2 个答案:

答案 0 :(得分:4)

尝试将内核命令行选项rootwait添加到bootargs中,以便内核不会立即放弃,而是永远等待,直到出现根文件系统。可能是内核在启动过程中没有等待足够长的时间来显示SD卡。

答案 1 :(得分:1)

  

[mmc]:找不到MMC设备2
  [mmc]:找不到mmc 2,因此无法退出
  ...
  内核命令行:console = ttyS0,115200 earlyprintk ignore_loglevel root = / dev / mmcblk0p2 rootfstype = ext4 rw
  ...
  VFS:无法打开根设备“ mmcblk0p2”或未知块(0,0):错误-6

您可能需要延迟,rootwait可能会解决它。但是,这正是initramfs试图解决的确切情况,并且至少是您的“调试”路径。如果创建一个initramfs映像并将其附加到Linux二进制文件,则可以使用Shell来探测Linux的分区布局和/或延迟安装rootfs直到准备就绪。您可以在initramfs中执行其他操作,例如添加启动屏幕,与USB基础架构并行,例如在安装了rootfs的情况下加载检测到的设备的模块。这样可以加快启动速度,并为您提供诊断启动的工具。

看起来u-boot也看不到/dev/mmcblk0p2。 u-boot和Linux似乎都在抱怨,这一事实可能表明分区生成出现了问题。将引导日志与锯木屑建议的已知工作版本进行比较绝对有用。例如,可能未为MMC设置定时/时钟,电源或针脚复用器,这可能会阻止设备被识别。看来您有驱动程序,但日志中没有该设备。即,没有mmcblk0任何东西。有关可能需要为电路板定义的一些值,请参见:DTS mmc entries。找到Linux的事实似乎与此矛盾,但是添加系统正在使用的MMC设备条目将很有用。我希望内核日志中有一些输出。另一种可能性是,某些东西是作为模块构建的,有望加载以使MMC可以访问。

获取最少的initramfs将为您提供一些诊断外壳程序的工具。您可以使用klibc或buildroot等来创建一个小的initramfs,它使您可以查看Linux设备节点,proc和sysfs值来诊断问题。不幸的是,这里有很多事情可能出错。但是,由于您具有Linux启动功能,因此即使不为最终系统保留initramfs,通常也很简单。