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 kernel prints nothing on custom am3352 based board

Other Parts Discussed in Thread: AM3352

I am performing board bringup on a custom am3352 based board. I can load kernel and dts files but it appears that the kernel is failing very early.

I get no prints after

Starting kernel ...

which is actually from u-boot.

My board does not have the eeprom. I have seen this to cause boot failure in u-boot and had to fix it. I need to know if this is an issue to booting kernel.

My board also does not have nand flash, sdcard and ethernet port on it. It only has usb, uart and jtag. How do I modify the dts files and what build options do I use. Do I have to rewrite the board files?

================================================================================

U-Boot# loady $loadaddr
## Ready for binary (ymodem) download to 0x82000000 at 115200 bps...
C, 34279(SOH)/0(STX)/0(CAN) packets, 4 retries
## Total Size = 0x0042f258 = 4387416 Bytes
U-Boot# loady $fdtaddr
## Ready for binary (ymodem) download to 0x88000000 at 115200 bps...
C 287(SOH)/0(STX)/0(CAN) packets, 3 retries
## Total Size = 0x00008e0c = 36364 Bytes
U-Boot# printenv console
console=ttyO2,115200n8
U-Boot# bootm $loadaddr - $fdtaddr
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.14.26-gb9df364-dirty
Created: 2015-06-03 17:57:20 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4387352 Bytes = 4.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Kernel Image ... OK
Loading Device Tree to 8fff4000, end 8ffffe0b ... OK

Starting kernel ...

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

