* [Buildroot] [PATCH V2 0/2] Introducing Xvisor
@ 2016-09-13 19:45 Eric Le Bihan
2016-09-13 19:45 ` [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location Eric Le Bihan
2016-09-13 19:45 ` [Buildroot] [PATCH V2 2/2] xvisor: new package Eric Le Bihan
0 siblings, 2 replies; 6+ messages in thread
From: Eric Le Bihan @ 2016-09-13 19:45 UTC (permalink / raw)
To: buildroot
This small series introduces Xvisor, an open-source type-1 hypervisor.
As it uses a kconfig clone named openconf, a patch to the kconfig-package
infrastructure is also provided, in order to support it.
v1->v2:
- change $(2)_KCONFIG_DOTCONFIG to be relative to package source directory.
- clarify comments about creation of .config directory hierarchy.
- clean-up xvisor Config.in.
Eric Le Bihan (2):
pkg-kconfig: support alternative .config location
xvisor: new package
package/Config.in | 1 +
package/pkg-kconfig.mk | 14 +++--
.../0001-Makefile-Fix-oldconfig-make-target.patch | 30 +++++++++
.../xvisor/0002-openconf-do-not-check-stdin.patch | 58 +++++++++++++++++
package/xvisor/Config.in | 58 +++++++++++++++++
package/xvisor/xvisor.hash | 2 +
package/xvisor/xvisor.mk | 72 ++++++++++++++++++++++
7 files changed, 229 insertions(+), 6 deletions(-)
create mode 100644 package/xvisor/0001-Makefile-Fix-oldconfig-make-target.patch
create mode 100644 package/xvisor/0002-openconf-do-not-check-stdin.patch
create mode 100644 package/xvisor/Config.in
create mode 100644 package/xvisor/xvisor.hash
create mode 100644 package/xvisor/xvisor.mk
--
2.4.11
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location
2016-09-13 19:45 [Buildroot] [PATCH V2 0/2] Introducing Xvisor Eric Le Bihan
@ 2016-09-13 19:45 ` Eric Le Bihan
2016-09-13 22:32 ` Yann E. MORIN
2016-09-17 13:18 ` Thomas Petazzoni
2016-09-13 19:45 ` [Buildroot] [PATCH V2 2/2] xvisor: new package Eric Le Bihan
1 sibling, 2 replies; 6+ messages in thread
From: Eric Le Bihan @ 2016-09-13 19:45 UTC (permalink / raw)
To: buildroot
Kconfig clones, such as openconf used by xvisor [1], do not look for
.config at the root of the build directory, but in a subdirectory (e.g.
build/openconf).
This patch introduces a new Makefile variable named
$(2)_KCONFIG_DOTCONFIG, which contains the path to .config relative to
the source directory of the package. It defaults to .config and can be
overridden in the package Makefile.
It also creates the full directory hierarchy where the .config file is
stored, in case it does not exist (e.g. in xvisor).
This allows the use of the kconfig-package infrastructure with packages
relying on such clones.
[1] https://github.com/xvisor/xvisor/tree/master/tools/openconf
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
package/pkg-kconfig.mk | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index b0f5178..ad5bbfc 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -36,6 +36,7 @@ $(2)_KCONFIG_EDITORS ?= menuconfig
$(2)_KCONFIG_OPTS ?=
$(2)_KCONFIG_FIXUP_CMDS ?=
$(2)_KCONFIG_FRAGMENT_FILES ?=
+$(2)_KCONFIG_DOTCONFIG ?= .config
# The config file as well as the fragments could be in-tree, so before
# depending on them the package should be extracted (and patched) first.
@@ -91,9 +92,10 @@ endef
# fragments are merged together to .config, after the package has been patched.
# Since the file could be a defconfig file it needs to be expanded to a
# full .config first.
-$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
+$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG): $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
$$(Q)$$(if $$($(2)_KCONFIG_DEFCONFIG), \
$$($(2)_KCONFIG_MAKE) $$($(2)_KCONFIG_DEFCONFIG), \
+ mkdir -p $$(@D); \
cp $$($(2)_KCONFIG_FILE) $$(@))
$$(Q)support/kconfig/merge_config.sh -m -O $$(@D) \
$$(@) $$($(2)_KCONFIG_FRAGMENT_FILES)
@@ -102,7 +104,7 @@ $$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
# If _KCONFIG_FILE or _KCONFIG_FRAGMENT_FILES exists, this dependency is
# already implied, but if we only have a _KCONFIG_DEFCONFIG we have to add
# it explicitly. It doesn't hurt to always have it though.
-$$($(2)_DIR)/.config: | $(1)-patch
+$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG): | $(1)-patch
# In order to get a usable, consistent configuration, some fixup may be needed.
# The exact rules are specified by the package .mk file.
@@ -112,7 +114,7 @@ define $(2)_FIXUP_DOT_CONFIG
$$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done
endef
-$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config
+$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)
$$($(2)_FIXUP_DOT_CONFIG)
# Before running configure, the configuration file should be present and fixed
@@ -202,8 +204,8 @@ $(1)-update-config: $(1)-check-configuration-done
echo "Unable to perform $(1)-update-config when fragment files are set"; exit 1)
@$$(if $$($(2)_KCONFIG_DEFCONFIG), \
echo "Unable to perform $(1)-update-config when using a defconfig rule"; exit 1)
- cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
- touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
+ cp -f $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
+ touch --reference $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
# Note: make sure the timestamp of the stored configuration is not newer than
# the .config to avoid a useless rebuild. Note that, contrary to
@@ -215,7 +217,7 @@ $(1)-update-defconfig: $(1)-savedefconfig
@$$(if $$($(2)_KCONFIG_DEFCONFIG), \
echo "Unable to perform $(1)-update-defconfig when using a defconfig rule"; exit 1)
cp -f $$($(2)_DIR)/defconfig $$($(2)_KCONFIG_FILE)
- touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
+ touch --reference $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
endif # package enabled
--
2.4.11
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH V2 2/2] xvisor: new package
2016-09-13 19:45 [Buildroot] [PATCH V2 0/2] Introducing Xvisor Eric Le Bihan
2016-09-13 19:45 ` [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location Eric Le Bihan
@ 2016-09-13 19:45 ` Eric Le Bihan
2016-09-17 13:35 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Eric Le Bihan @ 2016-09-13 19:45 UTC (permalink / raw)
To: buildroot
This new package provides Xvisor, an open-source type-1 hypervisor,
which aims at providing a monolithic, light-weight, portable, and
flexible virtualization solution.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
package/Config.in | 1 +
.../0001-Makefile-Fix-oldconfig-make-target.patch | 30 +++++++++
.../xvisor/0002-openconf-do-not-check-stdin.patch | 58 +++++++++++++++++
package/xvisor/Config.in | 58 +++++++++++++++++
package/xvisor/xvisor.hash | 2 +
package/xvisor/xvisor.mk | 72 ++++++++++++++++++++++
6 files changed, 221 insertions(+)
create mode 100644 package/xvisor/0001-Makefile-Fix-oldconfig-make-target.patch
create mode 100644 package/xvisor/0002-openconf-do-not-check-stdin.patch
create mode 100644 package/xvisor/Config.in
create mode 100644 package/xvisor/xvisor.hash
create mode 100644 package/xvisor/xvisor.mk
diff --git a/package/Config.in b/package/Config.in
index 332f05d..d571b89 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1732,6 +1732,7 @@ menu "System tools"
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"
diff --git a/package/xvisor/0001-Makefile-Fix-oldconfig-make-target.patch b/package/xvisor/0001-Makefile-Fix-oldconfig-make-target.patch
new file mode 100644
index 0000000..f056625
--- /dev/null
+++ b/package/xvisor/0001-Makefile-Fix-oldconfig-make-target.patch
@@ -0,0 +1,30 @@
+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
+
diff --git a/package/xvisor/0002-openconf-do-not-check-stdin.patch b/package/xvisor/0002-openconf-do-not-check-stdin.patch
new file mode 100644
index 0000000..34b350d
--- /dev/null
+++ b/package/xvisor/0002-openconf-do-not-check-stdin.patch
@@ -0,0 +1,58 @@
+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
+
diff --git a/package/xvisor/Config.in b/package/xvisor/Config.in
new file mode 100644
index 0000000..f450f6f
--- /dev/null
+++ b/package/xvisor/Config.in
@@ -0,0 +1,58 @@
+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
diff --git a/package/xvisor/xvisor.hash b/package/xvisor/xvisor.hash
new file mode 100644
index 0000000..13335be
--- /dev/null
+++ b/package/xvisor/xvisor.hash
@@ -0,0 +1,2 @@
+# Locally generated
+sha256 9347080c3481fb8586d196dd51a580a57084bfea1bc425e89f7fa0da7170708a xvisor-0.2.8.tar.gz
diff --git a/package/xvisor/xvisor.mk b/package/xvisor/xvisor.mk
new file mode 100644
index 0000000..0e7b995
--- /dev/null
+++ b/package/xvisor/xvisor.mk
@@ -0,0 +1,72 @@
+################################################################################
+#
+# 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)/build/vmm.bin $(BINARIES_DIR)
+endef
+
+ifeq ($(BR2_PACKAGE_XVISOR_CREATE_UBOOT_IMAGE),y)
+XVISOR_DEPENDENCIES += host-uboot-tools
+define XVISOR_CREATE_UBOOT_IMAGE
+ $(HOST_DIR)/usr/bin/mkimage -A $(BR2_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))
--
2.4.11
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location
2016-09-13 19:45 ` [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location Eric Le Bihan
@ 2016-09-13 22:32 ` Yann E. MORIN
2016-09-17 13:18 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2016-09-13 22:32 UTC (permalink / raw)
To: buildroot
?ric, All,
On 2016-09-13 21:45 +0200, Eric Le Bihan spake thusly:
> Kconfig clones, such as openconf used by xvisor [1], do not look for
> .config at the root of the build directory, but in a subdirectory (e.g.
> build/openconf).
>
> This patch introduces a new Makefile variable named
> $(2)_KCONFIG_DOTCONFIG, which contains the path to .config relative to
> the source directory of the package. It defaults to .config and can be
> overridden in the package Makefile.
>
> It also creates the full directory hierarchy where the .config file is
> stored, in case it does not exist (e.g. in xvisor).
>
> This allows the use of the kconfig-package infrastructure with packages
> relying on such clones.
>
> [1] https://github.com/xvisor/xvisor/tree/master/tools/openconf
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
> package/pkg-kconfig.mk | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
> index b0f5178..ad5bbfc 100644
> --- a/package/pkg-kconfig.mk
> +++ b/package/pkg-kconfig.mk
> @@ -36,6 +36,7 @@ $(2)_KCONFIG_EDITORS ?= menuconfig
> $(2)_KCONFIG_OPTS ?=
> $(2)_KCONFIG_FIXUP_CMDS ?=
> $(2)_KCONFIG_FRAGMENT_FILES ?=
> +$(2)_KCONFIG_DOTCONFIG ?= .config
By the way, explanations in the manual for this new variable would be
nice. Well, it would even be mandatory. ;-) Make it another patch (we
usually add the documentation in a separate, following patch).
Maybe something like:
*FOO_KCONFIG_DOTCONFIG* is the path (with filename) of the +.config+
file, relative to the package source tree. The default, +.config+,
should be well suited for all packages that use the standard kconfig
infrastructure as inherited from the Linux kernel; some packages use
a derivative of kconfig that use a different location.
Otherwise:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
But see a small comment, below...
> # The config file as well as the fragments could be in-tree, so before
> # depending on them the package should be extracted (and patched) first.
> @@ -91,9 +92,10 @@ endef
> # fragments are merged together to .config, after the package has been patched.
> # Since the file could be a defconfig file it needs to be expanded to a
> # full .config first.
> -$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
> +$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG): $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
> $$(Q)$$(if $$($(2)_KCONFIG_DEFCONFIG), \
> $$($(2)_KCONFIG_MAKE) $$($(2)_KCONFIG_DEFCONFIG), \
> + mkdir -p $$(@D); \
> cp $$($(2)_KCONFIG_FILE) $$(@))
I knw the 'cp' was already there, and that you added the 'mkdir'.
However, when we need to copy a file for which it may be necessary to
create the parent directory, usinf "install" ( $(INSTALL) in Buildroot)
can do both at the same time:
$(INSTALL) -m 0644 -D $$($(2)_KCONFIG_FILE) $$(@)
(but don't forget the closing parenthesis, to close the '$(if'.)
Regards,
Yann E. MORIN.
> $$(Q)support/kconfig/merge_config.sh -m -O $$(@D) \
> $$(@) $$($(2)_KCONFIG_FRAGMENT_FILES)
> @@ -102,7 +104,7 @@ $$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES)
> # If _KCONFIG_FILE or _KCONFIG_FRAGMENT_FILES exists, this dependency is
> # already implied, but if we only have a _KCONFIG_DEFCONFIG we have to add
> # it explicitly. It doesn't hurt to always have it though.
> -$$($(2)_DIR)/.config: | $(1)-patch
> +$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG): | $(1)-patch
>
> # In order to get a usable, consistent configuration, some fixup may be needed.
> # The exact rules are specified by the package .mk file.
> @@ -112,7 +114,7 @@ define $(2)_FIXUP_DOT_CONFIG
> $$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done
> endef
>
> -$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config
> +$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)
> $$($(2)_FIXUP_DOT_CONFIG)
>
> # Before running configure, the configuration file should be present and fixed
> @@ -202,8 +204,8 @@ $(1)-update-config: $(1)-check-configuration-done
> echo "Unable to perform $(1)-update-config when fragment files are set"; exit 1)
> @$$(if $$($(2)_KCONFIG_DEFCONFIG), \
> echo "Unable to perform $(1)-update-config when using a defconfig rule"; exit 1)
> - cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
> - touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
> + cp -f $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
> + touch --reference $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
>
> # Note: make sure the timestamp of the stored configuration is not newer than
> # the .config to avoid a useless rebuild. Note that, contrary to
> @@ -215,7 +217,7 @@ $(1)-update-defconfig: $(1)-savedefconfig
> @$$(if $$($(2)_KCONFIG_DEFCONFIG), \
> echo "Unable to perform $(1)-update-defconfig when using a defconfig rule"; exit 1)
> cp -f $$($(2)_DIR)/defconfig $$($(2)_KCONFIG_FILE)
> - touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
> + touch --reference $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_KCONFIG_FILE)
>
> endif # package enabled
>
> --
> 2.4.11
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location
2016-09-13 19:45 ` [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location Eric Le Bihan
2016-09-13 22:32 ` Yann E. MORIN
@ 2016-09-17 13:18 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-09-17 13:18 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 13 Sep 2016 21:45:33 +0200, Eric Le Bihan wrote:
> Kconfig clones, such as openconf used by xvisor [1], do not look for
> .config at the root of the build directory, but in a subdirectory (e.g.
> build/openconf).
>
> This patch introduces a new Makefile variable named
> $(2)_KCONFIG_DOTCONFIG, which contains the path to .config relative to
> the source directory of the package. It defaults to .config and can be
> overridden in the package Makefile.
>
> It also creates the full directory hierarchy where the .config file is
> stored, in case it does not exist (e.g. in xvisor).
>
> This allows the use of the kconfig-package infrastructure with packages
> relying on such clones.
>
> [1] https://github.com/xvisor/xvisor/tree/master/tools/openconf
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
> package/pkg-kconfig.mk | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
I've applied after changing the mkdir+cp combination to a call to
install -D, as suggested by Yann.
I've also added a follow-up commit that documents this new variable.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH V2 2/2] xvisor: new package
2016-09-13 19:45 ` [Buildroot] [PATCH V2 2/2] xvisor: new package Eric Le Bihan
@ 2016-09-17 13:35 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-09-17 13:35 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 13 Sep 2016 21:45:34 +0200, Eric Le Bihan wrote:
> This new package provides Xvisor, an open-source type-1 hypervisor,
> which aims at providing a monolithic, light-weight, portable, and
> flexible virtualization solution.
>
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
I've applied, after doing a few changes, see below.
> diff --git a/package/xvisor/xvisor.mk b/package/xvisor/xvisor.mk
> new file mode 100644
> index 0000000..0e7b995
> --- /dev/null
> +++ b/package/xvisor/xvisor.mk
> @@ -0,0 +1,72 @@
> +################################################################################
> +#
> +# xvisor
> +#
> +################################################################################
> +
> +XVISOR_VERSION = 0.2.8
> +XVISOR_SITE = http://www.xhypervisor.org/tarball
> +XVISOR_LICENSE = GPLv2
Licensing is GPLv2+, all files that I checked say "GPLv2 or later".
> +define XVISOR_CREATE_UBOOT_IMAGE
> + $(HOST_DIR)/usr/bin/mkimage -A $(BR2_ARCH) -O linux -T kernel -C none \
I've used $(MKIMAGE) instead of $(HOST_DIR)/usr/bin/mkimage, and
$(MKIMAGE_ARCH) instead of $(BR2_ARCH).
Applied with those changes.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-09-17 13:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-13 19:45 [Buildroot] [PATCH V2 0/2] Introducing Xvisor Eric Le Bihan
2016-09-13 19:45 ` [Buildroot] [PATCH V2 1/2] pkg-kconfig: support alternative .config location Eric Le Bihan
2016-09-13 22:32 ` Yann E. MORIN
2016-09-17 13:18 ` Thomas Petazzoni
2016-09-13 19:45 ` [Buildroot] [PATCH V2 2/2] xvisor: new package Eric Le Bihan
2016-09-17 13:35 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox