Skip to content

Commit

Permalink
Add v4l2loopback module
Browse files Browse the repository at this point in the history
This eases using qubes-video-companion with dom0-provided kernel.

QubesOS/qubes-issues#6426

(cherry picked from commit 5ac5255)
  • Loading branch information
marmarek committed Jan 9, 2023
1 parent f0b0062 commit 2b15b10
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
path = linux-utils
url = https://github.com/QubesOS/qubes-linux-utils.git
branch = release4.0
[submodule "v4l2loopback"]
path = v4l2loopback
url = https://github.com/umlaeute/v4l2loopback
1 change: 1 addition & 0 deletions .qubesbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source:
- linux-utils
- dummy-psu
- dummy-backlight
- v4l2loopback
files:
- url: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-@[email protected]
signature: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-@[email protected]
Expand Down
2 changes: 1 addition & 1 deletion Makefile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ifeq ($(PACKAGE_SET),dom0)
RPM_SPEC_FILES := kernel.spec
NO_ARCHIVE := 1

INCLUDED_SOURCES = dummy-psu dummy-backlight linux-utils
INCLUDED_SOURCES = dummy-psu dummy-backlight linux-utils v4l2loopback
SOURCE_COPY_IN := $(INCLUDED_SOURCES)

$(INCLUDED_SOURCES): SRC_SUBDIR=$@
Expand Down
12 changes: 12 additions & 0 deletions kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Source0: linux-%{upstream_version}.tar
Source1: @dummy-psu@
Source2: @dummy-backlight@
Source3: @linux-utils@
Source4: @v4l2loopback@
Source6: macbook12-spi-driver-f85d028a41fbc928048c8ad248735501e76a2ce9.tar
Source16: guards
Source17: apply-patches
Expand Down Expand Up @@ -223,6 +224,9 @@ tar -x -C %_builddir -zf %{SOURCE2}
rm -rf %_builddir/u2mfn
tar -x -C %_builddir -zf %{SOURCE3} --strip-components=2 linux-utils/kernel-modules/u2mfn

rm -rf %_builddir/v4l2loopback
tar -x -C %_builddir -zf %{SOURCE4}

rm -rf %_builddir/macbook12-spi-driver
tar -x -C %_builddir -f %{SOURCE6}
mv %_builddir/$(basename %{SOURCE6} .tar) %_builddir/macbook12-spi-driver
Expand Down Expand Up @@ -250,6 +254,11 @@ if [ -d "%_builddir/u2mfn" ]; then
make -C %kernel_build_dir M=%_builddir/u2mfn modules
fi

# Build v4l2loopback module
if [ -d "%_builddir/v4l2loopback" ]; then
make -C %kernel_build_dir M=%_builddir/v4l2loopback modules
fi

# Build applespi, apple-ibridge, apple-ib-tb, apple-ib-als modules
if [ -d "%_builddir/macbook12-spi-driver" ]; then
make -C %kernel_build_dir M=%_builddir/macbook12-spi-driver modules
Expand Down Expand Up @@ -317,6 +326,9 @@ fi
if [ -d "%_builddir/u2mfn" ]; then
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/u2mfn
fi
if [ -d "%_builddir/v4l2loopback" ]; then
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/v4l2loopback
fi
if [ -d "%_builddir/macbook12-spi-driver" ]; then
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot M=%_builddir/macbook12-spi-driver
fi
Expand Down
1 change: 1 addition & 0 deletions v4l2loopback
Submodule v4l2loopback added at 1ecf81

0 comments on commit 2b15b10

Please sign in to comment.