WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Recent Posts

Pages: [1] 2 3 ... 10
1
General TC Talk / Re: I have achieved TinyCore Nirvana!
« Last post by gadget42 on Today at 07:44:24 AM »
old post circa 2017 but still interesting regarding these small units:

https://bkhome.org/news/201709/mele-pcg35-apo-works-well.html
2
Raspberry Pi / Re: 6.12 kernel breaks v4l2 picamera
« Last post by mung on Today at 06:26:17 AM »
I post  entire dmesg here for the rpi zero2 but seems there is not the call trace errors for unicam:

The test app failed in same error on all tests (  ioctl(fd, VIDIOC_QBUF, &bufferinfo) < 0)
 
I am wondering if this maybe 64/32bit problem maybe will try a 64bit os image and check again tonight.

Code: [Select]
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.12.25+rpt-rpi-v7 (serge@raspberrypi.com) (arm-linux-gnueabihf-gcc-12 (Raspbian 12.2.0-14+rpi1) 12.2.0, GNU ld (GNU Binutils for Raspbian) 2.40) #1 SMP Raspbian 1:6.12.25-1+rpt1 (2025-04-30)
[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Raspberry Pi Zero 2 W Rev 1.0
[    0.000000] random: crng init done
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x0b000000, size 256 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x0b000000..0x1affffff (262144 KiB) map reusable linux,cma
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001bffffff]
[    0.000000] percpu: Embedded 19 pages/cpu s45708 r8192 d23924 u77824
[    0.000000] pcpu-alloc: s45708 r8192 d23924 u77824 alloc=19*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 cgroup_disable=memory snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0  smsc95xx.macaddr=B8:27:EB:70:9F:CB vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  console=ttyS0,115200 console=tty1 root=PARTUUID=694d0b35-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=GB
[    0.000000] cgroup: Disabling memory control group subsystem
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 114688
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 37294 entries in 110 pages
[    0.000000] ftrace: allocated 110 pages with 5 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] Rude variant of Tasks RCU enabled.
[    0.000000] Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000011] Switching to timer-based delay loop, resolution 52ns
[    0.000279] Console: colour dummy device 80x30
[    0.000292] printk: legacy console [tty1] enabled
[    0.000372] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000388] CPU: Testing write buffer coherency: ok
[    0.000420] pid_max: default: 32768 minimum: 301
[    0.000495] LSM: initializing lsm=capability
[    0.000653] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000666] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001538] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.090217] Setting up static identity map for 0x100000 - 0x10003c
[    0.100081] rcu: Hierarchical SRCU implementation.
[    0.100088] rcu: Max phase no-delay instances is 1000.
[    0.100322] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.120191] smp: Bringing up secondary CPUs ...
[    0.170428] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.220412] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.270467] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.270551] smp: Brought up 1 node, 4 CPUs
[    0.270566] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.270576] CPU: All CPU(s) started in HYP mode.
[    0.270580] CPU: Virtualization extensions available.
[    0.271062] Memory: 154968K/458752K available (11264K kernel code, 1513K rwdata, 3440K rodata, 1024K init, 376K bss, 39352K reserved, 262144K cma-reserved)
[    0.271463] devtmpfs: initialized
[    0.279860] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.280017] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.280049] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.288327] pinctrl core: initialized pinctrl subsystem
[    0.289335] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.290891] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.294238] audit: initializing netlink subsys (disabled)
[    0.294456] audit: type=2000 audit(0.290:1): state=initialized audit_enabled=0 res=1
[    0.294862] thermal_sys: Registered thermal governor 'step_wise'
[    0.295121] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.295134] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.295372] Serial: AMBA PL011 UART driver
[    0.300198] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/ov5647@36
[    0.300348] /soc/i2c0mux/i2c@1/ov5647@36: Fixed dependency cycle(s) with /soc/csi@7e801000
[    0.300880] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.301910] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/ov5647@36
[    0.303470] /soc/i2c0mux/i2c@1/ov5647@36: Fixed dependency cycle(s) with /soc/csi@7e801000
[    0.320363] raspberrypi-firmware soc:firmware: Attached to firmware from 2025-04-30T13:35:18, variant start
[    0.330378] raspberrypi-firmware soc:firmware: Firmware hash is 5560078dcc8591a00f57b9068d13e5544aeef3aa
[    0.342944] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[    0.351765] bcm2835-dma 3f007000.dma-controller: DMA legacy API manager, dmachans=0x1
[    0.353277] SCSI subsystem initialized
[    0.353413] usbcore: registered new interface driver usbfs
[    0.353443] usbcore: registered new interface driver hub
[    1.707070] simple-framebuffer 1e669000.framebuffer: framebuffer at 0x1e669000, 0x591000 bytes
[    1.707104] simple-framebuffer 1e669000.framebuffer: format=a8r8g8b8, mode=1600x900x32, linelength=6400
[    1.707650] Console: switching to colour frame buffer device 200x56
[    1.719120] simple-framebuffer 1e669000.framebuffer: fb0: simplefb registered!
[    1.722126] bcm2835-rng 3f104000.rng: hwrng registered
[    1.722351] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.729582] brd: module loaded
[    1.734295] loop: module loaded
[    1.734744] Loading iSCSI transport class v2.0-870.
[    1.735858] usbcore: registered new interface driver lan78xx
[    1.735889] usbcore: registered new interface driver smsc95xx
[    1.735898] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.463763] Core Release: 2.80a
[    2.463778] Setting default values for core params
[    2.463797] Finished setting default values for core params
[    2.663982] Using Buffer DMA mode
[    2.663989] Periodic Transfer Interrupt Enhancement - disabled
[    2.663996] Multiprocessor Interrupt Enhancement - disabled
[    2.664001] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.664033] Dedicated Tx FIFOs mode

