From patchwork Wed Sep 12 10:22:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968939 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=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="PPFWKXKu"; 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 429HwK3qxLz9sBx for ; Wed, 12 Sep 2018 20:25:05 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2441688805; Wed, 12 Sep 2018 10:25:02 +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 ZPQWmRdPY6eu; Wed, 12 Sep 2018 10:25:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BB44887F6; Wed, 12 Sep 2018 10:25:01 +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 637471BFF9F for ; Wed, 12 Sep 2018 10:25:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 60F9986E2B for ; Wed, 12 Sep 2018 10:25:00 +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 pBvfZTvHBJg3 for ; Wed, 12 Sep 2018 10:25:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A753A86E25 for ; Wed, 12 Sep 2018 10:24:59 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id b19-v6so1775356wme.3 for ; Wed, 12 Sep 2018 03:24:59 -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=OxdnWmX3DTh8dPBtAd5jsqCQRxJjaNIt1iNcWEhbwUY=; b=PPFWKXKuTyntqLBT4ywvSYS12nl3xqKIu4gyl3m+U3NovQ4suOJWOLFqZIf6ejRpRq eaOcMfbIO9be+2h1aly7cebU6B6ewWb7mX/EpdJbaWNIU3M7i7WApRbb4yqpq8gD04qK QOsQ32opEzEE+SdYpuB+QGL6oYyCeMj+y8t87iIEWOF61fVFx0LYaoYXs1LZ7LGzD2Qa Wm22pOEowHmioVN/+4PIts1Air8C2MZWO6Qa0JyEky5wF+CZPHlN/a5xpGpj2/MFXgi5 EMASHsKydysi+CPOiTRzHbX78jH5AjmqsKJ9moRLkwuseFajhG77fu15kFMI8yraoqtz 5S1Q== 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=OxdnWmX3DTh8dPBtAd5jsqCQRxJjaNIt1iNcWEhbwUY=; b=S7oXbzm5Ad+I5HQQHy212VTBK8DyFbxWkvZ149JIYgCnuZg8Am5nCX8+Hxe1W3rPof EjP7iusSM408F2bpAw00hyxsYRBLTuBMB11CnVfk5MYb/oYoOuIaIKxnFfWoYSpaMBJC BaqTgQUa5FFHpsl7k3LcQPE136BzF8KrBownz9i2WcaOnll6y8p11iWBt1YDMwAS0BNH mssm6OFomsiYJ6I2MQIJh9jl2mViKXAwJ55OGM7+n8vLYlAtV96BGhZ5A7B3Dqffxzcd 7MvPj30GVbXhwBs033P0aEDbs2A3EHb03hekGWGHL2kwleFa6pFEkr7o3jOerc8aaoRa XH2A== X-Gm-Message-State: APzg51BoLRWNi0KEVE7RPKSzXApB6Tn8TM49m9RYyxb0hcdFy4t6z1J8 7+XGOXRkPrZ8VeR4OeubHon64jSMSSE= X-Google-Smtp-Source: ANB0VdYh5IREf+ee/vZX83Fjcj391Y76MwI1R+rrtuXS4mPQ/thpa/JCHT7QVLTaGPyZlc5a5WoIOQ== X-Received: by 2002:a1c:bd84:: with SMTP id n126-v6mr1193227wmf.67.1536747897857; Wed, 12 Sep 2018 03:24:57 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.24.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:24:57 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:51 +0100 Message-Id: <20180912102256.3164-2-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 1/6] 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: - update hashes for latest kernel versions --- linux/linux.hash | 9 +++++++++ package/linux-headers/linux-headers.hash | 1 + 2 files changed, 10 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..84f5312cea --- /dev/null +++ b/linux/linux.hash @@ -0,0 +1,9 @@ +# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc +sha256 f03b425e262a71e5079736706233a4e9afaf77c8462b552b4d6db2d33f5af731 linux-4.18.7.tar.xz +sha256 41026d713ba4f7a5e9d514b876ce4ed28a1d993c0c58b42b2a2597d6a0e83021 linux-4.16.18.tar.xz +sha256 61bdd5fbb0e33362d27476e7d8aade0aa1ad11ddb5959a27094c254cc03b19f0 linux-4.14.69.tar.xz +sha256 6d6a66c757d496460fbcb443063afd989eb5194521273720102e027318985bb5 linux-4.9.126.tar.xz +sha256 18098c4bae107d37f61474d38049a1ea7c718bcfc859f9b87382933a3a426dd9 linux-4.4.155.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 Wed Sep 12 10:22:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968940 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="JsI0sxEz"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 429HwW186Hz9sB5 for ; Wed, 12 Sep 2018 20:25:15 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 93DB986E57; Wed, 12 Sep 2018 10:25:13 +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 5ermX589ey_x; Wed, 12 Sep 2018 10:25:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 438C486E19; Wed, 12 Sep 2018 10:25:11 +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 A9F9A1BFF9F for ; Wed, 12 Sep 2018 10:25:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A5C4C2EE58 for ; Wed, 12 Sep 2018 10:25:10 +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 snCzUT42U6ZA for ; Wed, 12 Sep 2018 10:25:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by silver.osuosl.org (Postfix) with ESMTPS id B00C42282C for ; Wed, 12 Sep 2018 10:25:09 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id z96-v6so1430038wrb.8 for ; Wed, 12 Sep 2018 03:25:09 -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=Qki6FZzDfzaKx387keWqX8STxjz/5h9yhNmPcGMACk8=; b=JsI0sxEzohqiiGkvFXR2M6SKwrD0sS4nPEKIYRw4Z335r6pgFuWB4/r1Bkkun91Wum wz2AJn47v1k9pErjRXpfYGbPEbVbX644703mu7gXmvrocw2n20NrBbEdCptiHVyAp3JT 95nYzKlw2UJEG6/auSfj1mXZj08KroLtdqJ6z17wb80rjAXfgA7xGGaFpE/Og6iZCEAd tE7lPNe4TtXWzMabdufDpqWkp0zw9mLn7F8AqNXOpzyWHWD4UNfiDRXAia6FDuox8gwX DwE5It8S/Ot9QvXPpT5oMvNta/ZgJSja8HjvI2NKy4lvJMKrtchCrt52wdSKlWwefXcd Ugdg== 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=Qki6FZzDfzaKx387keWqX8STxjz/5h9yhNmPcGMACk8=; b=MHW0crMzo6eO5zRUAe2NM+0U6ateAjoTB2411Zqoy4VkJpydjhGK6Ni1LbVD21vmrJ Dy0Alh+E/u21FEBmHroLkUPbriofyMyPkPbc6OQCL7S07xJQEJbELrsoYGJkbffCdNWN 4pWWAid+SMcvI2VgM6WVOsN87NDFPNLr4UX60TJYsCNtZYZ5ZuULaXUaYU4H7cXubh9l +rDqFT4mFtIhhWF8k84zY28xhIhVww2YSoZQyLibiPvkoZYXoHrnRjOUYJ5e5uMG9wjx MN8UgHYDsUsUgEpixvoVZVKgLyGVtGfyItLfOLldd1oj/juy6GvaAl+JQkdQEHqwks+q cMMg== X-Gm-Message-State: APzg51DAn7p6tTT49DrJmguV/NjQb0Pe2a8CR8wjL45pMWzKcPRszGLq 03Ft1uVm0SrCvNBNtmkcPcgELcsRhNU= X-Google-Smtp-Source: ANB0VdZxmgvB5/z2DFZNqMkJmZqYehbQCP2gjMg9JE9in/phb3zJaTwU28OLOo8bsq+2/r4NIuhpFQ== X-Received: by 2002:a5d:428a:: with SMTP id k10-v6mr1029342wrq.225.1536747907699; Wed, 12 Sep 2018 03:25:07 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.25.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:25:07 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:52 +0100 Message-Id: <20180912102256.3164-3-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 2/6] 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 e11f07f0b0..4f79ccc991 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -70,6 +70,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 @@ -79,9 +96,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. @@ -260,3 +295,6 @@ config BR2_DEFAULT_KERNEL_HEADERS default "4.16.18" if BR2_KERNEL_HEADERS_4_16 default "4.18.7" if BR2_KERNEL_HEADERS_4_18 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),\ From patchwork Wed Sep 12 10:22:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968941 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=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="ZTEeyWf1"; 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 429Hwc6GmCz9sBZ for ; Wed, 12 Sep 2018 20:25:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E79B088802; Wed, 12 Sep 2018 10:25:18 +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 KFzre9I0EMmH; Wed, 12 Sep 2018 10:25:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E8CCC88800; Wed, 12 Sep 2018 10:25:16 +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 D45AE1BFF9F for ; Wed, 12 Sep 2018 10:25:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CC8CF86E09 for ; Wed, 12 Sep 2018 10:25:14 +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 OMXUIRNVMSQC for ; Wed, 12 Sep 2018 10:25:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 54EB786E4E for ; Wed, 12 Sep 2018 10:25:13 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z96-v6so1430261wrb.8 for ; Wed, 12 Sep 2018 03:25:13 -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=nurcQU9ZXE4ninY6Af55evUtCR/sWlb5EKjmHkLhzKU=; b=ZTEeyWf17ESALAjkAYQ66DIrJ3XQ+0zVnFDZqib97H4nWLx50cue+EmT2iqHQtnxN1 6HQCFSlvUhSWftp6xdZhBlmkJwTUt/8qYlYTvzTt/OqrqErRnETZQst1kM9qc5vScSqt DdH30dvwKnFbxNR0SMOH0ebUDWoQN9O7sZSTveZp1bmyuGjwmlAn835JsuwbbtVk21Qu 6QDBm6d1JNhI/Cj6kcwBRr8B5EcnEVaABm6WL0Ue9Ed+TzglztEvOoeJaLuQVyOik57L 8NCqofz45qKejkEW7NX7IQRnH1RWJS4El8dHdUbndAE9796IxKWn1MlYJ6LIQFLwzzPY LYiA== 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=nurcQU9ZXE4ninY6Af55evUtCR/sWlb5EKjmHkLhzKU=; b=KHIaUDJ7pimb+COvD+ZXQSQTZABMCuNzaM258vpuB2WlWH4tCVrhLOMBiu/iKIUAnY xnUfhp61a50Aa+Q0ykXkMUQAwubcL/oqNgGA5DTTQSe29TJxffkYii2Q9ZD9bUDb3ILt V6MZME0vn9xb49B09f91RpxM+LIQkwDhO9Dprjf2OmE2yBMSK7laVGzlmmq7TZ+KyHY8 9h2yNxPMkYH6xNkJuSbgdlIonEhfNDnnn1G/SIQJL+NCsB4Xf546+GZaaP75oYiRtkO2 DnLrS35EC3aADBXIIzl+jdAOeQ8cHit7WCSuwDw+yd9qp2g893umEBoaEq3j1ayflAYY S7tw== X-Gm-Message-State: APzg51Cw3dYGpxPB80T2S9cVno08klJdeFQFpAauuDWCm5ga2rHFQ43F EBZ/knRg19G/fNnBNIitdOIfX08sWZQ= X-Google-Smtp-Source: ANB0Vda+yR+uAkRXfQYyrBeTZEH5IL2dHzc4ABfhZnlMdMaNBto19OgXJtgP0NPQuC9XAh9lfdi9qA== X-Received: by 2002:adf:bc44:: with SMTP id a4-v6mr1009836wrh.255.1536747911508; Wed, 12 Sep 2018 03:25:11 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.25.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:25:10 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:53 +0100 Message-Id: <20180912102256.3164-4-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 3/6] arch: allow GCC target options to be optionally overwritten 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" The BR2_GCC_TARGET_* configuration variables are copied to corresponding GCC_TARGET_* variables which may then be optionally modified or overwritten by architecture specific makefiles. All makefiles must use the new GCC_TARGET_* variables instead of the BR2_GCC_TARGET_* versions. Signed-off-by: Mark Corbin --- Makefile | 4 +-- arch/arch.mk | 17 ++++++++++++ package/ffmpeg/ffmpeg.mk | 8 +++--- package/freerdp/freerdp.mk | 2 +- package/gcc/gcc.mk | 27 +++++++++---------- package/kodi/kodi.mk | 2 +- package/kvm-unit-tests/kvm-unit-tests.mk | 2 +- package/meson/meson.mk | 2 +- package/nodejs/nodejs.mk | 2 +- package/tvheadend/tvheadend.mk | 2 +- package/valgrind/valgrind.mk | 2 +- .../pkg-toolchain-external.mk | 22 +++++++-------- 12 files changed, 53 insertions(+), 39 deletions(-) create mode 100644 arch/arch.mk diff --git a/Makefile b/Makefile index 2c6af12989..d636aaeaae 100644 --- a/Makefile +++ b/Makefile @@ -493,9 +493,9 @@ include Makefile.legacy include system/system.mk include package/Makefile.in -# arch/arch.mk.* must be after package/Makefile.in because it may need to +# arch/arch.mk must be after package/Makefile.in because it may need to # complement variables defined therein, like BR_NO_CHECK_HASH_FOR. --include $(sort $(wildcard arch/arch.mk.*)) +-include $(sort $(wildcard arch/arch.mk)) include support/dependencies/dependencies.mk include $(sort $(wildcard toolchain/*.mk)) diff --git a/arch/arch.mk b/arch/arch.mk new file mode 100644 index 0000000000..2429567b24 --- /dev/null +++ b/arch/arch.mk @@ -0,0 +1,17 @@ +# Allow GCC target configuration settings to be optionally +# overwritten by architecture specific makefiles. + +# Makefiles must use the GCC_TARGET_* variables below instead +# of the BR2_GCC_TARGET_* versions. +GCC_TARGET_ARCH := $(call qstrip,$(BR2_GCC_TARGET_ARCH)) +GCC_TARGET_ABI := $(call qstrip,$(BR2_GCC_TARGET_ABI)) +GCC_TARGET_NAN := $(call qstrip,$(BR2_GCC_TARGET_NAN)) +GCC_TARGET_FP32_MODE := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE)) +GCC_TARGET_CPU := $(call qstrip,$(BR2_GCC_TARGET_CPU)) +GCC_TARGET_CPU_REVISION := $(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)) +GCC_TARGET_FPU := $(call qstrip,$(BR2_GCC_TARGET_FPU)) +GCC_TARGET_FLOAT_ABI := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +GCC_TARGET_MODE := $(call qstrip,$(BR2_GCC_TARGET_MODE)) + +# Include any architecture specific makefiles. +-include $(sort $(wildcard arch/arch.mk.*)) diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk index cf9abeb102..b8cc696f83 100644 --- a/package/ffmpeg/ffmpeg.mk +++ b/package/ffmpeg/ffmpeg.mk @@ -511,10 +511,10 @@ endif # warning from ffmpeg's configure script. ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) FFMPEG_CONF_OPTS += --cpu=generic -else ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) -FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU) -else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) -FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) +else ifneq ($(GCC_TARGET_CPU),) +FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_CPU)" +else ifneq ($(GCC_TARGET_ARCH),) +FFMPEG_CONF_OPTS += --cpu="$(GCC_TARGET_ARCH)" endif FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) diff --git a/package/freerdp/freerdp.mk b/package/freerdp/freerdp.mk index 48c407b6b5..91e4ae47ee 100644 --- a/package/freerdp/freerdp.mk +++ b/package/freerdp/freerdp.mk @@ -77,7 +77,7 @@ FREERDP_CONF_OPTS += -DWITH_SSE2=OFF endif ifeq ($(BR2_arm)$(BR2_armeb),y) -FREERDP_CONF_OPTS += -DARM_FP_ABI=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +FREERDP_CONF_OPTS += -DARM_FP_ABI=$(GCC_TARGET_FLOAT_ABI) endif #--------------------------------------- diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk index 1ae9b7edd9..5f6d53f106 100644 --- a/package/gcc/gcc.mk +++ b/package/gcc/gcc.mk @@ -200,39 +200,36 @@ HOST_GCC_COMMON_CONF_OPTS += --disable-decimal-float endif # Determine arch/tune/abi/cpu options -ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) -HOST_GCC_COMMON_CONF_OPTS += --with-arch=$(BR2_GCC_TARGET_ARCH) +ifneq ($(GCC_TARGET_ARCH),) +HOST_GCC_COMMON_CONF_OPTS += --with-arch="$(GCC_TARGET_ARCH)" endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),) -HOST_GCC_COMMON_CONF_OPTS += --with-abi=$(BR2_GCC_TARGET_ABI) +ifneq ($(GCC_TARGET_ABI),) +HOST_GCC_COMMON_CONF_OPTS += --with-abi="$(GCC_TARGET_ABI)" endif ifeq ($(BR2_TOOLCHAIN_HAS_MNAN_OPTION),y) -ifneq ($(call qstrip,$(BR2_GCC_TARGET_NAN)),) -HOST_GCC_COMMON_CONF_OPTS += --with-nan=$(BR2_GCC_TARGET_NAN) +ifneq ($(GCC_TARGET_NAN),) +HOST_GCC_COMMON_CONF_OPTS += --with-nan="$(GCC_TARGET_NAN)" endif endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_FP32_MODE)),) -HOST_GCC_COMMON_CONF_OPTS += --with-fp-32=$(BR2_GCC_TARGET_FP32_MODE) +ifneq ($(GCC_TARGET_FP32_MODE),) +HOST_GCC_COMMON_CONF_OPTS += --with-fp-32="$(GCC_TARGET_FP32_MODE)" endif -ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) -ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) -HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) +ifneq ($(GCC_TARGET_CPU),) +ifneq ($(GCC_TARGET_CPU_REVISION),) +HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(GCC_TARGET_CPU)-$(GCC_TARGET_CPU_REVISION) else -HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)) +HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(GCC_TARGET_CPU) endif endif -GCC_TARGET_FPU = $(call qstrip,$(BR2_GCC_TARGET_FPU)) ifneq ($(GCC_TARGET_FPU),) HOST_GCC_COMMON_CONF_OPTS += --with-fpu=$(GCC_TARGET_FPU) endif -GCC_TARGET_FLOAT_ABI = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) ifneq ($(GCC_TARGET_FLOAT_ABI),) HOST_GCC_COMMON_CONF_OPTS += --with-float=$(GCC_TARGET_FLOAT_ABI) endif -GCC_TARGET_MODE = $(call qstrip,$(BR2_GCC_TARGET_MODE)) ifneq ($(GCC_TARGET_MODE),) HOST_GCC_COMMON_CONF_OPTS += --with-mode=$(GCC_TARGET_MODE) endif diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk index 8e8d53d6b0..8d2430ea55 100644 --- a/package/kodi/kodi.mk +++ b/package/kodi/kodi.mk @@ -88,7 +88,7 @@ KODI_DEPENDENCIES += rpi-userland # These CPU-specific options are only used on rbpi: # https://github.com/xbmc/xbmc/blob/Krypton/project/cmake/scripts/rbpi/ArchSetup.cmake#L13 ifeq ($(BR2_arm1176jzf_s)$(BR2_cortex_a7)$(BR2_cortex_a53),y) -KODI_CONF_OPTS += -DWITH_CPU=$(BR2_GCC_TARGET_CPU) +KODI_CONF_OPTS += -DWITH_CPU="$(GCC_TARGET_CPU)" endif else ifeq ($(BR2_arceb)$(BR2_arcle),y) diff --git a/package/kvm-unit-tests/kvm-unit-tests.mk b/package/kvm-unit-tests/kvm-unit-tests.mk index 54614e2643..92d67fb34b 100644 --- a/package/kvm-unit-tests/kvm-unit-tests.mk +++ b/package/kvm-unit-tests/kvm-unit-tests.mk @@ -28,7 +28,7 @@ endif KVM_UNIT_TESTS_CONF_OPTS =\ --arch="$(KVM_UNIT_TESTS_ARCH)" \ - --processor="$(call qstrip,$(BR2_GCC_TARGET_CPU))" \ + --processor="$(GCC_TARGET_CPU)" \ --endian="$(KVM_UNIT_TESTS_ENDIAN)" # For all architectures but x86-64, we use the target diff --git a/package/meson/meson.mk b/package/meson/meson.mk index d110e594f5..08e5c505c9 100644 --- a/package/meson/meson.mk +++ b/package/meson/meson.mk @@ -14,7 +14,7 @@ HOST_MESON_DEPENDENCIES = host-ninja HOST_MESON_NEEDS_HOST_PYTHON = python3 HOST_MESON_TARGET_ENDIAN = $(call LOWERCASE,$(BR2_ENDIAN)) -HOST_MESON_TARGET_CPU = $(call qstrip,$(BR2_GCC_TARGET_CPU)) +HOST_MESON_TARGET_CPU = $(GCC_TARGET_CPU) HOST_MESON_SED_CFLAGS = $(if $(TARGET_CFLAGS),`printf '"%s"$(comma) ' $(TARGET_CFLAGS)`) HOST_MESON_SED_LDFLAGS = $(if $(TARGET_LDFLAGS),`printf '"%s"$(comma) ' $(TARGET_LDFLAGS)`) diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk index 165f3f109a..4d57cf9010 100644 --- a/package/nodejs/nodejs.mk +++ b/package/nodejs/nodejs.mk @@ -96,7 +96,7 @@ NODEJS_CPU = arm else ifeq ($(BR2_aarch64),y) NODEJS_CPU = arm64 # V8 needs to know what floating point ABI the target is using. -NODEJS_ARM_FP = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +NODEJS_ARM_FP = $(GCC_TARGET_FLOAT_ABI) endif # MIPS architecture specific options diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk index 4c9cda4d9a..5ebb98b941 100644 --- a/package/tvheadend/tvheadend.mk +++ b/package/tvheadend/tvheadend.mk @@ -114,7 +114,7 @@ define TVHEADEND_CONFIGURE_CMDS ./configure \ --prefix=/usr \ --arch="$(ARCH)" \ - --cpu="$(BR2_GCC_TARGET_CPU)" \ + --cpu="$(GCC_TARGET_CPU)" \ --nowerror \ --python="$(HOST_DIR)/bin/python" \ --enable-dvbscan \ diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk index 11dec607dd..b1ab7e72fc 100644 --- a/package/valgrind/valgrind.mk +++ b/package/valgrind/valgrind.mk @@ -31,7 +31,7 @@ VALGRIND_CFLAGS = \ # and pass the right -march option, so they take precedence over # Valgrind's wrongfully detected value. ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) -VALGRIND_CFLAGS += -march=$(BR2_GCC_TARGET_ARCH) +VALGRIND_CFLAGS += -march="$(GCC_TARGET_ARCH)" endif VALGRIND_CONF_ENV = CFLAGS="$(VALGRIND_CFLAGS)" diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk index 02d992531d..08e61af00b 100644 --- a/toolchain/toolchain-external/pkg-toolchain-external.mk +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk @@ -151,18 +151,18 @@ TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS)) # Definition of the CFLAGS to use with the external toolchain, as well as the # common toolchain wrapper build arguments # -ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) -CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)) +ifeq ($(GCC_TARGET_CPU_REVISION),) +CC_TARGET_CPU_ := $(GCC_TARGET_CPU) else -CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) -endif -CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH)) -CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI)) -CC_TARGET_NAN_ := $(call qstrip,$(BR2_GCC_TARGET_NAN)) -CC_TARGET_FP32_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_FP32_MODE)) -CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU)) -CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) -CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE)) +CC_TARGET_CPU_ := $(GCC_TARGET_CPU)-$(GCC_TARGET_CPU_REVISION) +endif +CC_TARGET_ARCH_ := $(GCC_TARGET_ARCH) +CC_TARGET_ABI_ := $(GCC_TARGET_ABI) +CC_TARGET_NAN_ := $(GCC_TARGET_NAN) +CC_TARGET_FP32_MODE_ := $(GCC_TARGET_FP32_MODE) +CC_TARGET_FPU_ := $(GCC_TARGET_FPU) +CC_TARGET_FLOAT_ABI_ := $(GCC_TARGET_FLOAT_ABI) +CC_TARGET_MODE_ := $(GCC_TARGET_MODE) # march/mtune/floating point mode needs to be passed to the external toolchain # to select the right multilib variant From patchwork Wed Sep 12 10:22:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968943 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.136; helo=silver.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="WO/SxW4r"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 429Hwm1WnBz9sB5 for ; Wed, 12 Sep 2018 20:25:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 213D62F7B4; Wed, 12 Sep 2018 10:25:25 +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 aTfkhlJNo5z8; Wed, 12 Sep 2018 10:25:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5882E2EE58; Wed, 12 Sep 2018 10:25:21 +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 CDF7D1BFF9F for ; Wed, 12 Sep 2018 10:25:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CB5432EE58 for ; Wed, 12 Sep 2018 10:25:19 +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 9pHMZHvxzkOU for ; Wed, 12 Sep 2018 10:25:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by silver.osuosl.org (Postfix) with ESMTPS id DFC592282C for ; Wed, 12 Sep 2018 10:25:15 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id g33-v6so1454065wrd.1 for ; Wed, 12 Sep 2018 03:25:15 -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=Y99mhxcvt2ius34zVN9qLoXTVVhN8/g/Z3V91e3lzfY=; b=WO/SxW4raoDPCpTQltfcpgMNeAbwZrMss/2g2AbF6iawCHJWWEItMCZXdtxvp4PZMD EnswHvcQG911irQAPp/JbgrLyMi9CZUplCDaq5IDR6WYHyawsSY2tvSIRn38kh1T3A7l gstPnlvpGcwqpAPqjThNffFh/SaIolPN+24ckQooc/JBmpg7W34aMK/t4fWpminaOx8x R3fcAgjtj6gbUniZkIcMd1RedsOM+cq0EOHG8SpUlwsE7siYsN9XU9P62fwmuCNBuVDY v0LJcuydcr+O8+zLag2qmw25LJd1K92uiFdc1sH8G60FcW+4zR8GPWhsXRf02MMudWul fNQQ== 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=Y99mhxcvt2ius34zVN9qLoXTVVhN8/g/Z3V91e3lzfY=; b=E/v+NDZ1hXYkZn/7ZciF+iJ1SCfLwiZRHoL5VIO98zImdU8rSCHtxhbXnULTC5K4ru yeHkS4dV4vVYUn8eGzf712LU9NJcXMOepmkYz7Wh/yuBNU2i1BudtNL2RP3+NsnaEb2b EPGuBVblfWbUzkM7o7uTp0XUoxB48/+peUZXS9dpFEEHENzD7RvXRWme858HPoRGCudq qmnxB0MxZwJrZMzNTvzv259kwkh4P7adAbtza+E5hqWSqMj59GDOXl7YegAcY1jjaECb wvp/4jFB2nkR9TC7KUaEoR6ylox1UXt9ZQkI9h9WSrQ7/RKrVsrYXd5Rf01d2OexQpAd PAZQ== X-Gm-Message-State: APzg51BbNQ8oJ4eIxXGu4S3jEkUPjgMXfBDnhMBLB52QAv8rVEK/SzGy RpHyy0DEihFKyJenZFJGvV+DSticz9U= X-Google-Smtp-Source: ANB0Vda0sP/QWVqdlMKQu0EoyHcoJoPM/GJltUEwzjvZYQcviSKAa9aYZ5jb6lITAXxT6SddyIouzg== X-Received: by 2002:adf:bd90:: with SMTP id l16-v6mr998045wrh.250.1536747914102; Wed, 12 Sep 2018 03:25:14 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.25.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:25:13 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:54 +0100 Message-Id: <20180912102256.3164-5-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 4/6] arch: add support for RISC-V 64-bit (riscv64) architecture 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" This enables a riscv64 system to be built with a Buildroot generated toolchain (gcc >= 7.x, binutils >= 2.30, glibc only). This configuration has been used to successfully build a qemu-bootable riscv-linux-4.15 kernel (https://github.com/riscv/riscv-linux.git). Signed-off-by: Mark Corbin --- Changes v1 -> v2: - updated DEVELOPERS file (Thomas P) - changed BR2_riscv64 to BR2_riscv to match kernel architecture (Arnout) - MMU now mandatory instead of optional (Thomas P) - moved selection of minimum gcc version to BR2_riscv (Thomas P) - forced selection of ISA atomic extensions as it is required for glibc (Thomas P) - add blind BR2_RISCV_64 option for later use with a 32-bit option (Arnout) - updated generation of GCC_TARGET_ARCH to use new override feature in arch/arch.mk (Thomas P) - added library path override for glibc to avoid default paths that include the ABI - disable selection of linux header versions for versions that don't support RISC-V (Arnout) - removed explicit selection of default C library (Thomas P) - removed comment relating to atomic instructions with glibc (Arnout) - removed explicit selection of default binutils version (Thomas P) --- DEVELOPERS | 4 + Makefile | 1 + arch/Config.in | 15 ++++ arch/Config.in.riscv | 104 ++++++++++++++++++++++++ arch/arch.mk.riscv | 30 +++++++ package/binutils/Config.in.host | 2 + package/glibc/glibc.mk | 30 +++++-- package/linux-headers/Config.in.host | 5 ++ toolchain/toolchain-buildroot/Config.in | 6 +- 9 files changed, 187 insertions(+), 10 deletions(-) create mode 100644 arch/Config.in.riscv create mode 100644 arch/arch.mk.riscv diff --git a/DEVELOPERS b/DEVELOPERS index 8c43ce1b17..1c29da4038 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1286,6 +1286,10 @@ F: package/lynx/ N: Mario Rugiero F: package/ratpoison/ +N: Mark Corbin +F: arch/arch.mk.riscv +F: arch/Config.in.riscv + N: Markos Chandras F: package/harfbuzz/ F: package/libsecret/ diff --git a/Makefile b/Makefile index d636aaeaae..8cec717cdd 100644 --- a/Makefile +++ b/Makefile @@ -433,6 +433,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \ -e s/parisc64/parisc/ \ -e s/powerpc64.*/powerpc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/riscv.*/riscv/ \ -e s/sh.*/sh/ \ -e s/microblazeel/microblaze/) diff --git a/arch/Config.in b/arch/Config.in index 7d1aeb2174..8bd57fe1cc 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -198,6 +198,17 @@ config BR2_powerpc64le http://www.power.org/ http://en.wikipedia.org/wiki/Powerpc +config BR2_riscv + bool "RISCV" + select BR2_ARCH_HAS_MMU_MANDATORY + select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 + help + RISC-V is an open, free Instruction Set Architecture created + by the UC Berkeley Architecture Research group and supported + and promoted by RISC-V Foundation. + https://riscv.org/ + https://en.wikipedia.org/wiki/RISC-V + config BR2_sh bool "SuperH" select BR2_ARCH_HAS_MMU_OPTIONAL @@ -423,6 +434,10 @@ if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le source "arch/Config.in.powerpc" endif +if BR2_riscv +source "arch/Config.in.riscv" +endif + if BR2_sh source "arch/Config.in.sh" endif diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv new file mode 100644 index 0000000000..8889f81e9b --- /dev/null +++ b/arch/Config.in.riscv @@ -0,0 +1,104 @@ +# RISC-V CPU ISA extensions. + +config BR2_RISCV_ISA_RVI + bool + +config BR2_RISCV_ISA_RVM + bool + +config BR2_RISCV_ISA_RVA + bool + +config BR2_RISCV_ISA_RVF + bool + +config BR2_RISCV_ISA_RVD + bool + +config BR2_RISCV_ISA_RVC + bool + + +choice + prompt "Target Architecture Variant" + default BR2_riscv_g + +config BR2_riscv_g + bool "General purpose (G)" + select BR2_RISCV_ISA_RVI + select BR2_RISCV_ISA_RVM + select BR2_RISCV_ISA_RVA + select BR2_RISCV_ISA_RVF + select BR2_RISCV_ISA_RVD + help + General purpose (G) is equivalent to IMAFD. + +config BR2_riscv_custom + bool "Custom architecture" + select BR2_RISCV_ISA_RVI + select BR2_RISCV_ISA_CUSTOM_RVA + +endchoice + +if BR2_riscv_custom + +comment "Instruction Set Extensions" + +config BR2_RISCV_ISA_CUSTOM_RVM + bool "Integer Multiplication and Division (M)" + select BR2_RISCV_ISA_RVM + +config BR2_RISCV_ISA_CUSTOM_RVA + bool "Atomic Instructions (A)" + select BR2_RISCV_ISA_RVA + +config BR2_RISCV_ISA_CUSTOM_RVF + bool "Single-precision Floating-point (F)" + select BR2_RISCV_ISA_RVF + +config BR2_RISCV_ISA_CUSTOM_RVD + bool "Double-precision Floating-point (D)" + depends on BR2_RISCV_ISA_RVF + select BR2_RISCV_ISA_RVD + +config BR2_RISCV_ISA_CUSTOM_RVC + bool "Compressed Instructions (C)" + select BR2_RISCV_ISA_RVC +endif + +config BR2_RISCV_64 + bool + default y + select BR2_ARCH_IS_64 + +choice + prompt "Target ABI" + default BR2_RISCV_ABI_LP64 + +config BR2_RISCV_ABI_LP64 + bool "lp64" + depends on BR2_ARCH_IS_64 + +config BR2_RISCV_ABI_LP64F + bool "lp64f" + depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVF + +config BR2_RISCV_ABI_LP64D + bool "lp64d" + depends on BR2_ARCH_IS_64 && BR2_RISCV_ISA_RVD +endchoice + +config BR2_ARCH + default "riscv64" if BR2_ARCH_IS_64 + +config BR2_ENDIAN + default "LITTLE" + +config BR2_GCC_TARGET_ABI + default "lp64" if BR2_RISCV_ABI_LP64 + default "lp64f" if BR2_RISCV_ABI_LP64F + default "lp64d" if BR2_RISCV_ABI_LP64D + +config BR2_READELF_ARCH_NAME + default "RISC-V" + diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv new file mode 100644 index 0000000000..dded5a5943 --- /dev/null +++ b/arch/arch.mk.riscv @@ -0,0 +1,30 @@ +# +# Configure the GCC_TARGET_ARCH variable and append the +# appropriate RISC-V ISA extensions. +# + +ifeq ($(BR2_riscv),y) + +ifeq ($(BR2_ARCH_IS_64),y) +RISCV_GCC_ARCH = rv64i +endif + +ifeq ($(BR2_RISCV_ISA_RVM),y) +RISCV_GCC_ARCH := $(RISCV_GCC_ARCH)m +endif +ifeq ($(BR2_RISCV_ISA_RVA),y) +RISCV_GCC_ARCH := $(RISCV_GCC_ARCH)a +endif +ifeq ($(BR2_RISCV_ISA_RVF),y) +RISCV_GCC_ARCH := $(RISCV_GCC_ARCH)f +endif +ifeq ($(BR2_RISCV_ISA_RVD),y) +RISCV_GCC_ARCH := $(RISCV_GCC_ARCH)d +endif +ifeq ($(BR2_RISCV_ISA_RVC),y) +RISCV_GCC_ARCH := $(RISCV_GCC_ARCH)c +endif + +GCC_TARGET_ARCH := $(RISCV_GCC_ARCH) + +endif diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index 21dc84e498..c8c02bca77 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -12,9 +12,11 @@ choice config BR2_BINUTILS_VERSION_2_28_X bool "binutils 2.28.1" depends on !BR2_arc + depends on !BR2_riscv config BR2_BINUTILS_VERSION_2_29_X bool "binutils 2.29.1" + depends on !BR2_riscv config BR2_BINUTILS_VERSION_2_30_X bool "binutils 2.30" diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index a2eb8714b1..ad5d79cee0 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -82,6 +82,26 @@ endif # Note that as mentionned in # http://patches.openembedded.org/patch/38849/, glibc must be # built with -O2, so we pass our own CFLAGS and CXXFLAGS below. + +GLIBC_CONF_OPTS = \ + --with-pkgversion="Buildroot" \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --enable-obsolete-rpc \ + --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \ + --with-headers=$(STAGING_DIR)/usr/include + +ifeq ($(BR2_x86_64),y) +GLIBC_CONF_OPTS += --enable-lock-elision +endif + +# Override the default library locations of /lib64/ and +# /usr/lib64// for RISC-V. +ifeq ($(BR2_riscv),y) +GLIBC_CONF_OPTS += libc_cv_slibdir=/lib64 libc_cv_rtlddir=/lib +endif + define GLIBC_CONFIGURE_CMDS mkdir -p $(@D)/build # Do the configuration @@ -98,14 +118,8 @@ define GLIBC_CONFIGURE_CMDS --build=$(GNU_HOST_NAME) \ --prefix=/usr \ --enable-shared \ - $(if $(BR2_x86_64),--enable-lock-elision) \ - --with-pkgversion="Buildroot" \ - --without-cvs \ - --disable-profile \ - --without-gd \ - --enable-obsolete-rpc \ - --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \ - --with-headers=$(STAGING_DIR)/usr/include) + $(GLIBC_CONF_OPTS) \ + ) $(GLIBC_ADD_MISSING_STUB_H) endef diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host index 4f79ccc991..817ad2c57a 100644 --- a/package/linux-headers/Config.in.host +++ b/package/linux-headers/Config.in.host @@ -29,22 +29,27 @@ config BR2_KERNEL_HEADERS_AS_KERNEL config BR2_KERNEL_HEADERS_3_2 bool "Linux 3.2.x kernel headers" depends on !BR2_aarch64 && !BR2_arc && !BR2_nios2 + depends on !BR2_riscv select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 config BR2_KERNEL_HEADERS_4_1 bool "Linux 4.1.x kernel headers" + depends on !BR2_riscv select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 config BR2_KERNEL_HEADERS_4_4 bool "Linux 4.4.x kernel headers" + depends on !BR2_riscv select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 config BR2_KERNEL_HEADERS_4_9 bool "Linux 4.9.x kernel headers" + depends on !BR2_riscv select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_9 config BR2_KERNEL_HEADERS_4_14 bool "Linux 4.14.x kernel headers" + depends on !BR2_riscv select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 config BR2_KERNEL_HEADERS_4_16 diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in index 75e8191f46..7d9428c70e 100644 --- a/toolchain/toolchain-buildroot/Config.in +++ b/toolchain/toolchain-buildroot/Config.in @@ -46,14 +46,16 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC BR2_aarch64_be || BR2_i386 || BR2_mips || \ BR2_mipsel || BR2_mips64 || BR2_mips64el|| \ BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ - BR2_sh || BR2_sparc64 || BR2_x86_64 || \ - BR2_microblaze || BR2_nios2 || BR2_archs38 + BR2_riscv || BR2_sh || BR2_sparc64 || \ + BR2_x86_64 || BR2_microblaze || BR2_nios2 || \ + BR2_archs38 depends on BR2_USE_MMU depends on !BR2_STATIC_LIBS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 depends on !BR2_powerpc_SPE + depends on BR2_RISCV_ISA_RVA || !BR2_riscv select BR2_TOOLCHAIN_USES_GLIBC # our glibc.mk enables RPC support select BR2_TOOLCHAIN_HAS_NATIVE_RPC From patchwork Wed Sep 12 10:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968942 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=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="ehnmKsPY"; 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 429Hwf6MKZz9sBZ for ; Wed, 12 Sep 2018 20:25:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5E749887F3; Wed, 12 Sep 2018 10:25:21 +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 YAjcU4E5ZIRw; Wed, 12 Sep 2018 10:25:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A0A7388804; Wed, 12 Sep 2018 10:25:20 +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 5EAF61BFF9F for ; Wed, 12 Sep 2018 10:25:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5B18787C7C for ; Wed, 12 Sep 2018 10:25:19 +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 gL81K+FYxkkH for ; Wed, 12 Sep 2018 10:25:18 +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 5AFEA87C74 for ; Wed, 12 Sep 2018 10:25:18 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id n2-v6so1431789wrw.7 for ; Wed, 12 Sep 2018 03:25:18 -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=6sAo4m6rmRyiW5p2vcKFMpZJ2eOiQkPfxshoaIL8k7c=; b=ehnmKsPYDjSbrdUUZSi6VVWLz9g2gBoQWeEyKal55khle47ZEs15OwSQ5YSwEKS3wJ JqxK7/eEyHN9mfmOPJqDRY7O4Z7RBsH6yDCsHgZHo+TIt89Z5OUHorUx0WvQjmJdZhu/ JAO7iK6+2ObLy/1xVfiy8ng9zXwzu9h3Gi7pJV8eSD89YpMI+tH5TUqXMyEGt5N7JCJ/ jzlk0SqAo0WZF/3gkebjukSC6DqGpaUvRbBZflyOUNHjij632lshers+zCiW97onNjNd MX6j2eADZxeF39uT9ybdGc1Dw1jqO805zoqkZc7ijl1ot/VCxXPikzObdXTN3b7BfSsu g2qA== 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=6sAo4m6rmRyiW5p2vcKFMpZJ2eOiQkPfxshoaIL8k7c=; b=k8oKyr2gUmc2lQN29qPof7+Cy5zCHaxo+fhN0NlGtFrrN3AfJYgCnddsFvWbYXJAFS Rc2pPcCEiosfi6+Cwx/gC+xzUzSxzPNRLsR2smCVJvz+pGKP7x+ex4zjGz5C6bp8hsS9 eoejyexJcNovAIeNtuGoBK2ozpvK/iRU0f44CGQ0G642kIybFg40DIySrExqE/1x8JqW IyrCUkk4f9cmK6kdo+ktTuvS4pRjjfzl7ILQJbufcFBaluxYvqfcOb0DOr5B0/fjTNcS q8oPBSSZ1GAvWsVPuyMGWhaeCWukBVEcNMzxOeKZ+Bb/+O+6e16FuMpSqN/o/czOY7T1 QmlQ== X-Gm-Message-State: APzg51BYwOWYs4hqGxm+cWhrhLyMuP+GrKSI1gn7Y7fEontJWT6ESLfl FnMgJXX+RYuoOmZEbpXaapr4eMVGDss= X-Google-Smtp-Source: ANB0VdY5uhMkQ8ml2ADeoVI8NDcE3rLyLwaMbBzxKdFvi2FyQWOkHN0XB57LHe/KtTpqdxvPE1ZQAQ== X-Received: by 2002:adf:82c3:: with SMTP id 61-v6mr966629wrc.131.1536747916745; Wed, 12 Sep 2018 03:25:16 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:25:16 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:55 +0100 Message-Id: <20180912102256.3164-6-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 5/6] boot/riscv-pk: add bootloader for RISC-V architecture 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 the RISC-V Proxy Kernel (pk) package which provides the Berkeley Boot Loader for booting RISC-V kernel images. Signed-off-by: Mark Corbin --- DEVELOPERS | 1 + boot/Config.in | 1 + boot/riscv-pk/Config.in | 13 +++++++++++++ boot/riscv-pk/riscv-pk.mk | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 boot/riscv-pk/Config.in create mode 100644 boot/riscv-pk/riscv-pk.mk diff --git a/DEVELOPERS b/DEVELOPERS index 1c29da4038..4d6c599aea 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1289,6 +1289,7 @@ F: package/ratpoison/ N: Mark Corbin F: arch/arch.mk.riscv F: arch/Config.in.riscv +F: boot/riscv-pk/ N: Markos Chandras F: package/harfbuzz/ diff --git a/boot/Config.in b/boot/Config.in index 3687c41a2c..945168bf37 100644 --- a/boot/Config.in +++ b/boot/Config.in @@ -13,6 +13,7 @@ source "boot/gummiboot/Config.in" source "boot/lpc32xxcdl/Config.in" source "boot/mv-ddr-marvell/Config.in" source "boot/mxs-bootlets/Config.in" +source "boot/riscv-pk/Config.in" source "boot/s500-bootloader/Config.in" source "boot/syslinux/Config.in" source "boot/ts4800-mbrboot/Config.in" diff --git a/boot/riscv-pk/Config.in b/boot/riscv-pk/Config.in new file mode 100644 index 0000000000..ec49f6aa6d --- /dev/null +++ b/boot/riscv-pk/Config.in @@ -0,0 +1,13 @@ +comment "riscv-pk (BBL) needs a Linux kernel to be built" + depends on BR2_riscv + depends on !BR2_LINUX_KERNEL + +config BR2_TARGET_RISCV_PK + bool "riscv-pk (BBL)" + depends on BR2_riscv + depends on BR2_LINUX_KERNEL + help + The RISC-V Proxy Kernel (pk) package contains the Berkeley + Boot Loader (BBL) which has been designed to boot a Linux + kernel on a RISC-V processor. + https://github.com/riscv/riscv-pk.git diff --git a/boot/riscv-pk/riscv-pk.mk b/boot/riscv-pk/riscv-pk.mk new file mode 100644 index 0000000000..9eee7e0a82 --- /dev/null +++ b/boot/riscv-pk/riscv-pk.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# riscv-pk (BBL) +# +################################################################################ + +RISCV_PK_VERSION = 706cc77c369fd3e4734b5a6aa813d421347f1814 +RISCV_PK_SITE = git://github.com/riscv/riscv-pk.git +RISCV_PK_LICENSE = BSD-3-Clause +RISCV_PK_LICENSE_FILES = LICENSE +RISCV_PK_DEPENDENCIES = linux +RISCV_PK_SUBDIR = build +RISCV_PK_INSTALL_IMAGES = YES + +define RISCV_PK_CONFIGURE_CMDS + mkdir -p $(@D)/build + (cd $(@D)/build; \ + $(TARGET_CONFIGURE_OPTS) ../configure \ + --host=$(GNU_TARGET_NAME) \ + --with-payload=$(BINARIES_DIR)/vmlinux \ + ) +endef + +define RISCV_PK_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -C $(@D)/build bbl +endef + +define RISCV_PK_INSTALL_IMAGES_CMDS + cp $(@D)/build/bbl $(BINARIES_DIR) +endef + +$(eval $(generic-package)) From patchwork Wed Sep 12 10:22:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968944 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.136; helo=silver.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="ONRykRpM"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 429Hwq18gHz9sB5 for ; Wed, 12 Sep 2018 20:25:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0D3622F74F; Wed, 12 Sep 2018 10:25:29 +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 H4HIknnCTyz8; Wed, 12 Sep 2018 10:25:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1A8A52F667; Wed, 12 Sep 2018 10:25:28 +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 1090D1BFF9F for ; Wed, 12 Sep 2018 10:25:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 08E9A2F4C8 for ; Wed, 12 Sep 2018 10:25:26 +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 xlZwhwC2TluT for ; Wed, 12 Sep 2018 10:25:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by silver.osuosl.org (Postfix) with ESMTPS id DB5AD2F667 for ; Wed, 12 Sep 2018 10:25:21 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id j26-v6so1451585wre.2 for ; Wed, 12 Sep 2018 03:25:21 -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=3KDU7Ylvs1b2SQyL/y5b0OaC/lAtebfHGcM9Xmp/8yo=; b=ONRykRpMww6JFCXfNrL3Etn04SrrRLeacykSSkd5RE9Y0EAhABEml4FSBA5vgiJj4V kC7+KPkYnhw72F/+owxqyPGr6inJGLBxPbSthJNjJAnV6OHHljAV7UBFW7tGiERVeGop cwF5ESpZd9r5M7O1MjOD8SkWKbJ+QLPJpKU7Nf8oZsrVoe4MiatLrt7VVtzEa28jZqlq XnJdeXDHffv2ZzRuLaPRcAnBzBIiyhiPZG+opwtpSlsEKZe0RvYQrTtUiegWBGekhs8h Q+kgcgXKrDV0VAe7B4TmWIVNhiuZd5EEnWaaDdCehq7CR4N/kNLm08b35RJFVGikiKDE 58Cg== 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=3KDU7Ylvs1b2SQyL/y5b0OaC/lAtebfHGcM9Xmp/8yo=; b=o6GboE4kxaEc6Al+Vz8z5TZa+5b/qshiclnP35gBVXnrgHSj5afMYE9WedZ5fsb1my ldFgTv9kJE9WpiQtJupwcpNolXyC2rtUaIOXuVsKx1VySm5DZ42Eo7gs60pIr4EJSk6Z 37MCYjJ5ohi1uuH7F87eGWZKXQS8CUWwn8sAAJPVxfTh33lByhstphEWmxYe6BwSGjxn QYGBDpkwK/gWpCujjZ+Ab7P6G3nOL29YtCeOfxORw9Ti+9DmK8FpQl0RLo8dFRaG6S5N YvwbDKgx11mi3DTZJzYxjQhrcJk4kgGqvXccuJzsV0uKzQfZ4i5bONK5spACAdk95Ej3 zfKQ== X-Gm-Message-State: APzg51D0UXgyZy6GA1sXFPEU/var4wBkV1cwUBTERj8OoUjWYePkGXCU 2cVhjq47bvYcCV8WWWh6G7LpTI/R5Zo= X-Google-Smtp-Source: ANB0VdbvssGzadZMMgRIkxIuZa9f7QFbu8prCJSF3R8HR3KyGy0gra0eJ1khrU5xRCzO2jfaI/Wj1g== X-Received: by 2002:a5d:6908:: with SMTP id t8-v6mr1032842wru.170.1536747920239; Wed, 12 Sep 2018 03:25:20 -0700 (PDT) Received: from localhost.localdomain ([2a02:390:741d:1:f928:e134:2d4b:86f7]) by smtp.gmail.com with ESMTPSA id z184-v6sm14059387wmz.0.2018.09.12.03.25.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:25:19 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:56 +0100 Message-Id: <20180912102256.3164-7-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180912102256.3164-1-mark.corbin@embecosm.com> References: <20180912102256.3164-1-mark.corbin@embecosm.com> Subject: [Buildroot] [PATCH v2 6/6] configs/qemu: add qemu_riscv64_virt_defconfig 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 RISC-V 64-bit defconfig for QEMU virt machine. Tested with QEMU 2.12.1 Signed-off-by: Mark Corbin --- Changes v1 -> v2: - updated DEVELOPERS file (Thomas P) - removed typo from readme.txt and updated text to remove BBL instructions now that it has been integrated as a package (Thomas P) - selected a specific kernel commit rather than a branch (Thomas P) - removed explicit selection of BR2_BINUTILS_VERSION_2_30_X (Thomas P) - added selection of riscv-pk package --- DEVELOPERS | 2 ++ board/qemu/riscv64-virt/linux.config | 23 +++++++++++++++++++++++ board/qemu/riscv64-virt/readme.txt | 7 +++++++ configs/qemu_riscv64_virt_defconfig | 24 ++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 board/qemu/riscv64-virt/linux.config create mode 100644 board/qemu/riscv64-virt/readme.txt create mode 100644 configs/qemu_riscv64_virt_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index 4d6c599aea..afd24853c6 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1289,7 +1289,9 @@ F: package/ratpoison/ N: Mark Corbin F: arch/arch.mk.riscv F: arch/Config.in.riscv +F: board/qemu/riscv64-virt/ F: boot/riscv-pk/ +F: configs/qemu_riscv64_virt_defconfig N: Markos Chandras F: package/harfbuzz/ diff --git a/board/qemu/riscv64-virt/linux.config b/board/qemu/riscv64-virt/linux.config new file mode 100644 index 0000000000..d09e8b3bb1 --- /dev/null +++ b/board/qemu/riscv64-virt/linux.config @@ -0,0 +1,23 @@ +CONFIG_ARCH_RV64I=y +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_PCI=y +CONFIG_SYSVIPC=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_WIRELESS is not set +CONFIG_VIRTIO_BLK=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO_NET=y +# CONFIG_ETHERNET is not set +# CONFIG_WLAN is not set +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_VIRT_DRIVERS=y +CONFIG_VIRTIO_MMIO=y +CONFIG_EXT2_FS=y +CONFIG_EXT4_FS=y +CONFIG_TMPFS=y diff --git a/board/qemu/riscv64-virt/readme.txt b/board/qemu/riscv64-virt/readme.txt new file mode 100644 index 0000000000..9f6e35c867 --- /dev/null +++ b/board/qemu/riscv64-virt/readme.txt @@ -0,0 +1,7 @@ +Run the emulation with: + + qemu-system-riscv64 -M virt -kernel output/images/bbl -append "root=/dev/vda ro console=ttyS0" -drive file=output/images/rootfs.ext2,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -netdev user,id=net0 -device virtio-net-device,netdev=net0 -nographic + +The login prompt will appear in the terminal that started Qemu. + +Tested with QEMU 2.12.1 diff --git a/configs/qemu_riscv64_virt_defconfig b/configs/qemu_riscv64_virt_defconfig new file mode 100644 index 0000000000..59343ee98f --- /dev/null +++ b/configs/qemu_riscv64_virt_defconfig @@ -0,0 +1,24 @@ +# Architecture +BR2_riscv=y + +# System +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_GENERIC_GETTY=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + +# Linux headers same as kernel, a 4.15 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/riscv/riscv-linux.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="fe92d7905c6ea0ebeabeb725b8040754ede7c220" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/riscv64-virt/linux.config" + +# Bootloader +BR2_TARGET_RISCV_PK=y