All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent McIntyre <media@arewethere.net>
To: linux-media@vger.kernel.org
Subject: [PATCH] media-build: build against a specific kernel
Date: Thu, 5 Dec 2019 21:15:24 +1100	[thread overview]
Message-ID: <20191205101523.GD9298@ubuntu.windy> (raw)

I find it helpful to be able to build the linux-media modules
for a kernel other than the one I am currently running.

This is a resend of the patch that in two previous attempts
made it into patchwork but the text was line-wrapped.
Those patches should be dropped.
  https://patchwork.linuxtv.org/patch/59979/
  https://patchwork.linuxtv.org/patch/60186/

There are no differences in the patch, just the submission email.
Apologies for all the noise.

Signed-off-by: Vincent McIntyre <media@arewethere.net>

---
 build | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/build b/build
index 2f6b3f4..c2067e7 100755
--- a/build
+++ b/build
@@ -14,6 +14,7 @@ my $check_only = 0;
 my $main_git = 0;
 my $depth;
 my @git;
+my $kernel_version = '';

 my $main_git_url = "git://linuxtv.org/media_tree.git";
 my $main_branch = "master";
@@ -27,6 +28,7 @@ GetOptions('v|verbose' => \$level,
 	   'main_git|main-git' => \$main_git,
 	   'depth=i' => \$depth,
 	   'git=s{2}' => \@git,
+	   'version=s' => \$kernel_version,
 	  ) or pod2usage(2);
 pod2usage(1) if $help;
 pod2usage(-exitstatus => 0, -verbose => 2) if $man;
@@ -522,7 +524,12 @@ print "******************\n";
 print "* Start building *\n";
 print "******************\n";

-run("make allyesconfig", "can't select all drivers");
+if ($kernel_version =~ /\S/) {
+    print "Building for kernel version $kernel_version\n";
+    run("make allyesconfig VER=$kernel_version", "can't select all drivers");
+} else {
+    run("make allyesconfig", "can't select all drivers");
+}
 run("make", "build failed");

 print "**********************************************************\n";
@@ -539,7 +546,7 @@ build - Builds the media drivers without needing to compile a new kernel
 =head1 SYNOPSIS

 build [--help] [--man] [--verbose] [--check-only] [<--git> [URL] [BRANCH]]
- [--main-git] [--depth [DEPTH]]
+ [--main-git] [--depth [DEPTH]] [--version [KERNELVERSION]]

 =head1 OPTIONS

@@ -579,6 +586,11 @@ depth parameter, in order to get a smaller tree.

 That helps to reduce disk storage and download time.

+=item B<--version> [KERNELVERSION]
+
+Try to build for a particular kernel version. The format of the
+version string is the same as the output from 'uname -r'.
+
 =back

 =head1 DESCRIPTION
--
2.7.4


                 reply	other threads:[~2019-12-05 10:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191205101523.GD9298@ubuntu.windy \
    --to=media@arewethere.net \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.