cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pburkacki
Observer
Observer
721 Views
Registered: ‎01-23-2020

Failure to mount root when trying to boot an SD card.

Jump to solution

Hello,

for a while now I have been working with the ZCU102 rev1.0 dev board.  I have been booting it off of an SD card which contains images generated under PetaLinux 2019.2.  Now I am trying to boot a custom board, which is based on the ZCU102 rev1.0 board, off of an SD card. The problem I am running into is that the custom board appears to go through a normal Linux boot but gets stuck while trying to mount /dev/mmcblk0p2.  I have searched through various forums and saw related posts but have not been able to find a solution.

 

The SD card I am using is formatted as follows:

  • 500 MB fat32 partition labeled BOOT which contains BOOT.BIN and image.ub.
  • Remaining space of the 32 GB card is an ext4 partition labeled rootfs into which the root file system is extracted.

This is very standard and has always worked on the ZCU102 board.  In the FPGA bit stream I am using, I have two devices: psu_sd_0 and psu_sd_1.  The former corresponds to the SD card and the latter to eMMC.  When I run petalinux-config, I select psu_sd_0 as the primary device so that project-spec/configs/config shows the following:

 

CONFIG_SUBSYSTEM_PRIMARY_SD_PSU_SD_0_SELECT=y
CONFIG_SUBSYSTEM_SD_PSU_SD_1_SELECT=y
CONFIG_SUBSYSTEM_SD_PSU_SD_0_SELECT=y

 

 

Running mmc commands under u-boot shows that SD and eMMC devices are identified correctly.  In fact, using fatls and ext4ls, I can list the contents of both SD card partitions.  A colleague took this further and was able to create a test file on the ext4 partition under u-boot so card write access it not an issue.  Here is output of some u-boot commands:

 

ynqMP> mmc list
mmc@ff160000: 0 (SD)
mmc@ff170000: 1 (eMMC)


ZynqMP> fatls mmc 0:1
  8952808   BOOT.BIN
 18129928   image.ub

2 file(s), 0 dir(s)


ZynqMP> ext4ls mmc 0:2
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 tmp
<DIR>       4096 dev
<DIR>       4096 bin
<DIR>       4096 media
<DIR>       4096 usr
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 home
<DIR>       4096 var
<DIR>       4096 run
<DIR>       4096 sys
<DIR>       4096 etc
<DIR>       4096 sbin
<DIR>       4096 lib
<DIR>       4096 boot
<DIR>       4096 proc

 

 

  The following is the kernel boot log:

 

NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v2.0(release):xilinx-v2019.1-12-g713dace9
NOTICE:  BL31: Built : 22:13:01, Dec 18 2020
PMUFW:  v1.1


U-Boot 2019.01 (Dec 18 2020 - 22:13:46 +0000)

Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
DRAM:  8 GiB
usb dr_mode not found
EL Level:       EL2
Chip ID:        zu4eg
MMC:   mmc@ff160000: 0, mmc@ff170000: 1
Loading Environment from SPI Flash... SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Bootmode: SD_MODE
Reset reason:   EXTERNAL 
Net:   ZYNQ GEM: ff0b0000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@ff0b0000ZYNQ GEM: ff0c0000, phyaddr ffffffff, interface rgmii-id

Warning: ethernet@ff0c0000 (eth1) using random MAC address - 2a:3b:23:60:7a:d8
, eth1: ethernet@ff0c0000
U-BOOT for custom_board

