Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meta-zephyr-sdk/conf/distro/include/zephyr-sdk.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ DISTRO_FEATURES_NATIVE = ""
DISTRO_FEATURES_BACKFILL = ""
DISTRO_FEATURES_NATIVESDK = ""

MAINTAINER = "Intel Yocto team"
MAINTAINER = "Zephyr developers / devops team"

SSTATE_DIR ?= "${TOPDIR}/../zephyr-cache/sstate-cache"
CACHE_forcevariable = "${TOPDIR}/../zephyr-cache/cache"
PERSISTENT_DIR = "${TOPDIR}/../zephyr-cache/persistent"
DL_DIR ?= "${TOPDIR}/../zephyr-downloads"

PREFERRED_VERSION_meson:forcevariable = "1.7.%"
PREFERRED_VERSION_nativesdk-meson:forcevariable = "1.7.%"
2 changes: 1 addition & 1 deletion meta-zephyr-sdk/conf/distro/zephyr-sdk.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require conf/distro/poky.conf
require include/zephyr-sdk.inc

DISTRO_VERSION = "0.9"
DISTRO_VERSION = "0.10"
PACKAGE_CLASSES = "package_ipk"
TARGET_VENDOR = "-zephyr"
2 changes: 1 addition & 1 deletion meta-zephyr-sdk/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ LICENSE_PATH += "${LAYERDIR}/files/additional-licenses"
BBFILE_COLLECTIONS += "zephyr-sdk"
BBFILE_PATTERN_zephyr-sdk := "^${LAYERDIR}/"
BBFILE_PRIORITY_zephyr-sdk = "8"

LAYERSERIES_COMPAT_zephyr_sdk = "Scarthgap"
6 changes: 0 additions & 6 deletions meta-zephyr-sdk/recipes-core/expat/expat_%.bbappend

This file was deleted.

14 changes: 8 additions & 6 deletions meta-zephyr-sdk/recipes-devtools/arc_qemu/arc-qemu_git.bb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

DEPENDS = "glib-2.0 zlib pixman gnutls libtasn1 dtc ninja-native meson-native"
LICENSE = "GPLv2"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
#FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"

SRCREV = "b46c4ec2d07a4c56c426b3d48195d6f2902226e5"
SRC_URI = "git://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git;protocol=https;nobranch=1 \
SRC_URI = "gitsm://github.com/foss-for-synopsys-dwc-arc-processors/qemu.git;protocol=https;nobranch=1 \
file://cross.patch \
"

Expand Down Expand Up @@ -199,7 +199,7 @@ QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-
--disable-tpm --disable-numa --disable-glusterfs \
--disable-virtfs --disable-xen --disable-curl --disable-attr --disable-curses --disable-iconv \
--disable-kvm --disable-parallels --disable-replication \
--disable-live-block-migration --disable-dmg --disable-fdt --disable-blobs \
--disable-live-block-migration --disable-dmg --disable-fdt --disable-blobs --disable-werror \
"

# NOTE: Once --prefix is set, QEMU configure script automatically figures out adequate sysconfdir,
Expand All @@ -223,12 +223,14 @@ do_configure() {
unset firmwarepath
unset localedir

${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${arc_qemu_prefix} \
${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${arc_qemu_prefix} \
--meson=meson
}

FILES_${PN} = " \
/opt/zephyr-sdk \

FILES:${PN} = " \
${arc_qemu_prefix} \
"


INSANE_SKIP_${PN} = "already-stripped"
29 changes: 17 additions & 12 deletions meta-zephyr-sdk/recipes-devtools/arc_qemu/files/cross.patch
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
We need to be able to trigger configure's cross code but we don't want
to set cross_prefix as it does other things we don't want. Patch things
so we can do what we need in the target config case.
From 0f45ccc448ff392e9844ea7f66bb697f334eefa7 Mon Sep 17 00:00:00 2001
From: Anas Nashif <[email protected]>
Date: Sun, 16 Feb 2025 07:44:37 -0500
Subject: [PATCH] cross patch

Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: Anas Nashif <[email protected]>
---
configure | 4 ----
1 file changed, 4 deletions(-)


Index: qemu/configure
===================================================================
diff --git a/configure b/configure
index 529d28fa5a..7ecbe94dc0 100755
--- a/configure
+++ b/configure
@@ -3934,7 +3934,6 @@ if test "$skip_meson" = no; then
@@ -3122,7 +3122,6 @@ if test "$skip_meson" = no; then
fi
echo "strip = [$(meson_quote $strip)]" >> $cross
echo "windres = [$(meson_quote $windres)]" >> $cross
- if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
if test "$mingw32" = "yes" ; then
@@ -3966,9 +3965,6 @@ if test "$skip_meson" = no; then
echo "system = '$targetos'" >> $cross
@@ -3140,9 +3139,6 @@ if test "$skip_meson" = no; then
else
echo "endian = 'little'" >> $cross
fi
- else
- cross_arg="--native-file config-meson.cross"
- fi
mv $cross config-meson.cross

rm -rf meson-private meson-info meson-logs
--
2.43.0

22 changes: 22 additions & 0 deletions meta-zephyr-sdk/recipes-devtools/legacy_qemu/files/cross.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/configure b/configure
index 7c08c18358..0613279f91 100755
--- a/configure
+++ b/configure
@@ -3118,7 +3118,6 @@ if test "$skip_meson" = no; then
fi
echo "strip = [$(meson_quote $strip)]" >> $cross
echo "windres = [$(meson_quote $windres)]" >> $cross
- if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
echo "system = '$targetos'" >> $cross
@@ -3136,9 +3135,6 @@ if test "$skip_meson" = no; then
else
echo "endian = 'little'" >> $cross
fi
- else
- cross_arg="--native-file config-meson.cross"
- fi
mv $cross config-meson.cross

rm -rf meson-private meson-info meson-logs
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@

DEPENDS = "glib-2.0 zlib pixman gnutls libtasn1 dtc ninja-native meson-native"
LICENSE = "GPLv2"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"

SRCREV = "06740e68dcb2c2ae168875a730f233f5661eb8b6"
SRC_URI = "git://github.com/zephyrproject-rtos/qemu.git;protocol=https;nobranch=1 \
https://github.com/zephyrproject-rtos/seabios/releases/download/zephyr-v1.0.0/bios-128k.bin;name=bios-128k \
https://github.com/zephyrproject-rtos/seabios/releases/download/zephyr-v1.0.0/bios-256k.bin;name=bios-256k \
SRC_URI = "gitsm://github.com/zephyrproject-rtos/qemu.git;protocol=https;nobranch=1 \
file://cross.patch \
"

SRC_URI[bios-128k.sha256sum] = "943c077c3925ee7ec85601fb12937a0988c478a95523a628cd7e61c639dd6e81"
SRC_URI[bios-256k.sha256sum] = "19133167cc0bfb2a9e8ce9567efcd013a4ab80d2f3522ac66df0c23c68c18984"

BBCLASSEXTEND = "native nativesdk"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"

S = "${WORKDIR}/git"

legacy_prefix = "${base_prefix}/usr/legacy"

inherit autotools pkgconfig

# Standard options:
Expand Down Expand Up @@ -199,43 +195,34 @@ inherit autotools pkgconfig
#--disable-fdt: Cannot use if supporting ARM
#--disable-kvm: AArch64 has a QEMU/KVM board

QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu sparc-softmmu x86_64-softmmu"
QEMUS_BUILT = "nios2-softmmu sparc-softmmu"
QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \
--disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio\
--disable-guest-agent --disable-libssh --disable-vnc-png --disable-seccomp \
--disable-tpm --disable-numa --disable-glusterfs \
--disable-virtfs --disable-xen --disable-curl --disable-attr --disable-curses --disable-iconv \
--disable-parallels --disable-replication \
--disable-live-block-migration --disable-dmg \
--disable-live-block-migration --disable-dmg --disable-werror \
"

copy_seabios() {
cp ${WORKDIR}/bios-128k.bin ${S}/pc-bios/bios.bin
cp ${WORKDIR}/bios-256k.bin ${S}/pc-bios/bios-256k.bin
}

do_unpack_append() {
bb.build.exec_func('copy_seabios', d)
}

do_configure() {
${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${prefix} \
--sysconfdir=${sysconfdir} --libexecdir=${libexecdir} --localstatedir=${localstatedir} \
--meson=meson
}

do_install_append() {
# Link Xilinx QEMU executables
ln -sf ../xilinx/bin/qemu-system-aarch64 ${D}${bindir}/qemu-system-xilinx-aarch64
ln -sf ../xilinx/bin/qemu-system-microblazeel ${D}${bindir}/qemu-system-xilinx-microblazeel

# Link ARC (Synopsys) QEMU executables
ln -sf ../synopsys/bin/qemu-system-arc ${D}${bindir}/qemu-system-arc
ln -sf ../synopsys/bin/qemu-system-arc64 ${D}${bindir}/qemu-system-arc64
unset libdir
unset libexecdir
unset includedir
unset bindir
unset mandir
unset datadir
unset docdir
unset sysconfdir
unset local_statedir
unset firmwarepath
unset localedir
${S}/configure ${QEMU_FLAGS} --target-list="${QEMUS_BUILT}" --prefix=${legacy_prefix} \
--meson=meson
}

FILES_${PN} = " \
/opt/zephyr-sdk \
FILES:${PN} = " \
${legacy_prefix} \
"

INSANE_SKIP_${PN} = "already-stripped"
INSANE_SKIP:${PN} = "already-stripped"
37 changes: 0 additions & 37 deletions meta-zephyr-sdk/recipes-devtools/meson/meson.inc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001
From 32c4ccfbdc8649f595a79e7fd1bd39d6f8325340 Mon Sep 17 00:00:00 2001
From: Ross Burton <[email protected]>
Date: Tue, 3 Jul 2018 13:59:09 +0100
Subject: [PATCH] Make CPU family warnings fatal

Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ross Burton <[email protected]>

---
mesonbuild/envconfig.py | 2 +-
mesonbuild/environment.py | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
mesonbuild/envconfig.py | 4 ++--
mesonbuild/environment.py | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 307aac3..66fb7ec 100644
index 86bad9b..9703315 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -267,7 +267,7 @@ class MachineInfo(HoldableObject):
@@ -277,8 +277,8 @@ class MachineInfo(HoldableObject):
'but is missing {}.'.format(minimum_literal - set(literal)))

cpu_family = literal['cpu_family']
if cpu_family not in known_cpu_families:
- if cpu_family not in known_cpu_families:
- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new')
+ if cpu_family not in known_cpu_families and cpu_family != "riscv":
+ raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family))

