Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,46 @@
From 0d5c0e9a75eca43667b0e29155b635e50622b66a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 27 Feb 2015 21:55:36 +0000
Subject: [PATCH] Revert "media-ctl: Don't install libmediactl and
libv4l2subdev"
This reverts commit 0911dce53b08b0df3066be2c75f67e8a314d8729.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Conflicts:
utils/media-ctl/Makefile.am
---
Upstream-Status: Pending
utils/media-ctl/Makefile.am | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
index c48c8d6..e255e16 100644
--- a/utils/media-ctl/Makefile.am
+++ b/utils/media-ctl/Makefile.am
@@ -1,8 +1,7 @@
-noinst_LTLIBRARIES = libmediactl.la libv4l2subdev.la
-
+lib_LTLIBRARIES = libmediactl.la libv4l2subdev.la
libmediactl_la_SOURCES = libmediactl.c mediactl-priv.h
-libmediactl_la_CFLAGS = -static $(LIBUDEV_CFLAGS)
-libmediactl_la_LDFLAGS = -static $(LIBUDEV_LIBS)
+libmediactl_la_CFLAGS = $(LIBUDEV_CFLAGS)
+libmediactl_la_LDFLAGS = $(LIBUDEV_LIBS)
media-bus-format-names.h: ../../include/linux/media-bus-format.h
$(AM_V_GEN) sed -e '/#define MEDIA_BUS_FMT/ ! d; s/.*FMT_//; /FIXED/ d; s/\t.*//; s/.*/{ \"&\", MEDIA_BUS_FMT_& },/;' \
@@ -18,9 +17,6 @@ CLEANFILES = $(BUILT_SOURCES)
nodist_libv4l2subdev_la_SOURCES = $(BUILT_SOURCES)
libv4l2subdev_la_SOURCES = libv4l2subdev.c
libv4l2subdev_la_LIBADD = libmediactl.la
-libv4l2subdev_la_CFLAGS = -static
-libv4l2subdev_la_LDFLAGS = -static
-
mediactl_includedir=$(includedir)/mediactl
noinst_HEADERS = mediactl.h v4l2subdev.h
@@ -0,0 +1,23 @@
From 320b8378ee30eb5e0fe83a8b397f822f2f88a4c1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 1 Mar 2015 22:25:07 +0000
Subject: [PATCH] %% original patch: mediactl-pkgconfig.patch
---
Upstream-Status: Pending
utils/media-ctl/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
index e255e16..ff7b417 100644
--- a/utils/media-ctl/Makefile.am
+++ b/utils/media-ctl/Makefile.am
@@ -20,6 +20,7 @@ libv4l2subdev_la_LIBADD = libmediactl.la
mediactl_includedir=$(includedir)/mediactl
noinst_HEADERS = mediactl.h v4l2subdev.h
+pkgconfig_DATA = libmediactl.pc
bin_PROGRAMS = media-ctl
media_ctl_SOURCES = media-ctl.c options.c options.h tools.h
media_ctl_LDADD = libmediactl.la libv4l2subdev.la
@@ -0,0 +1,26 @@
From f7109d6b2fcb291824d795071c04a492d9fbc45b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 1 Mar 2015 22:25:07 +0000
Subject: [PATCH] %% original patch: export-mediactl-headers.patch
---
Upstream-Status: Pending
utils/media-ctl/Makefile.am | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/utils/media-ctl/Makefile.am b/utils/media-ctl/Makefile.am
index ff7b417..6ce656f 100644
--- a/utils/media-ctl/Makefile.am
+++ b/utils/media-ctl/Makefile.am
@@ -17,8 +17,8 @@ CLEANFILES = $(BUILT_SOURCES)
nodist_libv4l2subdev_la_SOURCES = $(BUILT_SOURCES)
libv4l2subdev_la_SOURCES = libv4l2subdev.c
libv4l2subdev_la_LIBADD = libmediactl.la
-mediactl_includedir=$(includedir)/mediactl
-noinst_HEADERS = mediactl.h v4l2subdev.h
+otherincludedir = $(includedir)/mediactl
+otherinclude_HEADERS = mediactl.h v4l2subdev.h
pkgconfig_DATA = libmediactl.pc
bin_PROGRAMS = media-ctl
@@ -0,0 +1,60 @@
From 6e7e52de7afe29597016952a7317faf9c3ea3268 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Nov 2019 18:50:34 -0800
Subject: [PATCH] Do not use getsubopt
POSIX says that behavior when subopts list is empty is undefined.
musl libs will set value to NULL which leads to crash.
Simply avoid getsubopt, since we cannot rely on it.
Imported from Alpine Linux
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Adapt patch to 1.23.0.
(v4l-utils rev fd544473800d02e90bc289434cc44e5aa8fadd0f).
%% original patch: 0007-Do-not-use-getsubopt.patch
Signed-off-by: Daniel Gomez <daniel@qtec.com>
---
utils/v4l2-ctl/v4l2-ctl-common.cpp | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index d77f7104..838c297d 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -994,15 +994,17 @@ static bool parse_subset(char *optarg)
static bool parse_next_subopt(char **subs, char **value)
{
- static char *const subopts[] = {
- nullptr
- };
- int opt = v4l_getsubopt(subs, subopts, value);
+ char *p = *subs;
+ *value = *subs;
- if (opt < 0 || *value)
- return false;
- fprintf(stderr, "Missing suboption value\n");
- return true;
+ while (*p && *p != ',')
+ p++;
+
+ if (*p)
+ *p++ = '\0';
+
+ *subs = p;
+ return false;
}
void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
--
2.35.1