AnsweredAssumed Answered

System hang after "Freeing init memory: 200K" with YOCTO imge

Question asked by Robbie Jiang on Jul 4, 2015
Latest reply on Jul 23, 2015 by M.Adeel Sharif

Hi,

 

Recently I'm trying build system image ( e.g, rootfs) with FSL yocto release (i.e, fsl-bsp-release fsl-yocto-3.14.28-1.0.0).

I managed to build fsl-image-qt5  for imx6qsabreauto machine.

 

Before moving to YOCTO, I was using LTIB-3.0.35.  The U-Boot, kernel, and rootfs works well.

 

I would like to try to combine the working U-boot and kernel from LTIB, together with the rootfs built from YOCTO.

Certainly, the U-boot can load and boot kernel.

But when the kernel tried to mount the NFS rootfs ( the rootfs image built from my YOCTO),

the system hangs  after "Freeing init memory: 200K".

Note in my u-boot kernel parameters,  I set "console=ttymxc0,115200".

 

Here is the booting process:

 

MX6Q SABRELITE U-Boot # run bootcmd_net

FEC: Link is Up 796d

Using FEC0 device

TFTP from server 192.168.0.68; our IP address is 192.168.0.10

Filename 'uImage'.

Load address: 0x10800000

Loading: #################################################################

         #################################################################

         #################################################################

         #######################################################

done

Bytes transferred = 3668876 (37fb8c hex)

## Booting kernel from Legacy Image at 10800000 ...

   Image Name:   Linux-3.0.35-2666-gbdde708sensor

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3668812 Bytes =  3.5 MB

   Load Address: 10008000

   Entry Point:  10008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

Linux version 3.0.35-2666-gbdde708sensor-gc4baf66-dirty (jie@T400s) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD5

CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d

CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Freescale i.MX 6Quad Sabre-Lite Board

Memory policy: ECC disabled, Data cache writealloc

CPU identified as i.MX6Q, unknown revision

PERCPU: Embedded 7 pages/cpu @8c008000 s5440 r8192 d15040 u32768

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 194560

Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=192.168.0.10 nfsroot=192.168.0.68:/home/jie/rootfs.yocto,v3,tcp

PID hash table entries: 4096 (order: 2, 16384 bytes)

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 512MB 256MB = 768MB total

