From e40ca97d71330c153041b4db856698be8a47c823 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Sat, 10 Feb 2024 23:26:59 +0100 Subject: [PATCH] package/jailhouse: install files to /usr The jailhouse package installs files in the /usr/local prefix. This is not convenient, because the jailhouse binary ends up in /usr/local/sbin, which is not in the default Buildroot PATH. See [1]. Moreover, all other Buildroot packages install files in /usr. This is because the Buildroot package recipe does not set any prefix value, and the upstream Jailhouse Makefile has a default to /usr/local. See [2]. This commit sets the prefix value in the JAILHOUSE_MAKE_OPTS and also updates other installation commands to put all the files in /usr. [1] https://gitlab.com/buildroot.org/buildroot/-/blob/2023.11.1/system/Config.in#L495 [2] https://github.com/siemens/jailhouse/blob/v0.12/scripts/include.mk#L22 Signed-off-by: Julien Olivain Signed-off-by: Yann E. MORIN --- package/jailhouse/jailhouse.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/jailhouse/jailhouse.mk b/package/jailhouse/jailhouse.mk index c239e75e76..e7de40cf8c 100644 --- a/package/jailhouse/jailhouse.mk +++ b/package/jailhouse/jailhouse.mk @@ -15,7 +15,8 @@ JAILHOUSE_MAKE_OPTS = \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(KERNEL_ARCH)" \ KDIR="$(LINUX_DIR)" \ - DESTDIR="$(TARGET_DIR)" + DESTDIR="$(TARGET_DIR)" \ + prefix=/usr ifeq ($(BR2_PACKAGE_JAILHOUSE_HELPER_SCRIPTS),y) JAILHOUSE_DEPENDENCIES += \ @@ -60,8 +61,8 @@ define JAILHOUSE_INSTALL_TARGET_CMDS $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/jailhouse $(INSTALL) -D -m 0644 $(@D)/configs/*/*.cell $(TARGET_DIR)/etc/jailhouse - $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/local/libexec/jailhouse/demos - $(INSTALL) -D -m 0755 $(@D)/inmates/demos/*/*.bin $(TARGET_DIR)/usr/local/libexec/jailhouse/demos + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/libexec/jailhouse/demos + $(INSTALL) -D -m 0755 $(@D)/inmates/demos/*/*.bin $(TARGET_DIR)/usr/libexec/jailhouse/demos $(JAILHOUSE_INSTALL_HELPER_SCRIPTS) endef