Hi Frank, I hope you are well this time.
We are super grateful for your help. We have been testing and here are the details.
- The version with kernel 5.4 that you sent us compiled without problem, we added the remaining packages to get what we wanted, but we still have the same problem.
We cannot increase the CMA memory anywhere, it throws an initialization error at the time of booting.
(We tested this version with the example hello_wifi, it seems that it does not take the wifi at first, but this is another topic).
Now we test the 1.17.1 release Release v1.17.1 · nerves-project/nerves_system_rpi4 · GitHub
It is clearly 64bit and reserves 256M of CMA without problem.
Then we test the 1.12.1 release Release v1.21.1 · nerves-project/nerves_system_rpi4 · GitHub
It reserves 320m of CMA without problem, which is typical for the raspbian image.
Later, based on your help, we upgraded version 1.19.0 to 32bits. This version is the last stable one with kernel 5.10 (even omx is supported). Here is the repository GitHub - joserpintuitivo/nerves_system_rpi4_gst_omx at 1.19.0-32
This version presents the same behavior cannot initialize the CMA.
We don’t know if there is some configuration in the kernel that we should take into account or another. But we are stuck on this issue.
If you can give us a second hand, it would be a great help for us and we would be grateful to you.
PS: I am attaching the log of version 1.19.0 to 32bits, where the error is shown.
Regards,
erlinit: The shell will be launched on tty 'tty1'.
erlinit: If you would like the shell to be on this tty,
erlinit: configure erlinit with '-c ttyS0'.
erlinit: The hostname is 'nerves-2cc8'.
[ 4.029661] Out of memory: Killed process 81 (beam.smp) total-vm:146640kB, anon-rss:48320kB, file-rss:7444kB, shmem-rss:0kB, UID:0 pgtables:292kB oom_score_adj:0
[ 4.063656] Out of memory: Killed process 124 (modprobe) total-vm:2244kB, anon-rss:36kB, file-rss:232kB, shmem-rss:0kB, UID:0 pgtables:32kB oom_score_adj:0
[ 4.069312] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[ 4.084924] vc4-drm gpu: [drm] *ERROR* fbdev: Failed to setup generic emulation (ret=-12)
[ 4.098300] watchdog: watchdog0: watchdog did not stop!
[ 5.278106] reboot: Restarting system
erlinit: The shell will be launched on tty 'tty1'.
erlinit: If you would like the shell to be on this tty,
erlinit: configure erlinit with '-c ttyS0'.
erlinit: The hostname is 'nerves-2cc8'.
[ 4.091486] bcmgenet fd580000.ethernet eth0: failed to initialize Rx queues
[ 4.099488] bcmgenet fd580000.ethernet eth0: failed to initialize DMA
[ 5.429473] ieee80211 phy0: brcmf_cfg80211_attach: Failed to init iwm_priv (-12)
[ 5.429485] ieee80211 phy0: brcmf_bus_started: failed: -12
[ 5.429531] ieee80211 phy0: brcmf_attach: dongle is not responding: err=-12
[ 5.489665] brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed
[ 5.557918] Out of memory: Killed process 81 (beam.smp) total-vm:144932kB, anon-rss:44948kB, file-rss:7444kB, shmem-rss:0kB, UID:0 pgtables:284kB oom_score_adj:0
[ 5.598955] v3d fec00000.v3d: Failed to allocate page tables. Please ensure you have CMA enabled.
[ 5.706547] 8<--- cut here ---
[ 5.711742] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 5.722081] pgd = 22a48226
[ 5.726896] [00000000] *pgd=80000000004003, *pmd=00000000
[ 5.734444] Internal error: Oops: 80000207 [#1] PREEMPT SMP ARM
[ 5.742469] Modules linked in: v3d gpu_sched dwc2 roles brcmfmac sha256_generic libsha256 cfg80211 brcmutil snd_bcm2835(C) bcm2835_isp(C) bcm2835_codec(C) videobuf2_dma_contig v4l2_mem2mem bcm2835_v4l2(C) bcm2835_mmal_vchiq(C) vc_sm_cma(C) videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc rpivid_mem vc4 snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd cec drm_kms_helper drm drm_panel_orientation_quirks syscopyarea sysfillrect sysimgblt fb_sys_fops uio_pdrv_genirq uio
[ 5.793864] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G C 5.10.88 #1
[ 5.803479] Hardware name: BCM2711
[ 5.808997] PC is at 0x0
[ 5.813623] LR is at call_timer_fn+0x2c/0x224
[ 5.820108] pc : [<00000000>] lr : [<c02981a4>] psr: 200f0113
[ 5.828501] sp : c54d1e40 ip : 0000000b fp : 00000000
[ 5.835861] r10: ffff8d0a r9 : 00000001 r8 : c54d1e74
[ 5.843177] r7 : 00000101 r6 : 00000000 r5 : c54d0000 r4 : c0cf63c4
[ 5.851835] r3 : c54d0000 r2 : ffff8d0a r1 : 00000000 r0 : c0cf63c4
[ 5.860436] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 5.869688] Control: 30c5383d Table: 05639700 DAC: 55555555
[ 5.877535] Process swapper/2 (pid: 0, stack limit = 0x4e0bf1cb)
[ 5.885607] Stack: (0xc54d1e40 to 0xc54d2000)
[ 5.891991] 1e40: 00000001 c7fa0580 c54d0000 00000400 c7fa0580 c54d0000 c0cf63c4 00000000
[ 5.902222] 1e60: c54d1e74 c02985b4 00000001 c0e03d00 c7fa1708 00000000 c7fa1758 c02a9618
[ 5.912488] 1e80: 53bf1ce4 00000001 00000000 00000001 c7faa300 147ff8df c7fa168c c0c4d580
[ 5.922744] 1ea0: c0e050ec c0e03d00 c54d0000 00000082 00000101 c0ac7e2c c54d1f30 c02986f4
[ 5.932922] 1ec0: c0e03084 00000002 00000001 c0201234 c7fa17d0 c7fa17b0 c54d1ed0 c0e03080
[ 5.943128] 1ee0: c0c492c8 c0c53840 0000000a c0c49258 c0afa2d0 ffff8d0b c0e03d00 00200042
[ 5.953315] 1f00: c54d1f78 c0c53840 00000000 00000000 c0c53054 00000001 c54d1f78 c5415800
[ 5.963498] 1f20: c54d1f30 c0220814 c0c53054 c0273c18 c54d1f78 c0e05454 c8802000 c0c53060
[ 5.973630] 1f40: c880200c c54d1f58 c54d1f78 00000000 00000000 c0527fc8 c02079cc 600f0013
[ 5.983771] 1f60: ffffffff c54d1fac 00007000 c54d0000 00000000 c0200af8 00000002 00000000
[ 5.993877] 1f80: 00003bb8 c0215300 00000002 c54d0000 c0e04d1c c0e04d64 00007000 410fd083
[ 6.003956] 1fa0: 00000000 00000000 00000001 c54d1fc8 c02079c8 c02079cc 600f0013 ffffffff
[ 6.014019] 1fc0: c0e04d64 00000000 00000002 c086e144 00000002 c024ba00 00000092 00000000
[ 6.024107] 1fe0: 30c0387d c54d1ff8 00007000 c024bd50 0548f9c0 002015f0 00000000 00000000
[ 6.034200] [<c02981a4>] (call_timer_fn) from [<c02985b4>] (__run_timers.part.0+0x218/0x318)
[ 6.044524] [<c02985b4>] (__run_timers.part.0) from [<c02986f4>] (run_timer_softirq+0x40/0x70)
[ 6.055004] [<c02986f4>] (run_timer_softirq) from [<c0201234>] (__do_softirq+0x13c/0x454)
[ 6.065003] [<c0201234>] (__do_softirq) from [<c0220814>] (irq_exit+0x108/0x10c)
[ 6.074209] [<c0220814>] (irq_exit) from [<c0273c18>] (__handle_domain_irq+0xa8/0x110)
[ 6.083868] [<c0273c18>] (__handle_domain_irq) from [<c0527fc8>] (gic_handle_irq+0x80/0x94)
[ 6.094006] [<c0527fc8>] (gic_handle_irq) from [<c0200af8>] (__irq_svc+0x58/0x8c)
[ 6.103208] Exception stack(0xc54d1f78 to 0xc54d1fc0)
[ 6.109913] 1f60: 00000002 00000000
[ 6.119787] 1f80: 00003bb8 c0215300 00000002 c54d0000 c0e04d1c c0e04d64 00007000 410fd083
[ 6.129648] 1fa0: 00000000 00000000 00000001 c54d1fc8 c02079c8 c02079cc 600f0013 ffffffff
[ 6.139424] [<c0200af8>] (__irq_svc) from [<c02079cc>] (arch_cpu_idle+0x38/0x3c)
[ 6.148441] [<c02079cc>] (arch_cpu_idle) from [<c086e144>] (default_idle_call+0x30/0x18c)
[ 6.158258] [<c086e144>] (default_idle_call) from [<c024ba00>] (do_idle+0xc0/0x134)
[ 6.167487] [<c024ba00>] (do_idle) from [<c024bd50>] (cpu_startup_entry+0x18/0x1c)
[ 6.176634] [<c024bd50>] (cpu_startup_entry) from [<002015f0>] (0x2015f0)
[ 6.184999] Code: bad PC value
[ 6.189512] ---[ end trace 019c5b1e527b9fc1 ]---
[ 6.204899] Kernel panic - not syncing: Fatal exception in interrupt
[ 6.221808] Rebooting in 10 seconds..