* [Buildroot] [git commit] linux: add support for 3.x and -rc versions @ 2011-07-11 21:46 Thomas Petazzoni 2011-07-14 8:36 ` Sven Neumann 0 siblings, 1 reply; 7+ messages in thread From: Thomas Petazzoni @ 2011-07-11 21:46 UTC (permalink / raw) To: buildroot commit: http://git.buildroot.net/buildroot/commit/?id=f45f775b4fcb271e5b94b489ad47ffd37f712ce2 branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master The assumption that all kernels are in http://www.kernel.org/pub/linux/kernel/v2.6/ is no longer true: versions 3.x are in separate directories. We now compute the directory name from the major and minor versions of the version provided by the user. This assumes that the 3.1 version will be in a /v3.1/ directory, which we don't know yet because the 3.1 cycle hasn't started yet. At the same time, we add support for the official -rcX versions. Patch tested by compiling 3.0-rc6, which Buildroot has successfully downloaded and built. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> --- linux/linux.mk | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index bba4921..0679238 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -15,7 +15,16 @@ LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) LINUX_SITE_METHOD = git else LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ +# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order +# to use the $(word) function. We support versions such as 3.1, +# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. +LINUX_VERSION_MAJOR = $(word 1,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) +LINUX_VERSION_MINOR = $(word 2,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/ +# release candidates are in testing/ subdir +ifneq ($(findstring -rc,$(LINUX_VERSION)),) +LINUX_SITE = $(LINUX_SITE)testing/ +endif # -rc endif LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions 2011-07-11 21:46 [Buildroot] [git commit] linux: add support for 3.x and -rc versions Thomas Petazzoni @ 2011-07-14 8:36 ` Sven Neumann 2011-07-14 10:28 ` Peter Korsgaard 0 siblings, 1 reply; 7+ messages in thread From: Sven Neumann @ 2011-07-14 8:36 UTC (permalink / raw) To: buildroot On Mon, 2011-07-11 at 23:46 +0200, Thomas Petazzoni wrote: > commit: http://git.buildroot.net/buildroot/commit/?id=f45f775b4fcb271e5b94b489ad47ffd37f712ce2 > branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master > > The assumption that all kernels are in > http://www.kernel.org/pub/linux/kernel/v2.6/ is no longer true: > versions 3.x are in separate directories. > > We now compute the directory name from the major and minor versions of > the version provided by the user. This assumes that the 3.1 version > will be in a /v3.1/ directory, which we don't know yet because the 3.1 > cycle hasn't started yet. > > At the same time, we add support for the official -rcX versions. > > Patch tested by compiling 3.0-rc6, which Buildroot has successfully > downloaded and built. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> > --- > linux/linux.mk | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/linux/linux.mk b/linux/linux.mk > index bba4921..0679238 100644 > --- a/linux/linux.mk > +++ b/linux/linux.mk > @@ -15,7 +15,16 @@ LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) > LINUX_SITE_METHOD = git > else > LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 > -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ > +# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order > +# to use the $(word) function. We support versions such as 3.1, > +# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. > +LINUX_VERSION_MAJOR = $(word 1,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) > +LINUX_VERSION_MINOR = $(word 2,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) > +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/ > +# release candidates are in testing/ subdir > +ifneq ($(findstring -rc,$(LINUX_VERSION)),) > +LINUX_SITE = $(LINUX_SITE)testing/ > +endif # -rc > endif > > LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) I've updated to latest git today and ran into this error: linux/linux.mk:26: *** Recursive variable `LINUX_SITE' references itself (eventually). Stop. For now I've solved this by the following (somewhat inelegant) change: diff --git a/linux/linux.mk b/linux/linux.mk index 88fe6dd..35a228a 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -20,10 +20,11 @@ LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 # 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. LINUX_VERSION_MAJOR = $(word 1,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) LINUX_VERSION_MINOR = $(word 2,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/ # release candidates are in testing/ subdir ifneq ($(findstring -rc,$(LINUX_VERSION)),) -LINUX_SITE = $(LINUX_SITE)testing/ +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/testing +else +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR) endif # -rc endif I also think that the logic for selecting a custom tarball is wrong. Shouldn't this rather be changed like this: diff --git a/linux/linux.mk b/linux/linux.mk index 88fe6dd..35a228a 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -6,7 +6,7 @@ LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) # Compute LINUX_SOURCE and LINUX_SITE from the configuration -ifeq ($(LINUX_VERSION),custom) +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) LINUX_SITE = $(dir $(LINUX_TARBALL)) LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) Regards, Sven ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions 2011-07-14 8:36 ` Sven Neumann @ 2011-07-14 10:28 ` Peter Korsgaard 2011-07-14 14:29 ` Sven Neumann 0 siblings, 1 reply; 7+ messages in thread From: Peter Korsgaard @ 2011-07-14 10:28 UTC (permalink / raw) To: buildroot >>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes: Hi, Sven> I've updated to latest git today and ran into this error: Sven> linux/linux.mk:26: *** Recursive variable `LINUX_SITE' references itself Sven> (eventually). Stop. Interesting, I haven't seen that here. What make version are you using? I just built qemu_arm_versatile_defconfig with make 3.81 without any problems. Could you post your config, please? Sven> For now I've solved this by the following (somewhat inelegant) change: I think we can simply replace one of the '=' with a := to break the loop, but would like to be able to reproduce it first. Sven> I also think that the logic for selecting a custom tarball is wrong. Sven> Shouldn't this rather be changed like this: Sven> diff --git a/linux/linux.mk b/linux/linux.mk Sven> index 88fe6dd..35a228a 100644 Sven> --- a/linux/linux.mk Sven> +++ b/linux/linux.mk Sven> @@ -6,7 +6,7 @@ Sven> LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) Sven> # Compute LINUX_SOURCE and LINUX_SITE from the configuration Sven> -ifeq ($(LINUX_VERSION),custom) Sven> +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) Sven> LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) As far as I can see those should be equivalent as LINUX_VERSION is: default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions 2011-07-14 10:28 ` Peter Korsgaard @ 2011-07-14 14:29 ` Sven Neumann 2011-07-14 14:46 ` Peter Korsgaard 0 siblings, 1 reply; 7+ messages in thread From: Sven Neumann @ 2011-07-14 14:29 UTC (permalink / raw) To: buildroot On Thu, 2011-07-14 at 12:28 +0200, Peter Korsgaard wrote: > >>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes: > > Hi, > > Sven> I've updated to latest git today and ran into this error: > > Sven> linux/linux.mk:26: *** Recursive variable `LINUX_SITE' references itself > Sven> (eventually). Stop. > > Interesting, I haven't seen that here. What make version are you using? GNU Make 3.81 > I just built qemu_arm_versatile_defconfig with make 3.81 without any > problems. Could you post your config, please? Here's the kernel part, in the hope that this is sufficient: # Kernel # BR2_LINUX_KERNEL=y # BR2_LINUX_KERNEL_2_6_39 is not set # BR2_LINUX_KERNEL_SAME_AS_HEADERS is not set BR2_LINUX_KERNEL_CUSTOM_VERSION=y # BR2_LINUX_KERNEL_CUSTOM_TARBALL is not set # BR2_LINUX_KERNEL_CUSTOM_GIT is not set BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0-rc7" BR2_LINUX_KERNEL_VERSION="3.0-rc7" BR2_LINUX_KERNEL_PATCH="raumfeld/kernel-arm.patch" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="raumfeld/kernel-arm.config" BR2_LINUX_KERNEL_UIMAGE=y # BR2_LINUX_KERNEL_ZIMAGE is not set # BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM is not set BR2_LINUX_KERNEL_INSTALL_TARGET=y Sven ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions 2011-07-14 14:29 ` Sven Neumann @ 2011-07-14 14:46 ` Peter Korsgaard 0 siblings, 0 replies; 7+ messages in thread From: Peter Korsgaard @ 2011-07-14 14:46 UTC (permalink / raw) To: buildroot >>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes: Sven> On Thu, 2011-07-14 at 12:28 +0200, Peter Korsgaard wrote: >> >>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes: >> >> Hi, >> Sven> I've updated to latest git today and ran into this error: >> Sven> linux/linux.mk:26: *** Recursive variable `LINUX_SITE' references itself Sven> (eventually). Stop. >> >> Interesting, I haven't seen that here. What make version are you using? Sven> GNU Make 3.81 >> I just built qemu_arm_versatile_defconfig with make 3.81 without any >> problems. Could you post your config, please? Sven> Here's the kernel part, in the hope that this is sufficient: Ahh yes, fixed - Thanks. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions @ 2011-07-14 10:38 Quotient Remainder 2011-07-14 12:24 ` Quotient Remainder 0 siblings, 1 reply; 7+ messages in thread From: Quotient Remainder @ 2011-07-14 10:38 UTC (permalink / raw) To: buildroot On 14 I?il 2011 11:29, "Peter Korsgaard" <jacmet@uclibc.org> wrote: > Sven> linux/linux.mk:26: *** Recursive variable `LINUX_SITE' references itself ... > I think we can simply replace one of the '=' with a := to break the > loop, but would like to be able to reproduce it first. Or += if you want to avoid :=. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110714/eac94f30/attachment.html> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [git commit] linux: add support for 3.x and -rc versions 2011-07-14 10:38 Quotient Remainder @ 2011-07-14 12:24 ` Quotient Remainder 0 siblings, 0 replies; 7+ messages in thread From: Quotient Remainder @ 2011-07-14 12:24 UTC (permalink / raw) To: buildroot On Thu, 2011-07-14 at 11:38 +0100, Quotient Remainder wrote: > > On 14 I?il 2011 11:29, "Peter Korsgaard" <jacmet@uclibc.org> wrote: > > > Sven> linux/linux.mk:26: *** Recursive variable `LINUX_SITE' > references itself > ... > > I think we can simply replace one of the '=' with a := to break the > > loop, but would like to be able to reproduce it first. > > Or += if you want to avoid :=. Of course I'm talking rubbish. += will add an unwanted space between the parts. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-07-14 14:46 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-07-11 21:46 [Buildroot] [git commit] linux: add support for 3.x and -rc versions Thomas Petazzoni 2011-07-14 8:36 ` Sven Neumann 2011-07-14 10:28 ` Peter Korsgaard 2011-07-14 14:29 ` Sven Neumann 2011-07-14 14:46 ` Peter Korsgaard -- strict thread matches above, loose matches on Subject: below -- 2011-07-14 10:38 Quotient Remainder 2011-07-14 12:24 ` Quotient Remainder
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox