RobertCNelson / bb-kernel

MIT License
130 stars 102 forks source link

capemgr_loader causes kernel panic in 4.1.18-bone-rt-r20 #23

Closed QuickJack closed 8 years ago

QuickJack commented 8 years ago

I am trying to load capes using uEnv.txt. The BB-BONE-LOGIBONE cape is based on this https://github.com/QuickJack/logi-kernel/blob/master/beaglebone-black/logibone_ra2/BB-BONE-LOGIBONE-00A3.dts. I am using am33xx-boneblack-oberlay.dtb.

(1) cape_enable=bone_capemgr.enable_partno=BB-BONE-LOGIBONE:00A3 => Both capes are loading/working fine (2) cape_enable=BB-UART1,bone_capemgr.enable_partno=BB-BONE-LOGIBONE:00A3 => Both capes are loading/working fine (3) cape_enable=BB-UART1,BB-UART2 and loading BB-BONE-LOGIBONE by using "echo BB-BONE-LOGIBONE:00A3 > /sys/devices/platform/bone_capemgr/slots" is working fine (4) cape_enable=BB-UART1,BB-UART2,bone_capemgr.enable_partno=BB-BONE-LOGIBONE:00A3 => kernel panic:

[    4.119697] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,0A5A,1713BBBK2912                                                                             '
[    4.127011] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-bla                                                                             ck - #slots=4
[    4.143802] mmc0: host does not support reading read-only switch, assuming wr                                                                             ite-enable
[    4.154742] mmc0: new high speed SDHC card at address aaaa
[    4.161004] mmcblk0: mmc0:aaaa SL16G 14.8 GiB
[    4.167063]  mmcblk0: p1 p2
[    4.190372] bone_capemgr bone_capemgr: slot #0: No cape found
[    4.250337] bone_capemgr bone_capemgr: slot #1: No cape found
[    4.310333] bone_capemgr bone_capemgr: slot #2: No cape found
[    4.340147] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    4.347345] bone_capemgr bone_capemgr: slot #3: No cape found
[    4.353153] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER '                                                                             N/A' PR '0'
[    4.361304] bone_capemgr bone_capemgr: slot #4: override
[    4.366648] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    4.373668] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Ove                                                                             rride Manuf,BB-UART1'
[    4.382806] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER '                                                                             N/A' PR '0'
[    4.390958] bone_capemgr bone_capemgr: slot #5: override
[    4.396300] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    4.403319] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Ove                                                                             rride Manuf,BB-UART2'
[    4.412447] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-BONE-LOGIBON                                                                             E' VER '00A3#=>kernel' PR '0'
[    4.422170] bone_capemgr bone_capemgr: slot #6: override
[    4.427512] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    4.434532] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A3,Ove                                                                             rride Manuf,BB-BONE-LOGIBONE'
[    4.444709] bone_capemgr bone_capemgr: initialized OK.
[   39.710779] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltag                                                                             e latency[950000<->1325000]:-22
[   39.721319] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltag                                                                             e latency[950000<->1325000]:-22
[   39.731378] cpufreq: __cpufreq_add_dev: CPU0: Running at unlisted freq: 55000                                                                             0 KHz
[   55.651843] capemgr-loader- invoked oom-killer: gfp_mask=0x2800d0, order=0, o                                                                             om_score_adj=0
[   55.660258] capemgr-loader- cpuset=/ mems_allowed=0
[   57.487946] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.17-bone-rt-r                                                                             19 #1
[   57.495628] Hardware name: Generic AM33XX (Flattened Device Tree)
[   57.501835] [] (unwind_backtrace) from [] (show_stack+0x1                                                                             1/0x14)
[   57.509639] [] (show_stack) from [] (dump_header+0x4d/0x1                                                                             4c)
[   57.517111] [] (dump_header) from [] (__out_of_memory+0x2                                                                             79/0x284)
[   57.525096] [] (__out_of_memory) from [] (out_of_memory+0                                                                             x4d/0x54)
[   57.533081] [] (out_of_memory) from [] (__alloc_pages_nod                                                                             emask+0x5ad/0x65c)
[   57.541851] [] (__alloc_pages_nodemask) from [] (new_slab                                                                             +0x1e5/0x248)
[   57.550166] [] (new_slab) from [] (__slab_alloc.constprop                                                                             .9+0x157/0x1a8)
[   57.558669] [] (__slab_alloc.constprop.9) from [] (kmem_c                                                                             ache_alloc+0x87/0xd0)
[   57.567697] [] (kmem_cache_alloc) from [] (__d_alloc+0x1f                                                                             /0xd8)
[   57.575415] [] (__d_alloc) from [] (d_alloc+0x11/0x30)
[   57.582360] [] (d_alloc) from [] (lookup_dcache+0x53/0x70                                                                             )
[   57.589625] [] (lookup_dcache) from [] (__lookup_hash+0x1                                                                             7/0x2c)
[   57.597430] [] (__lookup_hash) from [] (lookup_slow+0x2b/                                                                             0x6c)
[   57.605063] [] (lookup_slow) from [] (link_path_walk+0x1d                                                                             5/0x570)
[   57.612956] [] (link_path_walk) from [] (path_openat+0x3b                                                                             /0x3e0)
[   57.620763] [] (path_openat) from [] (do_filp_open+0x23/0                                                                             x60)
[   57.628296] [] (do_filp_open) from [] (file_open_name+0xb                                                                             b/0xf0)
[   57.636101] [] (file_open_name) from [] (filp_open+0x21/0                                                                             x34)
[   57.643660] [] (filp_open) from [] (_request_firmware+0x1                                                                             93/0x56c)
[   57.651649] [] (_request_firmware) from [] (request_firmw                                                                             are_direct+0x21/0x2c)
[   57.660691] [] (request_firmware_direct) from [] (capemgr                                                                             _load_slot+0x87/0x440)
[   57.669791] [] (capemgr_load_slot) from [] (capemgr_loade                                                                             r+0x89/0x2f8)
[   57.678127] [] (capemgr_loader) from [] (kthread+0x8b/0xa                                                                             0)
[   57.685500] [] (kthread) from [] (ret_from_fork+0x11/0x30                                                                             )
[   57.692772] Mem-Info:
[   57.695076] active_anon:0 inactive_anon:0 isolated_anon:0
[   57.695076]  active_file:0 inactive_file:0 isolated_file:0
[   57.695076]  unevictable:0 dirty:0 writeback:0 unstable:0
[   57.695076]  slab_reclaimable:1193 slab_unreclaimable:793
[   57.695076]  mapped:0 shmem:0 pagetables:1 bounce:0
[   57.695076]  free:124291 free_pcp:157 free_cma:6078
[   57.726649] Normal free:497164kB min:2848kB low:3560kB high:4272kB active_ano                                                                             n:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolat                                                                             ed(anon):0kB isolated(file):0kB present:524288kB managed:507108kB mlocked:0kB di                                                                             rty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:4772kB slab_unreclai                                                                             mable:3172kB kernel_stack:352kB pagetables:4kB unstable:0kB bounce:0kB free_pcp:                                                                             628kB local_pcp:628kB free_cma:24312kB writeback_tmp:0kB pages_scanned:0 all_unr                                                                             eclaimable? yes
[   57.770029] lowmem_reserve[]: 0 0 0
[   57.773575] Normal: 9*4kB (UEMR) 9*8kB (UERC) 8*16kB (UEMRC) 11*32kB (UEMRC)                                                                              9*64kB (UEMRC) 7*128kB (UERC) 8*256kB (UEMR) 7*512kB (UEMRC) 6*1024kB (UERC) 6*2                                                                             048kB (UEMRC) 3*4096kB (UEC) 56*8192kB (UEC) = 497164kB
[   57.792729] 0 total pagecache pages
[   57.796239] 0 pages in swap cache
[   57.799568] Swap cache stats: add 0, delete 0, find 0/0
[   57.804830] Free swap  = 0kB
[   57.807721] Total swap = 0kB
[   57.810627] 131072 pages RAM
[   57.813518] 0 pages HighMem/MovableOnly
[   57.817369] 4294965447 pages reserved
[   57.821061] 6144 pages cma reserved
[   57.824565] [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oo                                                                             m_score_adj name
[   57.833180] Kernel panic - not syncing: Out of memory and no killable process                                                                             es...
[   57.833180]
[   57.842274] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.17-bone-rt-r                                                                             19 #1
[   57.849875] Hardware name: Generic AM33XX (Flattened Device Tree)
[   57.856014] [] (unwind_backtrace) from [] (show_stack+0x1                                                                             1/0x14)
[   57.863806] [] (show_stack) from [] (panic+0x6d/0x180)
[   57.870724] [] (panic) from [] (oom_zonelist_trylock+0x1/                                                                             0x80)
[   57.878344] [] (oom_zonelist_trylock) from [] (contig_pag                                                                             e_data+0xb10/0xb5c)
[   57.887182] ---[ end Kernel panic - not syncing: Out of memory and no killabl                                                                             e processes...
[   57.887182]
[   80.720349] random: nonblocking pool is initialized
QuickJack commented 8 years ago

Ich have to say, that I am not using the EEPROM on the Logibone. It has never been programmed. I am loading everything manually.

QuickJack commented 8 years ago

It is enough to add "cape_enable=bone_capemgr.enable_partno=UART1,UART2,UART3" to uEnv.txt. This will produce the above kernel panic. There's also an excessive delay when the capes are initialized during boot.

This bug is not related to the Logibone in any way!

RobertCNelson commented 8 years ago

I don't see that oom issue yet:

debian@beaglebone:~$ uname -r
4.1.18-ti-rt-r49
debian@beaglebone:~$ cat /proc/cmdline 
console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=UUID=1ea435af-d6f7-4713-9c46-758c7e0d2c75 ro rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
debian@beaglebone:~$ dmesg | grep bone
[    0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=UUID=1ea435af-d6f7-4713-9c46-758c7e0d2c75 ro rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
[    3.848068] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,,BBG115096703'
[    3.848101] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[    3.902769] bone_capemgr bone_capemgr: slot #0: No cape found
[    3.962745] bone_capemgr bone_capemgr: slot #1: No cape found
[    4.022741] bone_capemgr bone_capemgr: slot #2: No cape found
[    4.082742] bone_capemgr bone_capemgr: slot #3: No cape found
[    4.088541] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER 'N/A' PR '0'
[    4.088556] bone_capemgr bone_capemgr: slot #4: override
[    4.088573] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    4.088590] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-UART1'
[    4.088716] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER 'N/A' PR '0'
[    4.088730] bone_capemgr bone_capemgr: slot #5: override
[    4.088742] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    4.088757] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-UART2'
[    4.088862] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART3' VER 'N/A' PR '0'
[    4.088876] bone_capemgr bone_capemgr: slot #6: override
[    4.088888] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    4.088904] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-UART3'
[    4.089554] bone_capemgr bone_capemgr: initialized OK.
[    4.105042] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-UART1-00A0.dtbo' loaded; overlay id #0
[    4.109409] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-UART2-00A0.dtbo' loaded; overlay id #1
[    4.109566] bone_capemgr bone_capemgr: slot #6: dtbo 'BB-UART3-00A0.dtbo' loaded; overlay id #2
[   13.388091] LUN: removable file: /var/cache/doc-beaglebone-getting-started/beaglebone-getting-started-2015-12-04.img
QuickJack commented 8 years ago

