From patchwork Thu Aug 23 16:19:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 961475 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="NhKd2KPJ"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41x8m35hpqz9s4v for ; Fri, 24 Aug 2018 02:20:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CA6B787641; Thu, 23 Aug 2018 16:20:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6T1a+3hQTz+c; Thu, 23 Aug 2018 16:20:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B1CBC875EA; Thu, 23 Aug 2018 16:20:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 65C111C2B9D for ; Thu, 23 Aug 2018 16:20:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6386687D27 for ; Thu, 23 Aug 2018 16:20:43 +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 1V3CeKjbnNOE for ; Thu, 23 Aug 2018 16:20:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id B827587A65 for ; Thu, 23 Aug 2018 16:20:42 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id j26-v6so5138743wre.2 for ; Thu, 23 Aug 2018 09:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id; bh=+UTeKBh2V92lV+mrgKKp4ck+F3lpRvIcszxW1AXWj4s=; b=NhKd2KPJUuZMBYySDZvPbG74ypsMMCQgvC2zcA44BSGtZqHnTA9VlcKxfupg5Cw4IH HOhdQG3K9nFqy4ku2pB5Jsikm+NS9gCDE4DPMG78Hk2vlN3CuzUYXx5h7RLx0aVJwpff NimsQjpncXaYwLVl98P9y8go04ujxCwi2BrAkNmWy2e9LCXJmf3igE3Ua68cYifyThyR VdKDTTfzs6Nh4yWL4upgLBUZ21l+8IVtgLG5Kr28CCiWSaqB8d3Nz8Pjer5FSEqeFAVB 7hInHIGPDaRjl+JQHMQ2CdSSB791RYy3pICFJoXmnBtAj16vM2fcwmaJZs/5xNOXYB65 EadA== 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; bh=+UTeKBh2V92lV+mrgKKp4ck+F3lpRvIcszxW1AXWj4s=; b=SvjF+1BNjqt6CqbsATjul0Bksn6OMQK2rlBKgSwlT1WTyqavi+0zHnzMd72dOPB9Ry UitSTgIg5p6erCg+iPb7cYHhA6Bu4quk5odvU9gwGuoIcK23hNeFnByoAE9fT7XUT+pg kP5W4oJpC00ZWom7eJa8+7qU4G1Je985+2gqlwHHIvl+qGV2++Qoap1sc11THoDzPkaj LuiRPMJskKrKkYF76qrBg8qpsgZjmQOJoAdGH3A37jPsXXuog2JGTnbQmWJ9zxYtaxsS Wr1pzy4r5lNywzXa1KhLVF8yPZmq0ZK9Bfovq4Dz6znd2MNYRB9hQgBaT0mGox7N870C oe2g== X-Gm-Message-State: AOUpUlFe9aehC8Ip2uj03fCl5tT/wzGDk+/fNlIUILBRkUcd3+GCD+EX 2ti91mo6MkCYpOuJeoDYHaXSDLVpdnQ= X-Google-Smtp-Source: AA+uWPx4SUaTDTnzYynNy3KAmJrx3N8g3ZnnUia7xvfrS84j8rj6Y5wJS3khEtlyQ1FUhRTMtr0j4A== X-Received: by 2002:a5d:6908:: with SMTP id t8-v6mr22700490wru.170.1535041241165; Thu, 23 Aug 2018 09:20:41 -0700 (PDT) Received: from localhost.localdomain (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id 88-v6sm4327562wrf.95.2018.08.23.09.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 09:20:40 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Thu, 23 Aug 2018 17:19:28 +0100 Message-Id: <20180823161930.18461-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v2 1/3] package/linux-headers: add help text for manual header selection X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Corbin MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add kconfig help text that explains how to manually specify an official Linux version to use for the kernel headers. Signed-off-by: Mark Corbin --- package/linux-headers/Config.in.host | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host index adac3f6398..5c20c997f9 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -77,6 +77,14 @@ config BR2_KERNEL_HEADERS_4_17 config BR2_KERNEL_HEADERS_VERSION bool "Manually specified Linux version" + help + This option allows you to use a specific official version from + kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ... + + Note: you cannot use this option to select a _longterm_ 2.6 + kernel, because these kernels are not located at the standard + URL at kernel.org. Instead, select "Custom tarball" and + specify the right URL directly. endchoice From patchwork Thu Aug 23 16:19:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 961476 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="KIeNh/lr"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41x8m86yHkz9s5b for ; Fri, 24 Aug 2018 02:20:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5DCAB865C4; Thu, 23 Aug 2018 16:20:54 +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 YNWl_HjtRdTz; Thu, 23 Aug 2018 16:20:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5CD2D862FC; Thu, 23 Aug 2018 16:20:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E27F71C2B9D for ; Thu, 23 Aug 2018 16:20:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E0117877DF for ; Thu, 23 Aug 2018 16:20:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dtCgcSqnnAPb for ; Thu, 23 Aug 2018 16:20:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1EC65875EA for ; Thu, 23 Aug 2018 16:20:50 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id m27-v6so5125677wrf.3 for ; Thu, 23 Aug 2018 09:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Zt2FA3Iuois6yKuPn19qlDC900pjl6XNKH9HhFU3ZNg=; b=KIeNh/lr1U1YLGim3QUyGLyG6WK+/jqTIHqF7RRg+OJDIjEUKYs7o3NN4NpOf0+xOK lyAF4N2TGi07Mm8j7EeMQaV8XZsv8Z8R+7YUQfiCC3OZpKjVlyCGHkqXjL0Kzf/2ljZ6 XCJs3UUE/Ftic9rf02UA1yhPnkvkppdDZmZrZl3Jsqa2f4EE+2Gp/kPh29EHcg1Yz5DI eBFLy1/2t2tbLcUYNnW6AbbgABY3DC+ktQej0XSmyzLhcjyh1pnYkeE/n934qGHFEWLi wGFeDKM8k0T8HLOjGf3pKMQHhWDG+63FHuSnOibvrNbi1yQWUj6ZURimLaFSuC8jY1gx CPWg== 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; bh=Zt2FA3Iuois6yKuPn19qlDC900pjl6XNKH9HhFU3ZNg=; b=SQywDEZxXU95tAwoDBbbpReaaxjo3b1bR/nW3UKURqEVI2U6/SYJhNWVYA6FENTQk0 z+R5VJicsjF0ikeIs2ZcFtDBZDcNFRpAlCpCbAnY7xJ3XsQLeu18sh9LvrcO7nA+DMbn MU1XU0Sp7c8Sb8eGNafeqjp51P0EXqZWWt09eRXO+n7Umu7HnozddmfIyKT02blvI5O3 yvyloVxjEHu0IQCMe9ACXUsKtZvwjizkaggpqnLQ1u+toUGk+VDec9zwXyPBriOXqwyS iaFLs2XN2Q6PTbJNsQKyvjYp3q5XYUGjugFcxR1lrp5/9wW5MuHZRUedRCXFkUroxX+s MYIQ== X-Gm-Message-State: APzg51A2P1fQ6d848QZO+VTFK7U9GvLvOxjb6ajcEbnJtH0W/ohfAkGt moRsbVeDIuKJZIpCV90vOk4V+yiYaow= X-Google-Smtp-Source: ANB0VdatoEe80w0LZWcWnG6UiLpVyoZrxhdlpacgxD5+VexUoSG5Gv7WRAQ8iCv64D0VxgVTFfaR3Q== X-Received: by 2002:a5d:69d1:: with SMTP id s17-v6mr14741278wrw.77.1535041248452; Thu, 23 Aug 2018 09:20:48 -0700 (PDT) Received: from localhost.localdomain (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id 88-v6sm4327562wrf.95.2018.08.23.09.20.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 09:20:47 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Thu, 23 Aug 2018 17:19:29 +0100 Message-Id: <20180823161930.18461-2-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180823161930.18461-1-mark.corbin@embecosm.com> References: <20180823161930.18461-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 2/3] linux: add hash file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Corbin MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Added a hash file for the Linux kernel. Hashes have been copied from the appropriate sha256sums.asc files on kernel.org. The Linux hash file is also shared with the linux-headers package via a symbolic link. Signed-off-by: Mark Corbin --- Changes v1 -> v2: - use sha256 hashes from kernel.org instead of calculating values locally (Baruch) --- linux/linux.hash | 14 ++++++++++++++ package/linux-headers/linux-headers.hash | 1 + 2 files changed, 15 insertions(+) create mode 100644 linux/linux.hash create mode 120000 package/linux-headers/linux-headers.hash diff --git a/linux/linux.hash b/linux/linux.hash new file mode 100644 index 0000000000..5691d7f8af --- /dev/null +++ b/linux/linux.hash @@ -0,0 +1,14 @@ +# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc +sha256 4d8b5e3772771b60c9c6d875af8e59fbcd34d4291827c110501611da09b79b0f linux-4.17.18.tar.xz +sha256 41026d713ba4f7a5e9d514b876ce4ed28a1d993c0c58b42b2a2597d6a0e83021 linux-4.16.18.tar.xz +sha256 3f89cd717e0d497ba4818e145a33002f4c15032e355c1ad6d3d7f31f122caf41 linux-4.15.18.tar.xz +sha256 a38061ca4c864d11a72beb3dc5918a99f13372fe9ee35508d004fdfabd460413 linux-4.14.66.tar.xz +sha256 b025f3fc40801aff1a2d3438d50be56502eb5bf51a7094e85b5205fa71bec731 linux-4.13.16.tar.xz +sha256 86ab3f45b1aff5f8a9ec72c232bccf5a314edb2a09fb8664c5902b03edacfd27 linux-4.12.14.tar.xz +sha256 2e37d4e18094f66b8bd632cac0a3c08a39a14a1ada4a1c78a5e336c4d3036192 linux-4.11.12.tar.xz +sha256 1ae7056b5b6a3fb653b065503afeb514afc870e103b0f857d0d13a6d06fd66ee linux-4.10.17.tar.xz +sha256 8d12ceab9f8cbfd0555c881b35ed4384cf3ea8e223d894c030b04786005e5071 linux-4.9.123.tar.xz +sha256 5fea8c318626de61e99869eb6dde77e8af2419c5cf6f346280da4be1ab8089e8 linux-4.4.151.tar.xz +sha256 6ad9389e55e0ea57768eae173747058a4487fa3630e10a7999cfec9f945e559c linux-4.1.52.tar.xz +# From https://www.kernel.org/pub/linux/kernel/v3.x/sha256sums.asc +sha256 ad96d797571496c969aa71bf5d08e9d2a8c84458090d29a120f1b2981185a99e linux-3.2.102.tar.xz diff --git a/package/linux-headers/linux-headers.hash b/package/linux-headers/linux-headers.hash new file mode 120000 index 0000000000..04970e97c1 --- /dev/null +++ b/package/linux-headers/linux-headers.hash @@ -0,0 +1 @@ +../../linux/linux.hash \ No newline at end of file From patchwork Thu Aug 23 16:19:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 961477 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="bM/AMFA/"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41x8mF28knz9rvt for ; Fri, 24 Aug 2018 02:21:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CFBB586793; Thu, 23 Aug 2018 16:20:59 +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 nvRbWTY9ChNi; Thu, 23 Aug 2018 16:20:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 026B186500; Thu, 23 Aug 2018 16:20:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EBFB91C2B9D for ; Thu, 23 Aug 2018 16:20:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E8E52220B3 for ; Thu, 23 Aug 2018 16:20:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id holSkWs0Jno5 for ; Thu, 23 Aug 2018 16:20:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by silver.osuosl.org (Postfix) with ESMTPS id 0B2DE21F61 for ; Thu, 23 Aug 2018 16:20:56 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id o18-v6so6475927wmc.0 for ; Thu, 23 Aug 2018 09:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NHwAhIrtRDE/4UiVPpn7gyFtfNKx3m9AhjfcLY8s1Mo=; b=bM/AMFA/9gBMQ6Jc2BB1qv5CokSOSvigXjo9Jt1AbLxE10o+Afe5mTgrm5PFvJmfbM Qs/rGY3u9UcMbVR79Lzm+RPxK4zTRM7V3fu2ZQ5SEg82ybeuzp9ROs6RTnMT2qMX/uu7 bxYdS/4vdzMKeaEwQniALH6JlGULQvgkK6EaDYmqboi5+iOajpJrPRKeGdwF3U2ClrOA vsGsyBcUH5kkG9dbrRqc3oHD3PcpP5CTqozvO6mF0D9F0rdVqWvEPcIuVEFWsfCvDkWI C4fPOpi9nHXnfG6bZLH60k7mGzqwEjl3QXTgNpKSDNtR81sQ9y/IFIjfc3HLsDLRTltH NZ6Q== 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; bh=NHwAhIrtRDE/4UiVPpn7gyFtfNKx3m9AhjfcLY8s1Mo=; b=mlRFP3ZZdbdlYNwkHUd3d2BNYoBnjgkDIOt6J2Bqh6zE2cvQ1iLU42f1ymCu8PmrcK eZJErjXIHtuNdf02zTzuVtYRJUBSa9LsucGsHYwRBC2YpHPk/DCHzVG0EwpeE9uilJ4/ EZLrGqw2eXJ5XwoldCWd5WqDg6E9dal5fEHBdv7z1kfPrV5JvS3ogv+lQG33gfup1/+p LU2DCs/c5aYWVxL9aCVbxjX0KH6fw31KihMGe0IZ5mHY70n/M+PV7EnvldwbNeKGTjnK Y+r+pMyCvLtHM3pMWvBczRBr3uoMsBo3ryt+cvCPCujz04TYVHiARdJA56r1GtME6b7V SpAg== X-Gm-Message-State: APzg51DxLuqU8IL3Rz/FezPNvUin+XHq4vGp6VEr5LDaelXiywvG6IXg 1A3hcRgwqzRU0HJj9qzdc/+S8mp71+I= X-Google-Smtp-Source: ANB0Vda32yTx2M3DL+D1fans1Mf/Z0D66QDpsvrU21ayVoHByP9/htk5VXuTyBXYWFrooFUa40Jfvw== X-Received: by 2002:a1c:c44a:: with SMTP id u71-v6mr5656668wmf.43.1535041254310; Thu, 23 Aug 2018 09:20:54 -0700 (PDT) Received: from localhost.localdomain (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id 88-v6sm4327562wrf.95.2018.08.23.09.20.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 09:20:53 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Thu, 23 Aug 2018 17:19:30 +0100 Message-Id: <20180823161930.18461-3-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180823161930.18461-1-mark.corbin@embecosm.com> References: <20180823161930.18461-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 3/3] package/linux-headers: add support for custom headers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Corbin MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add support for building toolchains against custom headers. Allows the selection of a manual version, custom tarball or custom git repository for the kernel headers. This enables toolchains to be built against custom kernel headers without having to build a full kernel. This is particularly useful for new architectures, such as RISC-V where updated kernel headers may not have made it into the mainline kernel yet. Signed-off-by: Mark Corbin --- package/linux-headers/Config.in.host | 40 ++++++++++- package/linux-headers/linux-headers.mk | 94 +++++++++++++++----------- 2 files changed, 93 insertions(+), 41 deletions(-) diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host index 5c20c997f9..f8f78f90d1 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -86,6 +86,23 @@ config BR2_KERNEL_HEADERS_VERSION URL at kernel.org. Instead, select "Custom tarball" and specify the right URL directly. +config BR2_KERNEL_HEADERS_CUSTOM_TARBALL + bool "Custom tarball" + help + This option allows you to specify a URL pointing to a kernel + source tarball. This URL can use any protocol recognized by + Buildroot, like http://, ftp://, file:// or scp://. + + When pointing to a local tarball using file://, you may want + to use a make variable like $(TOPDIR) to reference the root of + the Buildroot tree. + +config BR2_KERNEL_HEADERS_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Git repository. + endchoice config BR2_DEFAULT_KERNEL_VERSION @@ -95,9 +112,27 @@ config BR2_DEFAULT_KERNEL_VERSION Specify the version you want to use. E.G.: 3.6.10 +config BR2_KERNEL_HEADERS_CUSTOM_TARBALL_LOCATION + string "URL of custom kernel tarball" + depends on BR2_KERNEL_HEADERS_CUSTOM_TARBALL + +if BR2_KERNEL_HEADERS_CUSTOM_GIT + +config BR2_KERNEL_HEADERS_CUSTOM_REPO_URL + string "URL of custom repository" + +config BR2_KERNEL_HEADERS_CUSTOM_REPO_VERSION + string "Custom repository version" + help + Revision to use in the typical format used by + Git/Mercurial/Subversion E.G. a sha id, a tag, branch, .. + +endif + choice bool "Custom kernel headers series" - depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL + depends on BR2_KERNEL_HEADERS_VERSION || BR2_KERNEL_HEADERS_AS_KERNEL || \ + BR2_KERNEL_HEADERS_CUSTOM_TARBALL || BR2_KERNEL_HEADERS_CUSTOM_GIT help Specify the kernel headers series you manually selected, above. @@ -277,3 +312,6 @@ config BR2_DEFAULT_KERNEL_HEADERS default "4.16.18" if BR2_KERNEL_HEADERS_4_16 default "4.17.18" if BR2_KERNEL_HEADERS_4_17 default BR2_DEFAULT_KERNEL_VERSION if BR2_KERNEL_HEADERS_VERSION + default "custom" if BR2_KERNEL_HEADERS_CUSTOM_TARBALL + default BR2_KERNEL_HEADERS_CUSTOM_REPO_VERSION \ + if BR2_KERNEL_HEADERS_CUSTOM_GIT diff --git a/package/linux-headers/linux-headers.mk b/package/linux-headers/linux-headers.mk index 954c6b7978..6bc60d8d74 100644 --- a/package/linux-headers/linux-headers.mk +++ b/package/linux-headers/linux-headers.mk @@ -7,27 +7,50 @@ # This package is used to provide Linux kernel headers for the # internal toolchain backend. +# Set variables depending on whether we are using headers from a kernel +# build or a standalone header package. ifeq ($(BR2_KERNEL_HEADERS_AS_KERNEL),y) - +LINUX_HEADERS_CUSTOM_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL)) +LINUX_HEADERS_CUSTOM_GIT = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT)) +LINUX_HEADERS_CUSTOM_HG = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_HG)) +LINUX_HEADERS_CUSTOM_SVN = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_SVN)) LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) +LINUX_HEADERS_CUSTOM_TARBALL_LOCATION = \ +$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) +LINUX_HEADERS_REPO_URL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +else # ! BR2_KERNEL_HEADERS_AS_KERNEL +LINUX_HEADERS_CUSTOM_TARBALL = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_TARBALL)) +LINUX_HEADERS_CUSTOM_GIT = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_GIT)) +LINUX_HEADERS_CUSTOM_HG = +LINUX_HEADERS_CUSTOM_SVN = +LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)) +LINUX_HEADERS_CUSTOM_TARBALL_LOCATION = \ +$(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_TARBALL_LOCATION)) +LINUX_HEADERS_REPO_URL = $(call qstrip,$(BR2_KERNEL_HEADERS_CUSTOM_REPO_URL)) +endif # BR2_KERNEL_HEADERS_AS_KERNEL + +# Configure tarball filenames. +ifeq ($(LINUX_HEADERS_CUSTOM_TARBALL),y) +LINUX_HEADERS_SOURCE = $(notdir $(LINUX_HEADERS_CUSTOM_TARBALL_LOCATION)) +else ifeq ($(LINUX_HEADERS_CUSTOM_GIT)$(LINUX_HEADERS_CUSTOM_HG)$(LINUX_HEADERS_CUSTOM_SVN),y) +LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz +else +LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz +endif -# Compute LINUX_HEADERS_SOURCE and LINUX_HEADERS_SITE from the configuration -ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) -LINUX_HEADERS_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) -LINUX_HEADERS_SITE = $(patsubst %/,%,$(dir $(LINUX_HEADERS_TARBALL))) -LINUX_HEADERS_SOURCE = $(notdir $(LINUX_HEADERS_TARBALL)) -else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) -LINUX_HEADERS_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +# Configure the various kernel source locations. +ifeq ($(LINUX_HEADERS_CUSTOM_TARBALL),y) +LINUX_HEADERS_SITE = $(patsubst %/,%,$(dir $(LINUX_HEADERS_CUSTOM_TARBALL_LOCATION))) +else ifeq ($(LINUX_HEADERS_CUSTOM_GIT),y) +LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL) LINUX_HEADERS_SITE_METHOD = git -# use same git tarball as linux kernel -LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz -else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y) -LINUX_HEADERS_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +else ifeq ($(LINUX_HEADERS_CUSTOM_HG),y) +LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL) LINUX_HEADERS_SITE_METHOD = hg -# use same hg tarball as linux kernel -LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.gz +else ifeq ($(LINUX_HEADERS_CUSTOM_SVN),y) +LINUX_HEADERS_SITE = $(LINUX_HEADERS_REPO_URL) +LINUX_HEADERS_SITE_METHOD = svn 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. @@ -37,13 +60,16 @@ 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 -endif +endif # x2.6 # release candidates are in testing/ subdir ifneq ($(findstring -rc,$(LINUX_HEADERS_VERSION)),) LINUX_HEADERS_SITE := $(LINUX_HEADERS_SITE)/testing endif # -rc -endif +endif # LINUX_HEADERS_CUSTOM_TARBALL +# Apply any necessary patches if we are using the headers from a kernel +# build. +ifeq ($(BR2_KERNEL_HEADERS_AS_KERNEL),y) LINUX_HEADERS_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) # We rely on the generic package infrastructure to download and apply @@ -53,35 +79,23 @@ LINUX_HEADERS_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) LINUX_HEADERS_PATCH = $(filter ftp://% http://% https://%,$(LINUX_HEADERS_PATCHES)) define LINUX_HEADERS_APPLY_LOCAL_PATCHES - for p in $(filter-out ftp://% http://% https://%,$(LINUX_HEADERS_PATCHES)) ; do \ - if test -d $$p ; then \ - $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \ - else \ - $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \ - fi \ - done + for p in $(filter-out ftp://% http://% https://%,$(LINUX_HEADERS_PATCHES)) ; do \ + if test -d $$p ; then \ + $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \ + else \ + $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \ + fi \ + done endef LINUX_HEADERS_POST_PATCH_HOOKS += LINUX_HEADERS_APPLY_LOCAL_PATCHES +endif # BR2_KERNEL_HEADERS_AS_KERNEL -else # ! BR2_KERNEL_HEADERS_AS_KERNEL - -LINUX_HEADERS_VERSION = $(call qstrip,$(BR2_DEFAULT_KERNEL_HEADERS)) -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 -endif -LINUX_HEADERS_SOURCE = linux-$(LINUX_HEADERS_VERSION).tar.xz - -ifeq ($(BR2_KERNEL_HEADERS_VERSION),y) +# Skip hash checking for custom kernel headers. +ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_CUSTOM_TARBALL)$(BR2_KERNEL_HEADERS_CUSTOM_GIT),y) BR_NO_CHECK_HASH_FOR += $(LINUX_HEADERS_SOURCE) endif -endif # ! BR2_KERNEL_HEADERS_AS_KERNEL - # linux-headers really is the same as the linux package LINUX_HEADERS_DL_SUBDIR = linux @@ -125,7 +139,7 @@ define LINUX_HEADERS_INSTALL_STAGING_CMDS headers_install) endef -ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_AS_KERNEL),y) +ifeq ($(BR2_KERNEL_HEADERS_VERSION)$(BR2_KERNEL_HEADERS_AS_KERNEL)$(BR2_KERNEL_HEADERS_CUSTOM_TARBALL)$(BR2_KERNEL_HEADERS_CUSTOM_GIT),y) define LINUX_HEADERS_CHECK_VERSION $(call check_kernel_headers_version,\ $(STAGING_DIR),\