source "package/unscd/Config.in"
source "package/util-linux/Config.in"
source "package/xen/Config.in"
+ source "package/xvisor/Config.in"
endmenu
menu "Text editors and viewers"
--- /dev/null
+From 99bbdc042ee4c92a13edcfeaf336aa755a199d0f Mon Sep 17 00:00:00 2001
+From: Anup Patel <anup@brainfault.org>
+Date: Sun, 11 Sep 2016 19:53:40 +0530
+Subject: [PATCH] Makefile: Fix oldconfig make target
+
+Use "-s" instead of "-o" option of "openconf/conf" tool because
+the "-o" option does not generate all required openconf files.
+
+Signed-off-by: Anup Patel <anup@brainfault.org>
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 149a682..e05e801 100644
+--- a/Makefile
++++ b/Makefile
+@@ -434,7 +434,7 @@ menuconfig:
+ oldconfig:
+ $(V)mkdir -p $(OPENCONF_TMPDIR)
+ $(V)$(MAKE) -C tools/openconf oldconfig
+- ./tools/openconf/conf -o $(OPENCONF_INPUT)
++ ./tools/openconf/conf -s $(OPENCONF_INPUT)
+
+ # Rule for "make savedefconfig"
+ .PHONY: savedefconfig
+--
+2.4.11
+
--- /dev/null
+From 6b49c1dbe0ac43e39eec97a7e79cf5fb995747dc Mon Sep 17 00:00:00 2001
+From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+Date: Mon, 12 Sep 2016 21:49:55 +0530
+Subject: [PATCH] openconf: do not check stdin
+
+Do not check if stdin is redirected when ask_silent is true, so the
+`yes` program can be used to answer the questions about new values.
+
+Example:
+
+ yes "" | make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig
+
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+Signed-off-by: Anup Patel <anup@brainfault.org>
+---
+ tools/openconf/conf.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/tools/openconf/conf.c b/tools/openconf/conf.c
+index a428058..711cf0b 100644
+--- a/tools/openconf/conf.c
++++ b/tools/openconf/conf.c
+@@ -65,16 +65,6 @@ static void strip(char *str)
+ *p-- = 0;
+ }
+
+-static void check_stdin(void)
+-{
+- if (!valid_stdin) {
+- printf("aborted!\n\n");
+- printf("Console input/output is redirected. ");
+- printf("Run 'make oldconfig' to update configuration.\n\n");
+- exit(1);
+- }
+-}
+-
+ static int conf_askvalue(struct symbol *sym, const char *def)
+ {
+ char *ret;
+@@ -100,7 +90,6 @@ static int conf_askvalue(struct symbol *sym, const char *def)
+ printf("%s\n", def);
+ return 0;
+ }
+- check_stdin();
+ case ask_all:
+ fflush(stdout);
+ ret = fgets(line, 128, stdin);
+@@ -306,7 +295,6 @@ static int conf_choice(struct menu *menu)
+ printf("%d\n", cnt);
+ break;
+ }
+- check_stdin();
+ case ask_all:
+ fflush(stdout);
+ ret = fgets(line, 128, stdin);
+--
+2.4.11
+
--- /dev/null
+menuconfig BR2_PACKAGE_XVISOR
+ bool "xvisor"
+ depends on BR2_USE_MMU
+ depends on BR2_arm || BR2_aarch64 || BR2_x86_64
+ depends on !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV7M
+ help
+ Xvisor is an open-source type-1 hypervisor, which aims at providing
+ a monolithic, light-weight, portable, and flexible virtualization
+ solution.
+
+ http://www.xhypervisor.org/
+
+if BR2_PACKAGE_XVISOR
+
+choice
+ prompt "Xvisor configuration"
+ default BR2_PACKAGE_XVISOR_USE_DEFCONFIG
+
+config BR2_PACKAGE_XVISOR_USE_DEFCONFIG
+ bool "Using an in-tree defconfig file"
+
+config BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG
+ bool "Using a custom (def)config file"
+
+endchoice
+
+config BR2_PACKAGE_XVISOR_DEFCONFIG
+ string "Defconfig name"
+ depends on BR2_PACKAGE_XVISOR_USE_DEFCONFIG
+ default "generic-v5" if BR2_ARM_CPU_ARMV5
+ default "generic-v6" if BR2_ARM_CPU_ARMV6
+ default "generic-v7" if BR2_ARM_CPU_ARMV7A
+ default "generic-v8" if BR2_AARCH64
+ default "x86_64_generic" if BR2_x86_64
+ help
+ Name of the Xvisor defconfig file to use, without the
+ trailing -defconfig. The defconfig is located in
+ arch/<arch>/configs in the source tree.
+
+config BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE
+ string "Configuration file path"
+ depends on BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG
+ help
+ Path to the Xvisor configuration file
+
+config BR2_PACKAGE_XVISOR_CREATE_UBOOT_IMAGE
+ bool "Create U-Boot image of Xvisor"
+ depends on BR2_arm
+ select BR2_PACKAGE_HOST_UBOOT_TOOLS
+ help
+ Create an image file of Xvisor loadable from Das U-Boot.
+
+config BR2_PACKAGE_XVISOR_BUILD_TEST_DTB
+ bool "Build test device-tree blobs"
+ help
+ Build test device-tree blobs for popular boards.
+
+endif
--- /dev/null
+# Locally generated
+sha256 9347080c3481fb8586d196dd51a580a57084bfea1bc425e89f7fa0da7170708a xvisor-0.2.8.tar.gz
--- /dev/null
+################################################################################
+#
+# xvisor
+#
+################################################################################
+
+XVISOR_VERSION = 0.2.8
+XVISOR_SITE = http://www.xhypervisor.org/tarball
+XVISOR_LICENSE = GPLv2+
+XVISOR_LICENSE_FILES = COPYING
+XVISOR_INSTALL_IMAGES = YES
+XVISOR_INSTALL_TARGET = NO
+
+XVISOR_MAKE_TARGETS = all
+
+ifeq ($(BR2_PACKAGE_XVISOR_BUILD_TEST_DTB),y)
+XVISOR_MAKE_TARGETS += dtbs
+endif
+
+XVISOR_KCONFIG_DOTCONFIG = build/openconf/.config
+
+ifeq ($(BR2_PACKAGE_XVISOR_USE_DEFCONFIG),y)
+XVISOR_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_PACKAGE_XVISOR_DEFCONFIG))-defconfig
+else ifeq ($(BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG),y)
+XVISOR_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE))
+endif
+XVISOR_KCONFIG_EDITORS = menuconfig
+
+XVISOR_MAKE_ENV = \
+ ARCH=$(if $(BR2_x86_64),x86,$(BR2_ARCH)) \
+ CROSS_COMPILE=$(TARGET_CROSS)
+
+XVISOR_MAKE_OPTS = $(if $(VERBOSE),VERBOSE=1)
+
+define XVISOR_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(XVISOR_MAKE_ENV) $(MAKE) $(XVISOR_MAKE_OPTS) \
+ -C $(@D) $(XVISOR_MAKE_TARGETS)
+endef
+
+define XVISOR_INSTALL_IMAGES_CMDS
+ $(INSTALL) -m 0644 -D $(@D)/build/vmm.bin $(BINARIES_DIR)/vmm.bin
+endef
+
+ifeq ($(BR2_PACKAGE_XVISOR_CREATE_UBOOT_IMAGE),y)
+XVISOR_DEPENDENCIES += host-uboot-tools
+define XVISOR_CREATE_UBOOT_IMAGE
+ $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux -T kernel -C none \
+ -a 0x00008000 -e 0x00008000 \
+ -n Xvisor -d $(BINARIES_DIR)/vmm.bin $(BINARIES_DIR)/uvmm.bin
+endef
+endif
+
+XVISOR_POST_INSTALL_IMAGES_HOOKS += XVISOR_CREATE_UBOOT_IMAGE
+
+# Checks to give errors that the user can understand
+ifeq ($(BR_BUILDING),y)
+
+ifeq ($(BR2_PACKAGE_XVISOR_USE_DEFCONFIG),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_XVISOR_DEFCONFIG)),)
+$(error No Xvisor defconfig name specified, check your BR2_PACKAGE_XVISOR_DEFCONFIG setting)
+endif
+endif
+
+ifeq ($(BR2_PACKAGE_XVISOR_USE_CUSTOM_CONFIG),y)
+ifeq ($(BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE),)
+$(error No Xvisor configuration file specified, check your BR2_PACKAGE_XVISOR_CUSTOM_CONFIG_FILE setting)
+endif
+endif
+
+endif
+
+$(eval $(kconfig-package))