riscv-pk: Remove riscv-pk as we no longer use BBL

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Alistair Francis 2019-02-12 11:09:17 -08:00 committed by Khem Raj
parent fbfab7fbaf
commit 672c73f1be
6 changed files with 0 additions and 6613 deletions

View file

@ -1,365 +0,0 @@
From c3c94f9356879c162b14f55a0fcd1facc0f4e36f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 9 Mar 2018 02:00:47 -0800
Subject: [PATCH] add acinclude.m4
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
acinclude.m4 | 345 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 345 insertions(+)
create mode 100644 acinclude.m4
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..15353f2
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,345 @@
+#=========================================================================
+# Local Autoconf Macros
+#=========================================================================
+# This file contains the macros for the Modular C++ Build System and
+# additional autoconf macros which developers can use in their
+# configure.ac scripts. Please read the documentation in
+# 'mcppbs-doc.txt' for more details on how the Modular C++ Build System
+# works. The documenation for each macro should include information
+# about the author, date, and copyright.
+
+#-------------------------------------------------------------------------
+# MCPPBS_PROG_INSTALL
+#-------------------------------------------------------------------------
+# This macro will add an --enable-stow command line option to the
+# configure script. When enabled, this macro will first check to see if
+# the stow program is available and if so it will set the $stow shell
+# variable to the binary name and the $enable_stow shell variable to
+# "yes". These variables can be used in a makefile to conditionally use
+# stow for installation.
+#
+# This macro uses two environment variables to help setup default stow
+# locations. The $STOW_PREFIX is used for stowing native built packages.
+# The packages are staged in $STOW_PREFIX/pkgs and then symlinks are
+# created from within $STOW_PREFIX into the pkgs subdirectory. If you
+# only do native builds then this is all you need to set. If you don't
+# set $STOW_PREFIX then the default is just the normal default prefix
+# which is almost always /usr/local.
+#
+# For non-native builds we probably want to install the packages in a
+# different location which includes the host architecture name as part
+# of the prefix. For these kind of builds, we can specify the $STOW_ROOT
+# environment variable and the effective prefix will be
+# $STOW_ROOT/${host_alias} where ${host_alias} is specified on the
+# configure command line with "--host".
+#
+# Here is an example setup:
+#
+# STOW_ROOT="$HOME/install"
+# STOW_ARCH="i386-macosx10.4"
+# STOW_PREFIX="${STOW_ROOT}/${STOW_ARCH}"
+#
+
+AC_DEFUN([MCPPBS_PROG_INSTALL],
+[
+
+ # Configure command line option
+
+ AC_ARG_ENABLE(stow,
+ AS_HELP_STRING(--enable-stow,[Enable stow-based install]),
+ [enable_stow="yes"],[enable_stow="no"])
+
+ AC_SUBST([enable_stow])
+
+ # Environment variables
+
+ AC_ARG_VAR([STOW_ROOT], [Root for non-native stow-based installs])
+ AC_ARG_VAR([STOW_PREFIX], [Prefix for stow-based installs])
+
+ # Check for install script
+
+ AC_PROG_INSTALL
+
+ # Deterimine if native build and set prefix appropriately
+
+ AS_IF([ test ${enable_stow} = "yes" ],
+ [
+ AC_CHECK_PROGS([stow],[stow],[no])
+ AS_IF([ test ${stow} = "no" ],
+ [
+ AC_MSG_ERROR([Cannot use --enable-stow since stow is not available])
+ ])
+
+ # Check if native or non-native build
+
+ AS_IF([ test "${build}" = "${host}" ],
+ [
+
+ # build == host so this is a native build. Make sure --prefix not
+ # set and $STOW_PREFIX is set, then set prefix=$STOW_PREFIX.
+
+ AS_IF([ test "${prefix}" = "NONE" && test -n "${STOW_PREFIX}" ],
+ [
+ prefix="${STOW_PREFIX}"
+ AC_MSG_NOTICE([Using \$STOW_PREFIX from environment])
+ AC_MSG_NOTICE([prefix=${prefix}])
+ ])
+
+ ],[
+
+ # build != host so this is a non-native build. Make sure --prefix
+ # not set and $STOW_ROOT is set, then set
+ # prefix=$STOW_ROOT/${host_alias}.
+
+ AS_IF([ test "${prefix}" = "NONE" && test -n "${STOW_ROOT}" ],
+ [
+ prefix="${STOW_ROOT}/${host_alias}"
+ AC_MSG_NOTICE([Using \$STOW_ROOT from environment])
+ AC_MSG_NOTICE([prefix=${prefix}])
+ ])
+
+ ])
+
+ ])
+
+])
+
+#-------------------------------------------------------------------------
+# MCPPBS_PROG_RUN
+# -------------------------------------------------------------------------
+# If we are doing a non-native build then we look for an isa simulator
+# to use for running tests. We set the RUN substitution variable to be
+# empty for native builds or to the name of the isa simulator for
+# non-native builds. Thus a makefile can run compiled programs
+# regardless if we are doing a native or non-native build like this:
+#
+# $(RUN) $(RUNFLAGS) ./test-program
+#
+
+AC_DEFUN([MCPPBS_PROG_RUN],
+[
+ AS_IF([ test "${build}" != "${host}" ],
+ [
+ AC_CHECK_TOOLS([RUN],[isa-run run],[no])
+ AS_IF([ test ${RUN} = "no" ],
+ [
+ AC_MSG_ERROR([Cannot find simulator for target ${target_alias}])
+ ])
+ ],[
+ RUN=""
+ ])
+ AC_SUBST([RUN])
+ AC_SUBST([RUNFLAGS])
+])
+
+#-------------------------------------------------------------------------
+# MCPPBS_SUBPROJECTS([ sproj1, sproj2, ... ])
+#-------------------------------------------------------------------------
+# The developer should call this macro with a list of the subprojects
+# which make up this project. One should order the list such that any
+# given subproject only depends on subprojects listed before it. The
+# subproject names can also include an * suffix which indicates that
+# this is an optional subproject. Optional subprojects are only included
+# as part of the project build if enabled on the configure command line
+# with a --enable-<subproject> flag. The user can also specify that all
+# optional subprojects should be included in the build with the
+# --enable-optional-subprojects flag.
+#
+# Subproject names can also include a ** suffix which indicates that it
+# is an optional subproject, but there is a group with the same name.
+# Thus the --enable-<sproj> command line option will enable not just the
+# subproject sproj but all of the subprojects which are in the group.
+# There is no error checking to make sure that if you use the ** suffix
+# you actually define a group so be careful.
+#
+# Both required and optional subprojects should have a 'subproject.ac'
+# file. The script's filename should be the abbreivated subproject name
+# (assuming the subproject name is sproj then we would use 'sproj.ac')
+# The MCPPBS_SUBPROJECTS macro includes the 'subproject.ac' files for
+# enabled subprojects. Whitespace and newlines are allowed within the
+# list.
+#
+# Author : Christopher Batten
+# Date : September 10, 2008
+
+AC_DEFUN([MCPPBS_SUBPROJECTS],
+[
+
+ # Add command line argument to enable all optional subprojects
+
+ AC_ARG_ENABLE(optional-subprojects,
+ AS_HELP_STRING([--enable-optional-subprojects],
+ [Enable all optional subprojects]))
+
+ # Loop through the subprojects given in the macro argument
+
+ m4_foreach([MCPPBS_SPROJ],[$1],
+ [
+
+ # Determine if this is a required or an optional subproject
+
+ m4_define([MCPPBS_IS_REQ],
+ m4_bmatch(MCPPBS_SPROJ,[\*+],[false],[true]))
+
+ # Determine if there is a group with the same name
+
+ m4_define([MCPPBS_IS_GROUP],
+ m4_bmatch(MCPPBS_SPROJ,[\*\*],[true],[false]))
+
+ # Create variations of the subproject name suitable for use as a CPP
+ # enabled define, a shell enabled variable, and a shell function
+
+ m4_define([MCPPBS_SPROJ_NORM],
+ m4_normalize(m4_bpatsubsts(MCPPBS_SPROJ,[*],[])))
+
+ m4_define([MCPPBS_SPROJ_DEFINE],
+ m4_toupper(m4_bpatsubst(MCPPBS_SPROJ_NORM[]_ENABLED,[-],[_])))
+
+ m4_define([MCPPBS_SPROJ_FUNC],
+ m4_bpatsubst(_mpbp_[]MCPPBS_SPROJ_NORM[]_configure,[-],[_]))
+
+ m4_define([MCPPBS_SPROJ_UNDERSCORES],
+ m4_bpatsubsts(MCPPBS_SPROJ,[-],[_]))
+
+ m4_define([MCPPBS_SPROJ_SHVAR],
+ m4_bpatsubst(enable_[]MCPPBS_SPROJ_NORM[]_sproj,[-],[_]))
+
+ # Add subproject to our running list
+
+ subprojects="$subprojects MCPPBS_SPROJ_NORM"
+
+ # Process the subproject appropriately. If enabled add it to the
+ # $enabled_subprojects running shell variable, set a
+ # SUBPROJECT_ENABLED C define, and include the appropriate
+ # 'subproject.ac'.
+
+ m4_if(MCPPBS_IS_REQ,[true],
+ [
+ AC_MSG_NOTICE([configuring default subproject : MCPPBS_SPROJ_NORM])
+ AC_CONFIG_FILES(MCPPBS_SPROJ_NORM[].mk:MCPPBS_SPROJ_NORM[]/MCPPBS_SPROJ_NORM[].mk.in)
+ MCPPBS_SPROJ_SHVAR="yes"
+ subprojects_enabled="$subprojects_enabled MCPPBS_SPROJ_NORM"
+ AC_DEFINE(MCPPBS_SPROJ_DEFINE,,
+ [Define if subproject MCPPBS_SPROJ_NORM is enabled])
+ m4_include(MCPPBS_SPROJ_NORM[]/MCPPBS_SPROJ_NORM[].ac)
+ ],[
+
+ # For optional subprojects we capture the 'subproject.ac' as a
+ # shell function so that in the MCPPBS_GROUP macro we can just
+ # call this shell function instead of reading in 'subproject.ac'
+ # again.
+
+ MCPPBS_SPROJ_FUNC ()
+ {
+ AC_MSG_NOTICE([configuring optional subproject : MCPPBS_SPROJ_NORM])
+ AC_CONFIG_FILES(MCPPBS_SPROJ_NORM[].mk:MCPPBS_SPROJ_NORM[]/MCPPBS_SPROJ_NORM[].mk.in)
+ MCPPBS_SPROJ_SHVAR="yes"
+ subprojects_enabled="$subprojects_enabled MCPPBS_SPROJ_NORM"
+ AC_DEFINE(MCPPBS_SPROJ_DEFINE,,
+ [Define if subproject MCPPBS_SPROJ_NORM is enabled])
+ m4_include(MCPPBS_SPROJ_NORM[]/MCPPBS_SPROJ_NORM[].ac)
+ };
+
+ # Optional subprojects add --enable-subproject command line
+ # options, _if_ the subproject name is not also a group name.
+
+ m4_if(MCPPBS_IS_GROUP,[false],
+ [
+ AC_ARG_ENABLE(MCPPBS_SPROJ_NORM,
+ AS_HELP_STRING(--enable-MCPPBS_SPROJ_NORM,
+ [Subproject MCPPBS_SPROJ_NORM]),
+ [MCPPBS_SPROJ_SHVAR="yes"],[MCPPBS_SPROJ_SHVAR="no"])
+
+ AS_IF([test "$MCPPBS_SPROJ_SHVAR" = "yes"],
+ [
+ eval "MCPPBS_SPROJ_FUNC"
+ ],[
+ AC_MSG_NOTICE([processing optional subproject : MCPPBS_SPROJ_NORM])
+ ])
+
+ ],[
+
+ # If the subproject name is also a group name then we need to
+ # make sure that we set the shell variable for that subproject to
+ # no so that the group code knows we haven't run it yet.
+
+ AC_MSG_NOTICE([processing optional subproject : MCPPBS_SPROJ_NORM])
+ MCPPBS_SPROJ_SHVAR="no"
+
+ ])
+
+ # Always execute the subproject configure code if we are enabling
+ # all subprojects.
+
+ AS_IF([ test "$enable_optional_subprojects" = "yes" \
+ && test "$MCPPBS_SPROJ_SHVAR" = "no" ],
+ [
+ eval "MCPPBS_SPROJ_FUNC"
+ ])
+
+ ])
+
+ ])
+
+ # Output make variables
+
+ AC_SUBST([subprojects])
+ AC_SUBST([subprojects_enabled])
+
+])
+
+#-------------------------------------------------------------------------
+# MCPPBS_GROUP( [group-name], [ sproj1, sproj2, ... ] )
+#-------------------------------------------------------------------------
+# This macro creates a subproject group with the given group-name. When
+# a user specifies --enable-<group-name> the listed subprojects will be
+# enabled. Groups can have the same name as a subproject and in that
+# case whenever a user specifies --enable-<subproject> the subprojects
+# listed in the corresponding group will also be enabled. Groups are
+# useful for specifying related subprojects which are usually enabled
+# together, as well as for specifying that a specific optional
+# subproject has dependencies on other optional subprojects.
+#
+# Author : Christopher Batten
+# Date : September 10, 2008
+
+AC_DEFUN([MCPPBS_GROUP],
+[
+
+ m4_define([MCPPBS_GROUP_NORM],
+ m4_normalize([$1]))
+
+ m4_define([MCPPBS_GROUP_SHVAR],
+ m4_bpatsubst(enable_[]MCPPBS_GROUP_NORM[]_group,[-],[_]))
+
+ AC_ARG_ENABLE(MCPPBS_GROUP_NORM,
+ AS_HELP_STRING(--enable-MCPPBS_GROUP_NORM,
+ [Group MCPPBS_GROUP_NORM: $2]),
+ [MCPPBS_GROUP_SHVAR="yes"],[MCPPBS_GROUP_SHVAR="no"])
+
+ AS_IF([test "$MCPPBS_GROUP_SHVAR" = "yes" ],
+ [
+ AC_MSG_NOTICE([configuring optional group : MCPPBS_GROUP_NORM])
+ ])
+
+ m4_foreach([MCPPBS_SPROJ],[$2],
+ [
+
+ m4_define([MCPPBS_SPROJ_NORM],
+ m4_normalize(MCPPBS_SPROJ))
+
+ m4_define([MCPPBS_SPROJ_SHVAR],
+ m4_bpatsubst(enable_[]MCPPBS_SPROJ_NORM[]_sproj,[-],[_]))
+
+ m4_define([MCPPBS_SPROJ_FUNC],
+ m4_bpatsubst(_mpbp_[]MCPPBS_SPROJ_NORM[]_configure,[-],[_]))
+
+ AS_IF([ test "$MCPPBS_GROUP_SHVAR" = "yes" \
+ && test "$MCPPBS_SPROJ_SHVAR" = "no" ],
+ [
+ eval "MCPPBS_SPROJ_FUNC"
+ ])
+
+ ])
+
+])
--
2.16.2