You are using a different kernel. Did you also use am335x-boneblack-overlay.dtb in uEnv.txt?

I will post the exact output when using UART1, UART2 & UART3 on monday.

RobertCNelson commented 8 years ago

it's the exact same overlay patchset, no i used: am335x-bonegreen-overlay.dtb

But that's exactly the same as am335x-boneblack-overlay.dtb

QuickJack commented 8 years ago

There's on difference. I have connected the Logibone and did not program the EEPROM which is at address 0x57. According to http://papermint-designs.com/community/node/331 this is equivalent to Slot 3.

The relevant dmesg output is:

[    4.340147] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    4.347345] bone_capemgr bone_capemgr: slot #3: No cape found
QuickJack commented 8 years ago

I checked it with a blank BeagleBone Black and the problem is still there. It might have something to do with the fact, that I cannot update the overlays from https://github.com/RobertCNelson/bb.org-overlays using install.sh. The problem is "E: Unable to locate package bb-customizations". Obviously this package does not exisit in my active repositories. What exactly is the purpose of this package?

I manually did all the steps defined in install.sh except installing bb-cusomizations. However, the problem still exists. Here is my full bootlog:

U-Boot SPL 2013.04-dirty (May 06 2013 - 16:12:47)
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
OMAP SD/MMC: 0
mmc_send_cmd : timeout: No status update
reading u-boot.img
reading u-boot.img
U-Boot 2013.04-dirty (May 06 2013 - 16:12:47)
I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:    not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  1  0 
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
1649 bytes read in 4 ms (402.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uEnv.txt
1649 bytes read in 4 ms (402.3 KiB/s)
reading zImage
6907304 bytes read in 793 ms (8.3 MiB/s)
reading /dtbs//am335x-boneblack-overlay.dtb
54299 bytes read in 16 ms (3.2 MiB/s)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 8801041a
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.1.18-bone-rt-r20 (martin@abt-ew-ub-test) (gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 4.9-2015.05) ) #1 Tue Mar 1 13:48:07 CET 2016
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d
[    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.0 (sgx neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyS0,115200 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3#=>kernel panic!!! root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=
[    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: 482532K/524288K available (6277K kernel code, 789K rwdata, 3444K rodata, 452K init, 843K bss, 17180K 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 : 0xbf800000 - 0xbfe00000   (   6 MB)
[    0.000000]       .text : 0xc0008000 - 0xc09866a0   (9722 kB)
[    0.000000]       .init : 0xc0987000 - 0xc09f8000   ( 452 kB)
[    0.000000]       .data : 0xc09f8000 - 0xc0abd598   ( 790 kB)
[    0.000000]        .bss : 0xc0ac0000 - 0xc0b92fe4   ( 844 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=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.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000043] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000058] OMAP clocksource: timer1 at 24000000 Hz
[    0.000283] Console: colour dummy device 80x30
[    0.000323] Calibrating delay loop... 548.86 BogoMIPS (lpj=2744320)
[    0.048674] pid_max: default: 32768 minimum: 301
[    0.048801] Security Framework initialized
[    0.048889] AppArmor: AppArmor disabled by boot time parameter
[    0.048899] Yama: becoming mindful.
[    0.049183] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.049199] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050098] Initializing cgroup subsys blkio
[    0.050127] Initializing cgroup subsys memory
[    0.050187] Initializing cgroup subsys devices
[    0.050209] Initializing cgroup subsys freezer
[    0.050230] Initializing cgroup subsys net_cls
[    0.050248] Initializing cgroup subsys perf_event
[    0.050267] Initializing cgroup subsys net_prio
[    0.050331] CPU: Testing write buffer coherency: ok
[    0.050392] ftrace: allocating 31641 entries in 62 pages
[    0.169659] Setting up static identity map for 0x800081c0 - 0x8000820c
[    0.174893] devtmpfs: initialized
[    0.195416] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.208897] omap_hwmod: tptc0 using broken dt data from edma
[    0.209051] omap_hwmod: tptc1 using broken dt data from edma
[    0.209191] omap_hwmod: tptc2 using broken dt data from edma
[    0.214329] omap_hwmod: debugss: _wait_target_disable failed
[    0.271987] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.274726] xor: measuring software checksum speed
[    0.368625]    arm4regs  :   684.000 MB/sec
[    0.468625]    8regs     :   519.600 MB/sec
[    0.568623]    32regs    :   604.000 MB/sec
[    0.668620]    neon      :   990.000 MB/sec
[    0.668632] xor: using function: neon (990.000 MB/sec)
[    0.668813] pinctrl core: initialized pinctrl subsystem
[    0.670473] NET: Registered protocol family 16
[    0.673619] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.674771] cpuidle: using governor ladder
[    0.674793] cpuidle: using governor menu
[    0.679483] OMAP GPIO hardware version 0.1
[    0.680032] GPIO line 52 (EMMC ResetN) hogged as output/high
[    0.692068] No ATAGs?
[    0.692099] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.878679] raid6: int32x1  gen()   132 MB/s
[    1.048824] raid6: int32x1  xor()   130 MB/s
[    1.218898] raid6: int32x2  gen()   199 MB/s
[    1.388644] raid6: int32x2  xor()   148 MB/s
[    1.558652] raid6: int32x4  gen()   217 MB/s
[    1.728699] raid6: int32x4  xor()   134 MB/s
[    1.898748] raid6: int32x8  gen()   177 MB/s
[    2.068731] raid6: int32x8  xor()   116 MB/s
[    2.238671] raid6: neonx1   gen()   806 MB/s
[    2.408642] raid6: neonx2   gen()  1032 MB/s
[    2.578666] raid6: neonx4   gen()  1115 MB/s
[    2.748714] raid6: neonx8   gen()   494 MB/s
[    2.748725] raid6: using algorithm neonx4 gen() 1115 MB/s
[    2.748735] raid6: using intx1 recovery algorithm
[    2.759432] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    2.765176] SCSI subsystem initialized
[    2.766002] usbcore: registered new interface driver usbfs
[    2.766105] usbcore: registered new interface driver hub
[    2.766182] usbcore: registered new device driver usb
[    2.766845] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    2.766906] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[    2.767059] media: Linux media interface: v0.10
[    2.767148] Linux video capture interface: v2.00
[    2.767298] pps_core: LinuxPPS API ver. 1 registered
[    2.767309] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
[    2.767349] PTP clock support registered
[    2.768169] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    2.769678] NetLabel: Initializing
[    2.769693] NetLabel:  domain hash size = 128
[    2.769700] NetLabel:  protocols = UNLABELED CIPSOv4
[    2.769788] NetLabel:  unlabeled traffic allowed by default
[    2.770504] Switched to clocksource timer1
[    2.880705] NET: Registered protocol family 2
[    2.881651] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    2.881732] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    2.881798] TCP: Hash tables configured (established 4096 bind 4096)
[    2.881887] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.881913] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.882140] NET: Registered protocol family 1
[    2.882683] RPC: Registered named UNIX socket transport module.
[    2.882699] RPC: Registered udp transport module.
[    2.882707] RPC: Registered tcp transport module.
[    2.882716] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.883770] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
[    2.883824] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    2.886608] futex hash table entries: 256 (order: -1, 3072 bytes)
[    2.886757] audit: initializing netlink subsys (disabled)
[    2.886842] audit: type=2000 audit(2.800:1): initialized
[    2.900271] zpool: loaded
[    2.900297] zbud: loaded
[    2.900935] VFS: Disk quotas dquot_6.6.0
[    2.901275] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.904093] NFS: Registering the id_resolver key type
[    2.904172] Key type id_resolver registered
[    2.904183] Key type id_legacy registered
[    2.904218] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    2.904619] fuse init (API version 7.23)
[    2.905376] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.911192] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    2.911392] io scheduler noop registered
[    2.911415] io scheduler deadline registered
[    2.911490] io scheduler cfq registered (default)
[    2.913119] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    2.915539] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    2.918981] console [ttyS0] disabled
[    2.919038] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 154, base_baud = 3000000) is a 8250
[    3.714707] console [ttyS0] enabled
[    3.719802] [drm] Initialized drm 1.1.0 20060810
[    3.726011] usbcore: registered new interface driver dln2
[    3.734411] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.741051] ehci-platform: EHCI generic platform driver
[    3.746521] ehci-omap: OMAP-EHCI Host Controller driver
[    3.753788] 47401300.usb-phy supply vcc not found, using dummy regulator
[    3.764252] 47401b00.usb-phy supply vcc not found, using dummy regulator
[    3.773607] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    3.779730] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    3.787928] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.794784] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.802061] usb usb1: Product: MUSB HDRC host driver
[    3.807052] usb usb1: Manufacturer: Linux 4.1.18-bone-rt-r20 musb-hcd
[    3.813540] usb usb1: SerialNumber: musb-hdrc.1.auto
[    3.819520] hub 1-0:1.0: USB hub found
[    3.823382] hub 1-0:1.0: 1 port detected
[    3.839959] mousedev: PS/2 mouse device common for all mice
[    3.847920] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    3.855815] i2c /dev entries driver
[    3.861652] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    3.869104] sdhci: Secure Digital Host Controller Interface driver
[    3.875364] sdhci: Copyright(c) Pierre Ossman
[    3.880310] omap_hsmmc 48060000.mmc: Got CD GPIO
[    3.931068] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.936932] hidraw: raw HID events driver (C) Jiri Kosina
[    3.944044] usbcore: registered new interface driver usbhid
[    3.949647] usbhid: USB HID core driver
[    3.953891] ashmem: initialized
[    3.963584] NET: Registered protocol family 10
[    3.969308] mip6: Mobile IPv6
[    3.972367] NET: Registered protocol family 17
[    3.976969] Key type dns_resolver registered
[    3.981295] mpls_gso: MPLS GSO support
[    3.985408] omap_voltage_late_init: Voltage driver support not added
[    3.992372] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
[    4.001176] cpu cpu0: cpu0 clock notifier not ready, retry
[    4.006947] ThumbEE CPU extension supported.
[    4.011296] Registering SWP/SWPB emulation handler
[    4.017416] registered taskstats version 1
[    4.025586] Btrfs loaded
[    4.033458] Key type encrypted registered
[    4.039590] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/input/input0
[    4.057716] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.067985] mmc0: new high speed SDHC card at address 0007
[    4.074239] mmcblk0: mmc0:0007 SL16G 14.5 GiB 
[    4.080655]  mmcblk0: p1 p2
[    4.089549] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    4.095547] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    4.102533] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    4.110103] at24 2-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    4.117556] at24 2-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    4.124951] at24 2-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    4.132354] at24 2-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    4.139290] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    4.151504] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,0A5A,1713BBBK2912'
[    4.158785] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[    4.220537] bone_capemgr bone_capemgr: slot #0: No cape found
[    4.280531] bone_capemgr bone_capemgr: slot #1: No cape found
[    4.340531] bone_capemgr bone_capemgr: slot #2: No cape found
[    4.370340] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    4.377535] bone_capemgr bone_capemgr: slot #3: No cape found
[    4.383343] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER 'N/A' PR '0'
[    4.391493] bone_capemgr bone_capemgr: slot #4: override
[    4.396838] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    4.403859] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-UART1'
[    4.413003] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER 'N/A' PR '0'
[    4.421154] bone_capemgr bone_capemgr: slot #5: override
[    4.426496] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    4.433514] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-UART2'
[    4.442637] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART3#=>kernel' VER 'N/A' PR '0'
[    4.451574] bone_capemgr bone_capemgr: slot #6: override
[    4.456916] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    4.463935] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-UART3#=>kerne'
[    4.474115] bone_capemgr bone_capemgr: initialized OK.
[   39.321275] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
[   39.331829] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1325000]:-22
[   39.341921] cpufreq: __cpufreq_add_dev: CPU0: Running at unlisted freq: 550000 KHz
[   72.519113] capemgr-loader- invoked oom-killer: gfp_mask=0x2800d0, order=0, oom_score_adj=0
[   74.349084] capemgr-loader- cpuset=/ mems_allowed=0
[   74.354104] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.18-bone-rt-r20 #1
[   74.361737] Hardware name: Generic AM33XX (Flattened Device Tree)
[   74.367921] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[   74.375754] [] (show_stack) from [] (dump_header+0x4d/0x14c)
[   74.383224] [] (dump_header) from [] (__out_of_memory+0x279/0x284)
[   74.391210] [] (__out_of_memory) from [] (out_of_memory+0x4d/0x54)
[   74.399178] [] (out_of_memory) from [] (__alloc_pages_nodemask+0x5ad/0x65c)
[   74.407948] [] (__alloc_pages_nodemask) from [] (new_slab+0x1e5/0x248)
[   74.416280] [] (new_slab) from [] (__slab_alloc.constprop.9+0x157/0x1a8)
[   74.424785] [] (__slab_alloc.constprop.9) from [] (kmem_cache_alloc+0x87/0xd0)
[   74.433815] [] (kmem_cache_alloc) from [] (__d_alloc+0x1f/0xd8)
[   74.441532] [] (__d_alloc) from [] (d_alloc+0x11/0x30)
[   74.448453] [] (d_alloc) from [] (lookup_dcache+0x53/0x70)
[   74.455735] [] (lookup_dcache) from [] (__lookup_hash+0x17/0x2c)
[   74.463539] [] (__lookup_hash) from [] (lookup_slow+0x2b/0x6c)
[   74.471171] [] (lookup_slow) from [] (link_path_walk+0x1d5/0x570)
[   74.479047] [] (link_path_walk) from [] (path_openat+0x3b/0x3e0)
[   74.486854] [] (path_openat) from [] (do_filp_open+0x23/0x60)
[   74.494403] [] (do_filp_open) from [] (file_open_name+0xbb/0xf0)
[   74.502209] [] (file_open_name) from [] (filp_open+0x21/0x34)
[   74.509752] [] (filp_open) from [] (_request_firmware+0x193/0x56c)
[   74.517738] [] (_request_firmware) from [] (request_firmware_direct+0x21/0x2c)
[   74.526781] [] (request_firmware_direct) from [] (capemgr_load_slot+0x87/0x440)
[   74.535901] [] (capemgr_load_slot) from [] (capemgr_loader+0x89/0x2f8)
[   74.544236] [] (capemgr_loader) from [] (kthread+0x8b/0xa0)
[   74.551609] [] (kthread) from [] (ret_from_fork+0x11/0x30)
[   74.558864] Mem-Info:
[   74.561183] active_anon:0 inactive_anon:0 isolated_anon:0
[   74.561183]  active_file:0 inactive_file:0 isolated_file:0
[   74.561183]  unevictable:0 dirty:0 writeback:0 unstable:0
[   74.561183]  slab_reclaimable:1193 slab_unreclaimable:793
[   74.561183]  mapped:0 shmem:0 pagetables:1 bounce:0
[   74.561183]  free:124292 free_pcp:156 free_cma:6078
[   74.592755] Normal free:497168kB min:2848kB low:3560kB high:4272kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:524288kB managed:507108kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:4772kB slab_unreclaimable:3172kB kernel_stack:352kB pagetables:4kB unstable:0kB bounce:0kB free_pcp:624kB local_pcp:624kB free_cma:24312kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
[   74.636135] lowmem_reserve[]: 0 0 0
[   74.639664] Normal: 10*4kB (UEMR) 9*8kB (UERC) 10*16kB (UEMRC) 12*32kB (UEMRC) 8*64kB (EMRC) 7*128kB (UERC) 10*256kB (UEMR) 8*512kB (UEMRC) 5*1024kB (UERC) 6*2048kB (UEMRC) 3*4096kB (UEC) 56*8192kB (UEC) = 497168kB
[   74.659004] 0 total pagecache pages
[   74.662531] 0 pages in swap cache
[   74.665862] Swap cache stats: add 0, delete 0, find 0/0
[   74.671124] Free swap  = 0kB
[   74.674015] Total swap = 0kB
[   74.676905] 131072 pages RAM
[   74.679795] 0 pages HighMem/MovableOnly
[   74.683662] 4294965447 pages reserved
[   74.687339] 6144 pages cma reserved
[   74.690857] [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[   74.699457] Kernel panic - not syncing: Out of memory and no killable processes...
[   74.699457] 
[   74.708550] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.18-bone-rt-r20 #1
[   74.716152] Hardware name: Generic AM33XX (Flattened Device Tree)
[   74.722293] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[   74.730084] [] (show_stack) from [] (panic+0x6d/0x18c)
[   74.737001] [] (panic) from [] (oom_zonelist_trylock+0x1/0x80)
[   74.744622] [] (oom_zonelist_trylock) from [] (contig_page_data+0xb10/0xb5c)
[   74.753462] ---[ end Kernel panic - not syncing: Out of memory and no killable processes...
[   74.753462] 
[   80.650547] random: nonblocking pool is initialized
RobertCNelson commented 8 years ago

Yeah i can factor out bb-customizations, that's just to bring the initramfs hook, dtbo..

Not sure if # is ignored, but the dtb= should be removed..

[    0.000000] Kernel command line: 
console=ttyS0,115200 
bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3#=>kernel panic!!!
root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=

btw, did you change the config? still not sure why oom is getting triggered...

Regards,

QuickJack commented 8 years ago

Using "console=ttyS0,115200 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=am335x-boneblack-overlay.dtb" the problem still exists.

Yes, I changed uEnv.txt. I added:

Is this https://eewiki.net/display/linuxonarm/BeagleBone+Black information about uEnv.txt still up to date?

RobertCNelson commented 8 years ago

It is, but you don't need to pass "dtb=am335x-boneblack-overlay.dtb" on the boot arg's.. just set it in /boot/uEnv.txt as:

dtb=am335x-boneblack-overlay.dtb

Regards,

RobertCNelson commented 8 years ago

@QuickJack still no oom's..

https://paste.debian.net/413304/

root@beaglebone:~# uname -r
4.1.18-bone-rt-r20

root@beaglebone:~# cat /boot/uEnv.txt | grep -v '#' | grep dtb
dtb=am335x-boneblack-overlay.dtb

root@beaglebone:~# cat /proc/cmdline 
console=tty0 console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
root@beaglebone:~# dmesg | grep bone
[    0.000000] Linux version 4.1.18-bone-rt-r20 (root@b4-jetson-tk1-2gb) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 Mon Feb 29 20:15:46 UTC 2016
[    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable
[    3.083699] usb usb1: Manufacturer: Linux 4.1.18-bone-rt-r20 musb-hcd
[    3.207605] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,,BBG115096609'
[    3.207628] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[    3.262501] bone_capemgr bone_capemgr: slot #0: No cape found
[    3.322491] bone_capemgr bone_capemgr: slot #1: No cape found
[    3.382489] bone_capemgr bone_capemgr: slot #2: No cape found
[    3.442488] bone_capemgr bone_capemgr: slot #3: No cape found
[    3.448274] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER 'N/A' PR '0'
[    3.448285] bone_capemgr bone_capemgr: slot #4: override
[    3.448299] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    3.448313] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-UART1'
[    3.448391] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER 'N/A' PR '0'
[    3.448401] bone_capemgr bone_capemgr: slot #5: override
[    3.448410] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    3.448423] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-UART2'
[    3.448491] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART3' VER 'N/A' PR '0'
[    3.448501] bone_capemgr bone_capemgr: slot #6: override
[    3.448510] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    3.448522] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-UART3'
[    3.448832] bone_capemgr bone_capemgr: initialized OK.
[    3.467368] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-UART1-00A0.dtbo' loaded; overlay id #0
[    3.468098] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-UART2-00A0.dtbo' loaded; overlay id #1
[    3.470023] bone_capemgr bone_capemgr: slot #6: dtbo 'BB-UART3-00A0.dtbo' loaded; overlay id #2
[    8.998590] LUN: removable file: /var/cache/doc-beaglebone-getting-started/beaglebone-getting-started-2015-12-04.img

