Issue regarding imx7 booting through SD card

I am trying to boot colibri imx7 by preparing the SD card based on the following link Boot From an SD Card / USB Stick / SATA drive | Toradex Developer Center
but I get the following sequence and it gets stuck at “Starting Kernel”.

CPU:   Freescale i.MX7D rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
DRAM:  1 GiB
PMIC:  RN5T567 LSIVER=0x01 OTPVER=0x0d
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Using default environment

In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX7 Dual 1GB (eMMC) V1.1A, Serial# 06794336
Net:   FEC0
Hit any key to stop autoboot:  0 
Colibri iMX7 # run sdboot
Booting from MMC/SD card...
reading zImage
6698208 bytes read in 304 ms (21 MiB/s)
reading imx7d-colibri-emmc-eval-v3.dtb
56570 bytes read in 19 ms (2.8 MiB/s)
Kernel image @ 0x81000000 [ 0x000000 - 0x6634e0 ]
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Loading Device Tree to 8ffef000, end 8ffffcf9 ... OK

Starting kernel ...

When i use the zImage of one of the Reference Multimedia Image
I can see the further logs while when i use the Reference Minimal Image it gets stuck at Starting Kernel.
Kindly support in the issue addressed.

Hi @pawas,

Welcome to our community :rocket: ! Please feel free to roam around and explore the topics that get your attention.

Could you please confirm the following information:

  • Which exact Colibri iMX7 are you using? It seems to be the iMX7D 1GB but can you please confirm the exact version?
  • Which Carrier Board are you using? Is this the Colibri Evaluation Board?
  • Which Images are you trying to flash to your board? Did you do any customization to our sample images?
  • What files do you have on your SD Card?

Finally, I’d like to remind you of the following passage of the article:

CAUTION

It is recommended to use SD booting only during development also because normal SD cards aren’t reliable for long-term usage. For a simple installation of bootable images please use our Toradex Easy Installer where available.

Therefore, would Toradex Easy Installer fit your current goal?

Best regards,

Hi @gclaudino.tx ,

Thank you for the reply.

  • Yes you are right ,I am using the Colibri imx7d 1gb v1.1A version with iris evaluation board.
  • I built the zImage using the colibri_imx7_defconfig from the git repository branch toradex_5.4-2.3.x-imx of the linux kernal.Similarly i built the dtb file for imx7d-colibri-emmc-eval-v3.dtb
  • I put the zImage and dtb file in a FAT partition of the SD card and the rootfs in ext4 partition. The rootfs i copied from one of the Reference Minimal Image.

Hi @pawas,

Can you please enable more logs on the kernel? You should set loglevel to 7 (The kernel’s command-line parameters — The Linux Kernel documentation). This other page discuss a little bit how to do it on TorizonCore but it should also work on the BSP.

Also, did you change the kernel configuration? If so, can you please share all the steps done and what has changed?

Moreover, can you please test if you can make it work with a default Toradex Image downloaded from our website? Toradex Download Links (Torizon, Linux BSP, WinCE and Partner Demos) | Toradex Developer Center. Please test with the kernel, device tree and rootfs files available from there.

Finally, I’d like to ask again if Toradex Easy Installer would not fit your requirements for this part of the project. Could you please share a bit about why?

Best regards,

Hi @gclaudino.tx ,

I tried to enable the logs with the settings you suggested but i cannot see anything after Starting kernel.
However if i just replace the zImage in SD card with the zImage in Reference Multimedia Image. I see the further logs as follows.