[    2.666007] WARN::dwc_otg_hcd_init:1072: FIQ DMA bounce buffers: virt = 8b104000 dma = 0xcb104000 len=9024
[    2.666036] FIQ FSM acceleration enabled for :
               Non-periodic Split Transactions
               Periodic Split Transactions
               High-Speed Isochronous Endpoints
               Interrupt/Control Split Transaction hack enabled
[    2.666046] dwc_otg: Microframe scheduler enabled
[    2.666137] WARN::hcd_init_fiq:457: FIQ on core 1
[    2.666152] WARN::hcd_init_fiq:458: FIQ ASM at 808daf84 length 36
[    2.666167] WARN::hcd_init_fiq:496: MPHI regs_base at 9c810000
[    2.666187] dwc_otg 3f980000.usb: DWC OTG Controller
[    2.666224] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    2.666251] dwc_otg 3f980000.usb: irq 89, io mem 0x00000000
[    2.666293] Init: Port Power? op_state=1
[    2.666299] Init: Power Port (0)
[    2.666461] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[    2.666474] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.666483] usb usb1: Product: DWC OTG Controller
[    2.666492] usb usb1: Manufacturer: Linux 6.12.25+rpt-rpi-v7 dwc_otg_hcd
[    2.666500] usb usb1: SerialNumber: 3f980000.usb
[    2.666984] hub 1-0:1.0: USB hub found
[    2.667017] hub 1-0:1.0: 1 port detected
[    2.866352] Freeing unused kernel image (initmem) memory: 1024K
[    2.866730] Run /init as init process
[    2.866737]   with arguments:
[    2.866742]     /init
[    2.866747]     splash
[    2.866752]   with environment:
[    2.866756]     HOME=/
[    2.866762]     TERM=linux
[    2.909020] mmc1: new high speed SDIO card at address 0001
[    2.922195] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.929450] mmc0: new high speed SDHC card at address 59b4
[    2.930234] mmcblk0: mmc0:59b4 LX32G 29.5 GiB
[    2.942719]  mmcblk0: p1 p2
[    2.943221] mmcblk0: mmc0:59b4 LX32G 29.5 GiB (quirks 0x40000000)
[    3.015164] usb 1-1: new low-speed USB device number 2 using dwc_otg
[    3.015990] Indeed it is in host mode hprt0 = 00041901
[    3.241461] usb 1-1: New USB device found, idVendor=05fe, idProduct=1011, bcdDevice= 2.03
[    3.241495] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.241505] usb 1-1: Product: USB Device
[    3.241514] usb 1-1: Manufacturer: Device
[    3.252103] input: Device USB Device as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.0/0003:05FE:1011.0001/input/input0
[    3.284978] i2c i2c-11: Added multiplexed i2c bus 0
[    3.292362] /soc/csi@7e801000: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/ov5647@36
[    3.292513] /soc/i2c0mux/i2c@1/ov5647@36: Fixed dependency cycle(s) with /soc/csi@7e801000
[    3.305367] i2c i2c-11: Added multiplexed i2c bus 10
[    3.411134] Console: switching to colour dummy device 80x30
[    3.419499] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[    3.422535] Registered IR keymap rc-cec
[    3.422749] rc rc0: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0
[    3.422947] input: vc4-hdmi as /devices/platform/soc/3f902000.hdmi/rc/rc0/input1
[    3.516385] hid-generic 0003:05FE:1011.0001: input,hidraw0: USB HID v1.00 Keyboard [Device USB Device] on usb-3f980000.usb-1/input0
[    3.535630] input: vc4-hdmi HDMI Jack as /devices/platform/soc/3f902000.hdmi/sound/card0/input2
[    3.535685] input: Device USB Device Mouse as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.1/0003:05FE:1011.0002/input/input3
[    3.537822] input: Device USB Device System Control as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.1/0003:05FE:1011.0002/input/input4
[    3.538238] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[    3.539529] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
[    3.540590] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.541723] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.542840] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[    3.543654] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[    3.552332] [drm] Initialized vc4 0.0.0 for soc:gpu on minor 0
[    3.595485] input: Device USB Device Consumer Control as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1:1.1/0003:05FE:1011.0002/input/input5
[    3.595746] hid-generic 0003:05FE:1011.0002: input,hidraw1: USB HID v1.00 Mouse [Device USB Device] on usb-3f980000.usb-1/input1
[    3.601430] Console: switching to colour frame buffer device 200x56
[    3.625890] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
[    4.636590] EXT4-fs (mmcblk0p2): mounted filesystem bbd12f80-9a62-4baf-b67b-c7ece572d713 ro with ordered data mode. Quota mode: none.
[    5.321840] systemd[1]: System time before build time, advancing clock.
[    5.508751] NET: Registered PF_INET6 protocol family
[    5.509833] Segment Routing with IPv6
[    5.509876] In-situ OAM (IOAM) with IPv6
[    6.917381] fuse: init (API version 7.41)
[    8.578873] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    8.585819] mc: Linux media interface: v0.10
[    8.783276] videodev: Linux video capture interface: v2.00
[    8.845544] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    8.846661] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    8.846694] [vc_sm_connected_init]: start
[    8.847316] [vc_sm_connected_init]: installed successfully
[    8.860824] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    8.882303] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    8.897900] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    8.926627] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    8.927401] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    8.927824] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    8.928142] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    8.928170] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    8.928185] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    8.928201] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    8.928212] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    8.959358] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    8.959832] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    8.960225] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    8.960517] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    8.960545] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    8.960574] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    8.960585] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    8.960595] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    8.960803] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    9.061058] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    9.066395] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    9.066449] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    9.069978] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    9.070025] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    9.073202] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    9.073249] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    9.082952] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    9.083003] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    9.085377] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    9.085417] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    9.371295] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.407167] Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
[    9.408808] Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
[    9.410387] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.411999] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
[    9.795392] usbcore: registered new interface driver brcmfmac
[   10.067148] brcmfmac: brcmf_c_process_txcap_blob: no txcap_blob available (err=-2)
[   10.067731] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7
[   10.166530] Bluetooth: hci0: BCM: features 0x2e
[   10.168055] Bluetooth: hci0: BCM43436 37.4MHz Class 1.5 RaspBerry Pi Zero2 [Version: 1017.1042]
[   10.168089] Bluetooth: hci0: BCM43430A1 (001.002.009) build 1042
[   10.168674] Bluetooth: hci0: BCM: Using default device address (43:43:a1:12:1f:ac)
[   11.205718] Adding 524284k swap on /var/swap.  Priority:-2 extents:14 across:16375808k SS
[   12.694991] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   12.695023] Bluetooth: BNEP filters: protocol multicast
[   12.695046] Bluetooth: BNEP socket layer initialized
[   12.712230] Bluetooth: MGMT ver 1.23
[   12.758790] NET: Registered PF_ALG protocol family
[   12.812369] cryptd: max_cpu_qlen set to 1000
[   13.713917] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   18.272497] Bluetooth: RFCOMM TTY layer initialized
[   18.272542] Bluetooth: RFCOMM socket layer initialized
[   18.272572] Bluetooth: RFCOMM ver 1.11

