On      2026-08-23 17:53, Kurt Jaeger wrote:
Hi!

What are relations to
Linux kernel that you mentioned? How this can be avoided?

If I understand it correctly, webcamd at https://github.com/hselasky/webcamd
was started as a user-space daemon that provides Linux USB Kernel
functions, so that relevant Linux-based webcam drivers can somehow
be integrated.

Yes, I am sorry I wasn't more verbose in my initial message.

When I ask about "finding a home" for the project is something like a github organization that could serve as umbrella, or codeberg, or own git hosting, the idea is to ensure the community can always take over without being locked out. But maybe you prefer the fork way, where I fork under my own name, maintain it, and if I abandon it, you do it again. I am new to freebsd governance so I do not know what is preferred.

Because "daemon currently depends on libc, pthreads, libusb and
libcuse" there is not much kernel involved right?
Except the Linux
kernel is a moving target so the copy-paste into webcamd may not
always be trivial :-P

Yes, I think this is why kuon mentioned Linux kernel topics.


Webcamd is structured this way (disclaimer, I used AI to summarize my findings).

WEBCAMD — WHAT'S ORIGINAL VS. COPIED FROM LINUX
================================================

webcamd is a FreeBSD daemon (by H. Selasky) that runs real Linux
kernel USB drivers (webcams, DVB, HID, remotes) in userspace. The
media_tree git submodule points at torvalds/linux.git, pinned to
Linux 5.17-rc1.

ACTUAL WEBCAMD CODE (BSD-2-Clause)
----------------------------------
webcamd.c + webcamd_global.h
    The daemon itself (~1,300 lines).
kernel/
    Linux kernel API emulation shim: linux_func.c, linux_usb.c,
    linux_task/thread/timer/file/firmware/i2c/struct.c,
    linux_list.h, linux_defs.h, etc. Mostly Selasky copyright
    (see exceptions below).
tools/linux_make/
    Build tool that parses Linux Kbuild Makefiles and generates
    the source list.
vtuner/
    VirtualTuner client/server (BSD).
dummy/
    251 files, ALL EMPTY — stub headers so Linux driver #includes
    compile cleanly.
config, config*.in, Makefile
    Kconfig-style build configuration.
man4/ (63 pages), webcamd.8, README.md, www/
    Documentation and branding.

FROM LINUX (GPLv2)
------------------
media_tree/
    The Linux kernel tree itself (submodule, empty in checkout;
    fetched at build time). Compiled directly: drivers/media,
    drivers/hid, drivers/input, drivers/leds, drivers/base/regmap,
    staging/media, sound/i2c/other, lib/lzo, mlx5 core, plus
    lib/kfifo.c and lib/rbtree.c. All ~1500 device drivers are
    Linux code.
patches/
    GPLv2 patches onto media_tree: 0001 adapts ~46 files (UVC,
    gspca, videobuf2, dvb-core, HID...) to the shim; 0002 adds
    extra DVB dongle drivers (tda18273, usbtv).
headers/linux/
    Verbatim Linux headers: i2c.h, i2c-id.h, idr.h.
contrib/dvb-usb/
    TBS QBOX S2 driver (GPLv2, not upstream).
contrib/v4l2loopback/
    v4l2loopback module submodule (GPLv2).

BORDERLINE (inside kernel/)
---------------------------
linux_idr.c    GPLv2, copied from Linux IDR code.
linux_radix.c  FreeBSD radix tree (BSD).
linux_xarray.c Mellanox/FreeBSD linuxkpi (BSD).

BOTTOM LINE
-----------
The daemon, the ~400 KB kernel-API shim, build tooling, and empty
dummy stubs are the real webcamd work. The drivers — the point of
the project — come straight from Linux via media_tree, lightly
patched for userspace. Licensing per COPYING: media_tree + patches
are GPLv2; the rest is BSD-2-Clause except individually copied
Linux helpers.

--
Nicolas Goy

Reply via email to