Working off the kirkstone branch of https://github.com/The-Good-Penguin/meta-morello, I did some cleanups and was able to add gitlab CI support. You can see it in action at https://gitlab.com/jonmason00/meta-morello/-/pipelines/773799653
Many other cleanups are needed, but I was only trying to get Gitlab CI working.
I see there is a Arm ecosystem FVP for Morello at https://developer.arm.com/downloads/-/arm-ecosystem-fvps If FVP support is enabled, it is possible to run testimage as part of CI. You can see that being done on meta-arm for corstone500, corstone1000-fvp, fvp-base, fvp-base-arm32, and fvp-baser-aemv8r64.
Let me know if there are any questions.
Thanks, Jon
Jon Mason (6): conf/machine: Remove MORELLO_RELEASE_VERSION musl-morello: Remove unused file Change SRVTAG to SRVREV kas: Changes necessary to compile the existing system images board-firmware: Fix LICENSE warning CI: add Gitlab CI support
.gitlab-ci.yml | 78 +++++++++++++++++++ ci/check-warnings | 19 +++++ ci/jobs-to-kas | 16 ++++ ci/logging.yml | 13 ++++ ci/update-repos | 40 ++++++++++ conf/machine/include/morello-1.5.inc | 1 - conf/machine/include/morello-common.inc | 6 +- conf/machine/morello-linux-glibc.conf | 1 - conf/machine/morello-linux-musl.conf | 5 +- kas/base.yml | 47 +++++------ .../board-firmware/board-firmware_1.4.bb | 6 +- recipes-core/busybox/busybox-morello.inc | 4 +- ...-morello-1.5.bb => busybox-morello_1.5.bb} | 2 +- recipes-core/musl/musl-morello-1.5.inc | 4 - recipes-core/musl/musl-morello-common.inc | 12 +-- .../gen-init-cpio/gen-init-cpio-native.bb | 6 +- recipes-kernel/linux/linux-morello.inc | 4 +- ...ux-morello-1.5.bb => linux-morello_1.5.bb} | 6 +- .../images/morello-linux-image-musl.bb | 4 +- 19 files changed, 220 insertions(+), 54 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100755 ci/check-warnings create mode 100755 ci/jobs-to-kas create mode 100644 ci/logging.yml create mode 100755 ci/update-repos delete mode 100644 conf/machine/include/morello-1.5.inc rename recipes-core/busybox/{busybox-morello-1.5.bb => busybox-morello_1.5.bb} (79%) delete mode 100644 recipes-core/musl/musl-morello-1.5.inc rename recipes-kernel/linux/{linux-morello-1.5.bb => linux-morello_1.5.bb} (57%)
MORELLO_RELEASE_VERSION is not used in the SRCTAG or anywhere else where modifying this variable would've provided easy upgrades. Remove it to prevent any future problems.
Signed-off-by: Jon Mason jon.mason@arm.com --- conf/machine/include/morello-1.5.inc | 1 - conf/machine/include/morello-common.inc | 1 - conf/machine/morello-linux-glibc.conf | 1 - conf/machine/morello-linux-musl.conf | 1 - recipes-core/musl/musl-morello-common.inc | 2 -- 5 files changed, 6 deletions(-) delete mode 100644 conf/machine/include/morello-1.5.inc
diff --git a/conf/machine/include/morello-1.5.inc b/conf/machine/include/morello-1.5.inc deleted file mode 100644 index ba380330b904..000000000000 --- a/conf/machine/include/morello-1.5.inc +++ /dev/null @@ -1 +0,0 @@ -MORELLO_RELEASE_VERSION = "1.5" \ No newline at end of file diff --git a/conf/machine/include/morello-common.inc b/conf/machine/include/morello-common.inc index 31601a40ff8a..cea499653c3c 100644 --- a/conf/machine/include/morello-common.inc +++ b/conf/machine/include/morello-common.inc @@ -1,5 +1,4 @@ require ${COREBASE}/meta/conf/machine/include/arm/armv8-2a/tune-neoversen1.inc -require conf/machine/include/morello-1.5.inc
MACHINEOVERRIDES =. "morello"
diff --git a/conf/machine/morello-linux-glibc.conf b/conf/machine/morello-linux-glibc.conf index 83e09eff2414..3ffd19fd8273 100644 --- a/conf/machine/morello-linux-glibc.conf +++ b/conf/machine/morello-linux-glibc.conf @@ -2,7 +2,6 @@ require conf/machine/include/morello-common.inc
MACHINEOVERRIDES =. "morello-linux-glibc:"
-PREFERRED_PROVIDER_virtual/kernel = "linux-morello-${MORELLO_RELEASE_VERSION}" PREFFERED_PROVIDER_morello-linux-image = "morello-linux-image-glibc" PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-glibc"
diff --git a/conf/machine/morello-linux-musl.conf b/conf/machine/morello-linux-musl.conf index c059775d0f73..c030a358f8d7 100644 --- a/conf/machine/morello-linux-musl.conf +++ b/conf/machine/morello-linux-musl.conf @@ -4,7 +4,6 @@ MACHINEOVERRIDES =. "morello-linux-musl:"
TARGET_OS ?= "linux-musl"
-PREFERRED_PROVIDER_virtual/kernel = "linux-morello-${MORELLO_RELEASE_VERSION}" PREFFERED_PROVIDER_morello-linux-image = "morello-linux-image-musl" PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-musl"
diff --git a/recipes-core/musl/musl-morello-common.inc b/recipes-core/musl/musl-morello-common.inc index f296e087b914..158331c6f980 100644 --- a/recipes-core/musl/musl-morello-common.inc +++ b/recipes-core/musl/musl-morello-common.inc @@ -1,5 +1,3 @@ -require musl-morello-${MORELLO_RELEASE_VERSION}.inc - DESCRIPTION = "CHERI enabled musl libc" OUTPUTS_NAME = "libc" LICENSE = "MIT"
Initially the idea was to make sure that the Linux kernel and musl are soruced from the same ARM release, but it was never actually used to toggle the versions. Now meta-morello will have its own release branches and this variable becomes irrelevant.
Pawel
On Fri, 10 Feb 2023 at 11:53, Jon Mason jdmason@kudzu.us wrote:
MORELLO_RELEASE_VERSION is not used in the SRCTAG or anywhere else where modifying this variable would've provided easy upgrades. Remove it to prevent any future problems.
Signed-off-by: Jon Mason jon.mason@arm.com
conf/machine/include/morello-1.5.inc | 1 - conf/machine/include/morello-common.inc | 1 - conf/machine/morello-linux-glibc.conf | 1 - conf/machine/morello-linux-musl.conf | 1 - recipes-core/musl/musl-morello-common.inc | 2 -- 5 files changed, 6 deletions(-) delete mode 100644 conf/machine/include/morello-1.5.inc
diff --git a/conf/machine/include/morello-1.5.inc b/conf/machine/include/morello-1.5.inc deleted file mode 100644 index ba380330b904..000000000000 --- a/conf/machine/include/morello-1.5.inc +++ /dev/null @@ -1 +0,0 @@ -MORELLO_RELEASE_VERSION = "1.5" \ No newline at end of file diff --git a/conf/machine/include/morello-common.inc b/conf/machine/include/morello-common.inc index 31601a40ff8a..cea499653c3c 100644 --- a/conf/machine/include/morello-common.inc +++ b/conf/machine/include/morello-common.inc @@ -1,5 +1,4 @@ require ${COREBASE}/meta/conf/machine/include/arm/armv8-2a/tune-neoversen1.inc -require conf/machine/include/morello-1.5.inc
MACHINEOVERRIDES =. "morello"
diff --git a/conf/machine/morello-linux-glibc.conf b/conf/machine/morello-linux-glibc.conf index 83e09eff2414..3ffd19fd8273 100644 --- a/conf/machine/morello-linux-glibc.conf +++ b/conf/machine/morello-linux-glibc.conf @@ -2,7 +2,6 @@ require conf/machine/include/morello-common.inc
MACHINEOVERRIDES =. "morello-linux-glibc:"
-PREFERRED_PROVIDER_virtual/kernel = "linux-morello-${MORELLO_RELEASE_VERSION}" PREFFERED_PROVIDER_morello-linux-image = "morello-linux-image-glibc" PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-glibc"
diff --git a/conf/machine/morello-linux-musl.conf b/conf/machine/morello-linux-musl.conf index c059775d0f73..c030a358f8d7 100644 --- a/conf/machine/morello-linux-musl.conf +++ b/conf/machine/morello-linux-musl.conf @@ -4,7 +4,6 @@ MACHINEOVERRIDES =. "morello-linux-musl:"
TARGET_OS ?= "linux-musl"
-PREFERRED_PROVIDER_virtual/kernel = "linux-morello-${MORELLO_RELEASE_VERSION}" PREFFERED_PROVIDER_morello-linux-image = "morello-linux-image-musl" PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-musl"
diff --git a/recipes-core/musl/musl-morello-common.inc b/recipes-core/musl/musl-morello-common.inc index f296e087b914..158331c6f980 100644 --- a/recipes-core/musl/musl-morello-common.inc +++ b/recipes-core/musl/musl-morello-common.inc @@ -1,5 +1,3 @@ -require musl-morello-${MORELLO_RELEASE_VERSION}.inc
DESCRIPTION = "CHERI enabled musl libc" OUTPUTS_NAME = "libc" LICENSE = "MIT" -- 2.30.2
linux-morello-distros mailing list -- linux-morello-distros@op-lists.linaro.org To unsubscribe send an email to linux-morello-distros-leave@op-lists.linaro.org
musl-morello-1.5.inc is not referenced anywhere but contains the branch and srcrev. Remove this file and transfer the data to musl-morello-common.inc, which appears to be used by musl-morello-a64.inc and musl-morello-c64.inc
Signed-off-by: Jon Mason jon.mason@arm.com --- recipes-core/musl/musl-morello-1.5.inc | 4 ---- recipes-core/musl/musl-morello-common.inc | 10 +++++++--- 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 recipes-core/musl/musl-morello-1.5.inc
diff --git a/recipes-core/musl/musl-morello-1.5.inc b/recipes-core/musl/musl-morello-1.5.inc deleted file mode 100644 index 750120da99ce..000000000000 --- a/recipes-core/musl/musl-morello-1.5.inc +++ /dev/null @@ -1,4 +0,0 @@ -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68" - -SRCBRANCH = "morello/master" -SRCTAG = "morello-release-1.5.0" \ No newline at end of file diff --git a/recipes-core/musl/musl-morello-common.inc b/recipes-core/musl/musl-morello-common.inc index 158331c6f980..c0ada533a6da 100644 --- a/recipes-core/musl/musl-morello-common.inc +++ b/recipes-core/musl/musl-morello-common.inc @@ -6,11 +6,15 @@ FILESEXTRAPATHS:prepend := "${THISDIR}:"
SUMMARY = "CHERI enabled musl libc" SRC_URI = " \ - git://git.morello-project.org/morello/musl-libc;protocol=https;tag=${SRCTAG};branch=${SRCBRANCH} \ + git://git.morello-project.org/morello/musl-libc;protocol=https;branch=${SRCBRANCH} \ file://files/compiler_rt.cmake \ "
-SRCREV ="" +# morello-release-1.5.0 +SRCREV = "df8f6409fb58efe35a3300b91a1f1941e2f89022" +SRCBRANCH = "morello/master" + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=b03f1cc25363d094011f8f4fd8bcfb68"
PV = "git${SRCPV}" S = "${WORKDIR}/git" @@ -60,4 +64,4 @@ do_configure() { do_compile() { export CFLAGS="" oe_runmake -} \ No newline at end of file +}
Remove SRVTAG and use SRCREV to match standard Yocto practice. Also, rename files with version to have the versions separated to allow for versionless bbappends to be used.
Signed-off-by: Jon Mason jon.mason@arm.com --- conf/machine/include/morello-common.inc | 5 ++++- recipes-core/busybox/busybox-morello.inc | 4 ++-- .../{busybox-morello-1.5.bb => busybox-morello_1.5.bb} | 2 +- recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb | 6 +++--- recipes-kernel/linux/linux-morello.inc | 4 ++-- .../linux/{linux-morello-1.5.bb => linux-morello_1.5.bb} | 6 ++++-- 6 files changed, 16 insertions(+), 11 deletions(-) rename recipes-core/busybox/{busybox-morello-1.5.bb => busybox-morello_1.5.bb} (79%) rename recipes-kernel/linux/{linux-morello-1.5.bb => linux-morello_1.5.bb} (57%)
diff --git a/conf/machine/include/morello-common.inc b/conf/machine/include/morello-common.inc index cea499653c3c..84af1345cd95 100644 --- a/conf/machine/include/morello-common.inc +++ b/conf/machine/include/morello-common.inc @@ -2,6 +2,9 @@ require ${COREBASE}/meta/conf/machine/include/arm/armv8-2a/tune-neoversen1.inc
MACHINEOVERRIDES =. "morello"
+PREFERRED_PROVIDER_virtual/kernel = "linux-morello" +PREFERRED_VERSION_virtual/kernel = "1.5" + LLVM_SHARED_SOURCE ?= "${TMPDIR}/work-shared/${MACHINE}/llvm-morello-source"
MUSL_INSTALL_DIR ??="" @@ -23,4 +26,4 @@ GLOBAL_ARCH_FLAGS ?= "${C64_ARCH_FLAGS}" TMPDIR_BSP = "tmp-bsp" TMPDIR_LINUX = "tmp-linux"
-APP_DIR ?= "pure-cap-apps" \ No newline at end of file +APP_DIR ?= "pure-cap-apps" diff --git a/recipes-core/busybox/busybox-morello.inc b/recipes-core/busybox/busybox-morello.inc index 695321356432..7c5fd9d4a144 100644 --- a/recipes-core/busybox/busybox-morello.inc +++ b/recipes-core/busybox/busybox-morello.inc @@ -13,7 +13,7 @@ PROVIDES += "virtual/morello-busybox" RPROVIDES:${PN} += "busybox-morello"
SRC_URI = " \ - git://git.morello-project.org/morello/morello-busybox;protocol=https;tag=${SRCTAG};branch=${SRCBRANCH} \ + git://git.morello-project.org/morello/morello-busybox;protocol=https;branch=${SRCBRANCH} \ file://files/0001-Remove-elf-patch-append-toolchain-with-relative-path.patch \ "
@@ -49,4 +49,4 @@ do_compile() { do_install() { install -d ${D}/busybox install -m 0755 ${S}/busybox ${D}/busybox/busybox -} \ No newline at end of file +} diff --git a/recipes-core/busybox/busybox-morello-1.5.bb b/recipes-core/busybox/busybox-morello_1.5.bb similarity index 79% rename from recipes-core/busybox/busybox-morello-1.5.bb rename to recipes-core/busybox/busybox-morello_1.5.bb index 46411b6a1d2c..0fdc60ce58dc 100644 --- a/recipes-core/busybox/busybox-morello-1.5.bb +++ b/recipes-core/busybox/busybox-morello_1.5.bb @@ -4,4 +4,4 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=de10de48642ab74318e893a61105afbb \ file://archival/libarchive/bz/LICENSE;md5=28e3301eae987e8cfe19988e98383dae"
SRCBRANCH = "morello/master" -SRCTAG = "morello-release-1.5.0" \ No newline at end of file +SRCREV = "0f2436d16ddbca4467808735b1357b46e67aeddf" diff --git a/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb b/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb index 5041b9d4b811..c188adecfebd 100644 --- a/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb +++ b/recipes-devtools/gen-init-cpio/gen-init-cpio-native.bb @@ -11,11 +11,11 @@ PROVIDES = "${OUTPUTS_NAME}-native" LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI = " \ - git://git.morello-project.org/morello/kernel/linux;protocol=https;tag=${SRCTAG};branch=${SRCBRANCH} \ + git://git.morello-project.org/morello/kernel/linux;protocol=https;branch=${SRCBRANCH} \ "
SRCBRANCH = "morello/master" -SRCTAG = "morello-release-1.5.0" +SRCREV = "87d06928f90fe910311210a0149d03f3420f593c"
S = "${WORKDIR}/git/usr"
@@ -31,4 +31,4 @@ do_compile(){ do_install(){ install -d ${D}${bindir} install -m 0744 ${S}/gen_init_cpio ${D}${bindir}/gen_init_cpio -} \ No newline at end of file +} diff --git a/recipes-kernel/linux/linux-morello.inc b/recipes-kernel/linux/linux-morello.inc index a5effbb50694..cb9f1db54ae8 100644 --- a/recipes-kernel/linux/linux-morello.inc +++ b/recipes-kernel/linux/linux-morello.inc @@ -12,7 +12,7 @@ DEPENDS += "rsync-native" PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = " \ - git://git.morello-project.org/morello/kernel/linux;protocol=https;tag=${SRCTAG};branch=${SRCBRANCH} \ + git://git.morello-project.org/morello/kernel/linux;protocol=https;branch=${SRCBRANCH} \ "
PV = "${LINUX_VERSION}+git${SRCPV}" @@ -44,4 +44,4 @@ do_configure:prepend(){
do_install:append() { oe_runmake headers_install ARCH=arm64 INSTALL_HDR_PATH=${STAGING_KERNEL_BUILDDIR}/kernel-headers -} \ No newline at end of file +} diff --git a/recipes-kernel/linux/linux-morello-1.5.bb b/recipes-kernel/linux/linux-morello_1.5.bb similarity index 57% rename from recipes-kernel/linux/linux-morello-1.5.bb rename to recipes-kernel/linux/linux-morello_1.5.bb index ea3e0cadebe6..db43225633d3 100644 --- a/recipes-kernel/linux/linux-morello-1.5.bb +++ b/recipes-kernel/linux/linux-morello_1.5.bb @@ -2,8 +2,10 @@ require linux-morello.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
+SRCREV = "87d06928f90fe910311210a0149d03f3420f593c" SRCBRANCH = "morello/master" -SRCTAG = "morello-release-1.5.0"
LINUX_VERSION = "5.18" -LINUX_VERSION_EXTENSION= "-yocto-purecap" \ No newline at end of file +LINUX_VERSION_EXTENSION= "-yocto-purecap" + +COMPATIBLE_MACHINE = "morello"
Signed-off-by: Jon Mason jon.mason@arm.com --- conf/machine/morello-linux-musl.conf | 4 +- kas/base.yml | 47 ++++++++++--------- .../images/morello-linux-image-musl.bb | 4 +- 3 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/conf/machine/morello-linux-musl.conf b/conf/machine/morello-linux-musl.conf index c030a358f8d7..f33e31b51bd3 100644 --- a/conf/machine/morello-linux-musl.conf +++ b/conf/machine/morello-linux-musl.conf @@ -10,8 +10,8 @@ PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-musl" TCLIBC = "musl"
BSP_GRUB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp/grub-efi" -BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp/trusted-firmware-a" +BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp"
TMPDIR = "${TOPDIR}/${TMPDIR_LINUX}"
-DISTRO = "" \ No newline at end of file +DISTRO = "" diff --git a/kas/base.yml b/kas/base.yml index f955eada4850..7d673f48d255 100644 --- a/kas/base.yml +++ b/kas/base.yml @@ -1,33 +1,36 @@ header: version: 11 -distro: "" -repos: - poky: - path: poky - url: "https://git.yoctoproject.org/poky" + +distro: poky + +defaults: + repos: refspec: kirkstone - layers: - meta: - meta-poky: - meta-yocto-bsp: excluded + +repos: + meta-morello: + meta-arm: - path: poky/meta-arm - url: "https://git.yoctoproject.org/meta-arm" - refspec: kirkstone + url: https://git.yoctoproject.org/meta-arm layers: meta-arm: meta-arm-bsp: meta-arm-toolchain: - meta-morello: - path: poky/meta-morello - url: "https://github.com/The-Good-Penguin/meta-morello" - refspec: kirkstone -bblayers_conf_header: - custom-local-conf: | - LCONF_VERSION = "7" - - YOCTOROOT := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + + poky: + url: https://git.yoctoproject.org/git/poky + layers: + meta: + meta-poky: + local_conf_header: base: | CONF_VERSION = "2" - EXTRA_IMAGE_FEATURES ?= "debug-tweaks" \ No newline at end of file + setup: | + PACKAGE_CLASSES = "package_ipk" + EXTRA_IMAGE_FEATURES:append = " debug-tweaks" + +machine: unset + +target: + - core-image-minimal diff --git a/recipes-morello/images/morello-linux-image-musl.bb b/recipes-morello/images/morello-linux-image-musl.bb index 7b5e6eb375b3..45196d09a971 100644 --- a/recipes-morello/images/morello-linux-image-musl.bb +++ b/recipes-morello/images/morello-linux-image-musl.bb @@ -86,11 +86,11 @@ do_install() { : > ${OUTPUTS_NAME}.img truncate --size="$(mult ${IMAGE_SIZE} 3)M" ${OUTPUTS_NAME}.img
- create_gpt ${OUTPUTS_NAME}.img ${ESP_IMAGE}.img /home/pawel/Code/ArmMorello/linux/output/root.img + create_gpt ${OUTPUTS_NAME}.img ${ESP_IMAGE}.img ${D}/root.img install ${OUTPUTS_NAME}.img ${D}/${OUTPUTS_NAME}.img }
do_deploy() { install ${D}/${OUTPUTS_NAME}.img ${DEPLOYDIR}/${OUTPUTS_NAME}-${MORELLO_ARCH}-${TCLIBC}.img } -addtask deploy after do_install \ No newline at end of file +addtask deploy after do_install
-BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp/trusted-firmware-a" +BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp"
Good catch.
/home/pawel/Code/ArmMorello/linux/output/root.img
Yikes ! :)
Pawel
On Fri, 10 Feb 2023 at 11:53, Jon Mason jdmason@kudzu.us wrote:
Signed-off-by: Jon Mason jon.mason@arm.com
conf/machine/morello-linux-musl.conf | 4 +- kas/base.yml | 47 ++++++++++--------- .../images/morello-linux-image-musl.bb | 4 +- 3 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/conf/machine/morello-linux-musl.conf b/conf/machine/morello-linux-musl.conf index c030a358f8d7..f33e31b51bd3 100644 --- a/conf/machine/morello-linux-musl.conf +++ b/conf/machine/morello-linux-musl.conf @@ -10,8 +10,8 @@ PREFFERED_PROVIDER_morello-initramfs = "morello-initramfs-musl" TCLIBC = "musl"
BSP_GRUB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp/grub-efi" -BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp/trusted-firmware-a" +BSP_DTB_DIR ?= "${TOPDIR}/${TMPDIR_BSP}/deploy/images/morello-bsp"
TMPDIR = "${TOPDIR}/${TMPDIR_LINUX}"
-DISTRO = "" \ No newline at end of file +DISTRO = "" diff --git a/kas/base.yml b/kas/base.yml index f955eada4850..7d673f48d255 100644 --- a/kas/base.yml +++ b/kas/base.yml @@ -1,33 +1,36 @@ header: version: 11 -distro: "" -repos:
- poky:
- path: poky
- url: "https://git.yoctoproject.org/poky"
+distro: poky
+defaults:
- repos: refspec: kirkstone
- layers:
meta:
meta-poky:
meta-yocto-bsp: excluded
+repos:
- meta-morello:
- meta-arm:
- path: poky/meta-arm
- url: "https://git.yoctoproject.org/meta-arm"
- refspec: kirkstone
- url: https://git.yoctoproject.org/meta-arm layers: meta-arm: meta-arm-bsp: meta-arm-toolchain:
- meta-morello:
path: poky/meta-morello
url: "https://github.com/The-Good-Penguin/meta-morello"
refspec: kirkstone
-bblayers_conf_header:
- custom-local-conf: |
- LCONF_VERSION = "7"
- YOCTOROOT := "${@os.path.abspath(os.path.dirname(d.getVar('FILE',
True)) + '/../..')}"
- poky:
- url: https://git.yoctoproject.org/git/poky
- layers:
meta:
meta-poky:
local_conf_header: base: | CONF_VERSION = "2"
- EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
\ No newline at end of file
- setup: |
- PACKAGE_CLASSES = "package_ipk"
- EXTRA_IMAGE_FEATURES:append = " debug-tweaks"
+machine: unset
+target:
- core-image-minimal
diff --git a/recipes-morello/images/morello-linux-image-musl.bb b/recipes-morello/images/morello-linux-image-musl.bb index 7b5e6eb375b3..45196d09a971 100644 --- a/recipes-morello/images/morello-linux-image-musl.bb +++ b/recipes-morello/images/morello-linux-image-musl.bb @@ -86,11 +86,11 @@ do_install() { : > ${OUTPUTS_NAME}.img truncate --size="$(mult ${IMAGE_SIZE} 3)M" ${OUTPUTS_NAME}.img
- create_gpt ${OUTPUTS_NAME}.img ${ESP_IMAGE}.img
/home/pawel/Code/ArmMorello/linux/output/root.img
- create_gpt ${OUTPUTS_NAME}.img ${ESP_IMAGE}.img ${D}/root.img install ${OUTPUTS_NAME}.img ${D}/${OUTPUTS_NAME}.img
}
do_deploy() { install ${D}/${OUTPUTS_NAME}.img ${DEPLOYDIR}/${OUTPUTS_NAME}-${MORELLO_ARCH}-${TCLIBC}.img } -addtask deploy after do_install \ No newline at end of file
+addtask deploy after do_install
2.30.2
linux-morello-distros mailing list -- linux-morello-distros@op-lists.linaro.org To unsubscribe send an email to linux-morello-distros-leave@op-lists.linaro.org
The improper names are being used, causing a warning to be logged.
Signed-off-by: Jon Mason jon.mason@arm.com --- recipes-bsp/board-firmware/board-firmware_1.4.bb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/recipes-bsp/board-firmware/board-firmware_1.4.bb b/recipes-bsp/board-firmware/board-firmware_1.4.bb index 502e64306bd9..84a5394af209 100644 --- a/recipes-bsp/board-firmware/board-firmware_1.4.bb +++ b/recipes-bsp/board-firmware/board-firmware_1.4.bb @@ -1,10 +1,8 @@ - - 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 & BDS-2" +LICENSE = "STMicroelectronics & BSD-3-Clause & BSD-2-Clause" OUTPUTS_NAME = "board-firmware" SECTION = "firmware"
@@ -26,4 +24,4 @@ SYSROOT_DIRS += "/${OUTPUTS_NAME}" do_install() { install -d "${D}/${OUTPUTS_NAME}" cp -rf ${S}/* "${D}/${OUTPUTS_NAME}/" -} \ No newline at end of file +}
Signed-off-by: Jon Mason jon.mason@arm.com --- .gitlab-ci.yml | 78 +++++++++++++++++++++++++++++++++++++++++++++++ ci/check-warnings | 19 ++++++++++++ ci/jobs-to-kas | 16 ++++++++++ ci/logging.yml | 13 ++++++++ ci/update-repos | 40 ++++++++++++++++++++++++ 5 files changed, 166 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100755 ci/check-warnings create mode 100755 ci/jobs-to-kas create mode 100644 ci/logging.yml create mode 100755 ci/update-repos
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000000..8be7d551454a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,78 @@ +image: ghcr.io/siemens/kas/kas:3.2 + +variables: + CPU_REQUEST: "" + DEFAULT_TAG: "" + # These are needed as the k8s executor doesn't respect the container + # entrypoint by default + FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: 0 + FF_KUBERNETES_HONOR_ENTRYPOINT: 1 + +stages: + - prep + - build + +# Common job fragment to get a worker ready +.setup: + tags: + - $DEFAULT_TAG + stage: build + interruptible: true + variables: + KAS_WORK_DIR: $CI_PROJECT_DIR/work + KAS_REPO_REF_DIR: $CI_BUILDS_DIR/persist/repos + SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate + DL_DIR: $CI_BUILDS_DIR/persist/downloads + BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml + before_script: + - echo KAS_WORK_DIR = $KAS_WORK_DIR + - echo SSTATE_DIR = $SSTATE_DIR + - echo DL_DIR = $DL_DIR + - rm -rf $KAS_WORK_DIR + - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR + - sudo apt-get update && sudo apt install -y libtinfo5 + +# Generalised fragment to do a Kas build +.build: + extends: .setup + variables: + KUBERNETES_CPU_REQUEST: $CPU_REQUEST + script: + - KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME") + - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf' + - kas build $KASFILES + - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log + artifacts: + name: "logs" + when: on_failure + paths: + - $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.* + +# +# Prep stage, update repositories once +# +update-repos: + extends: .setup + stage: prep + script: + - flock --verbose --timeout 60 $KAS_REPO_REF_DIR ./ci/update-repos + +check-layers: + extends: .setup + coverage: '/Coverage: \d+/' + script: + - kas shell --update --force-checkout kas/base.yml --command \ + "yocto-check-layer-wrapper $CI_PROJECT_DIR -n --dependency $KAS_WORK_DIR/meta-arm/meta-arm $KAS_WORK_DIR/meta-arm/meta-arm-toolchain" + +# +# Build stage, the actual build jobs +# + +morello-bsp: + extends: .build + +morello-linux-glibc: + extends: .build + +morello-linux-musl: + extends: .build diff --git a/ci/check-warnings b/ci/check-warnings new file mode 100755 index 000000000000..9d080103b50b --- /dev/null +++ b/ci/check-warnings @@ -0,0 +1,19 @@ +#! /bin/bash + +# Expects the path to a log file as $1, and if this file has any content +# then display the contents and exit with an error code. + +set -e -u + +LOGFILE=$1 + +LINES=$(grep --invert-match "relocations in .text" $LOGFILE | wc -l) +if test "$LINES" -ne 0; then + echo ============================== + echo The build had warnings/errors: + echo ============================== + cat $LOGFILE + exit 1 +fi + +exit 0 diff --git a/ci/jobs-to-kas b/ci/jobs-to-kas new file mode 100755 index 000000000000..95df56c74a76 --- /dev/null +++ b/ci/jobs-to-kas @@ -0,0 +1,16 @@ +#! /bin/bash + +# This script is expecting an input of machine name, optionally followed by a +# colon and a list of one or more parameters separated by commas between +# brackets. For example, the following are acceptable: +# qemu-x86 +# qemu-cortex-m3: [testimage] +# qemu-cortex-a53: [zephyr-toolchain, testimage] +# +# Turn this list into a series of yml files separated by colons to pass to kas + +set -e -u + +FILES="kas/$(echo $1 | cut -d ':' -f 1).yml" + +echo $FILES diff --git a/ci/logging.yml b/ci/logging.yml new file mode 100644 index 000000000000..3af10295f8f3 --- /dev/null +++ b/ci/logging.yml @@ -0,0 +1,13 @@ +# Python logging configuration to write all warnings to a separate file +version: 1 + +handlers: + warnings: + class: logging.FileHandler + level: WARNING + filename: warnings.log + formatter: BitBake.logfileFormatter + +loggers: + BitBake: + handlers: [warnings] diff --git a/ci/update-repos b/ci/update-repos new file mode 100755 index 000000000000..fa638aad2efb --- /dev/null +++ b/ci/update-repos @@ -0,0 +1,40 @@ +#! /usr/bin/env python3 + +# Update clones of the repositories we need in KAS_REPO_REF_DIR to speed up fetches + +import sys +import os +import subprocess +import pathlib + +def repo_shortname(url): + # Taken from Kas (Repo.__getattr__) to ensure the logic is right + from urllib.parse import urlparse + url = urlparse(url) + return ('{url.netloc}{url.path}' + .format(url=url) + .replace('@', '.') + .replace(':', '.') + .replace('/', '.') + .replace('*', '.')) + +repositories = ( + "https://git.yoctoproject.org/git/poky", + "https://git.openembedded.org/meta-openembedded", +) + +if __name__ == "__main__": + if "KAS_REPO_REF_DIR" not in os.environ: + print("KAS_REPO_REF_DIR needs to be set") + sys.exit(1) + + base_repodir = pathlib.Path(os.environ["KAS_REPO_REF_DIR"]) + + for repo in repositories: + repodir = base_repodir / repo_shortname(repo) + if repodir.exists(): + print("Updating %s..." % repo) + subprocess.run(["git", "-C", repodir, "fetch"], check=True) + else: + print("Cloning %s..." % repo) + subprocess.run(["git", "clone", "--bare", repo, repodir], check=True)
Hi Jon,
Thank you for your help!
I have added my comments under your patches as I go along. I think that no changes are required and these can be committed to meta-morello as is.
Adding FVP support could be our next objective.
Pawel
On Fri, 10 Feb 2023 at 11:53, Jon Mason jdmason@kudzu.us wrote:
Working off the kirkstone branch of https://github.com/The-Good-Penguin/meta-morello, I did some cleanups and was able to add gitlab CI support. You can see it in action at https://gitlab.com/jonmason00/meta-morello/-/pipelines/773799653
Many other cleanups are needed, but I was only trying to get Gitlab CI working.
I see there is a Arm ecosystem FVP for Morello at https://developer.arm.com/downloads/-/arm-ecosystem-fvps If FVP support is enabled, it is possible to run testimage as part of CI. You can see that being done on meta-arm for corstone500, corstone1000-fvp, fvp-base, fvp-base-arm32, and fvp-baser-aemv8r64.
Let me know if there are any questions.
Thanks, Jon
Jon Mason (6): conf/machine: Remove MORELLO_RELEASE_VERSION musl-morello: Remove unused file Change SRVTAG to SRVREV kas: Changes necessary to compile the existing system images board-firmware: Fix LICENSE warning CI: add Gitlab CI support
.gitlab-ci.yml | 78 +++++++++++++++++++ ci/check-warnings | 19 +++++ ci/jobs-to-kas | 16 ++++ ci/logging.yml | 13 ++++ ci/update-repos | 40 ++++++++++ conf/machine/include/morello-1.5.inc | 1 - conf/machine/include/morello-common.inc | 6 +- conf/machine/morello-linux-glibc.conf | 1 - conf/machine/morello-linux-musl.conf | 5 +- kas/base.yml | 47 +++++------ .../board-firmware/board-firmware_1.4.bb | 6 +- recipes-core/busybox/busybox-morello.inc | 4 +- ...-morello-1.5.bb => busybox-morello_1.5.bb} | 2 +- recipes-core/musl/musl-morello-1.5.inc | 4 - recipes-core/musl/musl-morello-common.inc | 12 +-- .../gen-init-cpio/gen-init-cpio-native.bb | 6 +- recipes-kernel/linux/linux-morello.inc | 4 +- ...ux-morello-1.5.bb => linux-morello_1.5.bb} | 6 +- .../images/morello-linux-image-musl.bb | 4 +- 19 files changed, 220 insertions(+), 54 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100755 ci/check-warnings create mode 100755 ci/jobs-to-kas create mode 100644 ci/logging.yml create mode 100755 ci/update-repos delete mode 100644 conf/machine/include/morello-1.5.inc rename recipes-core/busybox/{busybox-morello-1.5.bb => busybox-morello_1.5.bb} (79%) delete mode 100644 recipes-core/musl/musl-morello-1.5.inc rename recipes-kernel/linux/{linux-morello-1.5.bb => linux-morello_1.5.bb} (57%)
-- 2.30.2
linux-morello-distros mailing list -- linux-morello-distros@op-lists.linaro.org To unsubscribe send an email to linux-morello-distros-leave@op-lists.linaro.org
Now applied on kirkstone and merged into master, thanks again.
Pawel
On Tue, 14 Feb 2023 at 12:17, Pawel Zalewski pzalewski@thegoodpenguin.co.uk wrote:
Hi Jon,
Thank you for your help!
I have added my comments under your patches as I go along. I think that no changes are required and these can be committed to meta-morello as is.
Adding FVP support could be our next objective.
Pawel
On Fri, 10 Feb 2023 at 11:53, Jon Mason jdmason@kudzu.us wrote:
Working off the kirkstone branch of https://github.com/The-Good-Penguin/meta-morello, I did some cleanups and was able to add gitlab CI support. You can see it in action at https://gitlab.com/jonmason00/meta-morello/-/pipelines/773799653
Many other cleanups are needed, but I was only trying to get Gitlab CI working.
I see there is a Arm ecosystem FVP for Morello at https://developer.arm.com/downloads/-/arm-ecosystem-fvps If FVP support is enabled, it is possible to run testimage as part of CI. You can see that being done on meta-arm for corstone500, corstone1000-fvp, fvp-base, fvp-base-arm32, and fvp-baser-aemv8r64.
Let me know if there are any questions.
Thanks, Jon
Jon Mason (6): conf/machine: Remove MORELLO_RELEASE_VERSION musl-morello: Remove unused file Change SRVTAG to SRVREV kas: Changes necessary to compile the existing system images board-firmware: Fix LICENSE warning CI: add Gitlab CI support
.gitlab-ci.yml | 78 +++++++++++++++++++ ci/check-warnings | 19 +++++ ci/jobs-to-kas | 16 ++++ ci/logging.yml | 13 ++++ ci/update-repos | 40 ++++++++++ conf/machine/include/morello-1.5.inc | 1 - conf/machine/include/morello-common.inc | 6 +- conf/machine/morello-linux-glibc.conf | 1 - conf/machine/morello-linux-musl.conf | 5 +- kas/base.yml | 47 +++++------ .../board-firmware/board-firmware_1.4.bb | 6 +- recipes-core/busybox/busybox-morello.inc | 4 +- ...-morello-1.5.bb => busybox-morello_1.5.bb} | 2 +- recipes-core/musl/musl-morello-1.5.inc | 4 - recipes-core/musl/musl-morello-common.inc | 12 +-- .../gen-init-cpio/gen-init-cpio-native.bb | 6 +- recipes-kernel/linux/linux-morello.inc | 4 +- ...ux-morello-1.5.bb => linux-morello_1.5.bb} | 6 +- .../images/morello-linux-image-musl.bb | 4 +- 19 files changed, 220 insertions(+), 54 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100755 ci/check-warnings create mode 100755 ci/jobs-to-kas create mode 100644 ci/logging.yml create mode 100755 ci/update-repos delete mode 100644 conf/machine/include/morello-1.5.inc rename recipes-core/busybox/{busybox-morello-1.5.bb => busybox-morello_1.5.bb} (79%) delete mode 100644 recipes-core/musl/musl-morello-1.5.inc rename recipes-kernel/linux/{linux-morello-1.5.bb => linux-morello_1.5.bb} (57%)
-- 2.30.2
linux-morello-distros mailing list -- linux-morello-distros@op-lists.linaro.org To unsubscribe send an email to linux-morello-distros-leave@op-lists.linaro.org
linux-morello-distros@op-lists.linaro.org