ethernet@ff0b0000 Waiting for PHY auto negotiation to complete......................................... TIMEOUT!
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
DHCP client bound to address 192.168.16.33 (8148 ms)
Hit any key to stop autoboot:  0 
Device: mmc@ff160000
Manufacturer ID: 27
OEM: 5048
Name: SD32G 
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
18129940 bytes read in 1209 ms (14.3 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x10000104
     Data Size:    18082304 Bytes = 17.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   864b73d6e80e0fb73ac3e08e5631968ef263c920
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x1113ec08
     Data Size:    45720 Bytes = 44.6 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   d0335fe9f27a5d96dc3e4113e3a57efa59774a37
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x1113ec08
   Loading Kernel Image ... OK
   Loading Device Tree to 0000000007ff1000, end 0000000007fff297 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.0-xilinx-v2019.2 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Fri Dec 10
[    0.000000] Machine model: ZynqMP ZCU102 Rev1.0
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] random: get_random_bytes called from start_kernel+0x94/0x3f8 with crng_init=0
[    0.000000] percpu: Embedded 23 pages/cpu @(____ptrval____) s53656 r8192 d32360 u94208
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 2068227
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw root
[    0.000000] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.000000] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000] software IO TLB: mapped [mem 0x6bc00000-0x6fc00000] (64MB)
[    0.000000] Memory: 7913536K/8387584K available (10748K kernel code, 634K rwdata, 5424K rodata, 832K init, 3)
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    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: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x170f8de2d3, max_idle_ns: 440s
[    0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511101ns
[    0.008243] Console: colour dummy device 80x25
[    0.012393] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.98 BogoMIPS (lpj=)
[    0.022756] pid_max: default: 32768 minimum: 301
[    0.027454] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.034192] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes)
[    0.042137] ASID allocator initialised with 32768 entries
[    0.046854] rcu: Hierarchical SRCU implementation.
[    0.051882] EFI services will not be available.
[    0.056174] smp: Bringing up secondary CPUs ...
[    0.060837] Detected VIPT I-cache on CPU1
[    0.060866] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.061174] Detected VIPT I-cache on CPU2
[    0.061193] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.061478] Detected VIPT I-cache on CPU3
[    0.061497] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.061541] smp: Brought up 1 node, 4 CPUs
[    0.096027] SMP: Total of 4 processors activated.
[    0.100700] CPU features: detected: 32-bit EL0 Support
[    0.107338] CPU: All CPU(s) started at EL2
[    0.109880] alternatives: patching kernel code
[    0.115189] devtmpfs: initialized
[    0.122692] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.127266] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.138983] xor: measuring software checksum speed
[    0.177473]    8regs     :  2375.000 MB/sec
[    0.217500]    8regs_prefetch:  2052.000 MB/sec
[    0.257528]    32regs    :  2724.000 MB/sec
[    0.297557]    32regs_prefetch:  2308.000 MB/sec
[    0.297597] xor: using function: 32regs (2724.000 MB/sec)
[    0.301907] pinctrl core: initialized pinctrl subsystem
[    0.307737] NET: Registered protocol family 16
[    0.311808] audit: initializing netlink subsys (disabled)
[    0.316936] audit: type=2000 audit(0.268:1): state=initialized audit_enabled=0 res=1
[    0.324589] cpuidle: using governor menu
[    0.328612] vdso: 2 pages (1 code @ (____ptrval____), 1 data @ (____ptrval____))
[    0.335815] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.343237] DMA: preallocated 256 KiB pool for atomic allocations
[    0.363284] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.431336] raid6: int64x1  gen()   448 MB/s
[    0.499284] raid6: int64x1  xor()   450 MB/s
[    0.567393] raid6: int64x2  gen()   684 MB/s
[    0.635374] raid6: int64x2  xor()   598 MB/s
[    0.703430] raid6: int64x4  gen()   980 MB/s
[    0.771468] raid6: int64x4  xor()   736 MB/s
[    0.839512] raid6: int64x8  gen()  1163 MB/s
[    0.907532] raid6: int64x8  xor()   758 MB/s
[    0.975579] raid6: neonx1   gen()   736 MB/s
[    1.043634] raid6: neonx1   xor()   879 MB/s
[    1.111679] raid6: neonx2   gen()  1130 MB/s
[    1.179726] raid6: neonx2   xor()  1172 MB/s
[    1.247784] raid6: neonx4   gen()  1482 MB/s
[    1.315811] raid6: neonx4   xor()  1416 MB/s
[    1.383876] raid6: neonx8   gen()  1541 MB/s
[    1.451911] raid6: neonx8   xor()  1459 MB/s
[    1.451948] raid6: using algorithm neonx8 gen() 1541 MB/s
[    1.455908] raid6: .... xor() 1459 MB/s, rmw enabled
[    1.460839] raid6: using neon recovery algorithm
[    1.466265] SCSI subsystem initialized
[    1.469322] usbcore: registered new interface driver usbfs
[    1.474630] usbcore: registered new interface driver hub
[    1.479905] usbcore: registered new device driver usb
[    1.484948] media: Linux media interface: v0.10
[    1.489412] videodev: Linux video capture interface: v2.00
[    1.494860] pps_core: LinuxPPS API ver. 1 registered
[    1.499768] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.508862] PTP clock support registered
[    1.512761] EDAC MC: Ver: 3.0.0
[    1.516250] zynqmp-ipi-mbox mailbox@ff990400: Probed ZynqMP IPI Mailbox driver.
[    1.523367] FPGA manager framework
[    1.526699] Advanced Linux Sound Architecture Driver Initialized.
[    1.532837] Bluetooth: Core ver 2.22
[    1.536121] NET: Registered protocol family 31
[    1.540516] Bluetooth: HCI device and connection manager initialized
[    1.546832] Bluetooth: HCI socket layer initialized
[    1.551674] Bluetooth: L2CAP socket layer initialized
[    1.556707] Bluetooth: SCO socket layer initialized
[    1.561937] clocksource: Switched to clocksource arch_sys_counter
[    1.567761] VFS: Disk quotas dquot_6.6.0
[    1.571523] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.583665] NET: Registered protocol family 2
[    1.584060] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes)
[    1.590545] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
[    1.598012] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    1.605080] TCP: Hash tables configured (established 65536 bind 65536)
[    1.610838] UDP hash table entries: 4096 (order: 5, 131072 bytes)
[    1.616951] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
[    1.623523] NET: Registered protocol family 1
[    1.627869] RPC: Registered named UNIX socket transport module.
[    1.633518] RPC: Registered udp transport module.
[    1.638192] RPC: Registered tcp transport module.
[    1.642854] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.650122] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.656491] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.664962] Initialise system trusted keyrings
[    1.668525] workingset: timestamp_bits=62 max_order=21 bucket_order=0
[    1.675572] NFS: Registering the id_resolver key type
[    1.679892] Key type id_resolver registered
[    1.684033] Key type id_legacy registered
[    1.688016] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.694684] jffs2: version 2.2. (NAND) �ũ 2001-2006 Red Hat, Inc.
[    2.782403] NET: Registered protocol family 38
[    2.841823] Key type asymmetric registered
[    2.841862] Asymmetric key parser 'x509' registered
[    2.845158] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    2.852483] io scheduler noop registered
[    2.856372] io scheduler deadline registered
[    2.860630] io scheduler cfq registered (default)
[    2.865288] io scheduler mq-deadline registered
[    2.869782] io scheduler kyber registered
[    2.916961] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.921425] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.928427] brd: module loaded
[    2.932337] loop: module loaded
[    2.933216] mtdoops: mtd device (mtddev=name/number) must be supplied
[    2.938392] libphy: Fixed MDIO Bus: probed
[    2.941479] tun: Universal TUN/TAP device driver, 1.6
[    2.945519] CAN device driver interface
[    2.950284] usbcore: registered new interface driver asix
[    2.954569] usbcore: registered new interface driver ax88179_178a
[    2.960605] usbcore: registered new interface driver cdc_ether
[    2.966401] usbcore: registered new interface driver net1080
[    2.972026] usbcore: registered new interface driver cdc_subset
[    2.977906] usbcore: registered new interface driver zaurus
[    2.983451] usbcore: registered new interface driver cdc_ncm
[    2.989602] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.995533] ehci-pci: EHCI PCI platform driver
[    3.000246] usbcore: registered new interface driver uas
[    3.005255] usbcore: registered new interface driver usb-storage
[    3.011719] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    3.018436] i2c /dev entries driver
[    3.023679] usbcore: registered new interface driver uvcvideo
[    3.027541] USB Video Class driver (1.1.1)
[    3.032641] Bluetooth: HCI UART driver ver 2.3
[    3.036023] Bluetooth: HCI UART protocol H4 registered
[    3.041126] Bluetooth: HCI UART protocol BCSP registered
[    3.046419] Bluetooth: HCI UART protocol LL registered
[    3.051506] Bluetooth: HCI UART protocol ATH3K registered
[    3.056886] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    3.063135] Bluetooth: HCI UART protocol Intel registered
[    3.068477] Bluetooth: HCI UART protocol QCA registered
[    3.073678] usbcore: registered new interface driver bcm203x
[    3.079298] usbcore: registered new interface driver bpa10x
[    3.084837] usbcore: registered new interface driver bfusb
[    3.090285] usbcore: registered new interface driver btusb
[    3.095708] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    3.101374] usbcore: registered new interface driver ath3k
[    3.106904] EDAC MC: ECC not enabled
[    3.110512] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.me)
[    3.123159] sdhci: Secure Digital Host Controller Interface driver
[    3.128582] sdhci: Copyright(c) Pierre Ossman
[    3.132905] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.138898] ledtrig-cpu: registered to indicate activity on CPUs
[    3.144543] zynqmp_firmware_probe Platform Management API v1.1
[    3.150297] zynqmp_firmware_probe Trustzone version v1.0
[    3.158373] zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: zynqmp pinctrl initialized
[    3.186223] zynqmp_clk_mux_get_parent() getparent failed for clock: lpd_wdt, ret = -22
[    3.188942] alg: No test for xilinx-zynqmp-aes (zynqmp-aes)
[    3.194045] zynqmp_aes zynqmp_aes: AES Successfully Registered
[    3.194045] 
[    3.201576] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384)
[    3.207732] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa)
[    3.213290] usbcore: registered new interface driver usbhid
[    3.218596] usbhid: USB HID core driver
[    3.224725] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    3.229207] usbcore: registered new interface driver snd-usb-audio
[    3.235902] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    3.243045] Initializing XFRM netlink socket
[    3.246788] NET: Registered protocol family 10
[    3.251474] Segment Routing with IPv6
[    3.254842] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.260970] NET: Registered protocol family 17
[    3.265057] NET: Registered protocol family 15
[    3.269472] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to.
[    3.282385] can: controller area network core (rev 20170425 abi 9)
[    3.288520] NET: Registered protocol family 29
[    3.292906] can: raw protocol (rev 20170425)
[    3.297143] can: broadcast manager protocol (rev 20170425 t)
[    3.302768] can: netlink gateway (rev 20170425) max_hops=1
[    3.308448] Bluetooth: RFCOMM TTY layer initialized
[    3.313067] Bluetooth: RFCOMM socket layer initialized
[    3.318184] Bluetooth: RFCOMM ver 1.11
[    3.321882] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.327161] Bluetooth: BNEP filters: protocol multicast
[    3.332354] Bluetooth: BNEP socket layer initialized
[    3.337283] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.343166] Bluetooth: HIDP socket layer initialized
[    3.348233] 9pnet: Installing 9P2000 support
[    3.352351] Key type dns_resolver registered
[    3.357007] registered taskstats version 1
[    3.360645] Loading compiled-in X.509 certificates
[    3.365731] Btrfs loaded, crc32c=crc32c-generic
[    3.376220] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 43, base_baud = 6249375) is a xuartps
[    3.385947] console [ttyPS0] enabled
[    3.385947] console [ttyPS0] enabled
[    3.389539] bootconsole [cdns0] disabled
[    3.389539] bootconsole [cdns0] disabled
[    3.397663] ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 44, base_baud = 6249375) is a xuartps
[    3.410310] GPIO IRQ not connected
[    3.413696] XGpio: gpio@a0020000: registered, base is 506
[    3.419096] GPIO IRQ not connected
[    3.422608] XGpio: gpio@a0020000: dual channel registered, base is 498
[    3.430048] of-fpga-region fpga-full: FPGA Region probed
[    3.435948] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    3.443055] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    3.450163] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    3.457263] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    3.464370] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    3.471474] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    3.478579] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    3.485684] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    3.492860] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    3.499966] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    3.507067] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    3.514169] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    3.521278] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    3.528381] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    3.535487] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    3.542590] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    3.550570] m25p80 spi0.0: unrecognized JEDEC id bytes: 00, 00, 00
[    3.557076] macb ff0b0000.ethernet: Not enabling partial store and forward
[    3.564486] libphy: MACB_mii_bus: probed
[    3.570767] macb ff0b0000.ethernet eth0: Could not attach to PHY
[    3.585993] zynqmp_pll_disable() clock disable failed for apll_int, ret = -13
[    3.602560] macb ff0c0000.ethernet: Not enabling partial store and forward
[    3.609895] libphy: MACB_mii_bus: probed
[    3.616155] macb ff0c0000.ethernet eth0: Could not attach to PHY
[    3.646540] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    3.653058] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM
[    3.659538] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM
[    3.666017] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM
[    3.673476] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.681948] dwc3 fe200000.dwc3: Failed to get clk 'ref': -2
[    3.687877] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.693369] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.701287] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x0000000202010810
[    3.710697] xhci-hcd xhci-hcd.0.auto: irq 50, io mem 0xfe200000
[    3.716824] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[    3.725084] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.732301] usb usb1: Product: xHCI Host Controller
[    3.737169] usb usb1: Manufacturer: Linux 4.19.0-xilinx-v2019.2 xhci-hcd
[    3.743862] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.749012] hub 1-0:1.0: USB hub found
[    3.752774] hub 1-0:1.0: 1 port detected
[    3.756882] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.762371] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.770024] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0  SuperSpeed
[    3.776757] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 4.19
[    3.785021] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.792241] usb usb2: Product: xHCI Host Controller
[    3.797110] usb usb2: Manufacturer: Linux 4.19.0-xilinx-v2019.2 xhci-hcd
[    3.803803] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.808916] hub 2-0:1.0: USB hub found
[    3.812679] hub 2-0:1.0: 1 port detected
[    3.817096] dwc3-of-simple ff9e0000.usb1: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.825362] dwc3 fe300000.dwc3: Failed to get clk 'ref': -2
[    3.832043] pca953x 0-0020: 0-0020 supply vcc not found, using dummy regulator
[    3.839292] pca953x 0-0020: Linked as a consumer to regulator.0
[    3.845682] pca953x 0-0020: failed reading register
[    3.850583] pca953x 0-0020: Dropping the link to regulator.0
[    3.856362] pca953x 0-0021: 0-0021 supply vcc not found, using dummy regulator
[    3.863612] pca953x 0-0021: Linked as a consumer to regulator.0
[    3.869593] pca953x 0-0021: failed reading register
[    3.874487] pca953x 0-0021: Dropping the link to regulator.0
[    3.880333] pca954x 0-0075: probe failed
[    3.884269] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 32
[    3.891072] pca954x 1-0074: probe failed
[    3.895151] pca954x 1-0075: probe failed
[    3.899091] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 33
[    3.907662] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s
[    3.915090] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    3.922583] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1199880 KHz
[    3.930027] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 1199999 KHz
[    3.969822] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    4.013934] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    4.034505] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    4.041585] rtc_zynqmp ffa60000.rtc: setting system clock to 2020-12-19 14:26:14 UTC (1608387974)
[    4.050462] of_cfs_init
[    4.052913] of_cfs_init: OK
[    4.055840] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    4.196976] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    4.203505] clk: Not disabling unused clocks
[    4.207771] ALSA device list:
[    4.210724]   No soundcards found.
[    4.214437] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    4.223043] cfg80211: failed to load regulatory.db
[    4.228064] Waiting for root device /dev/mmcblk0p2...

 

 

