From patchwork Wed Sep 12 10:22:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 968938 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="YNnLwC+2"; 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 429HwF1ML4z9sB5 for ; Wed, 12 Sep 2018 20:25:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D3D6286E34; Wed, 12 Sep 2018 10:24:58 +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 BITyMhpa3Kav; Wed, 12 Sep 2018 10:24:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BF66186E19; Wed, 12 Sep 2018 10:24:56 +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 2535A1BFF9F for ; Wed, 12 Sep 2018 10:24:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2034287C7C for ; Wed, 12 Sep 2018 10:24:55 +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 HjuMVd91LvAe for ; Wed, 12 Sep 2018 10:24:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id D6BC787C74 for ; Wed, 12 Sep 2018 10:24:53 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id g33-v6so1452868wrd.1 for ; Wed, 12 Sep 2018 03:24:53 -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=LRo0lHvtslo3NaIxkoqAhGN8aKjZbrhkb5qoVfld2SE=; b=YNnLwC+2Xet16+R2am6QJmWIKCw/f20F/z5smPLOb3uQZqbuHbQMRcimB4sxAIEcyn VhMvv/WLKTfxlu4GCh4b+uO9JCDICCyFBljqHhSsazV6r9jChW7IWgD24qGNM8y2Dt4J +WhHs7JKi66SkuhDT2rz5cfPGm2Qa9YuvQavay/tfv9BAQ4yR9YXpXFlYaJjNc+Tc0if 9IRXdt3N2o4IXlz576lgB8opLwSkmE2xMrkmvavI+ch+Jrs/WR8GPAJxp+kfR0aFfyKN PlJo2L5L9IH6W5anpEHvJwIfUHZpXdAJpp+rQv5/i60mQbuEZR3tH12/z+O2cyGBCEE7 b/xQ== 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=LRo0lHvtslo3NaIxkoqAhGN8aKjZbrhkb5qoVfld2SE=; b=IQVDzm0xzMBGiKex4iKoDLa9/CAXfXuNDfRU2aKCfvGrmY4z+oqoPqm7osXVKdjojy MX0OL3K3hZE/7XlNWnzgPZDWCylovspL/EV87+2ouWFDghwWz+BCFf+BHBPh9wmXZX+n e4EbCrqeOcpW9g4TXg+ZuVyKfm9KA7AFzIVNxslJWU0t2Lt2LL5GW16kgDB40NfuUjD1 VXIMn/JLLaJ8Z03ekRXi4+Jb+8rUTaZAvXhwFtOVJ7aguA4Edlggr3/LQsnExc7DL1mF B6zB+JK6XU0hRLugykYIp8C4dJ5jDNIeF/pJmfmRd+DGDp7uR9q4OOEQSve7hKkz2sNi G/LA== X-Gm-Message-State: APzg51DtuwAx01CpXKP9BHPRNU1ofyFOZ5dSMlDtqnZkgVYGDF2+Htcy fk55dCM3axFW7EAIRS+RY5mRGA8twLM= X-Google-Smtp-Source: ANB0VdZeb0yAhwtQZptbYtfpmDpTNa+VRtRpRTGqN5qdeQy5cw0zQv4l5aIRN2lnmrfBOY9Sufyfow== X-Received: by 2002:adf:a936:: with SMTP id u51-v6mr1045992wrc.175.1536747892076; Wed, 12 Sep 2018 03:24:52 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 03:24:51 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 12 Sep 2018 11:22:50 +0100 Message-Id: <20180912102256.3164-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v2 0/6] Add RISC-V 64-bit architecture support 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 patch set adds support for the RISC-V 64-bit architecture. Full RISC-V support is not expected in the upstream kernel until the 4.19 release. As a result the ability to select custom toolchain headers has been added. This allows a RISC-V toolchain to be built against kernel headers from a git repository without having to build a kernel. A new method for overriding the BR2_GCC_TARGET_* settings has been added. These variables are copied to corresponding GCC_TARGET_* variables which may then be modified using architecture specific makefiles (arch/arch.mk.). This allows a custom architecture string to be built for the RISC-V from the various optional ISA extensions. All package makefiles that were using the BR2_GCC_TARGET_* variables have been updated to use the GCC_TARGET_* versions. Any new makefiles must use the new variables. The default glibc library paths for RISC-V are /lib64/ and /usr/lib64/. An architecture specific patch has been applied to glibc.mk to override these settings and allow shared libraries to be located by packages at runtime. The riscv-pk (Proxy Kernel) package has been added to provide the Berkeley Boot Loader (BBL) for booting RISC-V kernels. A new defconfig has been added which can build a qemu-bootable RISC-V 64-bit system. Mark Corbin (6): linux: add hash file package/linux-headers: add support for custom headers arch: allow GCC target options to be optionally overwritten arch: add support for RISC-V 64-bit (riscv64) architecture boot/riscv-pk: add bootloader for RISC-V architecture configs/qemu: add qemu_riscv64_virt_defconfig DEVELOPERS | 7 ++ Makefile | 5 +- arch/Config.in | 15 +++ arch/Config.in.riscv | 104 ++++++++++++++++++ arch/arch.mk | 17 +++ arch/arch.mk.riscv | 30 +++++ board/qemu/riscv64-virt/linux.config | 23 ++++ board/qemu/riscv64-virt/readme.txt | 7 ++ boot/Config.in | 1 + boot/riscv-pk/Config.in | 13 +++ boot/riscv-pk/riscv-pk.mk | 33 ++++++ configs/qemu_riscv64_virt_defconfig | 24 ++++ linux/linux.hash | 9 ++ package/binutils/Config.in.host | 2 + package/ffmpeg/ffmpeg.mk | 8 +- package/freerdp/freerdp.mk | 2 +- package/gcc/gcc.mk | 27 ++--- package/glibc/glibc.mk | 30 +++-- package/kodi/kodi.mk | 2 +- package/kvm-unit-tests/kvm-unit-tests.mk | 2 +- package/linux-headers/Config.in.host | 45 +++++++- package/linux-headers/linux-headers.hash | 1 + package/linux-headers/linux-headers.mk | 94 +++++++++------- package/meson/meson.mk | 2 +- package/nodejs/nodejs.mk | 2 +- package/tvheadend/tvheadend.mk | 2 +- package/valgrind/valgrind.mk | 2 +- toolchain/toolchain-buildroot/Config.in | 6 +- .../pkg-toolchain-external.mk | 22 ++-- 29 files changed, 447 insertions(+), 90 deletions(-) create mode 100644 arch/Config.in.riscv create mode 100644 arch/arch.mk create mode 100644 arch/arch.mk.riscv create mode 100644 board/qemu/riscv64-virt/linux.config create mode 100644 board/qemu/riscv64-virt/readme.txt create mode 100644 boot/riscv-pk/Config.in create mode 100644 boot/riscv-pk/riscv-pk.mk create mode 100644 configs/qemu_riscv64_virt_defconfig create mode 100644 linux/linux.hash create mode 120000 package/linux-headers/linux-headers.hash