Skip to content

Commit

Permalink
Upgrade: xentools 4.15.0 to 4.19.0
Browse files Browse the repository at this point in the history
Upgraded xen/Dockerfile and xen-tools/Dockerfile to point new version (1)

Removed the following unused patches: 11-char-socket-revert.patch, 12-disable-Werror-to-build-under-gcc-11.2.patch, 15-qemu-Set-the-affinity-of-QEMU-threads-according-to-t.patch, 16-imammedo_x86_acpi_use_offset_instead_of_pointer_when_using_build_header.patch, 0003-arch-arm-small-hack-for-rpi4-usb.patch

Signed-off-by: Roja Eswaran <roja@zededa.com>
  • Loading branch information
roja-zededa committed Sep 19, 2024
1 parent 6169cf9 commit a641d23
Show file tree
Hide file tree
Showing 24 changed files with 248 additions and 450 deletions.
23 changes: 14 additions & 9 deletions pkg/xen-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

FROM lfedge/eve-uefi:d821658883d6748d8bbf0d6640c62288e3ce8c6f as uefi-build

FROM lfedge/eve-alpine:82df60e43ab9f8c935584b8c7b4d0a4b0271d608 as runx-build
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 as runx-build
ENV BUILD_PKGS mkinitfs gcc musl-dev e2fsprogs chrony agetty
RUN eve-alpine-deploy.sh

Expand All @@ -20,16 +20,18 @@ RUN gcc -s -o /chroot2 /tmp/chroot2.c -Wall -Werror
RUN gcc -s -o /hacf /tmp/hacf.c -Wall -Werror
RUN mkinitfs -n -F base -i /init-initrd -o /runx-initrd

FROM lfedge/eve-alpine:82df60e43ab9f8c935584b8c7b4d0a4b0271d608 as build
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 as build
ENV BUILD_PKGS \
gcc make libc-dev dev86 xz-dev perl bash python3-dev \
gettext iasl util-linux-dev ncurses-dev glib-dev \
pixman-dev libaio-dev yajl-dev argp-standalone \
linux-headers git patch texinfo tar libcap-ng-dev \
attr-dev flex bison cmake libusb-dev zstd-dev
attr-dev flex bison cmake libusb-dev zstd-dev \
python3 build-base ninja

ENV BUILD_PKGS_arm64 dtc-dev

ENV PKGS alpine-baselayout musl-utils bash libaio libbz2 glib pixman yajl keyutils libusb xz-libs libuuid sudo zstd-libs
ENV PKGS alpine-baselayout libgcc bash musl-utils libaio libbz2 glib pixman yajl keyutils libusb xz-libs libuuid zstd-libs util-linux-misc
ENV PKGS_arm64 libfdt

RUN eve-alpine-deploy.sh
Expand Down Expand Up @@ -57,11 +59,11 @@ RUN rm -rf /out/usr/man
RUN strip /out/usr/lib/* || :

# When changing this version, also update SEABIOS_UPSTREAM_REVISION to whatever is in `Config.mk` in the xen source
ENV XEN_VERSION 4.15.0
ENV XEN_VERSION 4.19.0
ENV XEN_SOURCE=https://downloads.xenproject.org/release/xen/${XEN_VERSION}/xen-${XEN_VERSION}.tar.gz
ENV EXTRA_QEMUU_CONFIGURE_ARGS="--enable-libusb --enable-linux-aio \
--enable-vhost-net --enable-vhost-vsock --enable-vhost-scsi --enable-vhost-kernel \
--enable-vhost-user --enable-linux-io-uring --enable-zstd"
--enable-vhost-net --enable-vhost-kernel \
--enable-vhost-user --enable-linux-io-uring --enable-zstd"

WORKDIR /

Expand All @@ -80,7 +82,7 @@ RUN cat /patches/*.patch /patches/"$(uname -m)"/*.patch | patch -p1
# Note that Xen's `configure` command uses this env variable SEABIOS_UPSTREAM_URL to find the seabios source.
ENV SEABIOS_UPSTREAM_URL /seabios.git
# this revision should be kept in sync with the XEN_VERSION by reading `Config.mk` in the xen source
ENV SEABIOS_UPSTREAM_REVISION rel-1.14.0
ENV SEABIOS_UPSTREAM_REVISION rel-1.16.3
ADD --keep-git-dir git://xenbits.xen.org/seabios.git#${SEABIOS_UPSTREAM_REVISION} ${SEABIOS_UPSTREAM_URL}
# we need this because it will complain about ambiguous refs
RUN git config --global core.warnambiguousrefs false
Expand All @@ -89,10 +91,13 @@ RUN mkdir -p /out

# FEATURES="--enable-stubdom --enable-vtpm-stubdom --enable-vtpmmgr-stubdom"
COPY gmp.patch /xen/stubdom

WORKDIR /xen

# disable golang as it does not play well together with musl (stderr is defined as FILE* const and fails to compile)
RUN ./configure --prefix=/usr --disable-xen --disable-golang --disable-qemu-traditional --disable-docs --enable-9pfs \
--with-system-ovmf=/usr/lib/xen/boot/ovmf.bin --disable-stubdom
--with-system-ovmf=/usr/lib/xen/boot/ovmf.bin --disable-stubdom \
--enable-vhost-vsock --enable-vhost-scsi
RUN make -j "$(getconf _NPROCESSORS_ONLN)" && make dist
RUN dist/install.sh /out

Expand Down
24 changes: 0 additions & 24 deletions pkg/xen-tools/patches-4.15.0/11-char-socket-revert.patch

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ index dac1b8ddb8..a368fe6ba0 100644
if (rc) return rc;

diff --git a/tools/xl/xl_utils.c b/tools/xl/xl_utils.c
index 4503ac7ea0..1f646c6400 100644
index b0d23b2..949d281 100644
--- a/tools/xl/xl_utils.c
+++ b/tools/xl/xl_utils.c
@@ -27,6 +27,8 @@
Expand All @@ -164,31 +164,30 @@ index 4503ac7ea0..1f646c6400 100644

+#include "../libs/light/xentoollog_external.h"
+
void dolog(const char *file, int line, const char *func, char *fmt, ...)
{
va_list ap;
@@ -264,14 +266,17 @@ int do_daemonize(char *name, const char *pidfile)
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
@@ -268,14 +270,16 @@ int do_daemonize(const char *name, const char *pidfile)

postfork();

- ret = libxl_create_logfile(ctx, name, &fullname);
- if (ret) {
- LOG("failed to open logfile %s: %s",fullname,strerror(errno));
- exit(-1);
- }
+ logfile = xtl_logger_create_external(name);
+ logfile = xtl_logger_create_external((char *)name);
+ if (logfile < 0) {
+ ret = libxl_create_logfile(ctx, name, &fullname);
+ if (ret) {
+ LOG("failed to open logfile %s: %s",fullname,strerror(errno));
+ exit(-1);
+ }

- CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
+ ret = libxl_create_logfile(ctx, name, &fullname);
+ if (ret) {
+ LOG("failed to open logfile %s: %s",fullname,strerror(errno));
+ exit(-1);
+ }
+ CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644));
+ free(fullname);
}
-
- CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644));
- free(fullname);
+ CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644));
+ free(fullname);
+ }
assert(logfile >= 3);

CHK_SYSCALL(nullfd = open("/dev/null", O_RDONLY));
CHK_SYSCALL(nullfd = open("/dev/null", O_RDONLY));
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
diff --git a/tools/qemu-xen/net/tap.c b/tools/qemu-xen/net/tap.c
index 1bf085d..1887c4a 100644
--- a/tools/qemu-xen/net/tap.c
+++ b/tools/qemu-xen/net/tap.c
@@ -62,7 +62,7 @@
@@ -63,7 +63,7 @@ typedef struct TAPState {
Notifier exit;
} TAPState;

Expand All @@ -9,7 +11,7 @@
int fd, Error **errp);

static void tap_send(void *opaque);
@@ -300,7 +300,7 @@
@@ -323,7 +323,7 @@ static void tap_exit_notify(Notifier *notifier, void *data)
Error *err = NULL;

if (s->down_script[0]) {
Expand All @@ -18,7 +20,7 @@
if (err) {
error_report_err(err);
}
@@ -397,7 +397,7 @@
@@ -431,7 +431,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer,
return s;
}

Expand All @@ -27,24 +29,26 @@
int fd, Error **errp)
{
int pid, status;
@@ -422,6 +422,7 @@
@@ -456,6 +456,7 @@ static void launch_script(const char *setup_script, const char *ifname,
parg = args;
*parg++ = (char *)setup_script;
*parg++ = (char *)ifname;
+ *parg++ = (char *)bridge;
*parg = NULL;
execv(setup_script, args);
_exit(1);
@@ -607,7 +608,7 @@
@@ -648,8 +649,8 @@ int net_init_bridge(const Netdev *netdev, const char *name,
}

static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr,
const char *setup_script, char *ifname,
- const char *setup_script, char *ifname,
- size_t ifname_sz, int mq_required, Error **errp)
+ const char *setup_script, char *ifname,
+ size_t ifname_sz, const char *bridge, int mq_required, Error **errp)
{
Error *err = NULL;
int fd, vnet_hdr_required;
@@ -629,7 +630,7 @@
@@ -671,7 +672,7 @@ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr,
if (setup_script &&
setup_script[0] != '\0' &&
strcmp(setup_script, "no") != 0) {
Expand All @@ -53,14 +57,20 @@
if (err) {
error_propagate(errp, err);
close(fd);
@@ -918,7 +919,9 @@

@@ -1003,8 +1004,14 @@ free_fail:
}

for (i = 0; i < queues; i++) {
fd = net_tap_init(tap, &vnet_hdr, i >= 1 ? "no" : script,
- fd = net_tap_init(tap, &vnet_hdr, i >= 1 ? "no" : script,
- ifname, sizeof ifname, queues > 1, errp);
+ ifname, sizeof ifname,
+ tap->has_br ? tap->br : "bn1",
+ queues > 1, errp);
+
+ if(tap->br == NULL)
+ fd = net_tap_init(tap, &vnet_hdr, i >= 1 ? "no" : script,
+ ifname, sizeof ifname, "bn1" , queues > 1, errp);
+ else
+ fd = net_tap_init(tap, &vnet_hdr, i >= 1 ? "no" : script,
+ ifname, sizeof ifname, tap->br , queues > 1, errp);
+
if (fd == -1) {
return -1;
}
Loading

0 comments on commit a641d23

Please sign in to comment.