From above output, it appears that u-boot and the mmc driver correctly identify both mmc devices:

 

MMC:   mmc@ff160000: 0, mmc@ff170000: 1
...
[    3.969822] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    4.013934] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit

 

 

But when I add debug code in the kernel, one of the functions called by the mmc driver is reporting timeouts while trying to attach the SD card, -110 which is ETIMEDOUT.

[    3.957722] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    3.981988] mmc_send_app_op_cond(155): ====> ocr = 0x0
[    3.990917] mmc_send_app_op_cond(162): ====> err = -110
[    4.008132] mmc_attach_sd(1274): ====> err = -110

 

Eventually, prepare_namespace() is called to mount disks, etc.  As it is waiting for the root device to initialize, it keeps calling name_to_dev_t(saved_root_name).  When debug code is added, it shows that a lookup of /dev/mmcblk0p2 fails:

[    4.295561] name_to_dev_t(252): 1 blk_lookup_devt(mmcblk0p2), res = 0
[    4.302525] name_to_dev_t(270): 2 blk_lookup_devt(mmcblk0p), res = 0
[    4.309398] name_to_dev_t(280): 3 blk_lookup_devt(mmcblk0), res = 0
[    4.316172] name_to_dev_t(286): case is fail

 

It's as though the device is not found. I think that this may be a configuration issue but I am not sure.  I appreciate any help.