Please dump config.gz to pastebin...

zcat /proc/config.gz

Regards,

QuickJack commented 8 years ago

I did not change my kernel config. Here is the link to the pastebin of my kernel config: http://pastebin.com/MErh66xA (zcat /proc/config.gz)

I have a feeling that it has something to do with UBoot and/or uEnv.txt. I did not download an up to date image. I started a long time ago using an Ubuntu image and a 3.8.13 kernel. I have recently started to upgrade my kernel to 4.1.x. So I am NOT using the new partioning layout.

QuickJack commented 8 years ago

I tested https://rcn-ee.com/rootfs/2016-02-11/microsd/bone-ubuntu-14.04.3-console-armhf-2016-02-11-2gb.img.xz which uses the TI kernel by default. It indeed works to activate UART1, UART2 & UART3. However, I noticed that a lot of things have changed:

(1) There are 2 different uEnv.txt files: /uEnv.txt and /boot/uEnv.txt (2) After running install_kernel.sh from the bb-kernel the system won't boot. Those two kernel variants are obviously incompatible in some way. (3) There is only one partition. The boot partion seems to be removed (4) I cannot find UBboot. During boot a 2013 version of UBoot is loaded. I guess this is loaded from the eMMC. I cannot use the eMMC because it shares the GPMC pins. (5) I used to load the kernel image from /boot/zImage. The new SDCard uses /boot/vmlinuz-

