All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz
@ 2013-05-10  8:51 Jerzy Grzegorek
  2013-05-10 14:04 ` Thomas Petazzoni
  2013-05-10 16:22 ` Raúl Sánchez Siles
  0 siblings, 2 replies; 4+ messages in thread
From: Jerzy Grzegorek @ 2013-05-10  8:51 UTC (permalink / raw)
  To: buildroot

After selecting BR2_LINUX_KERNEL or BR2_LINUX_KERNEL_CUSTOM_VERSION 
configuration item, if any of linux tarball linux-$(LINUX_VERSION).tar.xx
in local download tarball directory $(BR2_DL_DIR) exists, it used should be,
otherwise *we* set the compression of linux tarball to download to xz.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
---
 linux/linux.mk |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 8a73767..fba9d44 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -3,6 +3,7 @@
 # Linux kernel target
 #
 ###############################################################################
+
 LINUX_VERSION=$(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
 LINUX_LICENSE = GPLv2
 LINUX_LICENSE_FILES = COPYING
@@ -15,8 +16,15 @@ LINUX_SOURCE = $(notdir $(LINUX_TARBALL))
 else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
 LINUX_SITE_METHOD = git
-else
+# If any of linux tarball locally exists it used should be
+else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.xz),)
+LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
+else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.bz2),)
 LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2
+else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.gz),)
+LINUX_SOURCE = linux-$(LINUX_VERSION).tar.gz
+else
+LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
 # 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.
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz
  2013-05-10  8:51 [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz Jerzy Grzegorek
@ 2013-05-10 14:04 ` Thomas Petazzoni
  2013-05-10 16:22 ` Raúl Sánchez Siles
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-05-10 14:04 UTC (permalink / raw)
  To: buildroot

Dear Jerzy Grzegorek,

On Fri, 10 May 2013 10:51:48 +0200, Jerzy Grzegorek wrote:

> +# If any of linux tarball locally exists it used should be
> +else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.xz),)
> +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
> +else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.bz2),)
>  LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2
> +else ifneq ($(wildcard $(call qstrip,$(BR2_DL_DIR))/linux-$(LINUX_VERSION).tar.gz),)
> +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.gz
> +else
> +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
>  # 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.

Unfortunately, this doesn't work. First $(BR2_DL_DIR) is not the good
variable, as it doesn't take into account the fact that it can be
overridden by the BUILDROOT_DL_DIR environment variable.

Also, I believe this is a kind of "layering" violation. Packages should
not be directly poking into the Buildroot download directory. Managing
the Buildroot directory is the business of package/pkg-download.mk.

So either we decide that we use .tar.xz tarballs (which I think we
could do for all kernels >= 3.0), or we need to improve the package
infrastructure to support a list of possible files to download in
<pkg>_SOURCE, so that we can list the .xz and .bz2.

But for the case of Linux, I believe the easiest way is probably:

diff --git a/linux/linux.mk b/linux/linux.mk
index d375cf0..3611a6d 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -16,14 +16,15 @@ else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
 LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL))
 LINUX_SITE_METHOD = git
 else
-LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2
 # 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.
 ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.)
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/
+LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2
 else
 LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x/
+LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz
 endif
 # release candidates are in testing/ subdir
 ifneq ($(findstring -rc,$(LINUX_VERSION)),)

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz
  2013-05-10  8:51 [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz Jerzy Grzegorek
  2013-05-10 14:04 ` Thomas Petazzoni
@ 2013-05-10 16:22 ` Raúl Sánchez Siles
  2013-05-10 16:27   ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Raúl Sánchez Siles @ 2013-05-10 16:22 UTC (permalink / raw)
  To: buildroot

  Hi:

On Fri, May 10, 2013 at 10:51:48AM +0200, Jerzy Grzegorek wrote:
> After selecting BR2_LINUX_KERNEL or BR2_LINUX_KERNEL_CUSTOM_VERSION 
> configuration item, if any of linux tarball linux-$(LINUX_VERSION).tar.xx
> in local download tarball directory $(BR2_DL_DIR) exists, it used should be,
> otherwise *we* set the compression of linux tarball to download to xz.

  What about the one I'm attaching?

  Regards,
-- 
Ra?l S?nchez Siles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Choose-xz-compressed-tarball-for-linux-kernel.patch
Type: text/x-diff
Size: 1517 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130510/83639513/attachment.bin>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz
  2013-05-10 16:22 ` Raúl Sánchez Siles
@ 2013-05-10 16:27   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-05-10 16:27 UTC (permalink / raw)
  To: buildroot

Dear Ra?l S?nchez Siles,

On Fri, 10 May 2013 18:22:39 +0200, Ra?l S?nchez Siles wrote:

> On Fri, May 10, 2013 at 10:51:48AM +0200, Jerzy Grzegorek wrote:
> > After selecting BR2_LINUX_KERNEL or BR2_LINUX_KERNEL_CUSTOM_VERSION 
> > configuration item, if any of linux tarball linux-$(LINUX_VERSION).tar.xx
> > in local download tarball directory $(BR2_DL_DIR) exists, it used should be,
> > otherwise *we* set the compression of linux tarball to download to xz.
> 
>   What about the one I'm attaching?

This one works if we're sure that all the 3.x and 2.6 versions of the
Linux kernel, as hosted on kernel.org, are available as .xz.

Looking at https://www.kernel.org/pub/linux/kernel/v2.6/ and
https://www.kernel.org/pub/linux/kernel/v3.x/ it indeed seems to be the
case, so looks like your patch should be go to go.

Could you resend your patch inline, with 'git send-email', so that it
can be reviewed and Acked-by other developers, and hopefully applied?

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-10 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10  8:51 [Buildroot] [PATCH] linux.mk: change linux tarball compression to xz Jerzy Grzegorek
2013-05-10 14:04 ` Thomas Petazzoni
2013-05-10 16:22 ` Raúl Sánchez Siles
2013-05-10 16:27   ` Thomas Petazzoni

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.