Regards,

Paul

0 Kudos
1 Solution

Accepted Solutions
sandeepg
Moderator
Moderator
468 Views
Registered: ‎04-24-2017

Hi @pburkacki ,

Can you try adding no-1-8-v property for your SD controller.

 

&sdhci0 {
	no-1-8-v;
};

 

 

Yes for your custom board you need to define the board specific device-tree nodes based on your schematics below are few basic ones.

  1. I2C Muxes.
  2. GPIO Keys.
  3. LED's
  4. IO Channels
  5. Pin Controls
  6. EEPROM
  7. Ethernet PHY's
  8. Ethernet MAC
  9. SATA timing calibrations.
  10. External Clock Sources.
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
7 Replies
ksloatdesignlinx
Explorer
Explorer
661 Views
Registered: ‎02-24-2020

I would check that your card detect line is setup properly and registered with Linux. Another way to debug this, could be to setup your system to boot from a ramdisk image, and then see if the SD card properly mounts in general.

Ken Sloat - Embedded Software Engineer
https://www.designlinxhs.com
0 Kudos
pburkacki
Observer
Observer
598 Views
Registered: ‎01-23-2020

Hi Ken,

thank you for your reply.  We are currently checking the CD line.  I have not tried booting with a ramdisk but I did try JTAG.  JTAG boots all the way to the login prompt but then it appears to either not receive input from the keyboard or suffer some sort of a freeze.  In other words, key presses are not echoed to the console.  I will try a ramdisk boot though.