Memory: 769772k/769772k available, 278804k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    DMA     : 0xf4600000 - 0xffe00000   ( 184 MB)

    vmalloc : 0xc0800000 - 0xf2000000   ( 792 MB)

    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

    modules : 0x7f000000 - 0x7fe00000   (  14 MB)

      .init : 0x80008000 - 0x8003a000   ( 200 kB)

      .text : 0x8003a000 - 0x8069b9bc   (6535 kB)

      .data : 0x8069c000 - 0x806edea0   ( 328 kB)

       .bss : 0x806edec4 - 0x80757a0c   ( 423 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

Preemptible hierarchical RCU implementation.

NR_IRQS:624

MXC GPIO hardware

sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms

arm_max_freq=1GHz

MXC_Early serial console at MMIO 0x2020000 (options '115200')

bootconsole [ttymxc0] enabled

Console: colour dummy device 80x30

Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available

CPU1: Booted secondary processor

CPU2: Booted secondary processor

CPU3: Booted secondary processor

Brought up 4 CPUs

SMP: Total of 4 processors activated (6324.22 BogoMIPS).

print_constraints: dummy:

NET: Registered protocol family 16

print_constraints: vddpu: 725 <--> 1300 mV at 1150 mV fast normal

print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal

print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal

print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal

print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal

print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal

hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.

hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.

hw-breakpoint: maximum watchpoint size is 4 bytes.

L310 cache controller enabled

l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x02070000, Cache size: 1048576 B

bio: create slab <bio-0> at 0

mxs-dma mxs-dma-apbh: initialized

print_constraints: vmmc: 3300 mV

SCSI subsystem initialized

spi_imx imx6q-ecspi.2: probed

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

Freescale USB OTG Driver loaded, $Revision: 1.55 $

imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

imx-ipuv3 imx-ipuv3.1: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

Advanced Linux Sound Architecture Driver Version 1.0.24.

Bluetooth: Core ver 2.16

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

cfg80211: Calling CRDA to update world regulatory domain

i2c-core: driver [max17135] using legacy suspend method

i2c-core: driver [max17135] using legacy resume method

Switching to clocksource mxc_timer1

NET: Registered protocol family 2

IP route cache hash table entries: 32768 (order: 5, 131072 bytes)

TCP established hash table entries: 131072 (order: 8, 1048576 bytes)

TCP bind hash table entries: 65536 (order: 7, 786432 bytes)

TCP: Hash tables configured (established 131072 bind 65536)

TCP reno registered

UDP hash table entries: 512 (order: 2, 16384 bytes)

UDP-Lite hash table entries: 512 (order: 2, 16384 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.

PMU: registered new PMU device of type 0

Static Power Management for Freescale i.MX6

wait mode is enabled for i.MX6

cpaddr = c0880000 suspend_iram_base=c0918000

PM driver module loaded

IMX usb wakeup probe

add wake up source irq 75

IMX usb wakeup probe

cpu regulator mode:ldo_enable

i.MXC CPU frequency driver

JFFS2 version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.

msgmni has been set to 1503

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver ldb

mxc_sdc_fb mxc_sdc_fb.0: NO mxc display driver found!

mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver lcd

Console: switching to colour frame buffer device 100x30

mxc_sdc_fb mxc_sdc_fb.2: register mxc display driver ldb

mxc_sdc_fb mxc_sdc_fb.2: NO mxc display driver found!

mxc_sdc_fb mxc_sdc_fb.3: register mxc display driver ldb

mxc_sdc_fb mxc_sdc_fb.3: NO mxc display driver found!

mxc_sdc_fb mxc_sdc_fb.4: register mxc display driver hdmi

mxc_hdmi mxc_hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1

imx-sdma imx-sdma: loaded firmware 1.1

imx-sdma imx-sdma: initialized

mxc_hdmi mxc_hdmi: Read EDID again

mxc_hdmi mxc_hdmi: No modes read from edid

mxc_hdmi mxc_hdmi: create default modelist

Serial: IMX driver

imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX

console [ttymxc0] enabled, bootconsole disabled

console [ttymxc0] enabled, bootconsole disabled

imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

imx-uart.3: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX

imx-uart.4: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX

brd: module loaded

loop: module loaded

No sata disk.

m25p80 spi2.0: sst25vf016b (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000100000 : "bootloader"

0x000000100000-0x000000200000 : "kernel"

ONFI flash detected

ONFI param page 0 valid

NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron MT29F8G08ABABAWP)

gpmi-nand imx6q-gpmi-nand.0: enable asynchronous EDO mode 4

Scanning device for bad blocks

Bad eraseblock 300 at 0x000009600000

Bad eraseblock 400 at 0x00000c800000

Creating 2 MTD partitions on "gpmi-nand":

0x000000000000-0x000001000000 : "kernel"

0x000001000000-0x000040000000 : "rootfs"

GPMI NAND driver registered. (IMX)

vcan: Virtual CAN interface driver

CAN device driver interface

flexcan netdevice driver

FEC Ethernet Driver

fec_enet_mii_bus: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci.0: irq 75, io base 0x02184000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: Freescale On-Chip EHCI Host Controller

usb usb1: Manufacturer: Linux 3.0.35-2666-gbdde708sensor-gc4baf66-dirty ehci_hcd

usb usb1: SerialNumber: fsl-ehci.0

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

add wake up source irq 72

fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.1: irq 72, io base 0x02184200

fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00

usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb2: Product: Freescale On-Chip EHCI Host Controller

usb usb2: Manufacturer: Linux 3.0.35-2666-gbdde708sensor-gc4baf66-dirty ehci_hcd

usb usb2: SerialNumber: fsl-ehci.1

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

ARC USBOTG Device Controller driver (1 August 2005)

my_batt_ext_power_changed!

It is not usb supply!

g_file_storage gadget: controller 'fsl-usb2-udc' not recognized

check_parameters:UTP settings are in place now, overriding defaults

g_file_storage gadget: No serial-number string provided!

g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010

g_file_storage gadget: Number of LUNs=1

Suspend udc for OTG auto detect

fsl-usb2-udc: bind to driver g_file_storage

ft5x06-ts 1-0038: ft5x06: Could not detect touch screen.

ft5x06: Jan 27 2015

snvs_rtc snvs_rtc.0: rtc core: registered snvs_rtc as rtc0

i2c /dev entries driver

Linux media interface: v0.10

Linux video capture interface: v2.00

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video16

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video17

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video18

mxc_v4l2_output mxc_v4l2_output.0: V4L2 device registered as video19

fsl-usb2-udc fsl-usb2-udc: It is a stardard downstream port

my_batt_ext_power_changed!

i2c-core: driver [mag3110] using legacy suspend method

i2c-core: driver [mag3110] using legacy resume method

imx6 usb charger online:1

mma8451 2-001c: read chip ID 0x1 is not equal to 0x1a or 0x2a!

mma8451: probe of 2-001c failed with error -22

imx2-wdt imx2-wdt.0: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)

Bluetooth: Virtual HCI driver ver 1.3

Bluetooth: HCI UART driver ver 2.2

Bluetooth: HCIATH3K protocol initialized

Bluetooth: Generic Bluetooth USB driver ver 0.6

usbcore: registered new interface driver btusb

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

mmc0: SDHCI controller on platform [sdhci-esdhc-imx.2] using DMA

imx6 usb charger limit mA: 500

mxc_vdoa mxc_vdoa: i.MX Video Data Order Adapter(VDOA) driver probed

VPU initialized

mxc_asrc registered

Galcore version 4.6.9.6622

Thermal calibration data is 0x56d4c07d

Thermal sensor with ratio = 179

Anatop Thermal registered as thermal_zone0

anatop_thermal_probe: default cooling device is cpufreq!

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

imx_wm8974_probe:src_port:2, ext_port:6

wm8974 1-001a: Failed to add route Mic Jack->MICIN

asoc: wm8974 <-> imx-ssi.1 mapping ok

imx_wm8974_audio_init:device add OK!

ALSA device list:

  #0: wm8974-audio

NET: Registered protocol family 26

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

Bluetooth: RFCOMM TTY layer initialized

Bluetooth: RFCOMM socket layer initialized

Bluetooth: RFCOMM ver 1.11

Bluetooth: BNEP (Ethernet Emulation) ver 1.3

Bluetooth: BNEP filters: protocol multicast

Bluetooth: HIDP (Human Interface Emulation) ver 1.2

lib80211: common routines for IEEE802.11 drivers

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

Bus freq driver module loaded

Bus freq driver Enabled

mxc_dvfs_core_probe

DVFS driver module loaded

snvs_rtc snvs_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)

