Bug 12844

Summary: Yocto Rocko kernel will not boot on NXP i.MX6 (Wandboard Quads)
Product: [Build System, Metadata & Runtime] BSPs Reporter: Clay Montgomery <clay>
Component: bsps-meta-fsl-armAssignee: Otavio Salvador <otavio>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium CC: akuster, fabio.berton, kevin.tian, randy.macleod
Version: 2.4.3   
Target Milestone: 2.4.4   
Hardware: Other   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Clay Montgomery 2018-07-07 20:25:27 UTC
I am building Yocto 2.4 (Rocko) using the FSL Community BSP for several NXP i.MX6 boards including multiple Wandboard Quads and SolidRun Hummingboards. The kernel hangs consistently during the initialization of the sata interface. The previous version (2.3.2) does not have this problem. My kernel boot messages for Rocko on Wandboard follows:


Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.44+g0d698de4 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 SMP PREEMPT Sat Jul 7 01:14:11 UTC 2018
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Wandboard i.MX6Quad rev.D1
Reserved memory: created CMA memory pool at 0x6a000000, size 320 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 13 pages/cpu @ee6fe000 s21580 r8192 d23476 u53248
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 520720
Kernel command line: root=PARTUUID=30cd3a40-01 rootwait rw console=ttymxc0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 1735664K/2097152K available (9765K kernel code, 720K rwdata, 3076K rodata, 756K init, 453K bss, 33808K reserved, 327680K cma-reserved, 270336K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0x80000000 - 0xef800000   (1784 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x80c92a38   (12843 kB)
      .init : 0x80c93000 - 0x80d50000   ( 756 kB)
      .data : 0x80d50000 - 0x80e040dc   ( 721 kB)
       .bss : 0x80e07000 - 0x80e787a8   ( 454 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Preemptible hierarchical RCU implementation.
        Additional per-CPU info printed with stalls.
NR_IRQS:16 nr_irqs:16 16
L2C-310 errata 752271 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 16 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 16 ways, 1024 kB
L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76470001
mxc_clocksource_init 3000000
Switching to timer-based delay loop, resolution 333ns
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
CPU: Testing write buffer coherency: ok
ftrace: allocating 30187 entries in 89 pages
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x10008280 - 0x100082d8
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (24.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 1024 (order: 4, 65536 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
CPU identified as i.MX6Q, silicon rev 1.2
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
imx-gpc 20dc000.gpc: no fsl,ldo-bypass found!
mxs-dma 110000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
2000000.aips-bus:usbphy_nop1 supply vcc not found, using dummy regulator
2000000.aips-bus:usbphy_nop2 supply vcc not found, using dummy regulator
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA
i2c i2c-2: IMX I2C adapter registered
i2c i2c-2: can't use DMA
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 driver probed
mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 dphy version is 0x3130302a
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.20
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
UDP hash table entries: 1024 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
CPU PMU: Failed to parse /soc/pmu/interrupt-affinity[0]
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
imx rpmsg driver is registered.
Bus freq driver module loaded
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
backlight_lcd supply power not found, using dummy regulator
backlight_lvds supply power not found, using dummy regulator
MIPI DSI driver module loaded
MIPI DSI driver module loaded
20e0000.hdmi_video supply HDMI not found, using dummy regulator
mxc_sdc_fb fb@0: registered mxc display driver ldb
imx-ipuv3 2800000.ipu: WARNING: adapt panel end blank lines
imx-ipuv3 2800000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
imx-ipuv3 2800000.ipu: WARNING: adapt panel end blank lines
Console: switching to colour frame buffer device 128x37
mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1
fbcvt: 1920x1080@60: CVT Name - 2.073M9
mxc_sdc_fb fb@1: registered mxc display driver hdmi
imx-sdma 20ec000.sdma: no iram assigned, using external mem
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
mxc_hdmi 20e0000.hdmi_video: Read EDID again
imx-sdma 20ec000.sdma: initialized
pfuze100-regulator 2-0008: unrecognized pfuze chip ID!
pfuze100-regulator: probe of 2-0008 failed with error -5
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 25, base_baud = 5000000) is a IMX
mxc_hdmi 20e0000.hdmi_video: create default modelist
console [ttymxc0] enabled
21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 298, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
[drm] Initialized drm 1.1.0 20060810
[drm] Initialized vivante 1.0.0 20120216 on minor 0
brd: module loaded
loop: module loaded
ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
random: nonblocking pool is initialized
ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled
ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst

- The kernel hangs at this point -
Comment 1 Armin Kuster 2018-07-12 14:29:25 UTC
how can I reproduce this?
Comment 2 Clay Montgomery 2018-07-12 14:55:06 UTC
The steps I use to build Yocto 2.4.3 for the i.MX6 with this BSP are as follows:

	mkdir ~/Yocto/Wandboard-Rocko
	cd ~/Yocto/Wandboard-Rocko
	repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b rocko
	repo start rocko --all
	repo sync
	MACHINE=wandboard DISTRO=fslc-framebuffer source setup-environment build
	source setup-environment build
	bitbake fsl-image-machine-test

Then flash the built image onto a micro sdcard (at least 4GB):

	cd ~/Yocto/Wandboard-Rocko/build/tmp/deploy/images/wandboard
	cp fsl-image-machine-test-wandboard.wic.gz tmp.wic.gz
	gunzip tmp.wic.gz
        df
        sudo umount /dev/sdd1
	sudo dd if=tmp.wic  of=/dev/sdd  bs=1M
        sync

Then install the sdcard into the Wandboard boot slot. The kernel boot will hang during the sata initialization. I have no sata devices attached.
Comment 3 Fabio Berton 2018-07-12 20:30:43 UTC
Hi Clay!

FSL Community BSP doesn't support Wandboard rev D, only rev B and C. 

Your log shows:
Machine model: Wandboard i.MX6Quad rev.D1

Sumo release (2.5) support Wandboard rev.D1, can you try to build an image using sumo branch?

Thanks!

Fabio Berton
Comment 4 Otavio Salvador 2018-07-12 20:39:38 UTC
As Fabio said, rocko does not support the latest revisions. We had a bunch of work for it in new releases of U-Boot so please give it a go.
Comment 5 Clay Montgomery 2018-07-12 22:15:49 UTC
I confirmed that Rocko does indeed boot on my rev C1 Wandboard. I was using the wrong .dtb file before. Sorry about that.

But, this is weird because Pyro (older version) runs on all the Wandboards (B1, C1 and D1). I would be glad to document this on the Wandboard forum, if you can please explain it to me?

Slightly different subject, but what happened to support for Qt5 in the FSL Community BSP? The old image name 'fsl-image-x11-qt5' is gone.

I will test sumo on several boards.

Thanks, Clay
Comment 6 Armin Kuster 2018-11-05 23:32:48 UTC
Otavio,

Can we close this bug? I am working on maybe the last rocko release.
Comment 7 Stephen K Jolley 2019-01-31 19:08:58 UTC
bsps-meta-fsl-arm issues are now tracked in GitHub.  Please see: https://github.com/Freescale/meta-freescale