This series of patches is updating the software stack to v1.6 and it also makes adding new libraries to the purecap sysroot easier.
Implementation can be found here: https://git.morello-project.org/pzalewski/meta-morello/-/tree/release-1.6
Pawel Zalewski (17): llvm-morello: add flags to the compiler class config: move toolchain variables to meta-toolchain tfa: remove the flags edk2: remove flags musl: bump version to 1.6, match sysroot llvm-runtime: remove flags linux: bump version to 1.6, change kheaders install kheaders: add new class llvm-morell: bump version to 1.6 pure-cap-app: match the sysroot busybox: match the sysroot scp: bump version to 1.6 tfa: bump version to 1.6 fiptool: bump version to 1.6 board-firmware: embed dtb as hw-config edk2: bump version to 1.6 config: bump preferred versions to 1.6
.../classes/llvm-morello.bbclass | 47 +++++++++++-------- meta-morello-toolchain/conf/layer.conf | 15 ++++++ .../recipes-core/musl/musl-morello-common.inc | 13 +++-- .../recipes-core/musl/musl-morello-target.inc | 25 +++++----- ...usl_morello-1.5.bb => musl_morello-1.6.bb} | 0 .../llvm/llvm-morello-runtime-native.bb | 6 +++ .../recipes-devtools/llvm/llvm-morello.inc | 4 +- .../classes/pure-cap-application.bbclass | 2 +- .../classes/pure-cap-kheaders.bbclass | 2 + .../conf/machine/include/morello-common.inc | 18 +------ meta-morello/conf/machine/morello-fvp.conf | 1 - meta-morello/conf/machine/morello-soc.conf | 1 - .../board-firmware/board-firmware-image.bb | 1 + .../scp-firmware/scp-firmware_morello-2.10.bb | 4 +- .../trusted-firmware-a_morello-2.7.bb | 8 +++- .../uefi/edk2-firmware_morello-2.4.bb | 10 ++-- .../recipes-core/busybox/busybox-morello.inc | 14 +++--- .../fiptool/fiptool-native_2.7.bb | 4 +- .../recipes-kernel/linux/linux-morello.inc | 12 +++-- ...lo-1.5.bb => linux-morello_morello-1.6.bb} | 5 +- .../applications/pure-cap-app.bb | 1 - 21 files changed, 114 insertions(+), 79 deletions(-) rename meta-morello-toolchain/recipes-core/musl/{musl_morello-1.5.bb => musl_morello-1.6.bb} (100%) create mode 100644 meta-morello/classes/pure-cap-kheaders.bbclass rename meta-morello/recipes-kernel/linux/{linux-morello_morello-1.5.bb => linux-morello_morello-1.6.bb} (60%)
Set default flags for the compiler and the linker. Add default depends, these will have to be removed within the bsp recipes but allow for less typing in the rootfs, which is where the majority of the actual work awaits.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../classes/llvm-morello.bbclass | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-)
diff --git a/meta-morello-toolchain/classes/llvm-morello.bbclass b/meta-morello-toolchain/classes/llvm-morello.bbclass index 7f69763..d8877cf 100644 --- a/meta-morello-toolchain/classes/llvm-morello.bbclass +++ b/meta-morello-toolchain/classes/llvm-morello.bbclass @@ -18,26 +18,35 @@ TC_DEPENDS:append:toolchain-llvm-morello:class-target = " virtual/llvm-morello-r
DEPENDS:append:toolchain-llvm-morello = "${TC_DEPENDS}"
-# leaving out ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} for now; -# -target is set kind off backwards inside the recipes until further notice -CC:toolchain-llvm-morello = "${LLVM_PATH}/clang" -CXX:toolchain-llvm-morello = "${LLVM_PATH}/clang++" -CPP:toolchain-llvm-morello = "${LLVM_PATH}/clang -E" -CCLD:toolchain-llvm-morello = "${LLVM_PATH}/clang" -HOSTCC:toolchain-llvm-morello = "${LLVM_PATH}/clang" -RANLIB:toolchain-llvm-morello = "${LLVM_PATH}/llvm-ranlib" -AR:toolchain-llvm-morello = "${LLVM_PATH}/llvm-ar" -AS:toolchain-llvm-morello = "${LLVM_PATH}/llvm-as" -NM:toolchain-llvm-morello = "${LLVM_PATH}/llvm-nm" -OBJDUMP:toolchain-llvm-morello = "${LLVM_PATH}/llvm-objdump" -OBJCOPY:toolchain-llvm-morello = "${LLVM_PATH}/llvm-objcopy" -STRIP:toolchain-llvm-morello = "${LLVM_PATH}/llvm-strip" -STRINGS:toolchain-llvm-morello = "${LLVM_PATH}/llvm-strings" -READELF:toolchain-llvm-morello = "${LLVM_PATH}/llvm-readelf" -LD:toolchain-llvm-morello = "${LLVM_PATH}/ld.lld" -LTO:toolchain-llvm-morello = "-fuse-ld=lld" -LLVM_CONFIG:toolchain-llvm-morello = "${LLVM_PATH}/llvm-config" +CC:toolchain-llvm-morello ??= "${LLVM_PATH}/clang" +CXX:toolchain-llvm-morello ??= "${LLVM_PATH}/clang++" +CPP:toolchain-llvm-morello ??= "${LLVM_PATH}/clang -E" +CCLD:toolchain-llvm-morello ??= "${LLVM_PATH}/clang" +HOSTCC:toolchain-llvm-morello ??= "${LLVM_PATH}/clang" +RANLIB:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-ranlib" +AR:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-ar" +AS:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-as" +NM:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-nm" +OBJDUMP:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-objdump" +OBJCOPY:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-objcopy" +STRIP:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-strip" +STRINGS:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-strings" +READELF:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-readelf" +LD:toolchain-llvm-morello ??= "${LLVM_PATH}/ld.lld" +LTO:toolchain-llvm-morello ??= "-fuse-ld=lld" +LLVM_CONFIG:toolchain-llvm-morello ??= "${LLVM_PATH}/llvm-config"
export ${LLVM_CONFIG}
+CC_PURECAP_FLAGS = "--target=${GLOBAL_ARCH_TRIPLE} --sysroot ${STAGING_DIR_TARGET}${PURECAP_SYSROOT_DIR} -Wno-cheri-inefficient -march=morello+c64" +CC_PURECAP_FLAGS += "-Werror=implicit-function-declaration -Werror=format -Werror=undefined-internal -Werror=incompatible-pointer-types" + +CC:append:toolchain-llvm-morello:class-target = " ${CC_PURECAP_FLAGS}" +CXX:append:toolchain-llvm-morello:class-target = " ${CC_PURECAP_FLAGS}" + +LD_PURECAP_FLAGS = "-L${STAGING_DIR_TARGET}${PURECAP_SYSROOT_DIR}${libdir} -rtlib=compiler-rt" +LDFLAGS:append:toolchain-llvm-morello:class-target = " ${LD_PURECAP_FLAGS}" + DEPENDS:remove:toolchain-llvm-morello = "libgcc" + +RDEPENDS:${PN}:append:toolchain-llvm-morello = " musl" \ No newline at end of file
Move the variables to meta-toolchain, refactor the alias for purecap sysroot.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello-toolchain/conf/layer.conf | 15 +++++++++++++++ meta-morello/conf/machine/morello-fvp.conf | 1 - meta-morello/conf/machine/morello-soc.conf | 1 - 3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/meta-morello-toolchain/conf/layer.conf b/meta-morello-toolchain/conf/layer.conf index e40e76d..cb4c909 100644 --- a/meta-morello-toolchain/conf/layer.conf +++ b/meta-morello-toolchain/conf/layer.conf @@ -12,6 +12,21 @@ LAYERDEPENDS_meta-morello-toolchain = " \ " LAYERSERIES_COMPAT_meta-morello-toolchain = "kirkstone"
+PURECAP_SYSROOT_DIR ??= "${libdir}/${GLOBAL_ARCH_TRIPLE}" + +C64_ARCH_TRIPLE ??= "aarch64-linux-musl_purecap" +A64_ARCH_TRIPLE ??= "aarch64-linux-gnu" + +A64_LIB_TRIPLE ??= "aarch64-unknown-linux-gnu" +C64_LIB_TRIPLE ??= "aarch64-unknown-linux-musl_purecap" + +A64_ARCH_FLAGS ??= "-march=armv8" +C64_ARCH_FLAGS ??= "-march=morello+c64 -mabi=purecap" + +GLOBAL_ARCH_TRIPLE ??= "${C64_ARCH_TRIPLE}" +GLOBAL_LIB_TRIPLE ??= "${C64_LIB_TRIPLE}" +GLOBAL_ARCH_FLAGS ??= "${C64_ARCH_FLAGS}" + MORELLO_ARCH ??= "c64" TOOLCHAIN ??= "gnu" MORELLO_TOOLCHAIN ??= "gcc-morello" diff --git a/meta-morello/conf/machine/morello-fvp.conf b/meta-morello/conf/machine/morello-fvp.conf index 61f05d9..1c415f5 100644 --- a/meta-morello/conf/machine/morello-fvp.conf +++ b/meta-morello/conf/machine/morello-fvp.conf @@ -12,7 +12,6 @@ BSP_DTB_DIR ?= "${TMPDIR}/deploy/images/morello-fvp" TMPDIR = "${TOPDIR}/tmp-fvp"
MORELLO_TOOLCHAIN = "llvm-morello" -MUSL_INSTALL_DIR ?= "${libdir}/${GLOBAL_ARCH_TRIPLE}"
IMAGE_BASENAME = "usb-image"
diff --git a/meta-morello/conf/machine/morello-soc.conf b/meta-morello/conf/machine/morello-soc.conf index 5f17d43..d2d43e7 100644 --- a/meta-morello/conf/machine/morello-soc.conf +++ b/meta-morello/conf/machine/morello-soc.conf @@ -12,7 +12,6 @@ BSP_DTB_DIR ?= "${TMPDIR}/deploy/images/morello-soc" TMPDIR = "${TOPDIR}/tmp-soc"
MORELLO_TOOLCHAIN = "llvm-morello" -MUSL_INSTALL_DIR ?= "${libdir}/${GLOBAL_ARCH_TRIPLE}"
IMAGE_BASENAME = "usb-image"
Remove the default toolchain flags from tfa.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../trusted-firmware-a/trusted-firmware-a_morello-2.7.bb | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb index f16f12a..c41c1c1 100644 --- a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb +++ b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb @@ -35,6 +35,10 @@ TFA_DEBUG = "0"
ARM_TF_ARCH = "aarch64"
+CC:remove = "${CC_PURECAP_FLAGS}" +CXX:remove = "${CC_PURECAP_FLAGS}" +LDFLAGS:remove = "${LD_PURECAP_FLAGS}" + EXTRA_OEMAKE += "\ CREATE_KEYS=1 \ GENERATE_COT=1 \
Remove the default toolchain flags for edk2.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb index 855ffcb..bd8ec2f 100644 --- a/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb +++ b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb @@ -45,6 +45,10 @@ export PACKAGES_PATH = "${S}:${S}/edk2-platforms:${WORKDIR}/edk2-non-os export CC_PATH = "${LLVM_PATH}/clang" export LLVM_PATH_35 = "${LLVM_PATH}"
+CC:remove = "${CC_PURECAP_FLAGS}" +CXX:remove = "${CC_PURECAP_FLAGS}" +LDFLAGS:remove = "${LD_PURECAP_FLAGS}" + do_deploy[noexec] = "1"
do_install() {
Use latest musl version. Remove default toolchain flags. Refactor the install location.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-core/musl/musl-morello-common.inc | 13 +++++++--- .../recipes-core/musl/musl-morello-target.inc | 25 ++++++++++--------- ...usl_morello-1.5.bb => musl_morello-1.6.bb} | 0 3 files changed, 22 insertions(+), 16 deletions(-) rename meta-morello-toolchain/recipes-core/musl/{musl_morello-1.5.bb => musl_morello-1.6.bb} (100%)
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 cd2190a..eb6a0a8 100644 --- a/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-common.inc @@ -4,7 +4,8 @@ LICENSE = "MIT"
FILESEXTRAPATHS:prepend := "${THISDIR}:"
-DEPENDS:remove:toolchain-llvm-morello = "virtual/musl-morello" +DEPENDS:remove:toolchain-llvm-morello = "virtual/musl-morello" +RDEPENDS:${PN}:remove:toolchain-llvm-morello = "musl"
SUMMARY = "CHERI enabled musl libc" SRC_URI = " \ @@ -12,8 +13,8 @@ SRC_URI = " \ file://files/compiler_rt.cmake \ "
-# morello-release-1.5.0 -SRCREV = "df8f6409fb58efe35a3300b91a1f1941e2f89022" +# morello-release-1.6.0 +SRCREV = "3216cb79d3b198e30a13f4b5778a4e235ad58d31" SRCBRANCH = "morello/master"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68" @@ -21,12 +22,16 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68" S = "${WORKDIR}/git" B = "${WORKDIR}/build"
-TARGET_INSTALL_DIR = "${D}${MUSL_INSTALL_DIR}" +TARGET_INSTALL_DIR = "${D}${PURECAP_SYSROOT_DIR}"
INHIBIT_SYSROOT_STRIP = "1" INHIBIT_PACKAGE_STRIP = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+CC:remove = "${CC_PURECAP_FLAGS}" +CXX:remove = "${CC_PURECAP_FLAGS}" +LDFLAGS:remove = "${LD_PURECAP_FLAGS}" + CONFIGUREOPTS = " \ --prefix=${prefix} \ --exec-prefix=${exec_prefix} \ diff --git a/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc b/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc index 9f34ee9..4ce69d8 100644 --- a/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc +++ b/meta-morello-toolchain/recipes-core/musl/musl-morello-target.inc @@ -6,23 +6,24 @@ TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
MUSL_LDSO_ARCH = "aarch64_purecap"
-FILES:${PN} = "${MUSL_INSTALL_DIR}" -FILES:${PN} += "${MUSL_INSTALL_DIR}${datadir} ${MUSL_INSTALL_DIR}${bindir} ${MUSL_INSTALL_DIR}${libdir}" -FILES:${PN} += "${MUSL_INSTALL_DIR}${includedir} ${MUSL_INSTALL_DIR}${includedir}/sys \ - ${MUSL_INSTALL_DIR}${includedir}/arpa ${MUSL_INSTALL_DIR}${includedir}/bits \ - ${MUSL_INSTALL_DIR}${includedir}/net ${MUSL_INSTALL_DIR}${includedir}/netinet \ - ${MUSL_INSTALL_DIR}${includedir}/netpacket ${MUSL_INSTALL_DIR}${includedir}/arpa \ - ${MUSL_INSTALL_DIR}${includedir}/scsi ${MUSL_INSTALL_DIR}${includedir}/sys" +FILES:${PN} = "${PURECAP_SYSROOT_DIR}" + +FILES:${PN} += "${PURECAP_SYSROOT_DIR}${datadir} ${PURECAP_SYSROOT_DIR}${bindir} ${PURECAP_SYSROOT_DIR}${libdir}" +FILES:${PN} += "${PURECAP_SYSROOT_DIR}${includedir} ${PURECAP_SYSROOT_DIR}${includedir}/sys \ + ${PURECAP_SYSROOT_DIR}${includedir}/arpa ${PURECAP_SYSROOT_DIR}${includedir}/bits \ + ${PURECAP_SYSROOT_DIR}${includedir}/net ${PURECAP_SYSROOT_DIR}${includedir}/netinet \ + ${PURECAP_SYSROOT_DIR}${includedir}/netpacket ${PURECAP_SYSROOT_DIR}${includedir}/arpa \ + ${PURECAP_SYSROOT_DIR}${includedir}/scsi ${PURECAP_SYSROOT_DIR}${includedir}/sys"
FILES:${PN} += "${nonarch_base_libdir}/ld-musl-${MUSL_LDSO_ARCH}.so.1 ${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path"
-FILES:${PN}-staticdev = "${MUSL_INSTALL_DIR}${libdir}/libc.a" -FILES:${PN}-dev =+ "${MUSL_INSTALL_DIR}${libdir}/libcrypt.a ${MUSL_INSTALL_DIR}${libdir}/libdl.a ${MUSL_INSTALL_DIR}${libdir}/libm.a \ - ${MUSL_INSTALL_DIR}${libdir}/libpthread.a ${MUSL_INSTALL_DIR}${libdir}/libresolv.a \ - ${MUSL_INSTALL_DIR}${libdir}/librt.a ${MUSL_INSTALL_DIR}${libdir}/libutil.a ${MUSL_INSTALL_DIR}${libdir}/libxnet.a \ +FILES:${PN}-staticdev = "${PURECAP_SYSROOT_DIR}${libdir}/libc.a" +FILES:${PN}-dev =+ "${PURECAP_SYSROOT_DIR}${libdir}/libcrypt.a ${PURECAP_SYSROOT_DIR}${libdir}/libdl.a ${PURECAP_SYSROOT_DIR}${libdir}/libm.a \ + ${PURECAP_SYSROOT_DIR}${libdir}/libpthread.a ${PURECAP_SYSROOT_DIR}${libdir}/libresolv.a \ + ${PURECAP_SYSROOT_DIR}${libdir}/librt.a ${PURECAP_SYSROOT_DIR}${libdir}/libutil.a ${PURECAP_SYSROOT_DIR}${libdir}/libxnet.a \ "
-SYSROOT_DIRS += "${sysconfdir} ${MUSL_INSTALL_DIR}${includedir}" +SYSROOT_DIRS += "${sysconfdir} ${PURECAP_SYSROOT_DIR}${includedir}"
do_install() {
diff --git a/meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb b/meta-morello-toolchain/recipes-core/musl/musl_morello-1.6.bb similarity index 100% rename from meta-morello-toolchain/recipes-core/musl/musl_morello-1.5.bb rename to meta-morello-toolchain/recipes-core/musl/musl_morello-1.6.bb
Remove the default toolchain flags.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-devtools/llvm/llvm-morello-runtime-native.bb | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb index a1c27e3..7202ae4 100644 --- a/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb +++ b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello-runtime-native.bb @@ -13,6 +13,8 @@ B_COMPILERRT = "${WORKDIR}/build_compiler_rt" S_CRT = "${LLVM_SHARED_SOURCE}/compiler-rt/lib/crt" S_COMPILER_RT = "${LLVM_SHARED_SOURCE}/compiler-rt"
+RDEPENDS:${PN}:remove:toolchain-llvm-morello = " musl" + do_install[depends] += "llvm-morello-native:do_symlink"
FILES:${PN} += "$(${CC} -print-resource-dir)/lib/${LIB_TRIPLE}" @@ -35,6 +37,10 @@ BUILD_LD = "${LLVM_PATH}/ld.lld" BUILD_LTO = "-fuse-ld=lld" BUILD_HOSTCC = "${LLVM_PATH}/clang"
+CC:remove = "${CC_PURECAP_FLAGS}" +CXX:remove = "${CC_PURECAP_FLAGS}" +LDFLAGS:remove = "${LD_PURECAP_FLAGS}" + do_install() {
export CFLAGS=""
Use the latest version. Install headers to purecap sysroot, most libraries will expect it there anyway.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-kernel/linux/linux-morello.inc | 12 +++++++++--- ...o_morello-1.5.bb => linux-morello_morello-1.6.bb} | 5 +++-- 2 files changed, 12 insertions(+), 5 deletions(-) rename meta-morello/recipes-kernel/linux/{linux-morello_morello-1.5.bb => linux-morello_morello-1.6.bb} (60%)
diff --git a/meta-morello/recipes-kernel/linux/linux-morello.inc b/meta-morello/recipes-kernel/linux/linux-morello.inc index eb1255d..2821579 100644 --- a/meta-morello/recipes-kernel/linux/linux-morello.inc +++ b/meta-morello/recipes-kernel/linux/linux-morello.inc @@ -13,10 +13,11 @@ FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/${PN}:" DEPENDS += "rsync-native" PROVIDES += "virtual/${OUTPUTS_NAME}"
-DEPENDS:remove:toolchain-llvm-morello = "virtual/musl-morello" +DEPENDS:remove:toolchain-llvm-morello = "virtual/musl-morello" +RDEPENDS:${PN}:remove:toolchain-llvm-morello = " musl"
SRC_URI = " \ - git://git.morello-project.org/morello/kernel/linux;protocol=https;nobranch=1 \ + git://git.morello-project.org/morello/kernel/linux;protocol=https;branch=${SRCBRANCH} \ "
PV = "${LINUX_VERSION}+git${SRCPV}" @@ -41,10 +42,15 @@ KBUILD_DEFCONFIG = "morello_transitional_pcuabi_defconfig" do_kernel_configcheck[noexec] = "1" do_kernel_configme[depends] += "llvm-morello-native:do_populate_sysroot"
+FILES:${KERNEL_PACKAGE_NAME} += "${PURECAP_SYSROOT_DIR}${includedir}" + +SYSROOT_DIRS += "${PURECAP_SYSROOT_DIR}${includedir}" + do_configure:prepend(){ rm -f ${B}/.config }
do_install:append() { - oe_runmake headers_install ARCH=arm64 INSTALL_HDR_PATH=${STAGING_KERNEL_BUILDDIR}/kernel-headers + install -d ${D}${PURECAP_SYSROOT_DIR}${prefix} + oe_runmake headers_install ARCH=arm64 INSTALL_HDR_PATH=${D}${PURECAP_SYSROOT_DIR}${prefix} } diff --git a/meta-morello/recipes-kernel/linux/linux-morello_morello-1.5.bb b/meta-morello/recipes-kernel/linux/linux-morello_morello-1.6.bb similarity index 60% rename from meta-morello/recipes-kernel/linux/linux-morello_morello-1.5.bb rename to meta-morello/recipes-kernel/linux/linux-morello_morello-1.6.bb index 169776b..a514274 100644 --- a/meta-morello/recipes-kernel/linux/linux-morello_morello-1.5.bb +++ b/meta-morello/recipes-kernel/linux/linux-morello_morello-1.6.bb @@ -2,9 +2,10 @@ require linux-morello.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
-SRCREV = "87d06928f90fe910311210a0149d03f3420f593c" +SRCREV = "c4b74f2e4712d38f2ea9d5b924f52e38c6faa446" +SRCBRANCH = "morello/master"
-LINUX_VERSION = "5.18" +LINUX_VERSION = "6.1" LINUX_VERSION_EXTENSION= "-yocto-purecap"
COMPATIBLE_MACHINE = "morello"
Use this class to require the purecap kheaders. Not ideal but will have to do for now.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/classes/pure-cap-kheaders.bbclass | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 meta-morello/classes/pure-cap-kheaders.bbclass
diff --git a/meta-morello/classes/pure-cap-kheaders.bbclass b/meta-morello/classes/pure-cap-kheaders.bbclass new file mode 100644 index 0000000..552c7a2 --- /dev/null +++ b/meta-morello/classes/pure-cap-kheaders.bbclass @@ -0,0 +1,2 @@ +DEPENDS += "virtual/kernel" +do_configure[depends] = "virtual/kernel:do_install" \ No newline at end of file
Use the latest version of LLVM.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello-toolchain/recipes-devtools/llvm/llvm-morello.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello.inc b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello.inc index 580427e..8ea07e6 100644 --- a/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello.inc +++ b/meta-morello-toolchain/recipes-devtools/llvm/llvm-morello.inc @@ -8,9 +8,9 @@ OUTPUTS_NAME = "llvm-morello" DEPENDS = "zlib-native ninja-native ${COMPILER}-native"
SRC_URI = "git://git.morello-project.org/morello/llvm-project;protocol=https;branch=${SRCBRANCH}" -SRCREV = "cac045cbb70a9c8161f2f32fa5ef056242eb28f3" +SRCREV = "18d3bd9b9c53cf1a5334e5b91d56a8a7ce8a222a"
-SRCBRANCH = "morello/release-1.5" +SRCBRANCH = "morello/release-1.6" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
S = "${WORKDIR}/git/llvm"
Use the new sysroot location.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/classes/pure-cap-application.bbclass | 2 +- meta-morello/recipes-morello-apps/applications/pure-cap-app.bb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/meta-morello/classes/pure-cap-application.bbclass b/meta-morello/classes/pure-cap-application.bbclass index 4454173..fda1929 100644 --- a/meta-morello/classes/pure-cap-application.bbclass +++ b/meta-morello/classes/pure-cap-application.bbclass @@ -2,7 +2,7 @@ OUTPUTS_NAME ?= "pure-cap-app-default-name"
FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/${PN}:"
-MUSL_HOME = "${STAGING_DIR_TARGET}${MUSL_INSTALL_DIR}" +MUSL_HOME = "${STAGING_DIR_TARGET}${PURECAP_SYSROOT_DIR}"
INHIBIT_SYSROOT_STRIP = "1" INHIBIT_PACKAGE_STRIP = "1" 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 f7edde0..c741619 100644 --- a/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb +++ b/meta-morello/recipes-morello-apps/applications/pure-cap-app.bb @@ -10,7 +10,6 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ec TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
PROVIDES = "${OUTPUTS_NAME}" -RDEPENDS:${PN} += "musl" RPROVIDES:${PN} += "${OUTPUTS_NAME}"
FILES:${PN} += "/${APP_DIR}"
Use the new kheaders location, install to purecap sysroot.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-core/busybox/busybox-morello.inc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/meta-morello/recipes-core/busybox/busybox-morello.inc b/meta-morello/recipes-core/busybox/busybox-morello.inc index c70f8eb..116a12c 100644 --- a/meta-morello/recipes-core/busybox/busybox-morello.inc +++ b/meta-morello/recipes-core/busybox/busybox-morello.inc @@ -1,4 +1,4 @@ - +inherit pure-cap-kheaders
COMPATIBLE_MACHINE = "morello" SUMMARY = "CHERI enabled busybox" @@ -9,7 +9,6 @@ TOOLCHAIN = "${MORELLO_TOOLCHAIN}"
FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/${PN}:"
-DEPENDS += "virtual/kernel virtual/musl-morello" PROVIDES += "virtual/morello-busybox"
RPROVIDES:${PN} += "busybox-morello" @@ -22,14 +21,12 @@ SRC_URI = " \ PV = "git${SRCPV}" S = "${WORKDIR}/git"
-do_compile[depends] = "virtual/kernel:do_install" - EXTRA_OEMAKE = "\ - MUSL_HOME='${STAGING_DIR_TARGET}${MUSL_INSTALL_DIR}${prefix}' \ - KHEADERS='${STAGING_KERNEL_BUILDDIR}/kernel-headers/include/' \ + MUSL_HOME='${STAGING_DIR_TARGET}${PURECAP_SYSROOT_DIR}${prefix}' \ + KHEADERS='${STAGING_DIR_TARGET}${PURECAP_SYSROOT_DIR}${includedir}' \ "
-FILES:${PN} += "/busybox-morello/busybox" +FILES:${PN} += "/busybox-morello/busybox ${PURECAP_SYSROOT_DIR}/bin" SYSROOT_DIRS += "/busybox-morello"
INHIBIT_SYSROOT_STRIP = "1" @@ -49,6 +46,7 @@ do_compile() { }
do_install() { - install -d ${D}/busybox-morello + install -d ${D}/busybox-morello ${D}${PURECAP_SYSROOT_DIR}/bin install -m 0755 ${S}/busybox ${D}/busybox-morello/busybox + install -m 0755 ${S}/busybox ${D}${PURECAP_SYSROOT_DIR}/bin }
Use the latest scp version.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb index cbb8ec4..f0faeae 100644 --- a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb +++ b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb @@ -27,10 +27,10 @@ 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" +SRCREV = "6a5a79a4e51178483530f7161b1583a75029635e" PV = "morello-2.10.0+git${SRCPV}"
-SRCBRANCH = "morello/master" +SRCBRANCH = "morello/release-1.6"
SCP_BUILD_RELEASE ?= "1" SCP_COMPILER ?= "arm-none-eabi"
Use the latest tfa version.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../trusted-firmware-a/trusted-firmware-a_morello-2.7.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb index c41c1c1..8b45929 100644 --- a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb +++ b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb @@ -16,9 +16,9 @@ require ${MACHINE_TFA_REQUIRE} PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = "gitsm://git.morello-project.org/morello/trusted-firmware-a;protocol=https;name=tfa;branch=${SRCBRANCH}" -SRCREV_tfa = "3ce2815936774fe924ec7538151b71085c2f18d9" +SRCREV_tfa = "67b92446415f3532445b8a851e5adc18d0d1bf0f"
-SRCBRANCH = "morello/master" +SRCBRANCH = "morello/release-1.6" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"
TFA_MBEDTLS = "1"
Use the latest tfa repo version.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-devtools/fiptool/fiptool-native_2.7.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta-morello/recipes-devtools/fiptool/fiptool-native_2.7.bb b/meta-morello/recipes-devtools/fiptool/fiptool-native_2.7.bb index 9c21c7a..d6bce92 100644 --- a/meta-morello/recipes-devtools/fiptool/fiptool-native_2.7.bb +++ b/meta-morello/recipes-devtools/fiptool/fiptool-native_2.7.bb @@ -7,8 +7,8 @@ DEPENDS += "openssl-native" PROVIDES = "virtual/fiptool-native"
SRC_URI = "gitsm://git.morello-project.org/morello/trusted-firmware-a;protocol=https;branch=${SRCBRANCH}" -SRCBRANCH = "morello/master" -SRCREV = "3ce2815936774fe924ec7538151b71085c2f18d9" +SRCBRANCH = "morello/release-1.6" +SRCREV = "67b92446415f3532445b8a851e5adc18d0d1bf0f"
LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"
Follow what was done here [1] [2]
[1] https://git.morello-project.org/morello/build-scripts/-/commit/6836a3245a798... [2] https://git.morello-project.org/morello/trusted-firmware-a/-/commit/d2f8480a...
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb | 1 + 1 file changed, 1 insertion(+)
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 7a09568..227f095 100644 --- a/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb +++ b/meta-morello/recipes-bsp/board-firmware/board-firmware-image.bb @@ -30,6 +30,7 @@ FIP_OPTIONS = "\ --soc-fw '${FIRMWARE_PATH}/bl31.bin' \ --nt-fw '${FIRMWARE_PATH}/uefi.bin' \ --fw-config '${FIRMWARE_PATH}/morello_fw_config.dtb' \ + --hw-config '${FIRMWARE_PATH}/morello-${TARGET_PLATFORM}.dtb' \ --tb-fw-config '${FIRMWARE_PATH}/morello_tb_fw_config.dtb' \ --nt-fw-config '${FIRMWARE_PATH}/morello_nt_fw_config.dtb' \ --trusted-key-cert '${FIRMWARE_PATH}/tfa_certs/trusted_key.crt' \
Use the latest edk2 version.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb index bd8ec2f..3f421b6 100644 --- a/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb +++ b/meta-morello/recipes-bsp/uefi/edk2-firmware_morello-2.4.bb @@ -24,12 +24,12 @@ SRC_URI = "\ file://files/0001-Basetools-remove-brotli-build-errors.patch \ "
-EDK2_SRC_URI = "gitsm://git.morello-project.org/morello/edk2;branch=morello/master;protocol=https" -EDK2_PLATFORMS_SRC_URI = "gitsm://git.morello-project.org/morello/edk2-platforms;branch=morello/master;protocol=https" +EDK2_SRC_URI = "gitsm://git.morello-project.org/morello/edk2;branch=morello/release-1.6;protocol=https" +EDK2_PLATFORMS_SRC_URI = "gitsm://git.morello-project.org/morello/edk2-platforms;branch=morello/release-1.6;protocol=https" EDK2_NON_OSI_SRC_URI = "git://github.com/tianocore/edk2-non-osi;branch=master;protocol=https" SRCREV_edk2-non-osi = "0320db977fb27e63424b0953a3020bb81c89e8f0" SRCREV_edk2 = "ce510c33dfc354e262ccd71619add069876d6a08" -SRCREV_edk2-platforms = "6bae2381d664e668875720e7eb86f751cb1de373" +SRCREV_edk2-platforms = "a5e30111ce700fbd71415bc3b22bbe2561fe5c58"
EDK2_BUILD_RELEASE = "0"
Use 1.6 versions of the software stack. Remove duplicate variables that live now in meta-morello-toolchain.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- .../conf/machine/include/morello-common.inc | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/meta-morello/conf/machine/include/morello-common.inc b/meta-morello/conf/machine/include/morello-common.inc index 1c29774..8cc7992 100644 --- a/meta-morello/conf/machine/include/morello-common.inc +++ b/meta-morello/conf/machine/include/morello-common.inc @@ -9,28 +9,14 @@ 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 = "morello-1.5" +PREFERRED_VERSION_virtual/kernel = "morello-1.6"
-PREFERRED_VERSION_musl = "morello-1.5" +PREFERRED_VERSION_musl = "morello-1.6"
GDBVERSION = "morello-11.0"
-MUSL_INSTALL_DIR ??="" MORELLO_TOOLCHAIN ??= "llvm-morello"
-C64_ARCH_TRIPLE = "aarch64-linux-musl_purecap" -A64_ARCH_TRIPLE = "aarch64-linux-gnu" - -A64_LIB_TRIPLE = "aarch64-unknown-linux-gnu" -C64_LIB_TRIPLE = "aarch64-unknown-linux-musl_purecap" - -A64_ARCH_FLAGS = "-march=armv8" -C64_ARCH_FLAGS = "-march=morello+c64 -mabi=purecap" - -GLOBAL_ARCH_TRIPLE ?= "${C64_ARCH_TRIPLE}" -GLOBAL_LIB_TRIPLE ?= "${C64_LIB_TRIPLE}" -GLOBAL_ARCH_FLAGS ?= "${C64_ARCH_FLAGS}" - APP_DIR ?= "pure-cap-apps"
KERNEL_IMAGETYPE = "Image"
linux-morello-distros@op-lists.linaro.org