endian = literal['endian']
if endian not in ('little', 'big'):
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 71286a5..179917e 100644
index 71a2f3a..4cbeabe 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -352,9 +352,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
trial = 'ppc64'
@@ -416,10 +416,8 @@ def detect_cpu_family(compilers: CompilersDict) -> str:
if compilers and not any_compiler_has_define(compilers, '__mips64'):
trial = 'mips'

if trial not in known_cpu_families:
- if trial not in known_cpu_families:
- mlog.warning(f'Unknown CPU family {trial!r}, please report this at '
- 'https://github.com/mesonbuild/meson/issues/new with the '
- 'output of `uname -a` and `cat /proc/cpuinfo`')
+ if trial not in known_cpu_families and trail != "riscv":
+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial)

return trial
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 6f33fb67097beeb17e2345aaec3bda4a57b0b138 Mon Sep 17 00:00:00 2001
From: Ross Burton <[email protected]>
Date: Wed, 20 Nov 2024 13:09:38 +0000
Subject: [PATCH] dependencies/dev: prepend sysroot when searching for GTest
sources

Don't hardcode paths in /usr when looking for the GTest sources, as in
cross-compile or other builds with a sysroot this will find the host
sources, not ones that we want to use in the sysroot.

Closes #12690.

Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/13934]
Signed-off-by: Ross Burton <[email protected]>
---
mesonbuild/dependencies/dev.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 94f51ff69..cceb1756c 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -56,7 +56,9 @@ class GTestDependencySystem(SystemDependency):
def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.Any]) -> None:
super().__init__(name, environment, kwargs, language='cpp')
self.main = kwargs.get('main', False)
- self.src_dirs = ['/usr/src/gtest/src', '/usr/src/googletest/googletest/src']
+
+ sysroot = environment.properties[self.for_machine].get_sys_root() or ""
+ self.src_dirs = [sysroot + '/usr/src/gtest/src', sysroot + '/usr/src/googletest/googletest/src']
if not self._add_sub_dependency(threads_factory(environment, self.for_machine, {})):
self.is_found = False
return
--
2.34.1

Loading
Loading