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))