This series of patches sets meta-morello on the path of being Yocto compatible.
Bbappends are replaced with .bb recipes that pull the .inc files from meta-arm and poky. To save typing the "morello" prefix is moved into the package version, it can still appear in the recipe name itself when we want that recipe to be distinct (ie. busybox morello is used next to a64 busybox, the Linux kernel recipe etc.). The patches also contain bug fixes relating to hashes and licenses.
The implementation is available here:
https://git.morello-project.org/pzalewski/meta-morello/-/tree/check-layer
Pawel Zalewski (13): gdb: do not append the gdb recipe tf-a: do not append the tf-a recipe uefi: do not append the uefi recipe busybox: change the versioning linux: change the versioning board-firmware: change the versioning grub: make check-layer compliant config: changes to match new versioning musl: do not append the musl recipe rom-binaries: fix bugs gen-init-cpio: fix bugs fvp: fix bugs README.md: update
README.md | 7 +- .../recipes-core/musl/musl-morello-common.inc | 1 - .../recipes-core/musl/musl_%.bbappend | 17 ----- .../recipes-core/musl/musl_morello-1.5.bb | 15 +++++ .../recipes-core/musl/override-glibc.inc | 5 +- .../recipes-core/musl/override-musl.inc | 5 +- .../conf/machine/include/morello-common.inc | 12 +++- meta-morello/conf/machine/morello-fvp.conf | 4 -- meta-morello/conf/machine/morello-soc.conf | 4 -- .../board-firmware/board-firmware-image.bb | 4 +- ...e_1.4.bb => board-firmware_morello-1.4.bb} | 2 +- .../recipes-bsp/grub/grub-efi_2.%.bbappend | 24 ++++--- .../recipes-bsp/grub/grub_2.%.bbappend | 11 +++- .../rom-binaries/rom-binaries_1.5.bb | 6 +- ....bbappend => scp-firmware_morello-2.10.bb} | 65 ++++++++++++++++--- ...pend => trusted-firmware-a_morello-2.7.bb} | 3 +- ....bbappend => edk2-firmware_morello-2.4.bb} | 5 +- ..._1.5.bb => busybox-morello_morello-1.5.bb} | 0 .../recipes-devtools/fvp/fvp-morello.bb | 2 +- .../gdb/gdb-cross-canadian_morello-11.0.bb | 3 + .../gdb/gdb-cross_morello-11.0.bb | 2 + meta-morello/recipes-devtools/gdb/gdb.inc | 20 ++++++ ...make-man-install-relative-to-DESTDIR.patch | 28 ++++++++ ...ux-nat-Define-_ABIO32-if-not-defined.patch | 35 ++++++++++ ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 53 +++++++++++++++ ...readline.a-when-using-disable-static.patch | 50 ++++++++++++++ .../gdb/gdb/0006-use-asm-sgidefs.h.patch | 36 ++++++++++ .../gdb/gdb/0007-Change-order-of-CFLAGS.patch | 30 +++++++++ ...08-resolve-restrict-keyword-conflict.patch | 48 ++++++++++++++ .../0009-Fix-invalid-sigprocmask-call.patch | 49 ++++++++++++++ .../gdb/0010-gdbserver-ctrl-c-handling.patch | 40 ++++++++++++ .../recipes-devtools/gdb/gdb_%.bbappend | 7 -- .../recipes-devtools/gdb/gdb_morello-11.0.bb | 34 ++++++++++ .../gen-init-cpio/gen-init-cpio-native.bb | 5 +- ...lo_1.5.bb => linux-morello_morello-1.5.bb} | 0 .../applications/pure-cap-app.bb | 4 +- 36 files changed, 556 insertions(+), 80 deletions(-) delete mode 100644 meta-morello-toolchain/recipes-core/musl/musl_%.bbappend create mode 100644 meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb rename meta-morello/recipes-bsp/board-firmware/{board-firmware_1.4.bb => board-firmware_morello-1.4.bb} (93%) rename meta-morello/recipes-bsp/scp-firmware/{scp-firmware_2.10.%.bbappend => scp-firmware_morello-2.10.bb} (51%) rename meta-morello/recipes-bsp/trusted-firmware-a/{trusted-firmware-a_2.%.bbappend => trusted-firmware-a_morello-2.7.bb} (96%) rename meta-morello/recipes-bsp/uefi/{edk2-firmware_%.bbappend => edk2-firmware_morello-2.4.bb} (96%) rename meta-morello/recipes-core/busybox/{busybox-morello_1.5.bb => busybox-morello_morello-1.5.bb} (100%) create mode 100644 meta-morello/recipes-devtools/gdb/gdb-cross-canadian_morello-11.0.bb create mode 100644 meta-morello/recipes-devtools/gdb/gdb-cross_morello-11.0.bb create mode 100644 meta-morello/recipes-devtools/gdb/gdb.inc create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch delete mode 100644 meta-morello/recipes-devtools/gdb/gdb_%.bbappend create mode 100644 meta-morello/recipes-devtools/gdb/gdb_morello-11.0.bb rename meta-morello/recipes-kernel/linux/{linux-morello_1.5.bb => linux-morello_morello-1.5.bb} (100%)
Use the include files to create a bb recipe and use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../gdb/gdb-cross-canadian_morello-11.0.bb | 3 ++ .../gdb/gdb-cross_morello-11.0.bb | 2 + meta-morello/recipes-devtools/gdb/gdb.inc | 20 +++++++ ...make-man-install-relative-to-DESTDIR.patch | 28 ++++++++++ ...ux-nat-Define-_ABIO32-if-not-defined.patch | 35 ++++++++++++ ...e-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 53 +++++++++++++++++++ ...readline.a-when-using-disable-static.patch | 50 +++++++++++++++++ .../gdb/gdb/0006-use-asm-sgidefs.h.patch | 36 +++++++++++++ .../gdb/gdb/0007-Change-order-of-CFLAGS.patch | 30 +++++++++++ ...08-resolve-restrict-keyword-conflict.patch | 48 +++++++++++++++++ .../0009-Fix-invalid-sigprocmask-call.patch | 49 +++++++++++++++++ .../gdb/0010-gdbserver-ctrl-c-handling.patch | 40 ++++++++++++++ .../recipes-devtools/gdb/gdb_%.bbappend | 7 --- .../recipes-devtools/gdb/gdb_morello-11.0.bb | 34 ++++++++++++ 14 files changed, 428 insertions(+), 7 deletions(-) create mode 100644 meta-morello/recipes-devtools/gdb/gdb-cross-canadian_morello-11.0.bb create mode 100644 meta-morello/recipes-devtools/gdb/gdb-cross_morello-11.0.bb create mode 100644 meta-morello/recipes-devtools/gdb/gdb.inc create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch create mode 100644 meta-morello/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch delete mode 100644 meta-morello/recipes-devtools/gdb/gdb_%.bbappend create mode 100644 meta-morello/recipes-devtools/gdb/gdb_morello-11.0.bb
diff --git a/meta-morello/recipes-devtools/gdb/gdb-cross-canadian_morello-11.0.bb b/meta-morello/recipes-devtools/gdb/gdb-cross-canadian_morello-11.0.bb new file mode 100644 index 0000000..acb414b --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb-cross-canadian_morello-11.0.bb @@ -0,0 +1,3 @@ +require recipes-devtools/gdb/gdb-common.inc +require recipes-devtools/gdb/gdb-cross-canadian.inc +require gdb.inc diff --git a/meta-morello/recipes-devtools/gdb/gdb-cross_morello-11.0.bb b/meta-morello/recipes-devtools/gdb/gdb-cross_morello-11.0.bb new file mode 100644 index 0000000..a52a261 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb-cross_morello-11.0.bb @@ -0,0 +1,2 @@ +require recipes-devtools/gdb/gdb-cross.inc +require gdb.inc diff --git a/meta-morello/recipes-devtools/gdb/gdb.inc b/meta-morello/recipes-devtools/gdb/gdb.inc new file mode 100644 index 0000000..0bfd9dd --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb.inc @@ -0,0 +1,20 @@ +LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" + +SRC_URI = "git://git.morello-project.org/morello/binutils-gdb.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-make-man-install-relative-to-DESTDIR.patch \ + file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ + file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ + file://0005-Dont-disable-libreadline.a-when-using-disable-static.patch \ + file://0006-use-asm-sgidefs.h.patch \ + file://0007-Change-order-of-CFLAGS.patch \ + file://0008-resolve-restrict-keyword-conflict.patch \ + file://0009-Fix-invalid-sigprocmask-call.patch \ + file://0010-gdbserver-ctrl-c-handling.patch \ + " + +SRCBRANCH = "users/ARM/morello-binutils-gdb-master" +SRCREV = "f6e8c7228463a552d175211f4fcea93cca889686" \ No newline at end of file diff --git a/meta-morello/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta-morello/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch new file mode 100644 index 0000000..824b96f --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch @@ -0,0 +1,28 @@ +From a6d3df9d84463ec500d9d01558ab8a17e824e9e5 Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Mon, 2 Mar 2015 02:27:55 +0000 +Subject: [PATCH 01/10] make man install relative to DESTDIR + +Upstream-Status: Pending + +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + sim/common/Make-common.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in +index 8c2cacea1e5..4a52eef2203 100644 +--- a/sim/common/Make-common.in ++++ b/sim/common/Make-common.in +@@ -63,7 +63,7 @@ tooldir = $(libdir)/$(target_alias) + datadir = @datadir@ + datarootdir = @datarootdir@ + mandir = @mandir@ +-man1dir = $(mandir)/man1 ++man1dir = $(DESTDIR)$(mandir)/man1 + infodir = @infodir@ + includedir = @includedir@ + +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta-morello/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch new file mode 100644 index 0000000..591c9bf --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch @@ -0,0 +1,35 @@ +From 7f1f25eaaace289bc33c5aaa1c5fe9e04e719651 Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Wed, 23 Mar 2016 06:30:09 +0000 +Subject: [PATCH 02/10] mips-linux-nat: Define _ABIO32 if not defined + +This helps building gdb on mips64 on musl, since +musl does not provide sgidefs.h this define is +only defined when GCC is using o32 ABI, in that +case gcc emits it as built-in define and hence +it works ok for mips32 + +Upstream-Status: Pending +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdb/mips-linux-nat.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index b21c7cb2ea6..6614b4de31e 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -41,6 +41,10 @@ + #ifndef PTRACE_GET_THREAD_AREA + #define PTRACE_GET_THREAD_AREA 25 + #endif ++/* musl does not define and relies on compiler built-in macros for it */ ++#ifndef _ABIO32 ++#define _ABIO32 1 ++#endif + + class mips_linux_nat_target final : public linux_nat_trad_target + { +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta-morello/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file mode 100644 index 0000000..09ea533 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -0,0 +1,53 @@ +From 0cb233ec3951582fa1a051a16bfd644ef4969df5 Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Sat, 30 Apr 2016 18:32:14 -0700 +Subject: [PATCH 03/10] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC + systems + +Upstream-Status: Pending + +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdb/nat/ppc-linux.h | 6 ++++++ + gdbserver/linux-ppc-low.cc | 6 ++++++ + 2 files changed, 12 insertions(+) + +diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h +index e712a9a5713..76bbcca0928 100644 +--- a/gdb/nat/ppc-linux.h ++++ b/gdb/nat/ppc-linux.h +@@ -18,7 +18,13 @@ + #ifndef NAT_PPC_LINUX_H + #define NAT_PPC_LINUX_H + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + #include <asm/cputable.h> + + /* This sometimes isn't defined. */ +diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc +index db9a88219ea..151e4183bb1 100644 +--- a/gdbserver/linux-ppc-low.cc ++++ b/gdbserver/linux-ppc-low.cc +@@ -23,7 +23,13 @@ + #include "elf/common.h" + #include <sys/uio.h> + #include <elf.h> ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include <asm/ptrace.h> ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #include "arch/ppc-linux-common.h" + #include "arch/ppc-linux-tdesc.h" +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta-morello/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch new file mode 100644 index 0000000..02ea30f --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0005-Dont-disable-libreadline.a-when-using-disable-static.patch @@ -0,0 +1,50 @@ +From e2efd044c479895767f1b929f5a54fa0c689f318 Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Sat, 30 Apr 2016 15:25:03 -0700 +Subject: [PATCH 05/10] Dont disable libreadline.a when using --disable-static + +If gdb is configured with --disable-static then this is dutifully passed to +readline which then disables libreadline.a, which causes a problem when gdb +tries to link against that. + +To ensure that readline always builds static libraries, pass --enable-static to +the sub-configure. + +Upstream-Status: Pending +Signed-off-by: Ross Burton ross.burton@intel.com +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + Makefile.def | 3 ++- + Makefile.in | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile.def b/Makefile.def +index 5a460f1dbbc..77a702ac6d6 100644 +--- a/Makefile.def ++++ b/Makefile.def +@@ -105,7 +105,8 @@ host_modules= { module= libiconv; + missing= install-html; + missing= install-info; }; + host_modules= { module= m4; }; +-host_modules= { module= readline; }; ++host_modules= { module= readline; ++ extra_configure_flags='--enable-static';}; + host_modules= { module= sid; }; + host_modules= { module= sim; }; + host_modules= { module= texinfo; no_install= true; }; +diff --git a/Makefile.in b/Makefile.in +index 9b3a5d75735..98cbe844fca 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -25607,7 +25607,7 @@ configure-readline: + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ +- --target=${target_alias} \ ++ --target=${target_alias} --enable-static \ + || exit 1 + @endif readline + +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch b/meta-morello/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch new file mode 100644 index 0000000..ef271c4 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0006-use-asm-sgidefs.h.patch @@ -0,0 +1,36 @@ +From 5077518c11e8d75e9bf65cdf9ca21c59564e1037 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy amccurdy@gmail.com +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH 06/10] use <asm/sgidefs.h> + +Build fix for MIPS with musl libc + +The MIPS specific header <sgidefs.h> is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide +<asm/sgidefs.h> which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy armccurdy@gmail.com +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index 6614b4de31e..237eb6eb975 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include <sgidefs.h> ++#include <asm/sgidefs.h> + #include "nat/gdb_ptrace.h" + #include <asm/ptrace.h> + #include "inf-ptrace.h" +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch b/meta-morello/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch new file mode 100644 index 0000000..40d1257 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0007-Change-order-of-CFLAGS.patch @@ -0,0 +1,30 @@ +From 80080e6c8425ac51498f49c2063b960a08f9a27d Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Sat, 30 Apr 2016 15:35:39 -0700 +Subject: [PATCH 07/10] Change order of CFLAGS + +Lets us override Werror if need be + +Upstream-Status: Inappropriate + +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdbserver/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in +index 12e9b2777ae..ad44fbc3309 100644 +--- a/gdbserver/Makefile.in ++++ b/gdbserver/Makefile.in +@@ -172,7 +172,7 @@ WIN32APILIBS = @WIN32APILIBS@ + INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \ + ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS) + INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) +-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER ++INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER + + # LDFLAGS is specifically reserved for setting from the command line + # when running make. +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch b/meta-morello/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch new file mode 100644 index 0000000..9095f90 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0008-resolve-restrict-keyword-conflict.patch @@ -0,0 +1,48 @@ +From 4ee7e8afb9ff259e889ac938c673fda9ddc5e15a Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Tue, 10 May 2016 08:47:05 -0700 +Subject: [PATCH 08/10] resolve restrict keyword conflict + +GCC detects that we call 'restrict' as param name in function +signatures and complains since both params are called 'restrict' +therefore we use __restrict to denote the C99 keywork + +Upstream-Status: Pending + +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gnulib/import/sys_time.in.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h +index 90a67d18426..664641a1fe8 100644 +--- a/gnulib/import/sys_time.in.h ++++ b/gnulib/import/sys_time.in.h +@@ -93,20 +93,20 @@ struct timeval + # define gettimeofday rpl_gettimeofday + # endif + _GL_FUNCDECL_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + _GL_CXXALIAS_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # else + # if !@HAVE_GETTIMEOFDAY@ + _GL_FUNCDECL_SYS (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + # endif + /* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ + _GL_CXXALIAS_SYS_CAST (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # endif + _GL_CXXALIASWARN (gettimeofday); + # if defined __cplusplus && defined GNULIB_NAMESPACE +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch b/meta-morello/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch new file mode 100644 index 0000000..5b9d1cf --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0009-Fix-invalid-sigprocmask-call.patch @@ -0,0 +1,49 @@ +From 5740876d92ddb67b039d5fbcd1b71e6c58823c08 Mon Sep 17 00:00:00 2001 +From: Yousong Zhou yszhou4tech@gmail.com +Date: Fri, 24 Mar 2017 10:36:03 +0800 +Subject: [PATCH 09/10] Fix invalid sigprocmask call +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The POSIX document says + + The pthread_sigmask() and sigprocmask() functions shall fail if: + + [EINVAL] + The value of the how argument is not equal to one of the defined values. + +and this is how musl-libc is currently doing. Fix the call to be safe +and correct + + [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.ht... + +gdb/ChangeLog: +2017-03-24 Yousong Zhou yszhou4tech@gmail.com + + * common/signals-state-save-restore.c (save_original_signals_state): + Fix invalid sigprocmask call. + +Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&opene...] +Signed-off-by: André Draszik adraszik@tycoint.com +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdbsupport/signals-state-save-restore.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc +index 95c156e5036..f4aa512d105 100644 +--- a/gdbsupport/signals-state-save-restore.cc ++++ b/gdbsupport/signals-state-save-restore.cc +@@ -38,7 +38,7 @@ save_original_signals_state (bool quiet) + int i; + int res; + +- res = gdb_sigmask (0, NULL, &original_signal_mask); ++ res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask); + if (res == -1) + perror_with_name (("sigprocmask")); + +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch b/meta-morello/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch new file mode 100644 index 0000000..cb4744e --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb/0010-gdbserver-ctrl-c-handling.patch @@ -0,0 +1,40 @@ +From d611a68f05c0c86af27bf6beae189a90a946e2e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj raj.khem@gmail.com +Date: Thu, 29 Nov 2018 18:00:23 -0800 +Subject: [PATCH 10/10] gdbserver ctrl-c handling + +This problem was created by the upstream commit 78708b7c8c +After applying the commit, it will send SIGINT to the process +group(-signal_pid). +But if we use gdbserver send SIGINT, and the attached process is not a +process +group leader, then the "kill (-signal_pid, SIGINT)" returns error and +fails to +interrupt the attached process. + +Upstream-Status: Submitted +[https://sourceware.org/bugzilla/show_bug.cgi?id=18945] + +Author: Josh Gao +Signed-off-by: Zhixiong Chi zhixiong.chi@windriver.com +Signed-off-by: Khem Raj raj.khem@gmail.com +--- + gdbserver/linux-low.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc +index 5c6191d941c..7f7acf6700d 100644 +--- a/gdbserver/linux-low.cc ++++ b/gdbserver/linux-low.cc +@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt () + { + /* Send a SIGINT to the process group. This acts just like the user + typed a ^C on the controlling terminal. */ +- ::kill (-signal_pid, SIGINT); ++ ::kill (signal_pid, SIGINT); + } + + bool +-- +2.33.1 + diff --git a/meta-morello/recipes-devtools/gdb/gdb_%.bbappend b/meta-morello/recipes-devtools/gdb/gdb_%.bbappend deleted file mode 100644 index 631c79e..0000000 --- a/meta-morello/recipes-devtools/gdb/gdb_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -COMPATIBLE_MACHINE = "morello" - -SRC_URI = "git://git.morello-project.org/morello/binutils-gdb.git;protocol=https;branch=${SRCBRANCH}" -SRCBRANCH = "users/ARM/morello-binutils-gdb-master" -SRCREV = "f6e8c7228463a552d175211f4fcea93cca889686" - -S = "${WORKDIR}/git" \ No newline at end of file diff --git a/meta-morello/recipes-devtools/gdb/gdb_morello-11.0.bb b/meta-morello/recipes-devtools/gdb/gdb_morello-11.0.bb new file mode 100644 index 0000000..350c485 --- /dev/null +++ b/meta-morello/recipes-devtools/gdb/gdb_morello-11.0.bb @@ -0,0 +1,34 @@ +inherit gettext pkgconfig python3-dir +require recipes-devtools/gdb/gdb-common.inc +require gdb.inc + +COMPATIBLE_MACHINE = "morello" + +PACKAGES =+ "gdbserver" +FILES:gdbserver = "${bindir}/gdbserver" + +EXTRA_OEMAKE:append:libc-musl = "\ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes \ + gl_cv_func_working_strerror=yes \ + gl_cv_func_strerror_0_works=yes \ + gl_cv_func_gettimeofday_clobber=no \ + " + +S = "${WORKDIR}/git" + +do_configure:prepend() { + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + cat > ${WORKDIR}/python << EOF +#!/bin/sh +case "$2" in + --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; + --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; + --exec-prefix) echo "${exec_prefix}" ;; + *) exit 1 ;; +esac +exit 0 +EOF + chmod +x ${WORKDIR}/python + fi +}
Use the include files to create a bb recipe and use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- ....bbappend => scp-firmware_morello-2.10.bb} | 65 ++++++++++++++++--- ...pend => trusted-firmware-a_morello-2.7.bb} | 3 +- 2 files changed, 57 insertions(+), 11 deletions(-) rename meta-morello/recipes-bsp/scp-firmware/{scp-firmware_2.10.%.bbappend => scp-firmware_morello-2.10.bb} (51%) rename meta-morello/recipes-bsp/trusted-firmware-a/{trusted-firmware-a_2.%.bbappend => trusted-firmware-a_morello-2.7.bb} (96%)
diff --git a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb similarity index 51% rename from meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend rename to meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb index 69fdd1d..cbb8ec4 100644 --- a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend +++ b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb @@ -1,36 +1,77 @@ -inherit cmake +inherit cmake deploy + +SUMMARY = "SCP and MCP Firmware" +DESCRIPTION = "Firmware for SCP and MCP software reference implementation" +HOMEPAGE = "https://github.com/ARM-software/SCP-firmware" + +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 \ + file://contrib/cmsis/git/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
COMPATIBLE_MACHINE = "morello" OUTPUTS_NAME = "scp-firmware" SECTION = "firmware"
+PACKAGE_ARCH = "${MACHINE_ARCH}" + +TOOLCHAIN = "gcc" + MACHINE_SCP_REQUIRE ?= "" MACHINE_SCP_REQUIRE:morello-fvp = "scp-firmware-morello-fvp.inc" MACHINE_SCP_REQUIRE:morello-soc = "scp-firmware-morello-soc.inc" require ${MACHINE_SCP_REQUIRE}
-DEPENDS += "virtual/board-firmware" +INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "virtual/arm-none-eabi-gcc-native virtual/board-firmware" PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = "gitsm://git.morello-project.org/morello/scp-firmware.git;protocol=https;branch=${SRCBRANCH}" SRCREV = "758aad2f0c522d2dd7b8f84eca5d9d71fa2d9359" -PV = "2.10.0+git${SRCPV}" +PV = "morello-2.10.0+git${SRCPV}"
SRCBRANCH = "morello/master"
-SCP_PLATFORM = "morello" -SCP_LOG_LEVEL = "INFO" +SCP_BUILD_RELEASE ?= "1" +SCP_COMPILER ?= "arm-none-eabi" +SCP_PLATFORM ?= "morello" +SCP_LOG_LEVEL ?= "INFO"
SENSOR = "${RECIPE_SYSROOT}/board-firmware/LIB/sensor.a" B = "${WORKDIR}/build/morello" +S = "${WORKDIR}/git" + +# Allow platform specific copying of only scp or both scp & mcp, default to both +FW_TARGETS ?= "scp mcp" +FW_INSTALL ?= "ramfw romfw" + + +LDFLAGS[unexport] = "1"
-FW_TARGETS = "scp mcp"
-unset do_configure[noexec] -unset do_compile[cleandirs] +EXTRA_OEMAKE = "V=1 \ + BUILD_PATH='${B}' \ + PRODUCT='${SCP_PLATFORM}' \ + MODE='${SCP_BUILD_STR}' \ + LOG_LEVEL='${SCP_LOG_LEVEL}' \ + CC='${SCP_COMPILER}-gcc' \ + AR='${SCP_COMPILER}-ar' \ + SIZE='${SCP_COMPILER}-size' \ + OBJCOPY='${SCP_COMPILER}-objcopy' \ + " + do_configure[depends] += "board-firmware:do_install"
+FILES:${PN} = "/firmware" +SYSROOT_DIRS += "/firmware" + +FILES:${PN}-dbg += "/firmware/*.elf" + +# Skip QA check for relocations in .text of elf binaries +INSANE_SKIP:${PN}-dbg = "arch textrel" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" + do_configure() {
cd ${S} @@ -76,4 +117,10 @@ do_install() { cp -rf "${B}/${target}/bin/"*.bin "${D}/firmware/${target}.bin" done done -} \ No newline at end of file +} + +do_deploy() { + # Copy the images to deploy directory + cp -rf ${D}/firmware/* ${DEPLOYDIR}/ +} +addtask deploy after do_install \ No newline at end of file diff --git a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb similarity index 96% rename from meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend rename to meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb index c4bfc69..f16f12a 100644 --- a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend +++ b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb @@ -1,5 +1,5 @@
- +require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc COMPATIBLE_MACHINE = "morello" SUMMARY = "TF-A to be compiled with LLVM Morello" OUTPUTS_NAME = "trusted-firmware-a" @@ -17,7 +17,6 @@ PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = "gitsm://git.morello-project.org/morello/trusted-firmware-a;protocol=https;name=tfa;branch=${SRCBRANCH}" SRCREV_tfa = "3ce2815936774fe924ec7538151b71085c2f18d9" -PV = "2.7+git${SRCPV}"
SRCBRANCH = "morello/master" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"
Use the include files to create a bb recipe and use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- ...edk2-firmware_%.bbappend => edk2-firmware_morello-2.4.bb} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename meta-morello/recipes-bsp/uefi/{edk2-firmware_%.bbappend => edk2-firmware_morello-2.4.bb} (96%)
diff --git a/meta-morello/recipes-bsp/uefi/edk2-firmware_%.bbappend b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb similarity index 96% rename from meta-morello/recipes-bsp/uefi/edk2-firmware_%.bbappend rename to meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb index f7d9241..855ffcb 100644 --- a/meta-morello/recipes-bsp/uefi/edk2-firmware_%.bbappend +++ b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb @@ -1,8 +1,8 @@ inherit python3native - +require recipes-bsp/uefi/edk2-firmware.inc COMPATIBLE_MACHINE = "morello" SUMMARY = "EDK2 to be compiled with LLVM Morello" -OUTPUTS_NAME = "uefi" +OUTPUTS_NAME = "edk2-firmware" SECTION = "firmware"
TOOLCHAIN = "${MORELLO_TOOLCHAIN}" @@ -30,7 +30,6 @@ EDK2_NON_OSI_SRC_URI = "git://github.com/tianocore/edk2-non-osi;branch=master; SRCREV_edk2-non-osi = "0320db977fb27e63424b0953a3020bb81c89e8f0" SRCREV_edk2 = "ce510c33dfc354e262ccd71619add069876d6a08" SRCREV_edk2-platforms = "6bae2381d664e668875720e7eb86f751cb1de373" -PV = "git${SRCPV}"
EDK2_BUILD_RELEASE = "0"
Use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../{busybox-morello_1.5.bb => busybox-morello_morello-1.5.bb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meta-morello/recipes-core/busybox/{busybox-morello_1.5.bb => busybox-morello_morello-1.5.bb} (100%)
diff --git a/meta-morello/recipes-core/busybox/busybox-morello_1.5.bb b/meta-morello/recipes-core/busybox/busybox-morello_morello-1.5.bb similarity index 100% rename from meta-morello/recipes-core/busybox/busybox-morello_1.5.bb rename to meta-morello/recipes-core/busybox/busybox-morello_morello-1.5.bb
Use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../linux/{linux-morello_1.5.bb => linux-morello_morello-1.5.bb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meta-morello/recipes-kernel/linux/{linux-morello_1.5.bb => linux-morello_morello-1.5.bb} (100%)
diff --git a/meta-morello/recipes-kernel/linux/linux-morello_1.5.bb b/meta-morello/recipes-kernel/linux/linux-morello_morello-1.5.bb similarity index 100% rename from meta-morello/recipes-kernel/linux/linux-morello_1.5.bb rename to meta-morello/recipes-kernel/linux/linux-morello_morello-1.5.bb
Use the new versioning scheme, match edk2 recipe change. The hyperlink in the license file for STM points to STM-SLA0044-Rev5 license.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-bsp/board-firmware/board-firmware-image.bb | 4 ++-- .../{board-firmware_1.4.bb => board-firmware_morello-1.4.bb} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename meta-morello/recipes-bsp/board-firmware/{board-firmware_1.4.bb => board-firmware_morello-1.4.bb} (93%)
diff --git a/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb b/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb index 2ab5e5f..7a09568 100644 --- a/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb +++ b/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb @@ -18,7 +18,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" BB_DONT_CACHE = "1"
DEPENDS += "virtual/board-firmware virtual/scp-firmware \ - virtual/trusted-firmware-a virtual/uefi virtual/grub-efi \ + virtual/trusted-firmware-a virtual/edk2-firmware grub-efi \ mtools-native fiptool-native"
PROVIDES = "virtual/board-firmware-image" @@ -47,7 +47,7 @@ do_configure[noexec] = "1" do_compile[noexec] = "1" do_install[depends] += "virtual/board-firmware:do_populate_sysroot" do_install[depends] += "virtual/scp-firmware:do_populate_sysroot" -do_install[depends] += "virtual/uefi:do_populate_sysroot" +do_install[depends] += "virtual/edk2-firmware:do_populate_sysroot" do_install[depends] += "virtual/trusted-firmware-a:do_populate_sysroot"
do_install:prepend() { diff --git a/meta-morello/recipes-bsp/board-firmware/board-firmware_1.4.bb b/meta-morello/recipes-bsp/board-firmware/board-firmware_morello-1.4.bb similarity index 93% rename from meta-morello/recipes-bsp/board-firmware/board-firmware_1.4.bb rename to meta-morello/recipes-bsp/board-firmware/board-firmware_morello-1.4.bb index 9d98dc2..7e29ac1 100644 --- a/meta-morello/recipes-bsp/board-firmware/board-firmware_1.4.bb +++ b/meta-morello/recipes-bsp/board-firmware/board-firmware_morello-1.4.bb @@ -2,7 +2,7 @@ COMPATIBLE_MACHINE = "morello" SUMMARY = "Board firmware for Morello" DESCRIPTION = "The SD card image from ARM that contains non compile-able binaries." HOMEPAGE = "https://git.morello-project.org/morello/board-firmware" -LICENSE = "STMicroelectronics & BSD-3-Clause & BSD-2-Clause" +LICENSE = "STM-SLA0044-Rev5 & BSD-3-Clause & BSD-2-Clause" OUTPUTS_NAME = "board-firmware" SECTION = "firmware"
Do not change anything unless it is one of our machines. COMPATILBE_MACHINE was not required here.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-bsp/grub/grub-efi_2.%.bbappend | 24 ++++++++++++------- .../recipes-bsp/grub/grub_2.%.bbappend | 11 ++++++--- 2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/meta-morello/recipes-bsp/grub/grub-efi_2.%.bbappend b/meta-morello/recipes-bsp/grub/grub-efi_2.%.bbappend index c03b87c..204c1d2 100644 --- a/meta-morello/recipes-bsp/grub/grub-efi_2.%.bbappend +++ b/meta-morello/recipes-bsp/grub/grub-efi_2.%.bbappend @@ -1,22 +1,30 @@ -inherit deploy nopackages
-COMPATIBLE_MACHINE = "morello" -OUTPUTS_NAME = "grub-efi"
-PROVIDES += "virtual/${OUTPUTS_NAME}" +OUTPUTS_NAME = "grub-efi"
FILESEXTRAPATHS:prepend := "${THISDIR}:"
-GRUB_BUILDIN = " boot chain configfile ext2 fat gzio help linux loadenv \ +GRUB_BUILDIN:morello-soc = " boot chain configfile ext2 fat gzio help linux loadenv \ + lsefi normal ntfs ntfscomp part_gpt part_msdos progress read search \ + search_fs_file search_fs_uuid search_label terminal terminfo \ + " + +GRUB_BUILDIN:morello-fvp = " boot chain configfile ext2 fat gzio help linux loadenv \ lsefi normal ntfs ntfscomp part_gpt part_msdos progress read search \ search_fs_file search_fs_uuid search_label terminal terminfo \ "
-SRC_URI += "file://files/grub-config.cfg" +SRC_URI:append:morello-soc = " file://files/grub-config.cfg" +SRC_URI:append:morello-fvp = " file://files/grub-config.cfg" + +do_deploy:append:morello-soc() { + install -d ${DEPLOYDIR}/${OUTPUTS_NAME} + install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} "${DEPLOYDIR}/${OUTPUTS_NAME}/" + install -m 644 ${WORKDIR}/files/grub-config.cfg "${DEPLOYDIR}/${OUTPUTS_NAME}/grub-config.cfg" +}
-do_deploy() { +do_deploy:append:morello-fvp() { install -d ${DEPLOYDIR}/${OUTPUTS_NAME} install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} "${DEPLOYDIR}/${OUTPUTS_NAME}/" install -m 644 ${WORKDIR}/files/grub-config.cfg "${DEPLOYDIR}/${OUTPUTS_NAME}/grub-config.cfg" } -addtask deploy after do_install before do_build \ No newline at end of file diff --git a/meta-morello/recipes-bsp/grub/grub_2.%.bbappend b/meta-morello/recipes-bsp/grub/grub_2.%.bbappend index a2f232d..05b8f42 100644 --- a/meta-morello/recipes-bsp/grub/grub_2.%.bbappend +++ b/meta-morello/recipes-bsp/grub/grub_2.%.bbappend @@ -1,10 +1,15 @@
-EXTRA_OECONF+="\ +EXTRA_OECONF:append:morello-soc ="\ + --disable-efiemu \ + --enable-dependency-tracking \ + --disable-grub-themes \ + --disable-grub-mount \ + " + +EXTRA_OECONF:append:morello-fvp ="\ --disable-efiemu \ - --disable-werror \ --enable-dependency-tracking \ - --disable-grub-mkfont \ --disable-grub-themes \ --disable-grub-mount \ " \ No newline at end of file
Use the new versioning scheme. SOC and FVP will use the same versions anyway so move it to the include file.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/conf/machine/include/morello-common.inc | 10 +++++++++- meta-morello/conf/machine/morello-fvp.conf | 4 ---- meta-morello/conf/machine/morello-soc.conf | 4 ---- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/meta-morello/conf/machine/include/morello-common.inc b/meta-morello/conf/machine/include/morello-common.inc index 51b4db7..4e5779d 100644 --- a/meta-morello/conf/machine/include/morello-common.inc +++ b/meta-morello/conf/machine/include/morello-common.inc @@ -2,8 +2,16 @@ require ${COREBASE}/meta/conf/machine/include/arm/armv8-2a/tune-neoversen1.inc
MACHINEOVERRIDES =. "morello"
+PREFERRED_VERSION_board-firmware = "morello-1.4" +PREFERRED_VERSION_edk2-firmware = "morello-2.4" +PREFERRED_VERSION_scp-firmware = "morello-2.1%" + +PREFERRED_VERSION_trusted-firmware-a = "morello-2.7" + PREFERRED_PROVIDER_virtual/kernel = "linux-morello" -PREFERRED_VERSION_virtual/kernel = "1.5" +PREFERRED_VERSION_virtual/kernel = "morello-1.5" + +GDBVERSION = "morello-11.0"
MUSL_INSTALL_DIR ??="" MORELLO_TOOLCHAIN ??= "llvm-morello" diff --git a/meta-morello/conf/machine/morello-fvp.conf b/meta-morello/conf/machine/morello-fvp.conf index 0aa78f6..1872118 100644 --- a/meta-morello/conf/machine/morello-fvp.conf +++ b/meta-morello/conf/machine/morello-fvp.conf @@ -2,10 +2,6 @@ require conf/machine/include/morello-common.inc
MACHINEOVERRIDES =. "morello-fvp:"
-PREFERRED_VERSION_scp-firmware = "2.10%" -PREFERRED_VERSION_trusted-firmware-a = "2.7%" -PREFERRED_VERSION_board-firmware = "1.4" - TCLIBCAPPEND = ""
BSP_GRUB_DIR ?= "${TMPDIR}/deploy/images/morello-fvp/grub-efi" diff --git a/meta-morello/conf/machine/morello-soc.conf b/meta-morello/conf/machine/morello-soc.conf index cafdcc9..9f4ff11 100644 --- a/meta-morello/conf/machine/morello-soc.conf +++ b/meta-morello/conf/machine/morello-soc.conf @@ -2,10 +2,6 @@ require conf/machine/include/morello-common.inc
MACHINEOVERRIDES =. "morello-soc:"
-PREFERRED_VERSION_scp-firmware = "2.10%" -PREFERRED_VERSION_trusted-firmware-a = "2.7%" -PREFERRED_VERSION_board-firmware = "1.4" - TCLIBCAPPEND = ""
BSP_GRUB_DIR ?= "${TMPDIR}/deploy/images/morello-soc/grub-efi"
Use the include files to create a bb recipe and use the new versioning scheme. Pure-cap-app is affected.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-core/musl/musl-morello-common.inc | 1 - .../recipes-core/musl/musl_%.bbappend | 17 ----------------- .../recipes-core/musl/musl_morello-1.5.bb | 15 +++++++++++++++ .../recipes-core/musl/override-glibc.inc | 5 +---- .../recipes-core/musl/override-musl.inc | 5 +++-- .../conf/machine/include/morello-common.inc | 2 ++ .../applications/pure-cap-app.bb | 4 ++-- 7 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 meta-morello-toolchain/recipes-core/musl/musl_%.bbappend create mode 100644 meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb
diff --git a/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc index 78ebd91..cd2190a 100644 --- a/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc @@ -18,7 +18,6 @@ SRCBRANCH = "morello/master"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68"
-PV = "git${SRCPV}" S = "${WORKDIR}/git" B = "${WORKDIR}/build"
diff --git a/meta-morello-toolchain/recipes-core/musl/musl_%.bbappend b/meta-morello-toolchain/recipes-core/musl/musl_%.bbappend deleted file mode 100644 index 4f899a9..0000000 --- a/meta-morello-toolchain/recipes-core/musl/musl_%.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -require musl-morello-${MORELLO_ARCH}.inc musl-morello-${MORELLO_ARCH}-so.inc musl-morello-target.inc - -MACHINE_INC ?= "" -MACHINE_INC:morello-soc = "override-glibc.inc" -MACHINE_INC:morello-fvp = "override-glibc.inc" - -require ${MACHINE_INC} - -DEPENDS:remove = "virtual/${TARGET_PREFIX}binutils \ - virtual/${TARGET_PREFIX}gcc \ - libgcc-initial \ - linux-libc-headers \ - bsd-headers \ - libssp-nonshared \ - " - -RDEPENDS:${PN}-dev:remove = "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev" \ No newline at end of file diff --git a/meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb b/meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb new file mode 100644 index 0000000..ebb8969 --- /dev/null +++ b/meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb @@ -0,0 +1,15 @@ +require musl-morello-${MORELLO_ARCH}.inc musl-morello-${MORELLO_ARCH}-so.inc musl-morello-target.inc + +MACHINE_INC ?= "" +MACHINE_INC:morello-soc = "override-glibc.inc" +MACHINE_INC:morello-fvp = "override-glibc.inc" + +LEAD_SONAME = "libc.so" + +INSANE_SKIP:${PN}-dev = "staticdev" +INSANE_SKIP:${PN} = "libdir" +INSANE_SKIP:${PN} = "dev-so" + +RPROVIDES:${PN} += "ldd rtld(GNU_HASH) musl-libc" + +require ${MACHINE_INC} \ No newline at end of file diff --git a/meta-morello-toolchain/recipes-core/musl/override-glibc.inc b/meta-morello-toolchain/recipes-core/musl/override-glibc.inc index 9ccf9c2..7cd642e 100644 --- a/meta-morello-toolchain/recipes-core/musl/override-glibc.inc +++ b/meta-morello-toolchain/recipes-core/musl/override-glibc.inc @@ -1,4 +1 @@ -PROVIDES:append = " virtual/musl-morello" -PROVIDES:remove = "virtual/libc virtual/libiconv virtual/libintl virtual/crypt" -RPROVIDES:${PN}-dev:remove = "libc-dev virtual-libc-dev" -RPROVIDES:${PN}:append = " musl-libc" \ No newline at end of file +PROVIDES:append = " virtual/musl-morello" \ No newline at end of file diff --git a/meta-morello-toolchain/recipes-core/musl/override-musl.inc b/meta-morello-toolchain/recipes-core/musl/override-musl.inc index 1a810e6..6229389 100644 --- a/meta-morello-toolchain/recipes-core/musl/override-musl.inc +++ b/meta-morello-toolchain/recipes-core/musl/override-musl.inc @@ -1,2 +1,3 @@ -PROVIDES:append = " virtual/musl-morello" -RPROVIDES:${PN}:append = " musl-libc" \ No newline at end of file +PROVIDES:append = " virtual/musl-morello" +PROVIDES:append = " virtual/libc virtual/libiconv virtual/libintl virtual/crypt" +RPROVIDES:${PN}-dev:append = " libc-dev virtual-libc-dev" \ No newline at end of file diff --git a/meta-morello/conf/machine/include/morello-common.inc b/meta-morello/conf/machine/include/morello-common.inc index 4e5779d..b01dda2 100644 --- a/meta-morello/conf/machine/include/morello-common.inc +++ b/meta-morello/conf/machine/include/morello-common.inc @@ -11,6 +11,8 @@ PREFERRED_VERSION_trusted-firmware-a = "morello-2.7" PREFERRED_PROVIDER_virtual/kernel = "linux-morello" PREFERRED_VERSION_virtual/kernel = "morello-1.5"
+PREFERRED_VERSION_musl = "morello-1.5" + GDBVERSION = "morello-11.0"
MUSL_INSTALL_DIR ??="" diff --git a/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb b/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb index c1e9d86..f7edde0 100644 --- a/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb +++ b/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ec TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
PROVIDES = "${OUTPUTS_NAME}" -RDEPENDS:${PN} = "musl-libc" -RPROVIDES:${PN} = "${OUTPUTS_NAME}" +RDEPENDS:${PN} += "musl" +RPROVIDES:${PN} += "${OUTPUTS_NAME}"
FILES:${PN} += "/${APP_DIR}" SYSROOT_DIRS +="/${APP_DIR}"
The hash path was broken, output files were not added to $FILES, fix it.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-bsp/rom-binaries/rom-binaries_1.5.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta-morello/recipes-bsp/rom-binaries/rom-binaries_1.5.bb b/meta-morello/recipes-bsp/rom-binaries/rom-binaries_1.5.bb index 461e20c..f870d5b 100644 --- a/meta-morello/recipes-bsp/rom-binaries/rom-binaries_1.5.bb +++ b/meta-morello/recipes-bsp/rom-binaries/rom-binaries_1.5.bb @@ -16,12 +16,14 @@ SRCREV = "c86e6a17563423d3938240799196ec68784f9e04" SRCBRANCH = "morello/release-1.5"
LIC_FILES_CHKSUM = "file://LICENSES/bl1.txt;md5=8737ebfecb4a75675c676c10f7d07c70 \ - file://LICENSES/mcp_rom.txt;md5=ad686ac8d50ed47c030a1094ffdead49 \ - file://LICENSES/scp_rom.txt;md5=f4d01c71878528d6bb100cb606db590c \ + file://LICENSES/mcp_romfw.txt;md5=ad686ac8d50ed47c030a1094ffdead49 \ + file://LICENSES/scp_romfw.txt;md5=f4d01c71878528d6bb100cb606db590c \ "
S = "${WORKDIR}/git"
+FILES:${PN} = "bl1.bin scp_romfw.bin mcp_romfw.bin" + do_install () { install ${S}/bl1.bin ${D}/bl1.bin install ${S}/scp_romfw.bin ${D}/scp_romfw.bin
The license file does not exist in the provided $S path, fix it.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta-morello/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb b/meta-morello/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb index 3c45b05..f5e1fb0 100644 --- a/meta-morello/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb +++ b/meta-morello/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb @@ -19,18 +19,19 @@ SRC_URI = " \
SRCREV = "87d06928f90fe910311210a0149d03f3420f593c"
-S = "${WORKDIR}/git/usr" +S = "${WORKDIR}/git"
FILES:${PN} = "${bindir}/${OUTPUTS_NAME}"
do_configure[noexec] = "1"
do_compile(){ + cd usr mkdir -p ${B}/${OUTPUTS_NAME} oe_runmake gen_init_cpio }
do_install(){ install -d ${D}${bindir} - install -m 0744 ${S}/gen_init_cpio ${D}${bindir}/gen_init_cpio + install -m 0744 ${S}/usr/gen_init_cpio ${D}${bindir}/gen_init_cpio }
The license hash did not match, fix it.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-devtools/fvp/fvp-morello.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-morello/recipes-devtools/fvp/fvp-morello.bb b/meta-morello/recipes-devtools/fvp/fvp-morello.bb index 764b9c3..3757ab4 100644 --- a/meta-morello/recipes-devtools/fvp/fvp-morello.bb +++ b/meta-morello/recipes-devtools/fvp/fvp-morello.bb @@ -7,4 +7,4 @@ PV = "0.11.34" SRC_URI[sha256sum] = "ed1e110fb7fa8732d4f1bea9af69491a9e3f7dbf57d2ce6ea916d3cdf910d324"
LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=1a33828e132ba71861c11688dbb0bd16 \ - file://license_terms/third_party_licenses.txt;md5=3db0c4947b7e3405c40b943672d8de2f" \ No newline at end of file + file://license_terms/third_party_licenses.txt;md5=47473b1e04b70938cf0a7ffea8ea4cc3" \ No newline at end of file
Update to reflect what is required from contributors now.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md index db0a9ce..3c75044 100644 --- a/README.md +++ b/README.md @@ -28,14 +28,11 @@ Check if the work is not already scheduled in the issues section [2]. Follow the coding style found in other layers, the aim here is to keep them consistent where possible and very easy to read. Follow the order found in the "headers" of each recipe and in general.
-`.bb` recipes that come from Morello gitlab and are Morello forks of upstream inherit the name Morello in the recipe: package-name-morello -`.bbappends` do not need to do this even if they come from Morello gitlab as they would only change `SRC_URI`, which is a bad practice but -it is acceptable for now. - -Whether to append or start a new recipe at this stage is up to the designer, whatever is the easiest. +`.bb` recipes that come from Morello gitlab and are Morello forks of upstream inherit the name Morello in the recipe: package-name_morello-version
You should familiarize yourself with the following documents [3][4][5][6].
+ References ----------
linux-morello-distros@op-lists.linaro.org