Binary doesn't run on CM4 with release as build type

Dear Toradex team,

I tried to run diffrent compiled binaries of the demo applications from NXP (SDK_2.7.0_MIMX8QX6xxxFZ) on the colibri imx8x for the CM4. All tried applications are executed successfully when I set the build type to debug, but if I set the build type to release the binaries fail at boot time.

Does anyone know what I’m doing wrong or whether it’s a demo application problem?

Every help is appreciated.

Hi @developerTirol

Thanks for writing to the Toradex Community!

Could you provide the Software version of your module?

Regarding your issue, could you provide some error log?

Best regards,
Jaski

Dear @jaski.tx,

Linux kernel: 4.14.117-3.0.2+ge43e3a2
Image: Console-Image 3.0b2
U-Boot: 2018.03_4.14.78_1.0.0

Boot log:

U-Boot 2018.03-toradex_imx_v2018.03_4.14.78_1.0.0_ga-bringup+g92d0497 (Feb 13 2020 - 10:23:19 +0000)

CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 44C
DRAM:  2 GiB
PMIC:  device id: 0x40, revision id: 0x20, emrev 0, prog id fff
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX8 QuadXPlus 2GB Wi-Fi / BT IT V1.0B, Serial# 06494316

 BuildInfo:
  - SCFW cb6f758b, SECO-FW d7523fe8, IMX-MKIMAGE dd023400, ATF a-20190
  - U-Boot 2018.03-toradex_imx_v2018.03_4.14.78_1.0.0_ga-bringup+g92d0497

flash target is MMC:0
Net:   eth0: ethernet@5b040000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
12776 bytes read in 12 ms (1 MiB/s)
## Starting auxiliary core at 0x80280000 ...
Power on aux core 0
Copy image from 0x80280000 to 0x34fe0000
Start M4
bootaux complete
Scanning mmc 0:1...
Found U-Boot script /boot.scr
1202 bytes read in 8 ms (146.5 KiB/s)
## Executing script at 86000000
80891 bytes read in 9 ms (8.6 MiB/s)
23104000 bytes read in 463 ms (47.6 MiB/s)
## Flattened Device Tree blob at 84000000
   Booting using the fdt blob at 0x84000000
   Loading Device Tree to 00000000fd668000, end 00000000fd67ebfa ... OK