3
Raspberry Pi / Re: 6.12 kernel breaks v4l2 picamera
« Last post by mung on Today at 06:08:21 AM »
Okay, I don't keep absolute precise memory of sequence of what I have done, but I just did another quick test for rpi zero2 with the current pios.

exact method:
* download, https://downloads.raspberrypi.com/raspios_armhf/images/raspios_armhf-2025-05-13/2025-05-13-raspios-bookworm-armhf.img.xz
* burn image on 32Gb SD card with win32diskimager
* boot image on rpi zero2
* compile test app (will copy code below)
* run test app and fail with ioctl error

Code: [Select]
/* a simple webcam app


$CC -I /home/pi/.local/include webcam_cap.c -lm -lmlib -o webcam_cap
*/

#include <stdio.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <string.h>

//#include <tcc_shim.h>

int main(int argc, const char* argv[]) {

    int fd;
    fd = open(argv[1],O_RDWR);
    int frame_num = atoi(argv[3]);
    if(fd < 0){ perror("Failed to open device, OPEN");  return 1;  }

    struct v4l2_capability capability;
    if(ioctl(fd, VIDIOC_QUERYCAP, &capability) < 0){ perror("Failed to get device capabilities, VIDIOC_QUERYCAP"); return 1;  }


    struct v4l2_format imageFormat;
    imageFormat.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    imageFormat.fmt.pix.width = 1280;
    imageFormat.fmt.pix.height = 720;
    imageFormat.fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG;
    imageFormat.fmt.pix.field = V4L2_FIELD_NONE;
    if(ioctl(fd, VIDIOC_S_FMT, &imageFormat) < 0){
        perror("Device could not set format, VIDIOC_S_FMT");
        return 1;
    }

    struct v4l2_requestbuffers requestBuffer = {0};
    requestBuffer.count = 1;
    requestBuffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; // request a buffer wich we an use for capturing frames
    requestBuffer.memory = V4L2_MEMORY_MMAP;

    if(ioctl(fd, VIDIOC_REQBUFS, &requestBuffer) < 0){
        perror("Could not request buffer from device, VIDIOC_REQBUFS");
        return 1;
    }

    struct v4l2_buffer queryBuffer = {0};
    queryBuffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    queryBuffer.memory = V4L2_MEMORY_MMAP;
    queryBuffer.index = 0;

    if(ioctl(fd, VIDIOC_QUERYBUF, &queryBuffer) < 0){
        perror("Device did not return the buffer information, VIDIOC_QUERYBUF");
        return 1;
    }

    char* buffer = (char*)mmap(NULL, queryBuffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
                        fd, queryBuffer.m.offset);

    struct v4l2_buffer bufferinfo;
    memset(&bufferinfo, 0, sizeof(bufferinfo));
    bufferinfo.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    bufferinfo.memory = V4L2_MEMORY_MMAP;
    bufferinfo.index = 0;

    int type = bufferinfo.type;
    if(ioctl(fd, VIDIOC_STREAMON, &type) < 0){
        perror("Could not start streaming, VIDIOC_STREAMON");
        return 1;
    }

    int ofd;
    ofd = open(argv[2],O_CREAT | O_RDWR | O_NONBLOCK, S_IRWXU);

for (int fid = 0; fid < frame_num; fid++) {
fprintf(stderr,".");

    if(ioctl(fd, VIDIOC_QBUF, &bufferinfo) < 0){
        perror("Could not queue buffer, VIDIOC_QBUF");
        return 1;
    }

    if(ioctl(fd, VIDIOC_DQBUF, &bufferinfo) < 0){
        perror("Could not dequeue the buffer, VIDIOC_DQBUF");
        return 1;
    }

write(ofd, buffer + bufferinfo.m.offset, bufferinfo.bytesused);
}

   close(ofd);

    if(ioctl(fd, VIDIOC_STREAMOFF, &type) < 0){
        perror("Could not end streaming, VIDIOC_STREAMOFF");
        return 1;
    }

    close(fd);
    return 0;
}


