From patchwork Wed Mar 6 21:28:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 1052531 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="w2oZmS5Z"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44F6M64mg2z9s9y for ; Thu, 7 Mar 2019 08:28:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DEEB787568; Wed, 6 Mar 2019 21:28:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dYq-Rr2QxLe5; Wed, 6 Mar 2019 21:28:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D694687327; Wed, 6 Mar 2019 21:28:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 278D01BF847 for ; Wed, 6 Mar 2019 21:28:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0D508823FA for ; Wed, 6 Mar 2019 21:28:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pBy2YaRWlrJW for ; Wed, 6 Mar 2019 21:28:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8F2B88204B for ; Wed, 6 Mar 2019 21:28:21 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id g19so11688115edp.2 for ; Wed, 06 Mar 2019 13:28:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3OnGo6/r/ieNNESvvIOA9LctnsyJTS6D9Rq/z2shq60=; b=w2oZmS5Z6ss2NryKnqb+PTC8xqXUV+e7wtWWhWEpZ8noSmL4TF/HAX4WXR1oyogOHB cdIEea89KIId2CLt6SUQz/P4gZquFtWkTDfh0Z52ghPYsiZ9aY1gt+i2lMpuNDRbNyrO LdtBVwmxnx93/1o68vAudjee719mq3zcwwJVT0rXlkw7jkPw6iLxZ870PBiAvkB8oIBg YweiVJy78kuGrEK47asWRvTiDG6E52DtTwIadBqRINzdup+SyYTePt9SoiIonayWYdqs rQdUgR1B81kyL8IdKNq2M8MVzpxtKF6yToOK/6+fo/KRyZyYdw9tEK9qJxd+ZbrPHMUH pFYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3OnGo6/r/ieNNESvvIOA9LctnsyJTS6D9Rq/z2shq60=; b=bhWC4oznWKfV5xX5CIwY58eAjAyegZ5BXUUNV+/Sx9AR+YlGwRnWAXq5NJ8d/kaRkp CMy5dP67VGAQBY08YR3A7a+WHaXghNeFxZrQubw9VT5BO14WlNWOHuuUa0knA0bs72Fh 69ry6w0rYC8fvIV3Gqpi4KmWp8H7DevF7ZBZTnNMcGK5Kzh8bAPLKc3UpDIgzXWU9ZB4 yllNSMa03l8ak9X3ixppDLW+g3JhbQkSbcS0EVqq/1JaShS93ERSNmT+7SRXm+eo9UPi 5DmGJoRb1SO4KIY+JzuITfcrk2aFOQDHHhyHix4r3N+vkE3JhnMrOM7WeKn5pCxwHxcg B+bg== X-Gm-Message-State: APjAAAXsj5iCc1GFb+r2fpKT1fpJ6cSNIgCCj9CPLblHrE+TqluEJahJ MnR333eE/KTmFRPiMvJCXidb3drERew= X-Google-Smtp-Source: APXvYqyERE/w4pj+XtnsCjK7kHsAt+IpYxyk2Pl/0sZ2FaR780+CIPYPBOuig9FSs1C3JEmypeN2KQ== X-Received: by 2002:a50:b527:: with SMTP id y36mr25881180edd.83.1551907699224; Wed, 06 Mar 2019 13:28:19 -0800 (PST) Received: from localhost.localdomain (ptr-907qli7js4ahl8vkx72.18120a2.ip6.access.telenet.be. [2a02:1811:2c25:fa00:79ce:8aee:a207:140e]) by smtp.gmail.com with ESMTPSA id b22sm773835edb.5.2019.03.06.13.28.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Mar 2019 13:28:18 -0800 (PST) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Wed, 6 Mar 2019 22:28:15 +0100 Message-Id: <20190306212815.19759-2-arnout@mind.be> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190306212815.19759-1-arnout@mind.be> References: <20190306212815.19759-1-arnout@mind.be> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] linux{, -headers}: support downloads of v5+ X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With the arrival of linux v5.0, we need yet another condition to set _SITE correctly. Instead of continuing this madness, solve the problem generically: use v2.6 for 2.6.*, and use the number before the first dot in the other cases. While we're at it, remove the comment which has been incorrect since 80d7b68167a5c8893e906ace6b5f0b0166336406 (7 years ago). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Jan Kundrát Tested-by: Adam Duskett Reviewed-by: Adam Duskett --- linux/linux.mk | 9 ++------- package/linux-headers/linux-headers.mk | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/linux/linux.mk b/linux/linux.mk index 2b5d096e14..c7081db88f 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -37,15 +37,10 @@ else ifneq ($(findstring -rc,$(LINUX_VERSION)),) LINUX_SITE = https://git.kernel.org/torvalds/t 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 4.0, 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 -else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.) -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x -else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.) -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x +else +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_VERSION))).x endif endif diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk index 4b5ebf8d97..95432ade83 100644 --- a/package/linux-headers/linux-headers.mk +++ b/package/linux-headers/linux-headers.mk @@ -50,15 +50,10 @@ LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz LINUX_HEADERS_SITE = https://git.kernel.org/torvalds/t else LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_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 4.0, 3.1, -# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. ifeq ($(findstring x2.6.,x$(LINUX_HEADERS_VERSION)),x2.6.) LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6 -else ifeq ($(findstring x3.,x$(LINUX_HEADERS_VERSION)),x3.) -LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x -else ifeq ($(findstring x4.,x$(LINUX_HEADERS_VERSION)),x4.) -LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x +else +LINUX_HEADERS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_HEADERS_VERSION))).x endif # x2.6 endif # LINUX_HEADERS_CUSTOM_TARBALL