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.

Am335x Kernel Booting Problem

Hello everyone!

I have a problem, again: it's with booting Kernel
I build own Kernel with PRU support and followed these steps:
1) Installed SDK evm-02.00.00.00-Linux-x86
2) Then, i installed PRU Software Support Package and edit .configure file
3) Then, i followed this guide: processors.wiki.ti.com/.../Linux_Kernel_Users_Guide
3.1) i completed this "Installing the Kernel Image and Device Tree Binaries" in dir /home/rootfs/boot
3.2) i get "file system" from tar. /home/rootfs
3.3) i completed "Installing the Kernel Modules" in /home/rootfs
4) Then i ran SD card script --> chosen custom images.
4.1) Because I do not have MLO and u-boot, i take them from <sdk-path>/board-support/prebuild-images. How to build own MLO and u-boot? (this guide I didn't understand 

5) Insert SD card on board and power on

[    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.1.6-g52c4aa7 (root@SS) (gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 4.9-2015.05) ) #1 PREEMPT Thu Dec 10 00:41:30 NOVT 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 BeagleBone Black
[    0.000000] cma: Reserved 24 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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext4 rootwait
[    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: 485328K/524288K available (6251K kernel code, 254K rwdata, 2096K rodata, 264K init, 229K bss, 14384K reserved, 24576K 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 - 0xff000000   ( 488 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 - 0xc082f05c   (8349 kB)
[    0.000000]       .init : 0xc0830000 - 0xc0872000   ( 264 kB)
[    0.000000]       .data : 0xc0872000 - 0xc08b1b28   ( 255 kB)
[    0.000000]        .bss : 0xc08b4000 - 0xc08ed7f8   ( 230 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Additional per-CPU info printed with stalls.
[    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.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000030] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000040] OMAP clocksource: timer1 at 24000000 Hz
[    0.000205] Console: colour dummy device 80x30
[    0.000226] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.000232] This ensures that you still see kernel messages. Please
[    0.000236] update your kernel commandline.
[    0.000252] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.089366] pid_max: default: 32768 minimum: 301
[    0.089461] Security Framework initialized
[    0.089509] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089518] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090135] Initializing cgroup subsys blkio
[    0.090157] Initializing cgroup subsys memory
[    0.090194] Initializing cgroup subsys devices
[    0.090208] Initializing cgroup subsys freezer
[    0.090219] Initializing cgroup subsys perf_event
[    0.090242] CPU: Testing write buffer coherency: ok
[    0.090604] Setting up static identity map for 0x80008200 - 0x80008270
[    0.091976] devtmpfs: initialized
[    0.100077] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.107248] omap_hwmod: tptc0 using broken dt data from edma
[    0.107341] omap_hwmod: tptc1 using broken dt data from edma
[    0.107421] omap_hwmod: tptc2 using broken dt data from edma
[    0.111661] omap_hwmod: debugss: _wait_target_disable failed
[    0.166298] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.168289] pinctrl core: initialized pinctrl subsystem
[    0.169512] NET: Registered protocol family 16
[    0.171395] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.199355] cpuidle: using governor ladder
[    0.229345] cpuidle: using governor menu
[    0.232303] OMAP GPIO hardware version 0.1
[    0.239953] No ATAGs?
[    0.239983] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.276266] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.278883] vgaarb: loaded
[    0.279418] SCSI subsystem initialized
[    0.279890] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.280030] pps_core: LinuxPPS API ver. 1 registered
[    0.280038] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.280066] PTP clock support registered
[    0.280763] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.280952] Advanced Linux Sound Architecture Driver Initialized.
[    0.281670] Switched to clocksource timer1
[    0.290434] NET: Registered protocol family 2
[    0.291171] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.291215] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.291252] TCP: Hash tables configured (established 4096 bind 4096)
[    0.291329] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.291345] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.291484] NET: Registered protocol family 1
[    0.291904] RPC: Registered named UNIX socket transport module.
[    0.291918] RPC: Registered udp transport module.
[    0.291924] RPC: Registered tcp transport module.
[    0.291929] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.292697] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
[    0.292738] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.294364] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.294443] audit: initializing netlink subsys (disabled)
[    0.294505] audit: type=2000 audit(0.280:1): initialized
[    0.300715] VFS: Disk quotas dquot_6.6.0
[    0.300901] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.302915] NFS: Registering the id_resolver key type
[    0.302985] Key type id_resolver registered
[    0.302992] Key type id_legacy registered
[    0.303055] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.305272] NET: Registered protocol family 38
[    0.305340] io scheduler noop registered
[    0.305353] io scheduler deadline registered
[    0.305405] io scheduler cfq registered (default)
[    0.306307] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.307926] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    0.308841] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[    0.311979] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 155, base_baud = 3000000) is a 8250
[    0.947136] console [ttyS0] enabled
[    0.951499] [drm] Initialized drm 1.1.0 20060810
[    0.956507] slave hdmi: could not get i2c
[    0.969425] brd: module loaded
[    0.976881] loop: module loaded
[    0.980843] mtdoops: mtd device (mtddev=name/number) must be supplied
[    0.989157] mousedev: PS/2 mouse device common for all mice
[    0.994872] i2c /dev entries driver
[    0.999241] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.079884] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.088240] ledtrig-cpu: registered to indicate activity on CPUs
[    1.094687] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    1.100560] mmc0: new high speed SDHC card at address 1234
[    1.107040] mmcblk0: mmc0:1234 SA04G 3.68 GiB
[    1.112516] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    1.120294]  remoteproc0: wkup_m3 is available
[    1.125034]  mmcblk0: p1 p2
[    1.128686]  remoteproc0: Note: remoteproc is still under development and considered experimental.
[    1.137851]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[    1.149553]  remoteproc0: Direct firmware load for am335x-pm-firmware.elf failed with error -2
[    1.162974] oprofile: using arm/armv7
[    1.166972] Initializing XFRM netlink socket
[    1.171296] NET: Registered protocol family 17
[    1.175920]  remoteproc0: Falling back to user helper
[    1.181222] NET: Registered protocol family 15
[    1.185900] Key type dns_resolver registered
[    1.190424] omap_voltage_late_init: Voltage driver support not added
[    1.198362] ThumbEE CPU extension supported.
[    1.204738] Registering SWP/SWPB emulation handler
[    1.235958] mmc1: MAN_BKOPS_EN bit is not set
[    1.243205] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.248622] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.254290] mmc1: new high speed MMC card at address 0001
[    1.262323] mmcblk1: mmc1:0001 MMC04G 3.65 GiB
[    1.267778] mmcblk1boot0: mmc1:0001 MMC04G partition 1 1.00 MiB
[    1.274050] mmcblk1boot1: mmc1:0001 MMC04G partition 2 1.00 MiB
[    1.281925]  mmcblk1: p1 p2
[    1.393980] tda998x 0-0070: found TDA19988
[    1.399042] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.405716] [drm] No driver support for vblank timestamp query.
[    1.412019] tilcdc 4830e000.lcdc: No connectors reported connected with modes
[    1.419198] [drm] Cannot find any crtc or sizes - going 1024x768
[    1.433576] Console: switching to colour frame buffer device 128x48
[    1.445129] tilcdc 4830e000.lcdc: fb0:  frame buffer device
[    1.450724] tilcdc 4830e000.lcdc: registered panic notifier
[    1.481702] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[    1.551723] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.557858] davinci_mdio 4a101000.mdio: no live phy, scanning all
[    1.564279] davinci_mdio: probe of 4a101000.mdio failed with error -5
[    1.571404] cpsw 4a100000.ethernet: Detected MACID = 6c:ec:eb:aa:e1:d5
[    1.592235] hctosys: unable to open rtc device (rtc0)
[    1.600473] ALSA device list:
[    1.603559]   No soundcards found.
[    2.026595] EXT4-fs (mmcblk0p2): recovery complete
[    2.031439] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.039689] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.050293] devtmpfs: mounted
[    2.053675] Freeing unused kernel memory: 264K (c0830000 - c0872000)
/sbin/init: error while loading shared libraries: /usr/lib/libc.so.6: invalid ELF header
[    2.201843] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    2.201843]
[    2.211033] drm_kms_helper: panic occurred, switching back to text console
[    2.217961] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    2.217961]
[   78.161682] random: nonblocking pool is initialized