I will attach entire dmesg output below.
4
Raspberry Pi / Re: 6.12 kernel breaks v4l2 picamera
« Last post by patrikg on Today at 02:43:03 AM »
Is everything another thing the same like cmdline.txt and config.txt and so on ?
Do you upgrade ? And if you did that, do you take all files within the picore image ?
Or did you start from scratch, with the new image ?
5
Raspberry Pi / 6.12 kernel breaks v4l2 picamera
« Last post by mung on June 30, 2025, 07:41:46 PM »
I should probably not post this here but it started from trying to run the new picore16 and use v4l2 for pi csi camera as webcam stream. It crash with error -22 in ioctl. Previously v4l2 picam ran fine on picore15.

So I checked on the pios current 'desktop' image and also with a self compiled kernel with .config same as picore16 but run on the pios image.

I tested this on pi 3b+, pi4, and pizero2 with an original picam and the HQ picam and all same error, the old mmal camera interface is deprecated but most notes I have seen say it should still work.

I cannot open an issue on the raspberrypi linux guthub repo as I do not have an account.

Mayb it is my mistake, or maybe not, but I am not going to open a github account just to open an issue.

If anyone is interested or has suggestion here is the dmesg output when run on a pi4 (I should really have used zero2 as that was the original target but test was last checked on pi4):