In terms of the registration with the kernel, could you expand on that?  It is possible that this is the root cause of the issue we are running into.

Regards,

Paul

0 Kudos
sandeepg
Moderator
Moderator
564 Views
Registered: ‎04-24-2017

Hi @pburkacki ,

Can you post the <plnx-proj-root>images/linux/system.dtb content ? Below is the command to decompile dtb to dts.

dtc -I dtb -O dts -o system.dts system.dtb

 

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
pburkacki
Observer
Observer
556 Views
Registered: ‎01-23-2020

Hi @sandeepg,

I have attached the decompiled device tree.

 

Thanks for your help,

Paul

0 Kudos
pburkacki
Observer
Observer
543 Views
Registered: ‎01-23-2020

Hi @sandeepg,

there is one more thing I wanted to mention.  While I started out with the ZCU102 rev1.0 board and the custom board is based on that design, obviously there are differences.  For example, the ZCU102 board uses the zu9eg chip whereas the custom board uses the zu4eg chip.  At this time, I am using device tree files provided with the ZCU102 board.  I believe petalinux generates at least some of the device tree nodes based on the FPGA bit stream supplied using the `petalinux-config --get-hw-description <bit stream>` command.  However, I suspect that there are some entries which may need to be changed (via system-user.dtsi) so that they match the new board design.  Though I am not sure, this might be the source of the SD boot problem and some other issues I have seen so far as well.  I realize that this might be a topic for a separate post but perhaps you could suggest a good resource, a tutorial document or video, which would explain the changes I would need to make to generate a proper device tree file.