Also, i tried to change /prebuilt-images (i cp my zImage and DTB files) and after ran SD script and chosen "Install pre-built images from SDK" . When it finished, i copied to the folder modules (where exist PRU) in rootfs dir on SD. Linux starts, but gave that mistake:

[  302.561771] EXT4-fs (mmcblk0p2): error count since last fsck: 40
[  302.567867] EXT4-fs (mmcblk0p2): initial error at time 1449480854: __ext4_get_inode_loc:3795: inode 202001: block 819677
[  302.578894] EXT4-fs (mmcblk0p2): last error at time 1449480889: ext4_journal_check_start:56: inode 210081: block 851970
Arago 2015.09 am335x-evm /dev/ttyO0
ogin: [   64.582148]  remoteproc1: failed to load am335x-pru0-fw
[   64.587506] pru-rproc 4a334000.pru0: booting the PRU core manually
[   64.595324]  remoteproc1: powering up 4a334000.pru0
[   64.600555]  remoteproc1: Direct firmware load for am335x-pru0-fw failed with   error -2
[   64.609304]  remoteproc1: Falling back to user helper
[   64.615965]  remoteproc1: request_firmware failed: -11
[   64.621169] pru-rproc 4a334000.pru0: rproc_boot failed
[   64.627380]  remoteproc1: releasing 4a334000.pru0
[   64.632456] pru-rproc: probe of 4a334000.pru0 failed with error -11
[   64.639560]  remoteproc1: 4a338000.pru1 is available
[   64.645866]  remoteproc1: Note: remoteproc is still under development and considered experimental.
[   64.655029]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
[   64.666492]  remoteproc1: Direct firmware load for am335x-pru1-fw failed with    error -2
[   64.674669]  remoteproc1: Falling back to user helper
[   69.591061]  remoteproc1: failed to load am335x-pru1-fw
[   69.600162] pru-rproc 4a338000.pru1: booting the PRU core manually
[   69.607339]  remoteproc1: powering up 4a338000.pru1
[   69.612707]  remoteproc1: Direct firmware load for am335x-pru1-fw failed with    error -2
[   69.620681]  remoteproc1: Falling back to user helper
[   69.634226]  remoteproc1: request_firmware failed: -11
[   69.639452] pru-rproc 4a338000.pru1: rproc_boot failed
[   69.645653]  remoteproc1: releasing 4a338000.pru1
[   69.650649] pru-rproc: probe of 4a338000.pru1 failed with error -11
  • Hi,

    I will forward this to the Linux team.
  • Thanks.
    How long waiting the answer?
    So you didn't answer me: it is possible to do as i have described above?
  • I'm not a software expert myself. The software team will reply as soon as possible.
  • Hi,

    The above sequence you described to install the images on sd card is correct.

    Just a side note:

    Svyatoslav Venskiy said:
    3.1) i completed this "Installing the Kernel Image and Device Tree Binaries" in dir /home/rootfs/boot

    In this step you can use the image names, as provided in the wiki guide (am335x-boneblack.dtb & zImage) only if the sd card partitions /boot & rootfs were clean. 

    If you have a look at sd card with the prebuilt binaries on it, you'll see: 

    x0155517@mms:/media/x0155517/rootfs/boot$ ls -la
    total 111040
    drwxr-xr-x 2 root root 4096 Dec 7 11:54 .
    drwxr-xr-x 20 root root 4096 Jan 1 1970 ..
    lrwxrwxrwx 1 root root 38 Oct 7 22:30 am335x-boneblack.dtb -> devicetree-zImage-am335x-boneblack.dtb
    lrwxrwxrwx 1 root root 33 Oct 7 22:30 am335x-bone.dtb -> devicetree-zImage-am335x-bone.dtb
    lrwxrwxrwx 1 root root 32 Oct 7 22:30 am335x-evm.dtb -> devicetree-zImage-am335x-evm.dtb
    lrwxrwxrwx 1 root root 34 Oct 7 22:30 am335x-evmsk.dtb -> devicetree-zImage-am335x-evmsk.dtb
    -rw-r--r-- 1 root root 32637 Dec 7 11:54 devicetree-zImage-am335x-boneblack.dtb
    -rw-r--r-- 1 root root 31309 Oct 7 21:43 devicetree-zImage-am335x-bone.dtb
    -rw-r--r-- 1 root root 39851 Oct 7 21:43 devicetree-zImage-am335x-evm.dtb
    -rw-r--r-- 1 root root 37128 Oct 7 21:43 devicetree-zImage-am335x-evmsk.dtb
    -rw-r--r-- 1 root root 103613818 Oct 7 21:43 vmlinux-4.1.6-g52c4aa7
    lrwxrwxrwx 1 root root 21 Oct 7 22:31 zImage -> zImage-4.1.6-g52c4aa7
    -rwxr-xr-x 1 root root 3232752 Dec 7 11:53 zImage-4.1.6-g52c4aa7

    that those are actually symlinks & the actual dts & kernel binaries are named  zImage-4.1.6-g52c4aa7 & devicetree-zImage-<board name>.dtb 

    Regarding your question: 

    Svyatoslav Venskiy said:
    How to build own MLO and u-boot?

    You should use the following commands: 

    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ export ARCH=arm
    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ export PATH=/home/x0155517/ti-processor-sdk-linux-am335x-evm-02.00.00.00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/:$PATH
    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ export CROSS_COMPILE=arm-linux-gnueabihf-
    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ make distclean
    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ make am335x_evm_config

    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ make -j4 

    OR alternatively you can use: 

    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa$ cd ~/ti-processor-sdk-linux-am335x-evm-02.00.00.00/

    x0155517@mms:~/ti-processor-sdk-linux-am335x-evm-02.00.00.00$ make u-boot

    About the errors you see: 

    1). Have you tried fsck for your filesystem? This may be useful in removing the EXT4-fs errors.  

    2). As for the remoteproc errors, I have a couple of questions: 
    Are you loading the binaries from /firmware folder in your kernel sources (in other words are you using built-in binaries)?

    or

    Are you loading the .elf files from the filesystem with the use of init scripts? In that case inspect your fs (if elf are present) try with fresh copies, maybe the firmware images were damage when copying them on your sdcard the first time (/sbin/init: error while loading shared libraries: /usr/lib/libc.so.6: invalid ELF header) 

    Best Regards, 
    Yordan

  • I can't understand what is wrong with me:

    1) I clean the kernel (used ti-processor-sdk-linux-am335x-evm-02.00.00.00 and pru-addon-v4.0-Linux-x86 on VM with ubuntu 14.04 LTS)

    2) edit config ( use tisdk_am335x-evm_defconfig and enable PRU)

    3) compiling the kernel and dtb files ( zImage, am335x-bone*, am335x-boneblack*, am335x-evm*, am335x-evmsk.dtb) and copy them to folder <path-to-sdk>/board-support/prebuilt-images/

    4) compiling the kernel modules. Then i unpacked tisdk-rootfs-image-am335x-evm.tar.gz (/home/sitara/rootfs) and installed the modules (sudo make ARCH=arm INSTALL_MOD_PATH=/home/sitara/rootfs modules_install) to this folder. Then I packed fs in the archive with name tisdk-rootfs-image-am335x-evm.tar.gz and copy it to folder <path-to-sdk>/filesystem

    5) Ran SD script and chose 1. After, i insert SD on board and power on. 


    Agaro starts, but error with PRU remained. 


    About:

    "2). As for the remoteproc errors, I have a couple of questions: 
    Are you loading the binaries from /firmware folder in your kernel sources (in other words are you using built-in binaries)?"

    I do not quite understand the question. All actions that I have done as described above.

    Also, i used fsck for my fs on SD (i have ext3-fs, no ext4). It didn't help. Or I didn't understand how to use it.

    P.S. maybe i upload my archive with fs, that you checked it out. 

  • Hi,

    Were you able to successfully apply the pru-rpmsg & virtio patches:
    0002-rpmsg-pru-Add-a-PRU-RPMsg-driver.patch
    0003-virtio_ring-break-out-vring-descriptor-setup-code.patch
    0004-virtio_ring-revise-descriptor-addition-logic-for-vir.patch
    0005-virtio_ring-add-virtqueue_add_inbuf-outbuf_rpmsg-API.patch
    0006-rpmsg-fill-in-dma-fields-for-sgs-passed-to-virtio.patch

    Best Regards,
    Yordan