All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V
Date: Tue, 19 Mar 2019 22:09:49 +0100	[thread overview]
Message-ID: <20190319220949.06f6ee34@windsurf> (raw)
In-Reply-To: <20190319181449.25067-3-alistair.francis@wdc.com>

Hello,

I was about to apply this patch, but there is still an issue (see
below). Since a new iteration will be needed, I'll point out some minor
nits as well that I would have normally fixed myself when applying, but
that you can fix together with the more significant issue.

First minor nit: the commit title should be "boot/opensbi: new package"

On Tue, 19 Mar 2019 18:15:48 +0000
Alistair Francis <Alistair.Francis@wdc.com> wrote:


> diff --git a/boot/opensbi/opensbi.mk b/boot/opensbi/opensbi.mk
> new file mode 100644
> index 0000000000..13dffb9ce0
> --- /dev/null
> +++ b/boot/opensbi/opensbi.mk
> @@ -0,0 +1,32 @@
> +################################################################################
> +#
> +# OpenSBI

opensbi in lower-case

> +#
> +################################################################################
> +
> +OPENSBI_VERSION = v0.3
> +OPENSBI_SITE = $(call github,riscv,opensbi,$(OPENSBI_VERSION))
> +OPENSBI_LICENSE = BSD-2-Clause
> +OPENSBI_LICENSE_FILES = COPYING.BSD
> +OPENSBI_INSTALL_IMAGES = YES
> +
> +OPENSBI_MAKE_ENV = \
> +	CROSS_COMPILE=$(TARGET_CROSS)
> +
> +OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
> +ifneq ($(OPENSBI_PLAT),)
> +OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
> +endif
> +
> +define OPENSBI_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(OPENSBI_MAKE_ENV) $(MAKE) -C $(@D)
> +endef
> +
> +ifneq ($(OPENSBI_PLAT),)
> +define OPENSBI_INSTALL_IMAGES_CMDS
> +	$(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.bin $(BINARIES_DIR)/fw_jump.bin
> +	$(INSTALL) -m 0644 -D $(@D)/build/platform/$(OPENSBI_PLAT)/firmware/fw_jump.elf $(BINARIES_DIR)/fw_jump.elf
> +endef
> +endif

So the issue that I have is that this package doesn't install anything
when OPENSBI_PLAT is empty. It doesn't install any image, it doesn't
install any library to STAGING_DIR.

Should the libplatsbi.a library be installed in
$(STAGING_DIR)/usr/lib ? This location is normally for regular Linux
user-space libraries, which I suppose libplatsbi.a is not. Perhaps it
should be in another location ?

In any case, it should be installed somewhere, otherwise the package is
pretty meaningless when OPENSBI_PLAT is empty.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-03-19 21:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 18:15 [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 2/5] linux: Enable BR2_LINUX_KERNEL_IMAGE on RISC-V Alistair Francis
2019-03-19 21:06   ` Thomas Petazzoni
2019-03-19 18:15 ` [Buildroot] [PATCH v4 3/5] boot/opensbi: Initial commit of OpenSBI for RISC-V Alistair Francis
2019-03-19 21:09   ` Thomas Petazzoni [this message]
2019-03-20  0:37     ` Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 4/5] configs: qemu_riscv*_virt: Use OpenSBI by default Alistair Francis
2019-03-19 18:15 ` [Buildroot] [PATCH v4 5/5] boot/riscv-pk: Deprecate riscv-pk and BBL Alistair Francis
2019-03-19 21:05 ` [Buildroot] [PATCH v4 1/5] board/qemu/riscv32-virt: Update linux config Thomas Petazzoni
2019-03-19 21:24   ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190319220949.06f6ee34@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.