This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMDSLCDK138: The latest Processor SDK Linux kernel crashes at boot

Part Number: TMDSLCDK138
Other Parts Discussed in Thread: AM1808, OMAP-L138, DA8XX, OMAPL138

Tool/software: Linux

Hi!

We're working with OMAPL138-LCDK board. I'm trying to compile and boot the latest available Linux kernel (4.9.x) from the Processor SDK v03.03.00.04.

The default config I use is tisdk_omapl138-lcdk_defconfig. The toolchain is the latest GCC for ARM installed from the Ubuntu repos.

Everything compiles fine, no errors. But when I try to boot the Linux from the built binaries, it crashes. Boot log is as follows (user_debug=31 is specified in kernel args):

[log starts here]

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.13-g102f61776e (root@denis-VirtualBox) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #3 PREEMPT Mon Jun 26 16:07:34 MSK 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt:Machine model: DA850/AM1808/OMAP-L138 LCDK
Memory policy: Data cache writethrough
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24288
Kernel command line: console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait mem=32M@0xc0000000 mem=64M@0xc4000000 ip=off user_debug=31
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 90452K/98304K available (4456K kernel code, 359K rwdata, 1560K rodata, 224K init, 154K bss, 7852K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04626f8   (4458 kB)
      .init : 0xc05ea000 - 0xc0622000   ( 224 kB)
      .data : 0xc0622000 - 0xc067bf50   ( 360 kB)
       .bss : 0xc067bf50 - 0xc06a2a78   ( 155 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        Build-time adjustment of leaf fanout to 32.
NR_IRQS:245
clocksource: timer0_1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0008400 - 0xc0008458
devtmpfs: initialized
VFP support v0.3: not present
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 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
mux: initialized RTC_ALARM
mux: Setting register RTC_ALARM
mux:    PINMUX0 (0x00000000) = 0x48080000 -> 0x28080000
edma 1c00000.edma: memcpy is disabled
edma 1c00000.edma: TI EDMA DMA engine driver
edma 1e30000.edma: memcpy is disabled
edma 1e30000.edma: TI EDMA DMA engine driver
i2c_davinci i2c_davinci.1: could not find pctldev for node /soc@1c00000/pinmux@14120/pinmux_i2c0_pins, deferring probe
clocksource: Switched to clocksource timer0_1
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 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.
workingset: timestamp_bits=14 max_order=15 bucket_order=1
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered (default)
pinctrl-single 1c14120.pinmux: please update dts to use #pinctrl-cells = <2>
pinctrl-single 1c14120.pinmux: 160 pins at pa fec14120 size 80
Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
console [ttyS2] disabled
serial8250.2: ttyS2 at MMIO 0x1d0d000 (irq = 61, base_baud = 8250000) is a TI DA8xx/66AK2x
console [ttyS2] enabled
brd: module loaded
libphy: Fixed MDIO Bus: probed
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
libphy: davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio.0:00, driver SMSC LAN8710/LAN8720
i2c /dev entries driver
davinci_mmc da830-mmc.0: Got CD GPIO
davinci_mmc da830-mmc.0: Using DMA, 4-bit mode
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: incompatible machine/device type for reading mac address
davinci_emac davinci_emac.1: using random MAC addr: 1a:e3:55:dd:71:45
input: gpio-keys as /devices/platform/gpio-keys/input/input0
mmc0: host does not support reading read-only switch, assuming write-enable
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SS08G 7.40 GiB
 mmcblk0: p1 p2
hctosys: unable to open rtc device (rtc0)
EXT4-fs (mmcblk0p2): mounting ext3 file system using the ext4 subsystem
random: fast init done
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 224K (c05ea000 - c0622000)
This architecture does not have kernel memory protection.
init (1): undefined instruction: pc=b6fb008c
CPU: 0 PID: 1 Comm: init Not tainted 4.9.13-g102f61776e #3
Hardware name: Generic DA850/OMAP-L138/AM18x
task: c7838000 task.stack: c7836000
PC is at 0xb6fb008c
LR is at 0xb6fa65d0
pc : [<b6fb008c>]    lr : [<b6fa65d0>]    psr: 60000010
sp : bea8cb30  ip : bea8cb88  fp : bea8cda4
r10: b6fc6958  r9 : 7f5ea9cc  r8 : b6fc6958
r7 : 00000000  r6 : 00000000  r5 : 7f73595c  r4 : 7f5ebb00
r3 : 00015ca0  r2 : 00000197  r1 : 00000000  r0 : bea8cb60
Flags: nZCv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
Control: 0005317f  Table: c7b50000  DAC: 00000055
Code: e48c3004 e8ac0ff0 e59f302c e79f2003 (ecac8b10)
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[log ends]

I tried to use the different config I found in the arch/arm/configs/ti_sdk_omapl138_release_defconfig. The same story: it crashes.

But when I use the pre-built binaries that I've got from TI along with the PDK, everything boots fine and works.

Could you please give a hint on how to compile the kernel to boot successfully?

  • Hi Denis,

    Can you try the following:
    cd ~/<latest-ti-sdk>
    make linux_clean
    make linux

    And see if the generated linux images will work for your board. If the board boots, you can check the Rules.make file in the TISDK directory & see which files are used for the kernel configurations. Perhaps you export ARCH=arm, while Rules.make specifies: ARCH=armv5te

    Best Regards,
    Yordan
  • Actually I verified the bellow on my OMAP-L138 LCDK. I built the kernel as follows:
    x0155517@mms:~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050$ export ARCH=arm
    x0155517@mms:~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050$ export PATH=~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/:$PATH
    x0155517@mms:~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050$ export CROSS_COMPILE=arm-linux-gnueabi-
    x0155517@mms:~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050$ make tisdk_omapl138-lcdk_defconfig
    x0155517@mms:~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050$ make -j4

    Then I created my SDK Card & used the following commands to replace the newly built zImage:
    sudo mv zImage-4.9.28-geed43d1050 ./zImage-4.9.28-geed43d1050.old
    sudo cp ~/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/board-support/linux-4.9.28+gitAUTOINC+eed43d1050-geed43d1050/arch/arm/boot/zImage ./zImage-4.9.28-geed43d1050
    sync
    And my board booted fine. I think you should revise the setting of your environment prior to building the kernel.

    Best Regards,
    Yordan
  • Hi Yordan!

    Thanks for your answer.

    I don't seem to have target "linux_clean" in my makefile, I use "make distclean" to cleanup things before build.
    Also the architecture "armv5te" doesn't work for me, I only have "arm" subdir in the "arch" dir.

    Here is my sequence of commands for building:

    ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make distclean
    ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make tisdk_omapl138-lcdk_defconfig
    ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make zImage
    ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make modules
    etc.
  • Hi Yordan,

    Seems that we're using very similar steps to compile the kernel. But I notice the version of PSDK you use is later than my one (04.00.00.04 vs 03.03.00.04). Maybe it's the key? Could you please point out to where can I get the latest PSDK for my board?
  • Hi,

    The version I use is the officially released version that supports OMAP-L138. You can download it from here:
    software-dl.ti.com/.../index_FDS.html

    Best Regards,
    Yordan
  • Yordan, thanks a lot! The latest SDK works fine, I've succeeded to compile and boot