eth0: Freescale FEC PHY driver [Micrel KSZ9021 Gigabit PHY] (mii_bus:phy_addr=1:04, irq=-1)

PHY: 1:04 - Link is Up - 100/Full

IP-Config: Guessing netmask 255.255.255.0

IP-Config: Complete:

     device=eth0, addr=192.168.0.10, mask=255.255.255.0, gw=255.255.255.255,

     host=192.168.0.10, domain=, nis-domain=(none),

     bootserver=255.255.255.255, rootserver=192.168.0.68, rootpath=

VFS: Mounted root (nfs filesystem) on device 0:12.

Freeing init memory: 200K

 

Before executing init cmd!

 

Note here I added a print message ("Before executing init cmd!") in kernel init/main.c, right before kernel execute "/sbin/init".

Seems there is something wrong with the "init" process, or the "/etc/inittab" file.

Enclosed please find the inittab file in use.

Note as the sabreauto machine uses ttymxc3 as the default serial console,

but my board uses ttymxc0.

so I changed a little bit the inittab to try to the inittab file to switch to ttymxc0.

But it does not work.

 

Note if I set "init=/bin/sh" in the kernel parameter, I can get a shell on the serial console (ttymxc0).

Here "/bin/sh" comes from the YOCTO rootfs image.

 

Also if I set "init=/root/helloworld" in the kernel cmd line paramer, I can get the "hello world!" output on the serial console (ttymxc0).

Here  "/root/helloworld" is an application built by the same toolchain as the one built the YOCTO image.

 

Is there anything wrong with my inittab?

And how to debug this problem?

 

Thanks,

Robbie

Original Attachment has been moved to: rc_mxc.S.zip

Original Attachment has been moved to: inittab.zip

Outcomes