From: Jan Kiszka <jan.kis...@siemens.com>

Buster brings gcc 8, and that means we need the related patch for
Jailhouse 0.11.

The non-root-initramfs has to be switches to newer rules format that
allows to disable fakeroot reliably (to avoid the nesting issue).

And the orangepi target can drop the u-boot backport pick - injecting
additional apt sources via the machine conf was broken anyway and would
have exploded when adding a second ARM target.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
---
 conf/distro/jailhouse-demo.conf                    |  2 +-
 conf/machine/orangepi-zero.conf                    |  3 --
 conf/machine/preferences.orangepi-zero.conf        |  7 ---
 .../non-root-initramfs/files/debian/control        |  3 +-
 recipes-core/non-root-initramfs/files/debian/rules | 10 +---
 .../files/0001-arm-Fix-build-with-gcc-8.patch      | 56 ++++++++++++++++++++++
 recipes-jailhouse/jailhouse/jailhouse_0.11.bb      |  3 +-
 7 files changed, 62 insertions(+), 22 deletions(-)
 delete mode 100644 conf/machine/preferences.orangepi-zero.conf
 create mode 100644 
recipes-jailhouse/jailhouse/files/0001-arm-Fix-build-with-gcc-8.patch

diff --git a/conf/distro/jailhouse-demo.conf b/conf/distro/jailhouse-demo.conf
index faf2455..93bd0a1 100644
--- a/conf/distro/jailhouse-demo.conf
+++ b/conf/distro/jailhouse-demo.conf
@@ -9,7 +9,7 @@
 # SPDX-License-Identifier: MIT
 #
 
-require conf/distro/debian-stretch.conf
+require conf/distro/debian-buster.conf
 
 KERNEL_NAME ?= "jailhouse"
 
diff --git a/conf/machine/orangepi-zero.conf b/conf/machine/orangepi-zero.conf
index 8d6c134..fb7bb2e 100644
--- a/conf/machine/orangepi-zero.conf
+++ b/conf/machine/orangepi-zero.conf
@@ -14,7 +14,4 @@ DISTRO_ARCH = "armhf"
 IMAGE_TYPE = "wic-img"
 IMAGER_INSTALL += "u-boot-sunxi"
 
-DISTRO_APT_SOURCES_append = " conf/distro/debian-buster.list"
-DISTRO_APT_PREFERENCES += "conf/machine/preferences.orangepi-zero.conf"
-
 IMAGE_INSTALL += "u-boot-script xradio-${KERNEL_NAME}"
diff --git a/conf/machine/preferences.orangepi-zero.conf 
b/conf/machine/preferences.orangepi-zero.conf
deleted file mode 100644
index 0bdd9ec..0000000
--- a/conf/machine/preferences.orangepi-zero.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-Package: u-boot*
-Pin: release n=buster
-Pin-Priority: 501
-
-Package: *
-Pin: release n=buster
-Pin-Priority: -1
diff --git a/recipes-core/non-root-initramfs/files/debian/control 
b/recipes-core/non-root-initramfs/files/debian/control
index 059fb16..5ff2c5c 100644
--- a/recipes-core/non-root-initramfs/files/debian/control
+++ b/recipes-core/non-root-initramfs/files/debian/control
@@ -1,9 +1,10 @@
 Source: non-root-initramfs
 Section: misc
 Priority: optional
-Standards-Version: 3.9.6
+Standards-Version: 4.3.0
 Build-Depends: wget, cpio, unzip, rsync, python:native, bc
 Maintainer: Jan Kiszka <jan.kis...@siemens.com>
+Rules-Requires-Root: no
 
 Package: non-root-initramfs
 Architecture: any
diff --git a/recipes-core/non-root-initramfs/files/debian/rules 
b/recipes-core/non-root-initramfs/files/debian/rules
index 0f7f079..6f2638b 100755
--- a/recipes-core/non-root-initramfs/files/debian/rules
+++ b/recipes-core/non-root-initramfs/files/debian/rules
@@ -13,22 +13,14 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
-build-image:
+override_dh_auto_configure:
        cp ../.config .
        ${MAKE} olddefconfig
-       ${MAKE}
-
-# Only this target runs outside of fakeroot. We need to hook into it because
-# buildroot uses fakeroot itself.
-build: build-image
 
 # This target saves autotools outputs from output/. But we perform a clean
 # rebuild so that restoring the files may fail and is also not needed.
 override_dh_update_autotools_config:
 