Code: [Select]

[  421.786679] ------------[ cut here ]------------
[  421.786693] WARNING: CPU: 0 PID: 1442 at drivers/media/v4l2-core/v4l2-subdev.c:455 call_s_stream+0xf4/0x108 [videodev]
[  421.786766] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep brcmfmac_wcc hci_uart btbcm brcmfmac bluetooth imx477 binfmt_misc brcmutil cfg80211 raspberrypi_hwmon bcm2835_unicam_legacy bcm2835_v4l2(C) v4l2_dv_timings v4l2_fwnode v4l2_async bcm2835_codec(C) bcm2835_isp(C) ecdh_generic rpi_hevc_dec bcm2835_mmal_vchiq(C) ecc vc_sm_cma(C) rfkill v4l2_mem2mem videobuf2_vmalloc libaes videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 joydev videodev videobuf2_common raspberrypi_gpiomem snd_bcm2835(C) mc nvmem_rmem uio_pdrv_genirq uio i2c_dev ledtrig_pattern fuse dm_mod ip_tables x_tables ipv6 vc4 snd_soc_hdmi_codec drm_display_helper cec drm_dma_helper snd_soc_core snd_compress v3d gpu_sched drm_shmem_helper drm_kms_helper snd_pcm_dmaengine drm drm_panel_orientation_quirks i2c_mux_pinctrl i2c_mux i2c_brcmstb snd_pcm snd_timer i2c_bcm2835 snd backlight
[  421.786951] CPU: 0 UID: 0 PID: 1442 Comm: webcam_cap Tainted: G         C         6.12.25+rpt-rpi-v8 #1  Debian 1:6.12.25-1+rpt1
[  421.786960] Tainted: [C]=CRAP
[  421.786963] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[  421.786967] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  421.786973] pc : call_s_stream+0xf4/0x108 [videodev]
[  421.787010] lr : unicam_stop_streaming+0x64/0x178 [bcm2835_unicam_legacy]
[  421.787020] sp : ffffffc0848839c0
[  421.787023] x29: ffffffc0848839c0 x28: ffffff8040298000 x27: 0000000000000009
[  421.787034] x26: 0000000000000001 x25: 0000000000000000 x24: ffffff8040298600
[  421.787044] x23: ffffff8045aef080 x22: ffffff8040ee6518 x21: 0000000000000000
[  421.787053] x20: ffffff8040ee6000 x19: ffffff8040ee63e8 x18: ffffffc084883ac0
[  421.787063] x17: 0000000000000000 x16: ffffffd6eaf90628 x15: 0000000000000001
[  421.787072] x14: 00000000f7cf4000 x13: 0000000000000000 x12: ffffffd6eb0d7888
[  421.787081] x11: 0000000000000001 x10: ffffffd6eafefa60 x9 : ffffffd6c3f3a1ac
[  421.787090] x8 : ffffffc084883b18 x7 : 0000000000000000 x6 : 0000000000000000
[  421.787099] x5 : ffffff8045779800 x4 : 0000000000000000 x3 : ffffffd6c3e10b08
[  421.787108] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff8045aef080
[  421.787118] Call trace:
[  421.787122]  call_s_stream+0xf4/0x108 [videodev]
[  421.787158]  unicam_stop_streaming+0x64/0x178 [bcm2835_unicam_legacy]
[  421.787166]  __vb2_queue_cancel+0x34/0x2d8 [videobuf2_common]
[  421.787183]  vb2_core_queue_release+0x2c/0x88 [videobuf2_common]
[  421.787195]  _vb2_fop_release+0x90/0xd0 [videobuf2_v4l2]
[  421.787209]  unicam_v4l2_release+0x58/0xe8 [bcm2835_unicam_legacy]
[  421.787216]  v4l2_release+0xec/0x100 [videodev]
[  421.787252]  __fput+0xd0/0x2e0
[  421.787266]  ____fput+0x1c/0x30
[  421.787273]  task_work_run+0x80/0xe8
[  421.787279]  do_exit+0x2e8/0x9c0
[  421.787287]  do_group_exit+0x3c/0xa0
[  421.787293]  get_signal+0x9ac/0x9c8
[  421.787300]  do_signal+0x9c/0x1120
[  421.787305]  do_notify_resume+0xd0/0x150
[  421.787312]  el0_svc_compat+0x6c/0x80
[  421.787319]  el0t_32_sync_handler+0x98/0x140
[  421.787325]  el0t_32_sync+0x194/0x198
[  421.787330] ---[ end trace 0000000000000000 ]---
[  421.787486] ------------[ cut here ]------------
[  421.787492] WARNING: CPU: 0 PID: 1442 at drivers/media/mc/mc-entity.c:939 __media_pipeline_stop+0xd0/0xf0 [mc]
[  421.787524] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep brcmfmac_wcc hci_uart btbcm brcmfmac bluetooth imx477 binfmt_misc brcmutil cfg80211 raspberrypi_hwmon bcm2835_unicam_legacy bcm2835_v4l2(C) v4l2_dv_timings v4l2_fwnode v4l2_async bcm2835_codec(C) bcm2835_isp(C) ecdh_generic rpi_hevc_dec bcm2835_mmal_vchiq(C) ecc vc_sm_cma(C) rfkill v4l2_mem2mem videobuf2_vmalloc libaes videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 joydev videodev videobuf2_common raspberrypi_gpiomem snd_bcm2835(C) mc nvmem_rmem uio_pdrv_genirq uio i2c_dev ledtrig_pattern fuse dm_mod ip_tables x_tables ipv6 vc4 snd_soc_hdmi_codec drm_display_helper cec drm_dma_helper snd_soc_core snd_compress v3d gpu_sched drm_shmem_helper drm_kms_helper snd_pcm_dmaengine drm drm_panel_orientation_quirks i2c_mux_pinctrl i2c_mux i2c_brcmstb snd_pcm snd_timer i2c_bcm2835 snd backlight
[  421.787692] CPU: 0 UID: 0 PID: 1442 Comm: webcam_cap Tainted: G        WC         6.12.25+rpt-rpi-v8 #1  Debian 1:6.12.25-1+rpt1
[  421.787700] Tainted: [W]=WARN, [C]=CRAP
[  421.787703] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[  421.787707] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  421.787712] pc : __media_pipeline_stop+0xd0/0xf0 [mc]
[  421.787727] lr : media_pipeline_stop+0x34/0x58 [mc]
[  421.787740] sp : ffffffc0848839a0
[  421.787743] x29: ffffffc0848839a0 x28: ffffff8040298000 x27: 0000000000000009
[  421.787753] x26: 0000000000000001 x25: 0000000000000000 x24: ffffff8040298600
[  421.787763] x23: ffffff8045aef080 x22: ffffff8040ee6518 x21: ffffff8040ee66b8
[  421.787772] x20: ffffff8040ee6b08 x19: 0000000000000000 x18: 0000000000000000
[  421.787782] x17: 0000000000000000 x16: ffffffd6eaf8b2e0 x15: 00000000022a15e8
[  421.787791] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  421.787800] x11: 0000000000000040 x10: 0000000000001a40 x9 : ffffffd6c3cb6224
[  421.787810] x8 : ffffff8040299aa0 x7 : 0000000000000000 x6 : 0000000000000000
[  421.787819] x5 : 00000000410fd080 x4 : 0000000000000000 x3 : 0000000000000000
[  421.787828] x2 : ffffff8040298000 x1 : 0000000000000000 x0 : ffffff8040ee6b08
[  421.787838] Call trace:
[  421.787840]  __media_pipeline_stop+0xd0/0xf0 [mc]
[  421.787854]  media_pipeline_stop+0x34/0x58 [mc]
[  421.787868]  unicam_stop_streaming+0x88/0x178 [bcm2835_unicam_legacy]
[  421.787875]  __vb2_queue_cancel+0x34/0x2d8 [videobuf2_common]
[  421.787889]  vb2_core_queue_release+0x2c/0x88 [videobuf2_common]
[  421.787901]  _vb2_fop_release+0x90/0xd0 [videobuf2_v4l2]
[  421.787912]  unicam_v4l2_release+0x58/0xe8 [bcm2835_unicam_legacy]
[  421.787919]  v4l2_release+0xec/0x100 [videodev]
[  421.787957]  __fput+0xd0/0x2e0
[  421.787967]  ____fput+0x1c/0x30
[  421.787974]  task_work_run+0x80/0xe8
[  421.787979]  do_exit+0x2e8/0x9c0
[  421.787986]  do_group_exit+0x3c/0xa0
[  421.787992]  get_signal+0x9ac/0x9c8
[  421.787999]  do_signal+0x9c/0x1120
[  421.788004]  do_notify_resume+0xd0/0x150
[  421.788010]  el0_svc_compat+0x6c/0x80
[  421.788016]  el0t_32_sync_handler+0x98/0x140
[  421.788022]  el0t_32_sync+0x194/0x198
[  421.788027] ---[ end trace 0000000000000000 ]---
[  421.788034] unicam fe801000.csi: Runtime PM usage count underflow!



6
Please explain it to me in a way that someone without computer knowledge can understand it.
7
Please answer that
8
dCore x86_64 / Re: Is dCore x86_64 under development?
« Last post by ineedtinycoreluxhep on June 30, 2025, 05:38:48 PM »
I edited my message because i thought i wrote it with bad syntax, but when I realized it was a mistake I put it back as it was
9
dCore x86_64 / Is dCore x86_64 under development?
« Last post by ineedtinycoreluxhep on June 30, 2025, 05:27:19 PM »
Please answer that
10
Corepure64 / Re: fakechroot in CorePure64
« Last post by Zhurman on June 30, 2025, 12:26:39 PM »
When asking for help, it's usually a good idea to include:
Tinycore version i.e TC14, TC15, TC16, etc.
Architecture i,e, x86, x86_64, arm, aarch64
The exact command that is causing the issue.
OK, sure.
TC16.1, architecture x86_64

Did you try running it with the  -s  option:
Code: [Select]
fakechroot -s ...

That command also give segfaults and breaks my system.

Or you may have to compile it from source using the Tinycore
toolchain (compiletc.tcz):

[EDIT] Starting to try.
Pages: [1] 2 3 ... 10