Hi,
I cannot get the Kernel to find the firmware for the serdes and dsps. Soon after that the kernel panics, so I think the error has something to do with it.The boot displays the following:
K2L EVM # ubi part ubifs
Creating 1 MTD partitions on "nand0":
0x000000180000-0x000020000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "mtd=2"
UBI: MTD device size: 510 MiB
UBI: number of good PEBs: 4080
UBI: number of bad PEBs: 4
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 2
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 4080
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 1/0
K2L EVM # ubifsmount rootfs
UBIFS: mounted UBI device 0, volume 1, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size: 196685824 bytes (192076 KiB, 187 MiB, 1549 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root: 0 bytes (0 KiB)
K2L EVM # ubifsls /lib/firmware
4836596 Fri Mar 27 08:25:36 2015 messageq_single.k2e.xe66
5556 Mon Oct 03 22:39:00 2016 ks2_pa_post_pdsp0.bin
3872 Mon Oct 03 22:39:00 2016 ks2_pa_post_pdsp1.bin
3952 Mon Oct 03 22:39:02 2016 ks2_qmss_pdsp_qos.bin
6860 Mon Oct 03 22:39:00 2016 ks2_pa_eg2_pdsp0.bin
2856 Mon Oct 03 22:39:03 2016 ks2_xgbe_serdes.bin
2840 Mon Oct 03 22:39:03 2016 ks2_pcie_serdes.bin
5872 Mon Oct 03 22:39:00 2016 ks2_pa_eg1_pdsp0.bin
7432 Mon Oct 03 22:39:00 2016 ks2_pa_in4_pdsp0.bin
5076 Mon Oct 03 22:39:00 2016 ks2_pa_in4_pdsp1.bin
4280 Mon Oct 03 22:39:01 2016 ks2_pa_eg0_pdsp0.bin
8384 Mon Oct 03 22:39:00 2016 ks2_pa_eg0_pdsp1.bin
7752 Mon Oct 03 22:39:01 2016 ks2_pa_eg0_pdsp2.bin
6944 Mon Oct 03 22:39:00 2016 ks2_pa_in3_pdsp0.bin
5588 Mon Oct 03 22:39:01 2016 ks2_pa_in2_pdsp0.bin
7472 Mon Oct 03 22:39:00 2016 ks2_pa_in1_pdsp0.bin
4842336 Fri Mar 27 08:25:36 2015 messageq_single.k2l.xe66
5748 Mon Oct 03 22:39:00 2016 ks2_pa_in1_pdsp1.bin
7328 Mon Oct 03 22:39:00 2016 ks2_pa_in0_pdsp0.bin
8496 Mon Oct 03 22:39:00 2016 ks2_pa_in0_pdsp1.bin
2488 Mon Oct 03 22:39:03 2016 ks2_gbe_serdes.bin
104200 Mon Oct 03 22:39:03 2016 ks2_xgbe_serdes_mcu_fw.bin
4842472 Fri Mar 27 08:25:36 2015 messageq_single.xe66
1764 Mon Oct 03 22:39:02 2016 ks2_qmss_pdsp_acc48.bin
K2L EVM # mon_install 0x0c140000
## installed monitor, freq [199680000], status 0
K2L EVM # run args_all
K2L EVM # setenv bootargs ${bootargs} earlyprintk
K2L EVM # print env bootargs
bootargs=console=ttyS0,115200n8 rootwait=1 earlyprintk
K2L EVM # bootm 0x88000000 - 0x87000000
## Booting kernel from Legacy Image at 88000000 ...
Image Name:
Created: 2016-11-22 13:48:52 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3983720 Bytes = 3.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 87000000
Booting using the fdt blob at 0x87000000
Loading Kernel Image ... OK
OK
Using Device Tree in place at 87000000, end 8700dde2
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.19-gdb0b54cdad (neukkari@xskybex-laptop) (gcc v
ersion 4.7.3 20130205 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.02-01-20
130221 - Linaro GCC 2013.02) ) #6 SMP PREEMPT Tue Nov 22 15:38:29 EET 2016
[ 0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] Machine model: Texas Instruments Keystone 2 Lamarr EVM
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Switching physical address space to 0x800000000
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, s
ize 8 MiB
[ 0.000000] Reserved memory: initialized node dsp_common_cma_pool, compatible
id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x0000000820000000, s
ize 512 MiB
[ 0.000000] Reserved memory: initialized node dsp_reserved_mpm_area, compatib
le id shared-dma-pool
[ 0.000000] cma: Reserved 16 MiB at 0x000000085f000000
[ 0.000000] Forcing write-allocate cache policy for SMP
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
[ 0.000000] PERCPU: Embedded 13 pages/cpu @debaf000 s21184 r8192 d23872 u5324
8
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pag
es: 260608
[ 0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 earlyprint
k
[ 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: 1007016K/1048576K available (5337K kernel code, 322K rwda
ta, 1788K rodata, 352K init, 197K bss, 16984K reserved, 24576K cma-reserved, 507
904K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc06fd850 (7127 kB)
[ 0.000000] .init : 0xc06fe000 - 0xc0756000 ( 352 kB)
[ 0.000000] .data : 0xc0756000 - 0xc07a6a44 ( 323 kB)
[ 0.000000] .bss : 0xc07a8000 - 0xc07d95c0 ( 198 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Build-time adjustment of leaf fanout to 32.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] of_psc_clk_init: error registering clk clkpcie1
[ 0.000000] Architected cp15 timer(s) running at 199.68MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles:
0x2e0d652267, max_idle_ns: 440795206693 ns
[ 0.000003] sched_clock: 56 bits at 199MHz, resolution 5ns, wraps every 43980
46511101ns
[ 0.008108] Switching to timer-based delay loop, resolution 5ns
[ 0.014236] keystone timer clock @199680000 Hz
[ 0.018964] Console: colour dummy device 80x30
[ 0.023507] Calibrating delay loop (skipped), value calculated using timer fr
equency.. 399.36 BogoMIPS (lpj=1996800)
[ 0.034149] pid_max: default: 4096 minimum: 301
[ 0.038822] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.045540] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.053062] Initializing cgroup subsys io
[ 0.057178] Initializing cgroup subsys devices
[ 0.061716] Initializing cgroup subsys freezer
[ 0.066259] CPU: Testing write buffer coherency: ok
[ 0.071404] /cpus/cpu@0 missing clock-frequency property
[ 0.076823] /cpus/cpu@1 missing clock-frequency property
[ 0.082242] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.088017] Setting up static identity map for 0x80008300 - 0x8000840c
[ 0.175906] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.175975] Brought up 2 CPUs
[ 0.184799] SMP: Total of 2 processors activated (798.72 BogoMIPS).
[ 0.191161] CPU: All CPU(s) started in SVC mode.
[ 0.196111] devtmpfs: initialized
[ 0.207772] VFP support v0.3: implementor 41 architecture 4 part 30 variant f
rev 0
[ 0.215861] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma
x_idle_ns: 19112604462750000 ns
[ 0.226361] pinctrl core: initialized pinctrl subsystem
[ 0.231930] NET: Registered protocol family 16
[ 0.237157] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.250873] irq: no irq domain found for /soc/keystone_irq@26202a0 !
[ 0.257531] irq: no irq domain found for /soc/keystone_irq@26202a0 !
[ 0.264162] irq: no irq domain found for /soc/keystone_irq@26202a0 !
[ 0.270817] irq: no irq domain found for /soc/keystone_irq@26202a0 !
[ 0.283426] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint
registers.
[ 0.291557] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.305412] SCSI subsystem initialized
[ 0.311211] clocksource: Switched to clocksource arch_sys_counter
[ 0.342075] NET: Registered protocol family 2
[ 0.346926] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.354136] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.360715] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.367240] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.373204] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.379696] NET: Registered protocol family 1
[ 0.384359] RPC: Registered named UNIX socket transport module.
[ 0.390374] RPC: Registered udp transport module.
[ 0.395196] RPC: Registered tcp transport module.
[ 0.399991] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.406810] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counte
rs available
[ 0.415919] platform alarmtimer: set dma_pfn_offset00780000
[ 0.422047] futex hash table entries: 16 (order: -2, 1024 bytes)
[ 0.438681] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.445292] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.450035] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.458898] NET: Registered protocol family 38
[ 0.463556] bounce: pool size: 64 pages
[ 0.467689] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2
53)
[ 0.475226] io scheduler noop registered
[ 0.479247] io scheduler deadline registered
[ 0.483658] io scheduler cfq registered (default)
[ 0.488601] keystone_irq soc:keystone_irq@26202a0: irqchip registered, nr_irq
s 28
[ 0.541533] ti,keystone-serdes 232a000.phy: Direct firmware load for ks2_gbe_
serdes.bin failed with error -2
[ 0.551497] ti,keystone-serdes 232a000.phy: can't get any serdes init fw
[ 0.558296] ti,keystone-serdes 232a000.phy: serdes procider init failed -19
[ 0.566236] keystone-navigator-qmss soc:qmss@2a40000: qmgr start queue 0, num
ber of queues 8192
[ 0.575165] keystone-navigator-qmss soc:qmss@2a40000: added qmgr start queue
0, num of queues 8192, reg_peek f09c0000, reg_status f0988000, reg_config f098a0
00, reg_region f098c000, reg_push f0a00000, reg_pop f0a40000
[ 0.594839] keystone-navigator-qmss soc:qmss@2a40000: failed to get firmware
for pdsp pdsp0
[ 0.603354] keystone-navigator-qmss soc:qmss@2a40000: failed to get firmware
for pdsp pdsp3
[ 0.611861] keystone-navigator-qmss soc:qmss@2a40000: failed to get firmware
for pdsp pdsp7
[ 0.620919] keystone-navigator-qmss soc:qmss@2a40000: pdsp id 0 not started f
or range acc-low-0
[ 0.639355] Unhandled fault: asynchronous external abort (0x211) at 0x00000000
[ 0.646675] pgd = c0003000
[ 0.649466] [00000000] *pgd=80000800004003, *pmd=00000000
[ 0.654964] Internal error: : 211 [#1] PREEMPT SMP ARM
[ 0.660194] Modules linked in:
[ 0.663337] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.19-gdb0b54cdad #6
[ 0.670396] Hardware name: Keystone
[ 0.673971] task: de478000 ti: de47c000 task.ti: de47c000
[ 0.679467] PC is at knav_dma_hw_init+0x4c/0xc0
[ 0.684093] LR is at get_parent_ip+0x10/0x2c
[ 0.688453] pc : [<c03b1a78>] lr : [<c0047548>] psr: 60000013
[ 0.688453] sp : de47de48 ip : f09ae000 fp : de6d1f78
[ 0.700128] r10: c07cc504 r9 : debe6b50 r8 : c07cc504
[ 0.705444] r7 : debe696c r6 : 00000080 r5 : de6d1f88 r4 : de6d1f10
[ 0.712067] r3 : 0000445c r2 : 00000000 r1 : 00000000 r0 : 00000000
[ 0.718691] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kern
el
[ 0.726098] Control: 30c5387d Table: 00003000 DAC: fffffffd
[ 0.731937] Process swapper/0 (pid: 1, stack limit = 0xde47c210)
[ 0.738037] Stack: (0xde47de48 to 0xde47e000)
[ 0.742484] de40: 00000095 de6d1f10 de6d1f80 c02e829c 00000
000 00000000
[ 0.750763] de60: 00000000 c016c7bc 00000095 de602e10 debe696c de6d1f54 00000
b60 00000000
[ 0.759041] de80: 00000080 00000000 00000008 0000445c 00001000 00000000 c0743
83c ffffffef
[ 0.767320] dea0: de602e10 fffffdfb c0782c54 00000000 c074383c c06fe598 00000
000 c0314518
[ 0.775598] dec0: c03144c8 de602e10 c07cdcf4 00000000 c0782c54 c0313234 de602
e10 c0782c54
[ 0.783877] dee0: de602e44 00000000 c07260a0 c0313388 00000000 c0782c54 c0313
2fc c0311968
[ 0.792155] df00: de406f5c de560634 c0782c54 de661480 c07872a8 c0312934 c0673
088 c0782c54
[ 0.800433] df20: 00000006 c0782c54 00000006 22855017 00000000 c0313928 c0314
45c c074f7c0
[ 0.808712] df40: 00000006 c00096e0 0000f4ef 00000000 22855017 00000000 00000
006 c074f7c0
[ 0.816990] df60: 00000006 c0743830 c07a8000 0000007c c06fe598 c06fedbc 00000
006 00000006
[ 0.825268] df80: 00000000 c06fe598 00000000 c0509ee8 00000000 00000000 00000
000 00000000
[ 0.833546] dfa0: 00000000 c0509ef0 00000000 c000f668 00000000 00000000 00000
000 00000000
[ 0.841823] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000
000 00000000
[ 0.850101] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000
000 00000000
[ 0.858390] [<c03b1a78>] (knav_dma_hw_init) from [<c02e829c>] (knav_dma_probe
+0x62c/0x6c0)
[ 0.866762] [<c02e829c>] (knav_dma_probe) from [<c0314518>] (platform_drv_pro
be+0x50/0xb0)
[ 0.875131] [<c0314518>] (platform_drv_probe) from [<c0313234>] (driver_probe
_device+0x1e0/0x2a8)
[ 0.884109] [<c0313234>] (driver_probe_device) from [<c0313388>] (__driver_at
tach+0x8c/0x90)
[ 0.892650] [<c0313388>] (__driver_attach) from [<c0311968>] (bus_for_each_de
v+0x54/0x88)
[ 0.900929] [<c0311968>] (bus_for_each_dev) from [<c0312934>] (bus_add_driver
+0xec/0x1f8)
[ 0.909209] [<c0312934>] (bus_add_driver) from [<c0313928>] (driver_register+
0x78/0xf4)
[ 0.917316] [<c0313928>] (driver_register) from [<c00096e0>] (do_one_initcall
_debug+0x40/0x88)
[ 0.926037] [<c00096e0>] (do_one_initcall_debug) from [<c06fedbc>] (kernel_in
it_freeable+0x118/0x1e4)
[ 0.935366] [<c06fedbc>] (kernel_init_freeable) from [<c0509ef0>] (kernel_ini
t+0x8/0xf8)
[ 0.943562] [<c0509ef0>] (kernel_init) from [<c000f668>] (ret_from_fork+0x14/
0x2c)
[ 0.951232] Code: e594300c e7f03053 e1823003 e58c3004 (e5942008)
[ 0.957430] ---[ end trace 9cc7c360a05262b1 ]---
[ 0.962139] note: swapper/0[1] exited with preempt_count 1
[ 0.967764] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00
00000b
[ 0.967764]
[ 0.977089] CPU1: stopping
[ 0.979886] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.4.19-gd
b0b54cdad #6
[ 0.988163] Hardware name: Keystone
[ 0.991748] [<c00156f4>] (unwind_backtrace) from [<c0012980>] (show_stack+0x1
0/0x14)
[ 0.999597] [<c0012980>] (show_stack) from [<c02a95bc>] (dump_stack+0x74/0x94
)
[ 1.006920] [<c02a95bc>] (dump_stack) from [<c0014674>] (handle_IPI+0x1bc/0x3
6c)
[ 1.014416] [<c0014674>] (handle_IPI) from [<c0009454>] (gic_handle_irq+0x80/
0x8c)
[ 1.022089] [<c0009454>] (gic_handle_irq) from [<c050fe40>] (__irq_svc+0x40/0
x74)
[ 1.029670] Exception stack(0xde49ff90 to 0xde49ffd8)
[ 1.034813] ff80: 00000001 00000000 de49f
fe8 c001e740
[ 1.043092] ffa0: c07a4be0 c051422c c07a4be0 c07503a4 c07a43b6 c075994c 00000
000 00000001
[ 1.051371] ffc0: 00000001 de49ffe0 c0010084 c0010088 60000013 ffffffff
[ 1.058085] [<c050fe40>] (__irq_svc) from [<c0010088>] (arch_cpu_idle+0x30/0x
3c)
[ 1.065585] [<c0010088>] (arch_cpu_idle) from [<c005b65c>] (cpu_startup_entry
+0x120/0x340)
[ 1.073954] [<c005b65c>] (cpu_startup_entry) from [<800094ec>] (0x800094ec)
[ 1.081017] ---[ end Kernel panic - not syncing: Attempted to kill init! exit
code=0x0000000b
[ 1.081017]
I have now tried several tricks, but haven't so far succeeded in making the kernel to load the firmware bin files.
My board is a custom K2L board. The best I have tried so far:
1. I built a UBI file system image using the K2L rootfs from the MCSDK images "as a template".
2. I added all the firmware binaries the "k2-fw-initrd.cpio.gz" into /lib/firmware in my UBI file system file and checked that "ks2_gbe_serdes.bin" was included there.
3. I built a ubifs file by using the commands mkfs.ubifs and ubinize. The output ubi file contains the following volumes:
boot
uImage.bin
skern.bin
k2l.dtb
rootfs
all the ordinary Linux files + /lib/firmware
4. I flashed that file system into NAND
Mounting it in the u-boot succeeds with the commands
ubi part ubifs
ubifsmount rootfs
I can see files in the file system by using the command "ubifsls". Also the firmware bin files are in /lib/firmware. See the console log above, it is shown also there.
But...when booting the kernel it still does not find the firmware files.
I load the kerlen image and device tree into place with CCS and then boot the kernel by giving the commands:
setenv bootargs ${bootargs} earlyprintk
install_mon 0x0c140000
bootm 0x88000000 - 0x87000000
The kernel starts to boot like in the log above but then gives the error about the serdes firmware and panics.
I prefer booting the kernel from DDR3 for now, because that way I get the boot log on my terminal. If I let it boot from the UBI file system it prints nothing although I use the exactly same uImage binary in both cases. I don't know why.
One more strange thing is that when I run this same kernel in K2H EVM board I complains nothing about the serdes firmware
Questions:
1. How should I tell kernel where to load the firmware?
2. Is it possible at all the boot the kernel like I try to do it now: By mounting the UBI file system with the u-boot and then manually booting with "bootm" command, or is it necessary to boot all the way from UBI only? At lease the bootm command does not seem to provide any link to the file system for the kernel.
Best regards,
Ari