-# We are building via build-image.
-override_dh_auto_build:
-
 # No test desired.
 override_dh_auto_test:
 
diff --git 
a/recipes-jailhouse/jailhouse/files/0001-arm-Fix-build-with-gcc-8.patch 
b/recipes-jailhouse/jailhouse/files/0001-arm-Fix-build-with-gcc-8.patch
new file mode 100644
index 0000000..ade9989
--- /dev/null
+++ b/recipes-jailhouse/jailhouse/files/0001-arm-Fix-build-with-gcc-8.patch
@@ -0,0 +1,56 @@
+From 9f233898917f8c1141132606f2f2c624405d8c81 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kis...@siemens.com>
+Date: Sat, 13 Jul 2019 12:08:40 +0200
+Subject: [PATCH] arm: Fix build with gcc-8
+
+The inline .arch_extension statements are ignored by gcc-8. We rather
+need -march=armv7ve now.
+
+To keep older gcc prior to version 5 happy, leave the inline statements
+in place. Can be removed once we require newer gcc for other reasons.
+
+Reported-by: Vitaly Andrianov <vita...@ti.com>
+Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>
+---
+ hypervisor/arch/arm/Makefile              | 2 +-
+ hypervisor/arch/arm/include/asm/smc.h     | 1 +
+ hypervisor/arch/arm/include/asm/sysregs.h | 1 +
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/hypervisor/arch/arm/Makefile b/hypervisor/arch/arm/Makefile
+index 2f930cf3..a170b593 100644
+--- a/hypervisor/arch/arm/Makefile
++++ b/hypervisor/arch/arm/Makefile
+@@ -12,4 +12,4 @@
+ 
+ LINUXINCLUDE += -I$(src)/arch/arm-common/include
+ 
+-KBUILD_CFLAGS += -marm
++KBUILD_CFLAGS += -marm -march=armv7ve
+diff --git a/hypervisor/arch/arm/include/asm/smc.h 
b/hypervisor/arch/arm/include/asm/smc.h
+index 34944a2d..5cde3d8b 100644
+--- a/hypervisor/arch/arm/include/asm/smc.h
++++ b/hypervisor/arch/arm/include/asm/smc.h
+@@ -10,6 +10,7 @@
+  * the COPYING file in the top-level directory.
+  */
+ 
++/* for gcc < 5 */
+ asm (".arch_extension sec\n");
+ 
+ static inline int smc(unsigned long id)
+diff --git a/hypervisor/arch/arm/include/asm/sysregs.h 
b/hypervisor/arch/arm/include/asm/sysregs.h
+index 76dd5b55..b7eaccf6 100644
+--- a/hypervisor/arch/arm/include/asm/sysregs.h
++++ b/hypervisor/arch/arm/include/asm/sysregs.h
+@@ -283,6 +283,7 @@
+ #define arm_read_sysreg(...) _arm_read_sysreg(__VA_ARGS__)
+ 
+ #ifndef __ASSEMBLY__
++/* for gcc < 5 */
+ asm(".arch_extension virt\n");
+ 
+ #define arm_write_sysreg_32(op1, crn, crm, op2, val) \
+-- 
+2.16.4
+
diff --git a/recipes-jailhouse/jailhouse/jailhouse_0.11.bb 
b/recipes-jailhouse/jailhouse/jailhouse_0.11.bb
index 4d7aca1..5df3597 100644
--- a/recipes-jailhouse/jailhouse/jailhouse_0.11.bb
+++ b/recipes-jailhouse/jailhouse/jailhouse_0.11.bb
@@ -13,7 +13,8 @@ require jailhouse.inc
 
 SRC_URI += " \
     file://nuc6cay_0.11.c \
-    file://linux-nuc6cay-demo_0.11.c"
+    file://linux-nuc6cay-demo_0.11.c \
+    file://0001-arm-Fix-build-with-gcc-8.patch"
 
 SRCREV = "58052a7a9d1f5904d72b1637282c877172ee69f6"
 
-- 
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/77b3324d369a9e22fec6165566f4f75be4b47c71.1567490365.git.jan.kiszka%40siemens.com.

Reply via email to