From: Paul Barker <paul@paulbarker.me.uk>
To: Trevor Woerner <twoerner@gmail.com>
Cc: yocto@yoctoproject.org
Subject: Re: auto kernel version
Date: Sat, 18 Mar 2017 09:42:50 +0000 [thread overview]
Message-ID: <20170318094250.4b34ae29@lap0> (raw)
In-Reply-To: <20170318080705.GA11330@linux-uys3>
On Sat, 18 Mar 2017 04:07:05 -0400
Trevor Woerner <twoerner@gmail.com> wrote:
> Hi,
>
> Let's say I wanted to create a recipe to follow Linus' mainline or a
> recipe to follow GregKH's staging-next. In those cases I wouldn't
> want to nail them down with a version, I'd want to do AUTOREV. So I
> wouldn't put a version in the recipe filename (linus-mainline.bb or
> gregkh-staging-next_git.bb). But I can't seem to get away with not
> having some sort of version string (LINUX_VERSION, PV) in the recipe
> itself. Is it not possible to extract a PV or LINUX_VERSION
> automatically? Otherwise I'll need to update the recipe and commit
> with every release (which isn't the end of the world, but adds to the
> maintenance).
>
> SUMMARY = "GregKH's Staging-Next"
> SECTION = "kernel"
> LICENSE = "GPLv2"
>
> inherit kernel
> require recipes-kernel/linux/linux-dtb.inc
>
> LIC_FILES_CHKSUM =
> "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>
> SRC_URI =
> "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git;branch=staging-next"
> SRC_URI_append_rk3288 = " file://defconfig"
> SRC_URI_append_intel-corei7-64 = " file://defconfig" SRCREV =
> "${AUTOREV}"
>
> LINUX_VERSION = "4.11"
> PV = "${LINUX_VERSION}+git${SRCPV}"
> S = "${WORKDIR}/git"
>
> DEPENDS += "xz-native bc-native coreutils-native"
The problem here is that bitbake needs to know the PV value before
starting do_fetch, as PV becomes part of the path to the work directory
for this recipe. There is special handling in the git fetcher to
resolve AUTOREV during parsing, but it just uses 'git ls-remote' (if I
remember correctly) instead of doing a full git fetch. So at the minute
it's not possible to use 'make kernelversion' or something similar to
determine PV.
For my staging recipes I've just settled for LINUX_VERSION being 4.9
for everything in the 4.9 series, from 4.9-rc1 to the latest 4.9.14.
That way you only need to modify the recipe when you jump from one
mainline release to the next. It's not ideal, but it works for me.
Thanks,
Paul
prev parent reply other threads:[~2017-03-18 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-18 8:07 auto kernel version Trevor Woerner
2017-03-18 9:42 ` Paul Barker [this message]
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=20170318094250.4b34ae29@lap0 \
--to=paul@paulbarker.me.uk \
--cc=twoerner@gmail.com \
--cc=yocto@yoctoproject.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.