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/AM3358: Can't get the Kernel to start

Part Number: AM3358

Tool/software: Linux

Our history is AM335x board based on Beagle Bone White with 253MB DDR2 and RGMII1 Ethernet using a Atheros AR8031-AL1B 10/100/1000 Mbps Transceiver.  This board worked well for us. We recently upgraded the Kernel and OS with no problems.

We have designed a new board based on BBB with the same 512 DDR3L memory but still used the Atheros AR8031 Ethernet.  This board will not boot any of the pre-made images for BBB, in fact, we get nothing on our UART0 debug port.  We have been able to to make it through MLO and U-boot by trial and error using debug messages.  This is actually the second revision of this board with the majority of the changes being power.  The rev 1 board power ON bring up problems that we fixed with cuts and adds, but were not able to get the Kernal started on that board.  The rev 2 board does power ON and start correctly, the power all looks good.  But, we are unable to get this board past starting the Kernel.  I sent the design schematic to TI for engineering review and received some recommendations, I followed all of the recommended changes. There was no recommendations for memory or Ethernet changes. Unfortunatly, we did not add JTAG to our design. We ran the AM335x DDR3 Software Leveling Program MLO  from TI China on our rev1 and rev2 boards as well as BBB.  The MLO Software Leveling Program seemed to run properly on rev1, but on rev2 and BBB we received the same results with all the outputs at zero no matter what configuration data was entered.  The program runs to the end but doesn't return any useful data. 

I'm questioning the board layout for memory.  All signals are on three layers with a ground plane between each layer.  My memory line lengths are: DDR_Ax, DDR_BAx, DDR_CK(n), DDR_CKE, DDR_CSn0, DDR_CASn, DDR_RASn, DDR_WEn, DDR_ODT are all 24.0xmm.  The DDR_Dx, DDR_DQS0(n), DDRDQS1(n), DDR_DQM1, and DDRDQM0 are all 24.4xmm.  Do these line lengths seem reasonable for a good memory interface?  They are close to the BBB memory line lengths.  So much that I wonder why the BBB memory configuration values wouldn't be close enough to start the Kernel.

Since there are very few differences in our board and BBB (SD card interface and the I2C EEPROM (addr 50) are the same) I'm also wondering if the code is getting hung up on the Ethernet differences between BBB and our board. 

I could sure use some recommendations and help.  

Thanks,