/dma-controller@591F0000, 62300
/dma-controller@599F0000, 63188
/dma-controller@5a1f0000, 61424
/dma-controller@5a1f0000, 61424

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.117-3.0.2+ge43e3a2 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Tue Mar 3 15:37:38 UTC 2020
[    0.000000] Boot CPU: AArch64 Processor [410fd042]
[    0.000000] Machine model: Toradex Colibri iMX8QXP/DX on Colibri Evaluation Board V3
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000096000000, size 960 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x0000000090400000, size 28 MiB
[    0.000000] OF: reserved mem: initialized node rpmsg_dma@0x90400000, compatible id shared-dma-pool
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x00000000ffffffff]
[    0.000000] NUMA: NODE_DATA [mem 0xfff7d300-0xfff7f0ff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000080200000-0x00000000ffffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080200000-0x0000000083ffffff]
[    0.000000]   node   0: [mem 0x0000000086200000-0x000000008fffffff]
[    0.000000]   node   0: [mem 0x0000000094c00000-0x00000000ffffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
[    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] percpu: Embedded 24 pages/cpu s57624 r8192 d32488 u98304
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 487432
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: root=PARTUUID=1de869f2-02 ro rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 811520K/1982464K available (13308K kernel code, 1698K rwdata, 6244K rodata, 1280K init, 429K bss, 187904K reserved, 983040K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008d80000   ( 13312 KB)
[    0.000000]     .rodata : 0xffff000008d80000 - 0xffff0000093a0000   (  6272 KB)
[    0.000000]       .init : 0xffff0000093a0000 - 0xffff0000094e0000   (  1280 KB)
[    0.000000]       .data : 0xffff0000094e0000 - 0xffff000009688a00   (  1699 KB)
[    0.000000]        .bss : 0xffff000009688a00 - 0xffff0000096f4098   (   430 KB)
[    0.000000]     fixed   : 0xffff7dfffe7f9000 - 0xffff7dfffec00000   (  4124 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000008000 - 0xffff7e0002000000   (    31 MB actual)
[    0.000000]     memory  : 0xffff800000200000 - 0xffff800080000000   (  2046 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000]  Tasks RCU enabled.
[    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] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000051b00000
[    0.000000] arch_timer: cp15 timer(s) running at 8.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 440795202120 ns
[    0.000004] sched_clock: 56 bits at 8MHz, resolution 125ns, wraps every 2199023255500ns
[    0.003196] Console: colour dummy device 80x25
[    0.003901] console [tty0] enabled
[    0.003969] Calibrating delay loop (skipped), value calculated using timer frequency.. 16.00 BogoMIPS (lpj=32000)
[    0.003997] pid_max: default: 32768 minimum: 301
[    0.004085] Security Framework initialized
[    0.004772] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.005127] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.005170] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.005197] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.019917] ASID allocator initialised with 32768 entries
[    0.027914] Hierarchical SRCU implementation.
[    0.037246] *****Initialized MU
[    0.037291] ***** imx8_init_pm_domains *****
[    0.038478] CPU identified as i.MX8QXP, silicon rev 1.1
[    0.040244] EFI services will not be available.
[    0.048161] smp: Bringing up secondary CPUs ...
[    0.076568] Detected VIPT I-cache on CPU1
[    0.076598] GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000
[    0.076632] CPU1: Booted secondary processor [410fd042]
[    0.104606] Detected VIPT I-cache on CPU2
[    0.104625] GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000
[    0.104645] CPU2: Booted secondary processor [410fd042]
[    0.132665] Detected VIPT I-cache on CPU3
[    0.132683] GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000
[    0.132700] CPU3: Booted secondary processor [410fd042]
[    0.132764] smp: Brought up 1 node, 4 CPUs
[    0.132872] SMP: Total of 4 processors activated.
[    0.132886] CPU features: detected feature: GIC system register CPU interface
[    0.132903] CPU features: detected feature: 32-bit EL0 Support
[    0.132918] CPU features: detected feature: Kernel page table isolation (KPTI)
[    0.137616] CPU: All CPU(s) started at EL2
[    0.137641] alternatives: patching kernel code
[    0.138397] devtmpfs: initialized
[    0.151868] random: get_random_u32 called from bucket_table_alloc+0x104/0x268 with crng_init=0
[    0.152306] Registered cp15_barrier emulation handler
[    0.152331] Registered setend emulation handler
[    0.152591] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.152650] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.178970] pinctrl core: initialized pinctrl subsystem
[    0.181351] DMI not present or invalid.
[    0.181739] NET: Registered protocol family 16
[    0.184397] cpuidle: using governor menu
[    0.185907] vdso: 2 pages (1 code @ ffff000008d86000, 1 data @ ffff0000094e4000)
[    0.185946] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.192781] DMA: preallocated 256 KiB pool for atomic allocations
[    0.193570] Serial: AMBA PL011 UART driver
[    0.193746] imx rpmsg driver is registered.
[    0.196218] MU and Power domains initialized
[    0.196247] ***** imx8qxp_clocks_init *****
[    0.253780] imx8qxp-pinctrl iomuxc: initialized IMX pinctrl driver
[    0.276349] mxs_phy 5b100000.usbphy: 5b100000.usbphy supply phy-3p0 not found, using dummy regulator
[    0.288629] MU is ready for cross core communication!
[    0.288860] imx-rpmsg 90000000.rpmsg: assigned reserved memory node rpmsg_dma@0x90400000
[    0.289363] virtio_rpmsg_bus virtio0: rpmsg host is online
[    0.310326] virtio_rpmsg_bus virtio1: rpmsg host is online
[    0.327750] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.349124] ACPI: Interpreter disabled.
[    0.359708] vgaarb: loaded
[    0.360059] SCSI subsystem initialized
[    0.360531] usbcore: registered new interface driver usbfs
[    0.360600] usbcore: registered new interface driver hub
[    0.360693] usbcore: registered new device driver usb
[    0.361455] usb_phy_generic usbphynop1: usbphynop1 supply vcc not found, using dummy regulator
[    0.364226] i2c i2c-16: LPI2C adapter registered
[    0.365611] i2c i2c-17: LPI2C adapter registered
[    0.366994] media: Linux media interface: v0.10
[    0.367057] Linux video capture interface: v2.00
[    0.367254] pps_core: LinuxPPS API ver. 1 registered
[    0.367271] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.367306] PTP clock support registered
[    0.367543] EDAC MC: Ver: 3.0.0
[    0.367838] dmi: Firmware registration failed.
[    0.368675] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.369328] Advanced Linux Sound Architecture Driver Initialized.
[    0.370012] Bluetooth: Core ver 2.22
[    0.370078] NET: Registered protocol family 31
[    0.370091] Bluetooth: HCI device and connection manager initialized
[    0.370113] Bluetooth: HCI socket layer initialized
[    0.370129] Bluetooth: L2CAP socket layer initialized
[    0.370179] Bluetooth: SCO socket layer initialized
[    0.371016] clocksource: Switched to clocksource arch_sys_counter
[    0.371183] VFS: Disk quotas dquot_6.6.0
[    0.371252] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.371402] pnp: PnP ACPI: disabled
[    0.378238] NET: Registered protocol family 2
[    0.378891] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.379112] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.379346] TCP: Hash tables configured (established 16384 bind 16384)
[    0.379465] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.379527] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.379696] NET: Registered protocol family 1
[    0.380370] RPC: Registered named UNIX socket transport module.
[    0.380389] RPC: Registered udp transport module.
[    0.380403] RPC: Registered tcp transport module.
[    0.380416] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.381588] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.382066] kvm [1]: 8-bit VMID
[    0.383167] kvm [1]: GICv3: no GICV resource entry
[    0.383182] kvm [1]: disabling GICv2 emulation
[    0.383216] kvm [1]: GIC system register CPU interface enabled
[    0.383293] kvm [1]: vgic interrupt IRQ1
[    0.383385] kvm [1]: Hyp mode initialized successfully
[    0.385992] audit: initializing netlink subsys (disabled)
[    0.386124] audit: type=2000 audit(0.380:1): state=initialized audit_enabled=0 res=1
[    0.386500] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.393451] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.394138] NFS: Registering the id_resolver key type
[    0.394181] Key type id_resolver registered
[    0.394193] Key type id_legacy registered
[    0.394212] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.394245] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.394911] 9p: Installing v9fs 9p2000 file system support
[    0.400270] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.400306] io scheduler noop registered
[    0.400465] io scheduler cfq registered (default)
[    0.400481] io scheduler mq-deadline registered
[    0.400495] io scheduler kyber registered
[    0.418635] imx6q-pcie 5f010000.pcie: 5f010000.pcie supply epdev_on not found, using dummy regulator
[    0.418920] OF: PCI: host bridge /pcie@0x5f010000 ranges:
[    0.418942] OF: PCI:   No bus range found for /pcie@0x5f010000, using [bus 00-ff]
[    0.418969] OF: PCI:    IO 0x7ff80000..0x7ff8ffff -> 0x00000000
[    0.418996] OF: PCI:   MEM 0x70000000..0x7fefffff -> 0x70000000
[    0.423547] imx6q-pcie 5f010000.pcie: pcie phy pll is locked.
[    0.556530] imx6q-pcie 5f010000.pcie: Link: Gen2 disabled
[    0.556551] imx6q-pcie 5f010000.pcie: Link up, Gen1
[    0.558113] imx6q-pcie 5f010000.pcie: PCI host bridge to bus 0000:00
[    0.558150] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.558167] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.558185] pci_bus 0000:00: root bus resource [mem 0x70000000-0x7fefffff]
[    0.571143] pci 0000:00:00.0: BAR 0: assigned [mem 0x70000000-0x70ffffff 64bit]
[    0.571175] pci 0000:00:00.0: BAR 6: assigned [mem 0x71000000-0x71ffffff pref]
[    0.571199] pci 0000:00:00.0: BAR 15: assigned [mem 0x72000000-0x721fffff 64bit pref]
[    0.571226] pci 0000:01:00.0: BAR 0: assigned [mem 0x72000000-0x720fffff 64bit pref]
[    0.571289] pci 0000:01:00.0: BAR 2: assigned [mem 0x72100000-0x721fffff 64bit pref]
[    0.571352] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    0.571371] pci 0000:00:00.0:   bridge window [mem 0x72000000-0x721fffff 64bit pref]
[    0.572289] pcieport 0000:00:00.0: Signaling PME with IRQ 390
[    0.572442] pcieport 0000:00:00.0: AER enabled with IRQ 391
[    0.574093] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    0.582377] mxs-dma 5b810000.dma-apbh: initialized
[    0.584506] Bus freq driver module loaded
[    0.592085] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.595248] SuperH (H)SCI(F) driver initialized
[    0.596326] msm_serial: driver initialized
[    0.597768] 5a080000.serial: ttyLP2 at MMIO 0x5a080010 (irq = 46, base_baud = 5000000) is a FSL_LPUART
[    0.599657] 5a090000.serial: ttyLP3 at MMIO 0x5a090010 (irq = 47, base_baud = 5000000) is a FSL_LPUART
[    0.599703] Serial: Console lpuart rounded baud ratefrom 575539 to 115200
[    1.811013] console [ttyLP3] enabled

HI @developerTirol

Bsp 3.0b2 is not supported any more according to our Bsp Support Policy. Could you update to Bsp 3.0b4 and check if you still see the issue?

Thanks and best regards,
Jaski