View file

@ -1,131 +0,0 @@
From cc4cc207c0cb3bdb9cce938b48aaa6ed117bf913 Mon Sep 17 00:00:00 2001
From: Atish Patra <atish.patra@wdc.com>
Date: Fri, 6 Jul 2018 10:35:48 -0700
Subject: [PATCH 2/2] Add microsemi pcie entry in bbl.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
bbl/bbl.c | 10 ++++++++++
machine/mfdt.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
machine/mfdt.h | 1 +
3 files changed, 65 insertions(+)
diff --git a/bbl/bbl.c b/bbl/bbl.c
index 523b771..9f48346 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -7,6 +7,8 @@
#include "bits.h"
#include "config.h"
#include "mfdt.h"
+#include "libfdt.h"
+#include "fdt.h"
#include <string.h>
extern char _payload_start, _payload_end; /* internal payload */
@@ -29,10 +31,18 @@ static uintptr_t dtb_output()
static void filter_dtb(uintptr_t source)
{
+ int err;
uintptr_t dest = dtb_output();
uint32_t size = fdt_size(source);
memcpy((void*)dest, (void*)source, size);
+ // Allocate space for additional nodes i.e. timer, cpu-map
+ err = fdt_open_into((void *)dest, (void *)dest, size + 2048);
+
+ if (err < 0)
+ die("%s: fdt buffer couldn't be expanded err = [%d]!!\n", __func__, err);
+
+ add_msemi_pcie_node((void *)dest);
// Remove information from the chained FDT
filter_harts(dest, &disabled_hart_mask);
filter_plic(dest);
diff --git a/machine/mfdt.c b/machine/mfdt.c
index a6ccbad..886d691 100644
--- a/machine/mfdt.c
+++ b/machine/mfdt.c
@@ -5,6 +5,8 @@
#include <string.h>
#include "config.h"
#include "mfdt.h"
+#include "libfdt.h"
+#include "fdt.h"
#include "mtrap.h"
static inline uint32_t bswap(uint32_t x)
@@ -685,6 +687,58 @@ void filter_harts(uintptr_t fdt, long *disabled_hart_mask)
fdt_scan(fdt, &cb);
}
+//////////////////////////////////////////// NODE ADD //////////////////////////////////////////////
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#define fdt_setprop_cells(fdt, node_offset, property, ...) \
+ do { \
+ uint32_t qdt_tmp[] = { __VA_ARGS__ }; \
+ int i; \
+ \
+ for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \
+ qdt_tmp[i] = bswap(qdt_tmp[i]); \
+ } \
+ fdt_setprop(fdt, node_offset, property, qdt_tmp, \
+ sizeof(qdt_tmp)); \
+ } while (0)
+
+void add_msemi_pcie_node(void *dtb)
+{
+ int pci_offset;
+ int msemi_pci_offset;
+ int intc_offset;
+ int pci_intc_phandle;
+ int pci_intc_parent = fdt_get_phandle(dtb,fdt_path_offset(dtb, "/soc/interrupt-controller"));
+ pci_offset = fdt_path_offset(dtb, "/soc");
+ msemi_pci_offset = fdt_add_subnode(dtb, pci_offset, "pcix");
+ printm("In pci_offset = [%d] msem = [%d] parent = [%d]\n", pci_offset, msemi_pci_offset, pci_intc_parent);
+ fdt_setprop_cell(dtb, msemi_pci_offset, "#address-cells", 3);
+ fdt_setprop_cell(dtb, msemi_pci_offset, "#interrupt-cells", 1);
+ fdt_setprop_cell(dtb, msemi_pci_offset, "#size-cells", 2);
+ fdt_setprop_string(dtb, msemi_pci_offset, "compatible", "ms-pf,axi-pcie-host");
+ fdt_setprop_string(dtb, msemi_pci_offset, "device_type", "pci");
+
+ fdt_setprop_cells(dtb, msemi_pci_offset, "bus-range", 0x01, 0x7f);
+ fdt_setprop_cells(dtb, msemi_pci_offset, "interrupt-map-mask", 0, 0, 0, 7);
+ fdt_setprop_cell(dtb, msemi_pci_offset, "interrupt-parent", pci_intc_parent);
+ fdt_setprop_cell(dtb, msemi_pci_offset, "interrupts", 32);
+
+
+ fdt_setprop_cells(dtb, msemi_pci_offset, "ranges", 0x2000000, 0x0, 0x40000000, 0x0, 0x40000000, 0x0, 0x20000000);
+ fdt_setprop_cells(dtb, msemi_pci_offset, "reg", 0x20, 0x30000000, 0x0, 0x4000000, 0x20, 0x0, 0x0, 0x100000);
+ fdt_setprop(dtb, msemi_pci_offset, "reg-names", "control",sizeof("control"));
+ fdt_appendprop(dtb, msemi_pci_offset, "reg-names", "apb",sizeof("apb"));
+
+
+ intc_offset = fdt_add_subnode(dtb, msemi_pci_offset, "ms_pcie_intc");
+ fdt_setprop_cell(dtb, intc_offset, "#address-cells", 0);
+ fdt_setprop_cell(dtb, intc_offset, "#interrupt-cells", 1);
+ fdt_setprop(dtb, intc_offset, "interrupt-controller", NULL, 0);
+ fdt_setprop_cells(dtb, intc_offset, "phandle", 50);
+
+ pci_intc_phandle = fdt_get_phandle(dtb,intc_offset);
+ fdt_setprop_cells(dtb, msemi_pci_offset, "interrupt-map", 0, 0, 0, 1, pci_intc_phandle, 1, 0, 0, 0, 2, pci_intc_phandle, 2, 0, 0, 0 ,3,pci_intc_phandle, 3, 0, 0, 0, 4, pci_intc_phandle, 4);
+}
//////////////////////////////////////////// PRINT //////////////////////////////////////////////
#ifdef PK_PRINT_DEVICE_TREE
diff --git a/machine/mfdt.h b/machine/mfdt.h
index 97aa70d..1b0109d 100644
--- a/machine/mfdt.h
+++ b/machine/mfdt.h
@@ -68,6 +68,7 @@ void filter_harts(uintptr_t fdt, long *disabled_hart_mask);
void filter_plic(uintptr_t fdt);
void filter_compat(uintptr_t fdt, const char *compat);
+void add_msemi_pcie_node(void *fdt);
// The hartids of available harts
extern uint64_t hart_mask;
--
2.19.1