==============================================================================================

  • Hi Preetam,

    1. The build instructions are given in the link below:
    processors.wiki.ti.com/.../Linux_Core_U-Boot_User%27s_Guide
    processors.wiki.ti.com/.../Linux_Kernel_Users_Guide

    2. In your design the which UART is used ? TI reference board/code has UART0 for console, I see you are using console=ttyO2 ? If UART0 can you please use console=ttyO0 and check ?

    Best Regards,
    Shiv
  • BTW where does your filesystem will be as you mentioned there is no NAND and SD ??
  • I do have an emmc. I intend to use initramfs for initial filesystem and program the emmc. In any case I would like to have a kernel that boot till the point that it seeks init.
  • I tried ttyO0. It does not work. I have working u-boot and that gives me a valid uart on uart0. Its the kernel which does not give me any console output.

  • What is your kernel command line? You should at least have "console=ttyO0,115200n8 earlyprintk=serial" somewhere on it (of course, replace ttyO0 with your port).

    Make sure your kernal has CONFIG_OMAP_SERIAL and CONFIG_OMAP_SERIAL_CONSOLE set to "y".

    You also need the appropriate nodes in your device tree. Here are mine (our console is on ttyO2 and our device tree is based on the am335x-evm.dts device tree):

    Under the "am33xx_pinmux: pinmux@44e10800" node:

    uart2_pins: pinmux_uart2_pins {
    	pinctrl-single,pins = <
    		0x150 (PIN_INPUT_PULLUP | MUX_MODE1)	/* rx A17 spi0_sclk.uart2_rxd_mux3 */
    		0x154 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)	/* tx B17 spi0_d0.uart2_txd_mux3 */
    	>;
    };

    And under the "ocp" node:

    uart2: serial@48024000 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart2_pins>;
    	status = "okay";
    };

  • It started working after 2 changes:
    1. Use singlecore-omap2plus_defconfig instead of omap2plus_defconfig
    2. add earlyprintk=serial in the bootargs with console=ttyO0,115200n8

    I now know that the kernel has issues with device tree.
    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 3.14.26-gb9df364-dirty (preetam@preetam-core) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #2 Thu Jun 4 15:29:28 PDT 2015
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x EVM
    [ 0.000000] bootconsole [earlycon0] enabled
    [ 0.000000] cma: CMA: reserved 24 MiB at 86000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] Unable to handle kernel paging request at virtual address cfff4000
    [ 0.000000] pgd = c0004000
    [ 0.000000] [cfff4000] *pgd=00000000
    [ 0.000000] Internal error: Oops: 5 [#1] ARM
    [ 0.000000] Modules linked in:
    [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.14.26-gb9df364-dirty #2
    [ 0.000000] task: c082a978 ti: c0820000 task.ti: c0820000
    [ 0.000000] PC is at __unflatten_device_tree+0x20/0x15c
    [ 0.000000] LR is at unflatten_device_tree+0x30/0x3c
    [ 0.000000] pc : [<c04b0950>] lr : [<c08043b8>] psr: a0000193
    [ 0.000000] sp : c0821f20 ip : c0821f58 fp : c0821f54
    [ 0.000000] r10: 0000000c r9 : 80000200 r8 : c0889e54
    [ 0.000000] r7 : c07e09c0 r6 : c083af70 r5 : c071a57c r4 : cfff4000
    [ 0.000000] r3 : c08a123c r2 : c07e09c0 r1 : c08a1228 r0 : cfff4000
    [ 0.000000] Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
    [ 0.000000] Control: 10c5387d Table: 80004019 DAC: 00000015
    [ 0.000000] Process swapper (pid: 0, stack limit = 0xc0820238)
    [ 0.000000] Stack: (0xc0821f20 to 0xc0822000)
    [ 0.000000] 1f20: c083adf0 c08110c8 00900000 c08a1228 ffff1000 c07e09c0 c071a57c c083af70
    [ 0.000000] 1f40: c082b9c8 c0889e54 c0821f6c c0821f58 c08043b8 c04b093c c082b818 c08110c8
    [ 0.000000] 1f60: c0821fbc c0821f70 c07dffac c0804394 ffffffff 10c5387d c7dffac0 c082b9c8
    [ 0.000000] 1f80: c0821fac c0821f90 c05b8388 c00652d8 c0718ba8 c086e780 ffffffff 00000001
    [ 0.000000] 1fa0: c082bad0 80004059 413fc082 00000000 c0821ff4 c0821fc0 c07dc840 c07df924
    [ 0.000000] 1fc0: 00000000 00000000 00000000 00000000 00000000 c0811f68 10c5387d c0828044
    [ 0.000000] 1fe0: c0811f64 c082bad0 00000000 c0821ff8 80008070 c07dc7c4 00000000 00000000
    [ 0.000000] Backtrace:
    [ 0.000000] [<c04b0930>] (__unflatten_device_tree) from [<c08043b8>] (unflatten_device_tree+0x30/0x3c)
    [ 0.000000] r8:c0889e54 r7:c082b9c8 r6:c083af70 r5:c071a57c r4:c07e09c0
    [ 0.000000] [<c0804388>] (unflatten_device_tree) from [<c07dffac>] (setup_arch+0x694/0x7d4)
    [ 0.000000] r4:c08110c8 r3:c082b818
    [ 0.000000] [<c07df918>] (setup_arch) from [<c07dc840>] (start_kernel+0x88/0x364)
    [ 0.000000] r10:00000000 r9:413fc082 r8:80004059 r7:c082bad0 r6:00000001 r5:ffffffff
    [ 0.000000] r4:c086e780
    [ 0.000000] [<c07dc7b8>] (start_kernel) from [<80008070>] (0x80008070)
    [ 0.000000] r7:c082bad0 r6:c0811f64 r5:c0828044 r4:10c5387d
    [ 0.000000] Code: e2504000 e1a07002 e50b1028 0a00003c (e5942000)
    [ 0.000000] ---[ end trace 3406ff24bd97382e ]---
    [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!

    You are a lifesaver. I will start another question with this.
  • Thanks. I had to change 2 things to get it working.
    1. Use singlecore-omap2plus_defconfig instead of omap2plus_defconfig
    2. set earlyprintk=serial in bootargs

    Now i can see that my fdt has issues. Thanks
  • Preetam Reddy said:

    Now i can see that my fdt has issues. Thanks

    No problem. I went through the same kinds of things, glad I can help.