diff options
Diffstat (limited to 'recipes-extended/xen/files')
6 files changed, 275 insertions, 59 deletions
diff --git a/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch new file mode 100644 index 00000000..a3dbbbb4 --- /dev/null +++ b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch @@ -0,0 +1,68 @@ +From 2258853a19b2d0b1fafd901cddf69f730c38d450 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@gmail.com> +Date: Fri, 31 May 2024 14:50:33 +0000 +Subject: [PATCH] arm: silence gcc14 warning (error) on irq bounds check + +While we wait for upstream to update to gcc14, we add a quick +check to avoid gcc14 not being able to confirm that IRQ is +greater than 0 and hence throws a warning, which leads to an +error. + +| In function '__irq_to_desc', +| inlined from 'route_irq_to_guest' at arch/arm/irq.c:467:12: +| arch/arm/irq.c:65:16: error: array subscript -2 is below array bounds of 'irq_desc_t[32]' {aka 'struct irq_desc[32]'} [-Werror=array-bounds=] +| 65 | return &this_cpu(local_irq_desc)[irq]; +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending [the xen folks understand the code and the right fix .. I don't] + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- + xen/arch/arm/irq.c | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c +index ae69fb4aeb..dcac86bd84 100644 +--- a/xen/arch/arm/irq.c ++++ b/xen/arch/arm/irq.c +@@ -58,8 +58,13 @@ hw_irq_controller no_irq_type = { + static irq_desc_t irq_desc[NR_IRQS]; + static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc); + ++ + struct irq_desc *__irq_to_desc(int irq) + { ++ /* silence gcc14 warning */ ++ if ( irq < 0 ) ++ return &this_cpu(local_irq_desc)[0]; ++ + if ( irq < NR_LOCAL_IRQS ) + return &this_cpu(local_irq_desc)[irq]; + +@@ -723,16 +728,16 @@ int platform_get_irq(const struct dt_device_node *device, int index) + + int platform_get_irq_byname(const struct dt_device_node *np, const char *name) + { +- int index; ++ int index; + +- if ( unlikely(!name) ) +- return -EINVAL; ++ if ( unlikely(!name) ) ++ return -EINVAL; + +- index = dt_property_match_string(np, "interrupt-names", name); +- if ( index < 0 ) +- return index; ++ index = dt_property_match_string(np, "interrupt-names", name); ++ if ( index < 0 ) ++ return index; + +- return platform_get_irq(np, index); ++ return platform_get_irq(np, index); + } + + /* +-- +2.39.2 + diff --git a/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch b/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch new file mode 100644 index 00000000..b8711756 --- /dev/null +++ b/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch @@ -0,0 +1,57 @@ +From b300c18ab899b3c899e5405c96c20a32e51d77c8 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Mon, 2 Jul 2018 23:10:28 -0400 +Subject: [PATCH] xen: Fix menuconfig and add support for config fragments and + +Upstream-Status: Inappropriate [oe specific, cross compile issue] + +Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> +commit e6972e689a980ab28637e94e48c77eeace6abde5 + + xen/kconfig,menuconfig,mconf-cfg: Allow specification of ncurses location + + In some cross build environments such as the Yocto Project build + environment it provides an ncurses library that is compiled + differently than the host's version. This causes display corruption + problems when the host's curses includes are used instead of the + includes from the provided compiler are overridden. There is a second + case where there is no curses libraries at all on the host system and + menuconfig will just fail entirely. + + The solution is simply to allow an override variable in + check-lxdialog.sh for environments such as the Yocto Project. Adding + a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing + compiling and linking against the right headers and libraries. + + Change-Id: Ibe8dfafc90655e3be2671dbbb0cb7f5631fc4d44 + Signed-off-by: Jason Wessel <jason.wessel@windriver.com> + cc: Michal Marek <mmarek@suse.cz> + cc: linux-kbuild@vger.kernel.org + Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> + +--- + xen/tools/kconfig/mconf-cfg.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + mode change 100755 => 100644 xen/tools/kconfig/mconf-cfg.sh + +diff --git a/xen/tools/kconfig/mconf-cfg.sh b/xen/tools/kconfig/mconf-cfg.sh +old mode 100755 +new mode 100644 +index c812872d7f..56eb4fc79f +--- a/xen/tools/kconfig/mconf-cfg.sh ++++ b/xen/tools/kconfig/mconf-cfg.sh +@@ -4,6 +4,14 @@ + PKG="ncursesw" + PKG2="ncurses" + ++if [ "$CROSS_CURSES_LIB" != "" ]; then ++ echo libs=\'$CROSS_CURSES_LIB\' ++ if [ x"$CROSS_CURSES_INC" != x ]; then ++ echo cflags=\'$CROSS_CURSES_INC\' ++ fi ++ exit 0 ++fi ++ + if [ -n "$(command -v pkg-config)" ]; then + if pkg-config --exists $PKG; then + echo cflags=\"$(pkg-config --cflags $PKG)\" diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch new file mode 100644 index 00000000..476f5ddc --- /dev/null +++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch @@ -0,0 +1,73 @@ +From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001 +Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com> +From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> +Date: Fri, 19 Oct 2018 11:01:37 +0200 +Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args + +Upstream-Status: Inappropriate [oe specific, python install issues] + +Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR) +as well as other parameters set by the OpenEmbedded build system. +This is especially useful when the target libdir is not the default one +(/usr/lib), but for example /usr/lib64. + +Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> + +Forward-ported to Xen 4.12.0 +Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> + +Modified to support pygrub installation with python 3 +Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> + +Forward-ported to Xen 4.14.0 +Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> + +Forward-ported to Xen 4.15.0 +Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> + +--- + tools/pygrub/Makefile | 7 +++++-- + tools/python/Makefile | 2 +- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile +index 37b2146214..ffb9270065 100644 +--- a/tools/pygrub/Makefile ++++ b/tools/pygrub/Makefile +@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt + all: build + .PHONY: build + build: +- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build ++ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) + + .PHONY: install + install: all +@@ -18,7 +18,10 @@ install: all + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \ + LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \ + --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ +- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force ++ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \ ++ $(DISTUTILS_INSTALL_ARGS) ++ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub ++ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub + set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ + "`readlink -f $(DESTDIR)/$(bindir)`" != \ + "`readlink -f $(LIBEXEC_BIN)`" ]; then \ +diff --git a/tools/python/Makefile b/tools/python/Makefile +index cc76423647..5cb11ae453 100644 +--- a/tools/python/Makefile ++++ b/tools/python/Makefile +@@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA + SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \ + SHLIB_libxenguest="$(SHLIB_libxenguest)" \ + SHLIB_libxenstore="$(SHLIB_libxenstore)" \ +- $(PYTHON) setup.py ++ $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS) + + .PHONY: build + build: +-- +2.17.1 + diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch new file mode 100644 index 00000000..7ac1a399 --- /dev/null +++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch @@ -0,0 +1,43 @@ +Upstream-Status: Pending + +diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile +index 4963bc89c6..c1c05eb421 100644 +--- a/tools/pygrub/Makefile ++++ b/tools/pygrub/Makefile +@@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA + all: build + .PHONY: build + build: +- $(setup.py) build ++ $(setup.py) build $(DISTUTILS_BUILD_ARGS) + + .PHONY: install + install: all + $(INSTALL_DIR) $(DESTDIR)/$(bindir) + $(INSTALL_DIR) $(DESTDIR)/$(LIBEXEC_BIN) + $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ +- --root="$(DESTDIR)" --force ++ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) + $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub + set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ + "`readlink -f $(DESTDIR)/$(bindir)`" != \ +diff --git a/tools/python/Makefile b/tools/python/Makefile +index 437431c48e..0a99c2067e 100644 +--- a/tools/python/Makefile ++++ b/tools/python/Makefile +@@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA + + .PHONY: build + build: +- $(setup.py) build ++ $(setup.py) build $(DISTUTILS_BUILD_ARGS) + + .PHONY: install + install: + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) + $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ +- --root="$(DESTDIR)" --force ++ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) + $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN) + diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch deleted file mode 100644 index 6504d86e..00000000 --- a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch +++ /dev/null @@ -1,59 +0,0 @@ -From d79dcc2002008c58683de82f06c168d6eea57991 Mon Sep 17 00:00:00 2001 -From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> -Date: Fri, 19 Oct 2018 11:01:37 +0200 -Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args - -Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR) -as well as other parameters set by the OpenEmbedded build system. -This is especially useful when the target libdir is not the default one -(/usr/lib), but for example /usr/lib64. - -Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> - -Forward-ported to Xen 4.12.0 -Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> - -diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile -index 3063c49..513314b 100644 ---- a/tools/pygrub/Makefile -+++ b/tools/pygrub/Makefile -@@ -10,14 +10,15 @@ INSTALL_LOG = build/installed_files.txt - all: build - .PHONY: build - build: -- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build -+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) - - .PHONY: install - install: all - $(INSTALL_DIR) $(DESTDIR)/$(bindir) - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ - setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ -- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force -+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \ -+ $(DISTUTILS_INSTALL_ARGS) - set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ - "`readlink -f $(DESTDIR)/$(bindir)`" != \ - "`readlink -f $(LIBEXEC_BIN)`" ]; then \ -diff --git a/tools/python/Makefile b/tools/python/Makefile -index 541858e..4d4a344 100644 ---- a/tools/python/Makefile -+++ b/tools/python/Makefile -@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt - - .PHONY: build - build: -- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build -+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) - - .PHONY: install - install: -@@ -18,7 +18,7 @@ install: - - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ - setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ -- --root="$(DESTDIR)" --force -+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) - - $(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) - $(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN) diff --git a/recipes-extended/xen/files/0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch b/recipes-extended/xen/files/0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch new file mode 100644 index 00000000..bf99f5e8 --- /dev/null +++ b/recipes-extended/xen/files/0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch @@ -0,0 +1,34 @@ +From c7c43c4531fe1cd188f62d9905c3f5c7a29a6fb0 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Wed, 12 Apr 2023 10:30:18 +0200 +Subject: [PATCH] tools/xenstore/xenstored_control.c: correctly print time_t + +On 32 bit systems with 64 bit time_t (hello, Y2038 problem), +the following error occurs otherwise: + +| xenstored_control.c: In function 'lu_reject_reason': +| xenstored_control.c:646:70: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'time_t' {aka 'long long int'} [-Werror=format=] + +Upstream-Status: Submitted [by email to xen-devel@lists.xenproject.org and maintainers as suggested by add_maintainers.pl script] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + tools/xenstore/xenstored_control.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/xenstore/xenstored_control.c b/tools/xenstore/xenstored_control.c +index d1aaa00bf4..8d318c0399 100644 +--- a/tools/xenstore/xenstored_control.c ++++ b/tools/xenstore/xenstored_control.c +@@ -643,10 +643,10 @@ static const char *lu_reject_reason(const void *ctx) + list_for_each_entry(conn, &connections, list) { + if (conn->ta_start_time && + (now - conn->ta_start_time >= lu_status->timeout)) { +- ret = talloc_asprintf(ctx, "%s\nDomain %u: %ld s", ++ ret = talloc_asprintf(ctx, "%s\nDomain %u: %jd s", + ret ? : "Domains with long running transactions:", + conn->id, +- now - conn->ta_start_time); ++ (intmax_t)now - conn->ta_start_time); + } + } + |