Model: Toradex Colibri iMX7 Dual 1GB (eMMC) V1.1A, Serial# 06794336
Net:   FEC0
Hit any key to stop autoboot:  0 
Colibri iMX7 # run sdboot
Booting from MMC/SD card...
reading zImage
8516096 bytes read in 379 ms (21.4 MiB/s)
reading imx7d-colibri-emmc-eval-v3.dtb
56570 bytes read in 20 ms (2.7 MiB/s)
Kernel image @ 0x81000000 [ 0x000000 - 0x81f200 ]
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Loading Device Tree to 8ffef000, end 8ffffcf9 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.193-5.7.0+git.f5d73fd6e9f8 (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP Fri Jun 24 10:15:32 UTC 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Toradex Colibri iMX7D 1GB (eMMC) on Colibri Evaluation Board V3
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0xbc000000
[    0.000000] percpu: Embedded 20 pages/cpu s51084 r8192 d22644 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: root=/dev/mmcblk1p2 ro rootwait console=tty1 console=ttymxc0,115200n8 consoleblank=0 video=mxsfb:640x480M-16@60
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 953976K/1048576K available (11264K kernel code, 875K rwdata, 4004K rodata, 1024K init, 430K bss, 29064K reserved, 65536K cma-res)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x314/0x4ec with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 8.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
[    0.000007] sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
[    0.000020] Switching to timer-based delay loop, resolution 125ns
[    0.000501] Switching to timer-based delay loop, resolution 41ns
[    0.000519] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000534] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.002007] Console: colour dummy device 80x30
[    0.002429] printk: console [tty1] enabled
[    0.002474] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.002507] pid_max: default: 32768 minimum: 301
[    0.002720] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002755] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003815] CPU: Testing write buffer coherency: ok
[    0.004867] Setting up static identity map for 0x80100000 - 0x80100060
[    0.005030] rcu: Hierarchical SRCU implementation.
[    0.008699] EFI services will not be available.
[    0.009010] smp: Bringing up secondary CPUs ...
[    0.009716] smp: Brought up 1 node, 1 CPU
[    0.009742] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.009760] CPU: All CPU(s) started in SVC mode.
[    0.010409] devtmpfs: initialized
[    0.021545] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.021852] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.021895] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.024529] pinctrl core: initialized pinctrl subsystem
[    0.025794] NET: Registered protocol family 16
[    0.032452] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.033847] cpuidle: using governor ladder
[    0.033874] cpuidle: using governor menu
[    0.034572] No ATAGs?
[    0.034649] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.034688] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.035009] Serial: AMBA PL011 UART driver
[    0.040545] imx7d-pinctrl 302c0000.iomuxc-lpsr: initialized IMX pinctrl driver
[    0.041234] debugfs: Directory 'dummy-iomuxc-gpr@30340000' with parent 'regmap' already present!
[    0.041619] imx7d-pinctrl 30330000.iomuxc: initialized IMX pinctrl driver
[    0.043729] vdd1p0d: Bringing 0uV into 800000-800000uV
[    0.044410] vdd1p2: supplied by regulator-dummy
[    0.065576] cryptd: max_cpu_qlen set to 1000
[    0.086030] mxs-dma 33000000.dma-apbh: initialized
[    0.087712] regulator-usbh-vbus GPIO handle specifies active low - ignored
[    0.087960] VCC_USB[1-4]: supplied by 5V
[    0.088441] vgaarb: loaded
[    0.089036] SCSI subsystem initialized
[    0.089604] usbcore: registered new interface driver usbfs
[    0.089679] usbcore: registered new interface driver hub
[    0.089749] usbcore: registered new device driver usb
[    0.089914] usb_phy_generic usbphynop1: usbphynop1 supply vcc not found, using dummy regulator
[    0.090415] usb_phy_generic usbphynop3: usbphynop3 supply vcc not found, using dummy regulator
[    0.090777] usb_phy_generic usbphynop2: usbphynop2 supply vcc not found, using dummy regulator
[    0.092168] i2c i2c-0: IMX I2C adapter registered
[    0.093087] i2c i2c-3: IMX I2C adapter registered
[    0.093388] pps_core: LinuxPPS API ver. 1 registered
[    0.093410] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.093460] PTP clock support registered
[    0.093766] Advanced Linux Sound Architecture Driver Initialized.
[    0.094638] Bluetooth: Core ver 2.22
[    0.094706] NET: Registered protocol family 31
[    0.094724] Bluetooth: HCI device and connection manager initialized
[    0.094748] Bluetooth: HCI socket layer initialized
[    0.094769] Bluetooth: L2CAP socket layer initialized
[    0.094800] Bluetooth: SCO socket layer initialized
[    0.095507] clocksource: Switched to clocksource arch_sys_counter
[    0.666814] VFS: Disk quotas dquot_6.6.0
[    0.666928] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.676709] thermal_sys: Registered thermal governor 'step_wise'
[    0.677097] NET: Registered protocol family 2
[    0.677345] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.678582] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.678646] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.678752] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.678908] TCP: Hash tables configured (established 8192 bind 8192)
[    0.679037] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.679108] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.679337] NET: Registered protocol family 1
[    0.679983] RPC: Registered named UNIX socket transport module.
[    0.680011] RPC: Registered udp transport module.
[    0.680027] RPC: Registered tcp transport module.
[    0.680042] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.680067] PCI: CLS 0 bytes, default 64
[    0.680870] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.684233] Initialise system trusted keyrings
[    0.684506] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.692605] NFS: Registering the id_resolver key type
[    0.692656] Key type id_resolver registered
[    0.692672] Key type id_legacy registered
[    0.740128] NET: Registered protocol family 38
[    0.740165] Key type asymmetric registered
[    0.740183] Asymmetric key parser 'x509' registered
[    0.740266] bounce: pool size: 64 pages
[    0.740329] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    0.740563] io scheduler mq-deadline registered
[    0.740585] io scheduler kyber registered
[    0.746911] debugfs: Directory 'dummy-src@30390000' with parent 'regmap' already present!
[    0.805653] 30860000.serial: ttymxc0 at MMIO 0x30860000 (irq = 51, base_baud = 1500000) is a IMX
[    1.541961] printk: console [ttymxc0] enabled
[    1.547252] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 52, base_baud = 1500000) is a IMX
[    1.556825] 30880000.serial: ttymxc2 at MMIO 0x30880000 (irq = 53, base_baud = 1500000) is a IMX
[    1.582561] brd: module loaded
[    1.594853] loop: module loaded
[    1.618900] pps pps0: new PPS source ptp0
[    1.626657] fec 30be0000.ethernet eth0: registered PHC device 0
[    1.632806] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.639470] ehci-pci: EHCI PCI platform driver
[    1.643996] ehci-mxc: Freescale On-Chip EHCI Host driver
[    1.650240] usbcore: registered new interface driver usb-storage
[    1.656446] usbcore: registered new interface driver usbserial_generic
[    1.663020] usbserial: USB Serial support registered for generic
[    1.670861] imx_usb 30b10000.usb: No over current polarity defined
[    1.677203] imx_usb 30b10000.usb: 30b10000.usb supply vbus not found, using dummy regulator
[    1.685933] imx_usb 30b20000.usb: No over current polarity defined
[    1.695088] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    1.700076] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    1.735521] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    1.741833] hub 1-0:1.0: USB hub found
[    1.745704] hub 1-0:1.0: 1 port detected
[    1.754630] rtc-ds1307 3-0068: oscillator failed, set time!
[    1.760554] rtc-ds1307 3-0068: registered as rtc0
[    1.766406] snvs_rtc 30370000.snvs:snvs-rtc-lp: registered as rtc1
[    1.772753] i2c /dev entries driver
[    1.777878] pps_ldisc: PPS line discipline registered
[    1.784599] imx2-wdt 30280000.wdog: timeout 60 sec (nowayout=0)
[    1.791082] CPUidle arm: CPU 0 failed to init idle CPU ops
[    1.796936] sdhci: Secure Digital Host Controller Interface driver
[    1.803130] sdhci: Copyright(c) Pierre Ossman
[    1.807577] Synopsys Designware Multimedia Card Interface Driver
[    1.813941] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.820926] sdhci-esdhc-imx 30b40000.usdhc: Got CD GPIO
[    1.860263] mmc0: SDHCI controller on 30b40000.usdhc [30b40000.usdhc] using ADMA
[    1.895919] mmc1: SDHCI controller on 30b60000.usdhc [30b60000.usdhc] using ADMA
[    1.908047] caam 30900000.caam: Entropy delay = 3200
[    1.914194] caam 30900000.caam: Instantiated RNG4 SH0
[    1.973607] caam 30900000.caam: Instantiated RNG4 SH1
[    1.978693] caam 30900000.caam: device ID = 0x0a16030000000000 (Era 8)
[    1.985237] caam 30900000.caam: job rings = 3, qi = 0
[    2.000168] mmc0: new high speed SDHC card at address 59b4
[    2.007317] mmcblk0: mmc0:59b4 USD00 14.7 GiB 
[    2.018440]  mmcblk0: p1 p2
[    2.024861] caam algorithms registered in /proc/crypto
[    2.031928] caam 30900000.caam: caam pkc algorithms registered in /proc/crypto
[    2.042748] caam_jr 30901000.jr0: registering rng-caam
[    2.049487] usbcore: registered new interface driver usbhid
[    2.055118] usbhid: USB HID core driver
[    2.063174] usbcore: registered new interface driver snd-usb-audio
[    2.083139] sgtl5000 0-000a: sgtl5000 revision 0x11
[    2.112577] mmc1: new HS200 MMC card at address 0001
[    2.118648] mmcblk1: mmc1:0001 Q2J54A 3.64 GiB 
[    2.123756] mmcblk1boot0: mmc1:0001 Q2J54A partition 1 2.00 MiB
[    2.130280] mmcblk1boot1: mmc1:0001 Q2J54A partition 2 2.00 MiB
[    2.136578] mmcblk1rpmb: mmc1:0001 Q2J54A partition 3 512 KiB, chardev (246:0)
[    2.146160]  mmcblk1: p1
[    2.149902] random: fast init done
[    2.180497] NET: Registered protocol family 10
[    2.186266] Segment Routing with IPv6
[    2.190113] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.196836] NET: Registered protocol family 17
[    2.201383] Key type dns_resolver registered
[    2.206277] imx-cpufreq-dt imx-cpufreq-dt: cpu speed grade 2 mkt segment 1 supported-hw 0x4 0x2
[    2.216483] Registering SWP/SWPB emulation handler
[    2.223430] registered taskstats version 1
[    2.227612] Loading compiled-in X.509 certificates
[    2.264509] vdd1p0d: supplied by DCDC3
[    2.270126] imx_usb 30b10000.usb: No over current polarity defined
[    2.276445] imx_usb 30b10000.usb: 30b10000.usb supply vbus not found, using dummy regulator
[    2.289728] imx_thermal tempmon: Extended Commercial CPU temperature grade - max:105C critical:105C passive:95C
[    2.306197] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    2.317731] rtc-ds1307 3-0068: hctosys: unable to read the hardware clock
[    2.338086] ALSA device list:
[    2.341073]   No soundcards found.
[    2.345265] VFS: Cannot open root device "mmcblk1p2" or unknown-block(179,34): error -6
[    2.353347] Please append a correct "root=" boot option; here are the available partitions:
[    2.361748] 0100           65536 ram0 
[    2.361750]  (driver?)
[    2.367885] 0101           65536 ram1 
[    2.367887]  (driver?)
[    2.374004] 0102           65536 ram2 
[    2.374006]  (driver?)
[    2.380139] 0103           65536 ram3 
[    2.380141]  (driver?)
[    2.386272] 0104           65536 ram4 
[    2.386274]  (driver?)
[    2.392392] 0105           65536 ram5 
[    2.392394]  (driver?)
[    2.398526] 0106           65536 ram6 
[    2.398528]  (driver?)
[    2.404644] 0107           65536 ram7 
[    2.404646]  (driver?)
[    2.410778] 0108           65536 ram8 
[    2.410780]  (driver?)
[    2.416909] 0109           65536 ram9 
[    2.416912]  (driver?)
[    2.423030] 010a           65536 ram10 
[    2.423031]  (driver?)
[    2.429249] 010b           65536 ram11 
[    2.429251]  (driver?)
[    2.435455] 010c           65536 ram12 
[    2.435457]  (driver?)
[    2.441674] 010d           65536 ram13 
[    2.441676]  (driver?)
[    2.447894] 010e           65536 ram14 
[    2.447896]  (driver?)
[    2.454100] 010f           65536 ram15 
[    2.454102]  (driver?)
[    2.460323] b300        15441920 mmcblk0 
[    2.460326]  driver: mmcblk
[    2.467152]   b301          512000 mmcblk0p1 b280ee3d-01
[    2.467154] 
[    2.473967]   b302        14928896 mmcblk0p2 b280ee3d-02
[    2.473968] 
[    2.480795] b320         3817472 mmcblk1 
[    2.480798]  driver: mmcblk
[    2.487624]   b321           32768 mmcblk1p1 1ce94364-01
[    2.487625] 
[    2.494438] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34)
[    2.502987] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,34) ]---

can you give some insight what additional settings are enabled in the kernel of Reference Multimedia Image compared to Reference Minimal Image.

The aim of the project requires to boot from the SD card as it will not be possible to interact with the toradex easy installer graphical interface.

Thanks

Hi @pawas,

I’d like to better understand how you carried out this test.

This is important to know for us to check if your SD Card is properly mounted and if the partitions are as intended with a reference image.

Have you checked the autoinstall property and the production programming article for Toradex Easy Installer? They may also fit your requirements. Could you please have a look on this page and check if this could be a suitable solution for you Production Programming for Linux | Toradex Developer Center?

Best regards,