I think there's a lot of confusion about which UBoot image is loaded from which location. Also the format of uEnv.txt is constantly changing. There are even multiple different versions of uEnv.txt within a single partition.

RobertCNelson commented 8 years ago
(1) There are 2 different uEnv.txt files: /uEnv.txt and /boot/uEnv.txt

"/uEnv.txt" is just a shim for old versions of u-boot stuck in eMMC (retains compatibly all the way back to, Angstrom's 2013.06.20)

Since you are utilizing the eMMC for something else, just zero out the eMMC so you don't have to deal with that version of u-boot..

(2) After running install_kernel.sh from the bb-kernel the system won't boot. Those two kernel variants are obviously incompatible in some way.

Remove "/uEnv.txt" then "install_kernel.sh" will work, as it's falling in the first if statement here: https://github.com/RobertCNelson/stable-kernel/blob/master/tools/install_kernel.sh#L146-L166

when it really needs to enter the 2nd, if..

(3) There is only one partition. The boot partion seems to be removed
(4) I cannot find UBboot. During boot a 2013 version of UBoot is loaded. I guess this is loaded from the eMMC. I cannot use the eMMC because it shares the GPMC pins.

Correct, it makes things a lot more reliable, MLO/u-boot.img are dd'ed into the 1MB hole at the start of the drive https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard

(5) I used to load the kernel image from /boot/zImage. The new SDCard uses /boot/vmlinuz-

I think there's a lot of confusion about which UBoot image is loaded from which location. Also the format of uEnv.txt is constantly changing. There are even multiple different versions of uEnv.txt within a single partition.

Here is the full right up of what's going on:

http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

Haven't really made any changes to ^ since summer of 2014, just tweak/fix/addon's, but the same syntax in /boot/uEnv.txt

QuickJack commented 8 years ago

Many thanks for your comments. I will take a look into it asap.

I manually added the kernel to the new SDCard by moving the zImage to /boot/vmlinuz-4.1.18-bone-rt-r20 and adding the dtb files to /boot/dtbs/4.1.18-bone-rt-r20. I commented out the loadxrd line in /uEnv.txt. I also uncommented the dtb=am335x-boneblack-overly line and activated the UARTs in /boot/uEnv.txt. Here is my bootlog:

U-Boot 2013.04-dirty (May 06 2013 - 16:12:47)
I2C:   ready
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0 
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:    not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  1  0 
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
micro SD card found
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
1180 bytes read in 10 ms (115.2 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
1227 bytes read in 64 ms (18.6 KiB/s)
debug: [/boot/vmlinuz-4.1.18-bone-rt-r20] ...
6907304 bytes read in 1213 ms (5.4 MiB/s)
## Error: "loadxrd" not defined
debug: [/boot/dtbs/4.1.18-bone-rt-r20/am335x-boneblack-overlay.dtb] ...
54299 bytes read in 107 ms (495.1 KiB/s)
debug: [console=tty0 console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable] ...
debug: [bootz 0x82000000 0x88080000: 0x88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 8801041a
Starting kernel ...
[    3.008480] omap_voltage_late_init: Voltage driver support not added
[    3.015517] cpu cpu0: cpu0 clock notifier not ready, retry
[    3.130614] bone_capemgr bone_capemgr: slot #0: No cape found
[    3.190609] bone_capemgr bone_capemgr: slot #1: No cape found
[    3.250605] bone_capemgr bone_capemgr: slot #2: No cape found
[    3.280427] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    3.287637] bone_capemgr bone_capemgr: slot #3: No cape found
[   71.693351] Kernel panic - not syncing: Out of memory and no killable processes...
[   71.693351] 
[   71.702479] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.18-bone-rt-r20 #1
[   71.710093] Hardware name: Generic AM33XX (Flattened Device Tree)
[   71.716240] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[   71.724045] [] (show_stack) from [] (panic+0x6d/0x18c)
[   71.730972] [] (panic) from [] (oom_zonelist_trylock+0x1/0x80)
[   71.738605] [] (oom_zonelist_trylock) from [] (contig_page_data+0xb10/0xb5c)
[   71.747458] ---[ end Kernel panic - not syncing: Out of memory and no killable processes...
[   71.747458] 
[   80.480636] random: nonblocking pool is initialized
[  102.095167] musb-hdrc mus  

After all these tests I think that the problem seems to be kernel related

RobertCNelson commented 8 years ago

Oh, there is one other thing we should test. ;) Hold the boot button, before power up, to force the much newer version of u-boot on the microSD to load vs, the old version in eMMC...

Regards,

QuickJack commented 8 years ago

After pressing the boot button the result is as follows:

U-Boot 2016.01-00001-g795bd53 (Jan 25 2016 - 20:02:29 -0600), Build: jenkins-github_Bootloader-Builder-325
       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
Net:    not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
1180 bytes read in 10 ms (115.2 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
1227 bytes read in 67 ms (17.6 KiB/s)
debug: [/boot/vmlinuz-4.1.18-bone-rt-r20] ...
6907304 bytes read in 452 ms (14.6 MiB/s)
## Error: "loadxrd" not defined
debug: [/boot/dtbs/4.1.18-bone-rt-r20/am335x-boneblack-overlay.dtb] ...
54299 bytes read in 105 ms (504.9 KiB/s)
debug: [console=tty0 console=ttyO0,115200n8 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet cape_universal=enable] ...
debug: [bootz 0x82000000 0x88080000: 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x6965a8 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Using Device Tree in place at 88000000, end 8801041a
Starting kernel ...
[    2.877502] omap_voltage_late_init: Voltage driver support not added
[    2.884376] cpu cpu0: cpu0 clock notifier not ready, retry
[    2.992437] bone_capemgr bone_capemgr: slot #0: No cape found
[    3.052434] bone_capemgr bone_capemgr: slot #1: No cape found
[    3.112433] bone_capemgr bone_capemgr: slot #2: No cape found
[    3.142173] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    3.149360] bone_capemgr bone_capemgr: slot #3: No cape found
[   32.568162] Kernel panic - not syncing: Out of memory and no killable processes...
[   32.568162]
[   32.577273] CPU: 0 PID: 65 Comm: capemgr-loader- Not tainted 4.1.18-bone-rt-r20 #1
[   32.584877] Hardware name: Generic AM33XX (Flattened Device Tree)
[   32.591006] [] (unwind_backtrace) from [] (show_stack+0x11/0x14)
[   32.598793] [] (show_stack) from [] (panic+0x6d/0x18c)
[   32.605706] [] (panic) from [] (oom_zonelist_trylock+0x1/0x80)
[   32.613322] [] (oom_zonelist_trylock) from [] (contig_page_data+0xb10/0xb5c)
[   32.622161] ---[ end Kernel panic - not syncing: Out of memory and no killable processes...
[   32.622161]
[   80.552439] random: nonblocking pool is initialized

If I do understand you right, then u-boot.img and MLO are written to a fixed location within the SDCard outside of any filesystem. Wow, this sounds like magic...

QuickJack commented 8 years ago

I did another test which proves that the bb-kernel has a problem. I copied /boot/vmlinuz-4.1.17-ti-rt-r47 from the above mentioned image to my SDCard to /boot/uboot/zImage. In order to save some time I did not update .dtb files or modules. The system boots fine.

After activating UARTs 1..3 there is no problem at all:

uname -r
4.1.17-ti-rt-r47
dmesg|grep bone
[    0.000000] Kernel command line: console=ttyS0,115200 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=am335x-boneblack-overlay.dtb
dmesg|grep bone
o=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=am335x-boneblack-overlay.dtb[    0.000000] Kernel command line: console=ttyS0,115200 bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART3 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait dtb=am335x-boneblack-overlay.dtb
[    5.065287] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,0A5A,1713BBBK2912'
[    5.072590] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[    5.135655] bone_capemgr bone_capemgr: slot #0: No cape found
[    5.195653] bone_capemgr bone_capemgr: slot #1: No cape found
[    5.255651] bone_capemgr bone_capemgr: slot #2: No cape found
[    5.285671] bone_capemgr bone_capemgr: Invalid signature 'ffffffff' at slot 3
[    5.292856] bone_capemgr bone_capemgr: slot #3: No cape found
[    5.298676] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART1' VER 'N/A' PR '0'
[    5.306826] bone_capemgr bone_capemgr: slot #4: override
[    5.312181] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[    5.319198] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-UART1'
[    5.328404] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART2' VER 'N/A' PR '0'
[    5.336554] bone_capemgr bone_capemgr: slot #5: override
[    5.341906] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[    5.348922] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-UART2'
[    5.358106] bone_capemgr bone_capemgr: enabled_partno PARTNO 'BB-UART3' VER 'N/A' PR '0'
[    5.366254] bone_capemgr bone_capemgr: slot #6: override
[    5.371605] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[    5.378621] bone_capemgr bone_capemgr: slot #6: 'Override Board Name,00A0,Override Manuf,BB-UART3'
[    5.388608] bone_capemgr bone_capemgr: initialized OK.
[    6.529811] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-UART1-00A0.dtbo' loaded; overlay id #2
[    6.529994] bone_capemgr bone_capemgr: slot #5: dtbo 'BB-UART2-00A0.dtbo' loaded; overlay id #1
[    6.530110] bone_capemgr bone_capemgr: slot #6: dtbo 'BB-UART3-00A0.dtbo' loaded; overlay id #0
[   22.161460] bone_capemgr bone_capemgr: part_number 'BB-BONE-LOGIBONE', version '00A3'
[   22.161497] bone_capemgr bone_capemgr: slot #7: override
[   22.161516] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[   22.161535] bone_capemgr bone_capemgr: slot #7: 'Override Board Name,00A3,Override Manuf,BB-BONE-LOGIBONE'
[   22.203851] bone_capemgr bone_capemgr: slot #7: dtbo 'BB-BONE-LOGIBONE-00A3.dtbo' loaded; overlay id #3
QuickJack commented 8 years ago

Can you reproduce the problem with capemgr?

I have tested 4.1.18-ti-rt-r52.1 which uses the Linux DMA Engine API. After recompiling the Logibone driver it is working fine. Unfortunately, the CPU load increased from 17% to 23% when running my application. This means that this kernel is a step back compared to the bb-kernel.

QuickJack commented 8 years ago

Meanwhile I have switched to the latest rootfs and the problem disappeared. I am using a 4.1.x bone-rt kernel. There seems to be a problem with my old rootfs and/or partitioning scheme. It does not play nicely with capemgr.

I am closing this issue as it involves a combination of a new kernel and an old rootfs/ partitioning scheme which is difficult to reproduce.