Brian Weir

 

            

 

  • Hi Brian,

    Since there are very few differences in our board and BBB (SD card interface and the I2C EEPROM (addr 50) are the same) I'm also wondering if the code is getting hung up on the Ethernet differences between BBB and our board.


    It is not likely that your kernel won't start because of ethernet differences.

    When you say
    The rev 1 board power ON bring up problems that we fixed with cuts and adds, but were not able to get the Kernal started on that board. The rev 2 board does power ON and start correctly, the power all looks good. But, we are unable to get this board past starting the Kernel.


    Do you mean that you see the "Starting kernel ..." message on your console and nothing else (this is the last message from u-boot btw)?

    In that case there are a couple of reasons for this:

    1. You're using incorrect dtb file for your board & the kernel cannot be loaded.

    2. You're using different uarts in u-boot & kernel => you don't see the console messages anymore. --> this is less likely.

    Try enabling the low level debug feature in your kernel, see this wiki:
    processors.wiki.ti.com/.../Kernel_-_Common_Problems_Booting_Linux

    Please share your console output. Also try enabling #define DEBUG in am335x_evm.h to get a verbose output out of the u-boot. Maybe there's something you're missing from the log .

    Best Regards,
    Yordan
  • Yordan,
    Thank you for your suggestions they were helpful to the point that we now have the kernel starting. Please see the latest output we are getting below, any suggestions?
    Thanks, Brian

    NASCENT ActiveEdge 2017
    U-Boot SPL 2014.07-00010-gfcd7278-dirty (Mar 03 2017 - 11:44:06)
    inside s_init()
    enable rtc32k clock disabled for now...
    about to call early_init_f...
    mux.c board is boneabout to call sdram_init
    inside sdram_init...
    BoneBlack config ddr...
    end sdram_init...
    After call to sdram_init
    Inside am335x_spl_board_init...
    reading u-boot.img
    reading u-boot.img


    U-Boot 2014.07-00010-gfcd7278-dirty (Mar 03 2017 - 11:44:06)

    I2C: ready
    DRAM: 512 MiB
    Inside board_init..
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment

    Net: <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot: 1 0
    WARNING: Could not determine device tree to use
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    216 bytes read in 4 ms (52.7 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    Running uenvcmd ...
    reading uImage
    3951048 bytes read in 229 ms (16.5 MiB/s)
    reading am335x-edge.dtb
    36802 bytes read in 9 ms (3.9 MiB/s)
    ## Booting kernel from Legacy Image at 82000000 ...
    Image Name: Linux-4.4.52-02808-g18c4fd5-dirt
    Created: 2017-03-03 15:43:26 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3950984 Bytes = 3.8 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 8fffffc1 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpuset
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.4.52-02808-g18c4fd5-dirty (zclark@debian) (gcc version 4.9.3 (Timesys 20160328) ) #5 SMP Fri Mar 3 10:43:10 EST 2017
    [ 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: Remkon EdgeCOM
    [ 0.000000] bootconsole [earlycon0] enabled
    [ 0.000000] cma: Reserved 16 MiB at 0x9e800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon )
    [ 0.000000] PERCPU: Embedded 14 pages/cpu @df912000 s24896 r8192 d24256 u57344
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129408
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait ip=none earlyprintk
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Memory: 481112K/522240K available (7206K kernel code, 803K rwdata, 2532K rodata, 468K init, 8233K bss, 24744K reserved, 16384K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc098adb8 (9740 kB)
    [ 0.000000] .init : 0xc098b000 - 0xc0a00000 ( 468 kB)
    [ 0.000000] .data : 0xc0a00000 - 0xc0ac8fe0 ( 804 kB)
    [ 0.000000] .bss : 0xc0acb000 - 0xc12d57d0 (8234 kB)
    [ 0.000000] Running RCU self tests
    [ 0.000000] Hierarchical RCU implementation.
    [ 0.000000] RCU lockdep checking is enabled.
    [ 0.000000] Build-time adjustment of leaf fanout to 32.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000014] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.008169] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.017780] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.023360] clocksource_probe: no matching clocksources found
    [ 0.030490] Console: colour dummy device 80x30
    [ 0.035223] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    [ 0.043292] ... MAX_LOCKDEP_SUBCLASSES: 8
    [ 0.047590] ... MAX_LOCK_DEPTH: 48
    [ 0.051976] ... MAX_LOCKDEP_KEYS: 8191
    [ 0.056554] ... CLASSHASH_SIZE: 4096
    [ 0.061119] ... MAX_LOCKDEP_ENTRIES: 32768
    [ 0.065786] ... MAX_LOCKDEP_CHAINS: 65536
    [ 0.070440] ... CHAINHASH_SIZE: 32768
    [ 0.075108] memory used by lock dependency info: 5167 kB
    [ 0.080745] per task-struct memory footprint: 1536 bytes
    [ 0.086412] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
    [ 0.125908] pid_max: default: 32768 minimum: 301
    [ 0.131128] Security Framework initialized
    [ 0.135566] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.142461] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.152797] Initializing cgroup subsys io
    [ 0.157176] Initializing cgroup subsys memory
    [ 0.161828] Initializing cgroup subsys devices
    [ 0.166642] Initializing cgroup subsys freezer
    [ 0.171367] Initializing cgroup subsys perf_event
    [ 0.176379] CPU: Testing write buffer coherency: ok
    [ 0.182945] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [ 0.188511] Setting up static identity map for 0x80008340 - 0x800083b8
    [ 0.199486] Brought up 1 CPUs
    [ 0.202641] SMP: Total of 1 processors activated (996.14 BogoMIPS).
    [ 0.209266] CPU: All CPU(s) started in SVC mode.
    [ 0.218007] devtmpfs: initialized
    [ 0.259954] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3

    [ 0.316502] omap_hwmod: debugss: _wait_target_disable failed

    [ 0.322836] Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078

    [ 0.330803] pgd = c0004000

    [ 0.333672] [f9e3e078] *pgd=44e11452(bad)

    [ 0.337898] Internal error: : 1028 [#1] SMP ARM

    [ 0.342645] Modules linked in:

    [ 0.345880] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.52-02808-g18c4fd5-dirty #5

    [ 0.353932] Hardware name: Generic AM33XX (Flattened Device Tree)

    [ 0.360286] task: de096d00 ti: de098000 task.ti: de098000

    [ 0.365943] PC is at _update_sysc_cache+0x2c/0x94

    [ 0.370868] LR is at _enable+0x254/0x2d4

    [ 0.374988] pc : [<c002714c>] lr : [<c00276e4>] psr: 40000013

    [ 0.374988] sp : de099e98 ip : 00000000 fp : c098b598

    [ 0.386971] r10: c09dd858 r9 : c09dd83c r8 : 00000000

    [ 0.392432] r7 : c0a225a0 r6 : c0acb978 r5 : 00000000 r4 : c0a21ce4

    [ 0.399232] r3 : f9e3e078 r2 : c0a22b54 r1 : f9e3e000 r0 : c0a21ce4

    [ 0.406035] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none

    [ 0.413461] Control: 10c5387d Table: 80004019 DAC: 00000051

    [ 0.419456] Process swapper/0 (pid: 1, stack limit = 0xde098218)

    [ 0.425720] Stack: (0xde099e98 to 0xde09a000)

    [ 0.430289] 9e80: 00000000 c00276e4

    [ 0.438793] 9ea0: 00000001 00000000 a0000013 c0a21ce4 00000001 c0a21d30 c0a09500 c0999418

    [ 0.447297] 9ec0: c098b598 c0a228fc c099975c 00000000 c0a21ce4 c099934c 00000000 c0027cf8

    [ 0.455801] 9ee0: 00000000 c0a05db0 c0a05db0 de123f40 c0999e7c c0999eac 00000000 c00098a4

    [ 0.464304] 9f00: 00000001 c00950b8 00000000 c0a40968 c098be00 de096d00 00000000 c00950b8

    [ 0.472808] 9f20: 00000065 000000bf c0706740 c005e938 00000001 c08952a8 c0954550 00000000

    [ 0.481311] 9f40: 00000001 00000001 c09f76f8 c09f7708 c09f7724 00000001 c0acb000 000000c0

    [ 0.489815] 9f60: c0acb000 c09dd858 c098b598 c098beb8 00000001 00000001 00000000 c098b598

    [ 0.498318] 9f80: c06d39e8 00000000 c06d39e8 00000000 00000000 00000000 00000000 00000000

    [ 0.506820] 9fa0: 00000000 c06d39f0 00000000 c000f850 00000000 00000000 00000000 00000000

    [ 0.515324] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

    [ 0.523826] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000

    [ 0.532336] [<c002714c>] (_update_sysc_cache) from [<c00276e4>] (_enable+0x254/0x2d4)

    [ 0.540491] [<c00276e4>] (_enable) from [<c0999418>] (_setup+0xcc/0x410)

    [ 0.547476] [<c0999418>] (_setup) from [<c0027cf8>] (omap_hwmod_for_each+0x34/0x60)

    [ 0.555447] [<c0027cf8>] (omap_hwmod_for_each) from [<c0999eac>] (__omap_hwmod_setup_all+0x30/0x40)

    [ 0.564847] [<c0999eac>] (__omap_hwmod_setup_all) from [<c00098a4>] (do_one_initcall+0x80/0x1e0)

    [ 0.573982] [<c00098a4>] (do_one_initcall) from [<c098beb8>] (kernel_init_freeable+0x208/0x2d8)

    [ 0.583025] [<c098beb8>] (kernel_init_freeable) from [<c06d39f0>] (kernel_init+0x8/0xec)

    [ 0.591444] [<c06d39f0>] (kernel_init) from [<c000f850>] (ret_from_fork+0x14/0x24)

    [ 0.599321] Code: e3110c01 e590105c e6f13073 1a00000c (e5933000)

    [ 0.605723] ---[ end trace b8da58537c2e4093 ]---

    [ 0.610674] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

    [ 0.610674]

    [ 0.620263] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

    [ 0.620263]
  • Yordan,

    We have made it past this... It turned out to be the Unhandled fault: external abort on non-linefetch (0x1028) at 0xf9e3e078 was the virtual address of a RTC register and the RTC was not disabled in the kernel. e2e.ti.com/.../368679

    Now we are stuck at Waiting for root device /dev/mmcblk0p2, I opened e2e.ti.com/.../579502 to track.

    Regards,
    Brian
  • Yordan, Thank you for the post.

    We did however find our problem yesterday, we are able to boot to the Root File System from the SD Card without the SD_CD line connected.

    it turned out to be a problem in the mmc device tree:

    This patch fixed it:
    &mmc1 {
    status = "okay";
    - vqmmc-supply = <&ldo3_reg>;
    vmmc-supply = <&ldo4_reg>;
    bus-width = <0x4>;
    - pinctrl-names = "default"; /*, "sleep";*/
    - pinctrl-0 = <&sd_card_pins_default>;
    - /*pinctrl-1 = <&sd_card_pins_sleep>;*/
    - /*no-1-8-v;*/
    - /*broken-cd;*/
    - cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
    };

    Thanks and Regards, Brian