Thanks again for your help.

Paul

0 Kudos
sandeepg
Moderator
Moderator
469 Views
Registered: ‎04-24-2017

Hi @pburkacki ,

Can you try adding no-1-8-v property for your SD controller.

 

&sdhci0 {
	no-1-8-v;
};

 

 

Yes for your custom board you need to define the board specific device-tree nodes based on your schematics below are few basic ones.

  1. I2C Muxes.
  2. GPIO Keys.
  3. LED's
  4. IO Channels
  5. Pin Controls
  6. EEPROM
  7. Ethernet PHY's
  8. Ethernet MAC
  9. SATA timing calibrations.
  10. External Clock Sources.
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

0 Kudos
pburkacki
Observer
Observer
440 Views
Registered: ‎01-23-2020

Hi @sandeepg,

the device tree change you posted worked but required a couple more lines in our case.  Once they were added, the board was able to boot off of the SD card.  Thank you for your help on that.  The final version of what was added to system-user.dtsi looks like this:

&sdhci0 {
        no-1-8-v;
        disable-wp;
        broken-cd;
};

 

Also, the MACHINE_NAME string configured by running petalinux-config had to be set to "template" rather than "zcu102-rev1.0".  With those changes, our board now boots off of the SD card.  My understanding is that, eventually, the "template" string will have to be replaced with one which is appropriate for our board.  Is that right?

As you mentioned above, further changes will be required in the device tree.  Can you suggest a workflow which could be used to do so?  I have the schematics for the board but I am not exactly sure about the process required to translate that data into device tree nodes.  Many of the devices which appear in the device tree are added automatically by PetaLinux when the XSA files is imported and processed.  However, for those nodes which need to be changed (or added from scratch), is there a resource which would provide this sort of guidance?  I would appreciate any information or links you might have access to.

Regards,

Paul

0 Kudos