View file

@ -1,73 +0,0 @@
From 2dd8da6841fcc0c8ae6977e5461bcbeaaf715813 Mon Sep 17 00:00:00 2001
From: Alistair Francis <alistair.francis@wdc.com>
Date: Mon, 9 Jul 2018 12:58:21 -0700
Subject: [PATCH 4/4] Rename bcopy to acopy
This is requried to avoid an infinite loop in the bcopy implementation
that causes bbl to never exit.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
bbl/bbl.h | 2 ++
util/bcopy.c | 3 ++-
util/string.c | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bbl/bbl.h b/bbl/bbl.h
index c9a02e1..689418f 100644
--- a/bbl/bbl.h
+++ b/bbl/bbl.h
@@ -10,6 +10,8 @@
void print_logo();
+void acopy(const void *src0, void *dst0, size_t length);
+
#endif // !__ASSEMBLER__
#endif
diff --git a/util/bcopy.c b/util/bcopy.c
index 69b9384..55b28df 100644
--- a/util/bcopy.c
+++ b/util/bcopy.c
@@ -31,6 +31,7 @@
* SUCH DAMAGE.
*/
#include <string.h>
+#include "bbl.h"
/*
* sizeof(word) MUST BE A POWER OF TWO
* SO THAT wmask BELOW IS ALL ONES
@@ -52,7 +53,7 @@ void *
memmove(void *dst0, const void *src0, size_t length)
#else
void
-bcopy(const void *src0, void *dst0, size_t length)
+acopy(const void *src0, void *dst0, size_t length)
#endif
#endif
{
diff --git a/util/string.c b/util/string.c
index 02a2648..a9ae18b 100644
--- a/util/string.c
+++ b/util/string.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <stdint.h>
#include <ctype.h>
+#include "bbl.h"
void *memchr(const void *s, int c, size_t n)
{
@@ -57,7 +58,7 @@ void *memmove(void *dst, const void *src, size_t n)
if (__builtin_expect((q < p) || ((size_t)(q - p) >= n), 1)) {
return memcpy(dst, src, n);
} else {
- bcopy(src, dst, n);
+ acopy(src, dst, n);
return dst;
}
}
--
2.19.1

View file

@ -1,57 +0,0 @@
SUMMARY = "RISC-V Proxy Kernel"
DESCRIPTION = "RISC-V Proxy Kernel"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
SRCREV = "92434c4f697564929f2ceb724bc82d3b6bc58879"
SRC_URI = "git://github.com/riscv/riscv-pk.git \
file://0001-add-acinclude.m4.patch \
"
SRC_URI_append_freedom-u540 = " \
file://0002-Add-libfdt-support.patch \
file://0003-Add-microsemi-pcie-entry-in-bbl.patch \
file://0004-Rename-bcopy-to-acopy.patch \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
LDFLAGS_append = " -Wl,--build-id=none"
inherit autotools
EXTRA_OECONF += "--enable-logo --with-payload=${DEPLOY_DIR_IMAGE}/${RISCV_BBL_PAYLOAD}"
INHIBIT_PACKAGE_STRIP = "1"
S = "${WORKDIR}/git"
# bbl_payload needs kernel deployed artifacts (e.g. vmlinux)
do_compile[depends] += "virtual/kernel:do_deploy"
do_install_prepend () {
install -d ${D}${datadir}/riscv-pk
install -m 755 ${WORKDIR}/build/bbl ${D}${datadir}/riscv-pk
}
do_install_append() {
rm -rf ${D}${exec_prefix}/riscv64-*
}
do_install_append_freedom-u540() {
${OBJCOPY} -S -O binary --change-addresses -0x80000000 \
${WORKDIR}/build/bbl ${WORKDIR}/build/bbl.bin
}
do_deploy () {
install -d ${DEPLOY_DIR_IMAGE}
install -m 755 ${WORKDIR}/build/bbl ${DEPLOY_DIR_IMAGE}/bbl
}
do_deploy_append_freedom-u540() {
install -m 755 ${WORKDIR}/build/bbl.bin ${DEPLOY_DIR_IMAGE}/bbl.bin
}
addtask deploy before do_build after do_install
COMPATIBLE_HOST = "(riscv64|riscv32).*-linux"

View file

@ -1,6 +0,0 @@
# short-description: Create SD card image for HiFive Unleashed development board
part bbl --source rawcopy --sourceparams="file=bbl.bin" --ondisk mmcblk --align 1 --part-type 2e54b353-1271-4842-806f-e436d6af6985
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096 --size 5G
bootloader --ptable gpt