All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add INSTALL file
@ 2014-10-17 14:50 Olaf Hering
  2014-10-18 20:47 ` Julien Grall
  2014-10-20  9:10 ` Andrew Cooper
  0 siblings, 2 replies; 12+ messages in thread
From: Olaf Hering @ 2014-10-17 14:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering

Document how to use configure and what to pass to make(1).

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---

Just to get it out of the door, finally...

 INSTALL | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 README  |   3 +-
 2 files changed, 288 insertions(+), 2 deletions(-)

diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..99c1383
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,287 @@
+
+Compiling Xen from source
+
+* Overview
+* Options recognized by configure
+* Variables recognized by make
+* History of options
+* Examples
+
+Overview
+========
+
+The xen source contains four subsystems: xen, tools, stubdom and docs.
+All but xen has to be prepared for build with a configure script in the
+toplevel directory. configure recognizes certain arguments and
+environment variables which is used to adjust various aspects of the
+following compile process. Once configure is done, make(1) has to be
+called. Also make recognizes certain arguments. The following sections
+will give an overview.
+
+Options recognized by configure
+===============================
+
+The configure script in the toplevel directory will recognize these
+options. It will pass them to the configure scripts in the tools,
+stubdomw and docs directory.
+
+Individual subsystems can be selected by one of the following options.
+Please note that stubdom requires tools. 
+  --disable-xen
+  --disable-tools
+  --enable-stubdom
+  --disable-docs
+
+The well known GNU configure options to specify the target directories.
+Note: prefix defaults to /usr/local, sysconfdir defaults to /etc,
+localstatedir defaults to /var.
+  --prefix=DIR
+  --libdir=DIR
+  --libexecdir=BASEDIR
+  --bindir=DIR
+  --sbindir=DIR
+  --sysconfdir=DIR
+  --sharedstatedir=DIR
+  --localstatedir=DIR
+  --includedir=DIR
+  --datarootdir=DIR
+  --datadir=DIR
+  --mandir=DIR
+  --docdir=DIR
+
+To automatically run the toolstack in dom0 during system startup some
+sysv runlevel scripts are installed. This option allows to set the path
+for a given system. Possible values are /etc/init.d, /etc/rc.d/init.d or
+/etc/rc.d. If not specified configure tries to guess the path.
+  --with-initddir=DIR
+
+The runlevel scripts load certain configuration files. They are
+typically located in a subdirectory of /etc. Possible values are this
+subdirectory are "sysconfig" or "default". If not specified configure
+tries to guess the subdir.
+  --with-sysconfig-leaf-dir=SUBDIR
+
+If the tools are configured with a non-standard --prefix the runtime
+linker will either not find the required libraries or it will load them
+from a wrong location. Compiling the tools with rpath will force the
+linker to look in the correct location.
+  --enable-rpath
+
+During build in a git checkout the buildsystem needs to download
+additional tools such as qemu. This is done with either the native git
+protocol, or via http if this option is enabled.
+  --enable-githttp
+
+Disable xenstat and xentop monitoring tools.
+  --disable-monitors
+
+Disable build of certain ocaml libaries and tools. To actually build
+them ocaml development packages must be installed. If they are missing
+configure will automatically disable this option.
+  --disable-ocamltools
+
+Disable XSM policy compilation.
+  --disable-xsmpolicy
+
+Attempt to build of an OVMF firmware binary. This requires special
+versions of development tools. Use at your own risk.
+  --enable-ovmf
+
+Use the given OVMF binary instead of compiling a private copy.
+  --with-system-ovmf=PATH
+
+Build a private copy of SeaBIOS.
+  --disable-seabios
+
+Use the given SeaBIOS binary instead of compiling a private copy.
+  --with-system-seabios=PATH
+
+Build the old qemu used by xm/xend. This is required if existing domUs
+should be migrated to this host, or if existing domU snapshots should be
+started with this version of the tools. Only if all domUs used the new
+upstream qemu during initial start it is safe to disable this option.
+The old qemu requires rombios, wich can be disable along with
+qemu-traditional.
+  --enable-qemu-traditional
+  --enable-rombios
+
+The libxl toolstack uses the upstream qemu per default. A private copy
+will be built. If desired this private copy can be configured with
+additional options passed to its configure script.
+  --with-extra-qemuu-configure-args="arg1 arg2"
+
+Use the given qemu binary instead of compiling a private copy.
+  --with-system-qemu=PATH
+
+A dom0 requires a set of backend drivers. The configure script already
+supplies a list of known drivers which are automatically loaded in dom0.
+This internal list can be changed with this option.
+  --with-linux-backend-modules="kmod1 kmod2"
+
+Two variants of a xenstored exist: the original xenstored written in C
+(xenstored) or the newer and robust one written in Ocaml (oxenstored).
+The oxenstored daemon is the default but can only be used if the
+required ocaml packages are installed. In case they are missing the
+original xenstored will be used. Valid names are xenstored and
+oxenstored.
+  --with-xenstored=name
+
+Using additional CFLAGS to build tools running in dom0 is required when
+building distro packages. This is the option to pass things like
+RPM_OPT_FLAGS.
+  --with-extra-cflags-tools=EXTRA_CFLAGS
+  --with-extra-cflags-qemu-traditional=EXTRA_CFLAGS
+  --with-extra-cflags-qemu-upstream=EXTRA_CFLAGS
+
+Instead of starting the tools in dom0 with sysv runlevel scripts they
+can also be started by systemd. If this option is enabled xenstored will
+receive the communication socked directly from systemd. So starting it
+manually will not work anymore. The paths to systemd internals can also
+be changed in case the default paths do not fit anymore.
+NOTE: if systemd development packages are installed the systemd support
+will be the enabled per default. Using --disable-systemd will override
+this detection and the sysv runlevel scripts have to be used.
+  --enable-systemd
+  --with-systemd=DIR
+  --with-systemd-modules-load=DIR
+
+The old backend drivers are disabled because qdisk is now the default.
+This option can be used to build them anyway.
+  --enable-blktap1
+  --enable-blktap2
+  
+Build various stubom components, some are only example code. Its usually
+enough to specify just --enable-stubdom and leave these options alone.
+  --enable-ioemu-stubdom
+  --enable-c-stubdom
+  --enable-caml-stubdom
+  --disable-pv-grub
+  --disable-xenstore-stubdom
+  --enable-vtpm-stubdom
+  --enable-vtpmmgr-stubdom
+  --disable-extfiles
+
+Per default some parts of the tools code will print additional runtime
+debug. This option can be used to disable such code paths.
+  --disable-debug
+
+Variables recognized by make
+==========================
+
+The following variables are recognized by the build system. They have to
+be passed as make options, like 'make variable=value'. Having these
+variables in the environment, like 'env variable=value make', will not
+work for most of them.
+
+The well known variable to specify an offset during make install,
+useful for packaing.
+DESTDIR=
+
+Per default some parts of the tools code will print additional runtime
+debug. This option can be used to disable such code paths. 
+debug=y
+debug_symbols=y
+
+If --prefix= was used during configure the and ocaml was enabled the
+resuling libraries will not be installed in the specified path. Instead
+the path provided by ocamlfind(1) will be used. This variable can be
+used to override this path. Using the environment variable
+OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the same effect.
+OCAMLDESTDIR=
+
+The xen subsystem will install the hypervisor into fixed locations.
+BOOT_DIR defaults to /boot, EFI_DIR to /usr/lib64/efi.
+BOOT_DIR=
+EFI_DIR=
+
+The make target 'rpmball' will build a xen.rpm. This variable can be
+used to append a custom string to the name.
+PKG_SUFFIX=
+
+The hypervisor will report a certain version string. This variable can
+be used to append a custom string to the version.
+XEN_VENDORVERSION=
+
+During boot xen will report a certain user@host string, which can be
+changed with these variables.
+XEN_WHOAMI=
+XEN_DOMAIN=
+
+The following variables can be used to tweak some aspects of the
+hypervisor build.
+verbose=y
+perfc=y
+perfc_arrays=y
+lock_profile=y
+crash_debug=y
+frame_pointer=y
+lto=y
+
+During tools build external repos will be cloned into the source tree.
+This variable can be used to point to a different git binary to be used.
+GIT=
+
+During tools build external repos will be cloned into the source tree.
+During stubdom build external packages will be downloaded into the
+source tree. These variables can be used to point to a different
+locations.
+XEN_EXTFILES_URL=
+OVMF_UPSTREAM_URL=
+QEMU_UPSTREAM_URL=
+QEMU_TRADITIONAL_URL=
+SEABIOS_UPSTREAM_URL=
+
+This variable can be used to use DIR/include and DIR/lib during build.
+This is the same as PREPEND_LIB and PREPEND_INCLUDES. APPEND_LIB and
+APPEND_INCLUDES= will be appendend to the CFLAGS/LDFLAGS variable.
+EXTRA_PREFIX=DIR
+PREPEND_LIB=DIR
+PREPEND_INCLUDES=DIR
+APPEND_LIB=DIR
+APPEND_INCLUDES=DIR
+
+While the tools build will set the path to the python binary with the
+configure script, the hypervisor build has to use this variable to use a
+different python binary.
+PYTHON=
+
+Building the python tools may fail unless certain options are passed to
+setup.py. Config.mk contains additional info how to use this variable.
+PYTHON_PREFIX_ARG=
+
+The hypervisor may be build with XSM support, which can be changed with
+the following variables.
+XSM_ENABLE=y
+FLASK_ENABLE=y
+
+Do a build to for coverage.
+coverage=y
+
+Use clang instead of GCC.
+clang=y
+
+
+History of options
+==================
+
+Prior to xen-4.5 configure recognized essentially only the --prefix= and
+--libdir= option to specify target directories. Starting with xen-4.5
+all paths can be adjusted once with configure.
+
+
+Examples
+========
+
+To build a private copy of tools and xen:
+configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
+make
+sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
+
+
+TODO
+====
+
+ - DESTDIR should be empty, not "/"
+ - add make uninstall targets
+ - replace private path variables as needed (SBINDIR/sbindir)
+ - ...
diff --git a/README b/README
index 414e5b9..8e5eb5e 100644
--- a/README
+++ b/README
@@ -110,8 +110,7 @@ performed with root privileges.]
     # make world
     # make install
 
-   If you want, you can run ./configure --help to see the list of
-   options available options when building and installing Xen.
+   See the documentation in the INSTALL file for more info.
 
    This will create and install onto the local machine. It will build
    the xen binary (xen.gz), the tools and the documentation.

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-17 14:50 [PATCH] Add INSTALL file Olaf Hering
@ 2014-10-18 20:47 ` Julien Grall
  2014-10-20  8:11   ` Olaf Hering
  2014-10-20  9:10 ` Andrew Cooper
  1 sibling, 1 reply; 12+ messages in thread
From: Julien Grall @ 2014-10-18 20:47 UTC (permalink / raw)
  To: Olaf Hering, xen-devel

Hi Olaf,

On 17/10/2014 15:50, Olaf Hering wrote:
> +Variables recognized by make
> +==========================

There is a bunch of variables missing in this section such as:
    - XEN_TARGET_ARCH: specify for which architecture we want to build Xen
    - CROSS_COMPILE: prefix of the toolchain (including the trailing 
dash "-")

This is very useful for compiling Xen ARM as it may be very slow to 
compile on the board.

> +
> +The following variables are recognized by the build system. They have to
> +be passed as make options, like 'make variable=value'. Having these
> +variables in the environment, like 'env variable=value make', will not
> +work for most of them.
> +
> +The well known variable to specify an offset during make install,
> +useful for packaing.

NIT: packaging

[..]

> +Do a build to for coverage.

Did you meant "Do a build for coverage"?

> +coverage=y

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-18 20:47 ` Julien Grall
@ 2014-10-20  8:11   ` Olaf Hering
  2014-10-20 12:24     ` Julien Grall
  0 siblings, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2014-10-20  8:11 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel

On Sat, Oct 18, Julien Grall wrote:

> On 17/10/2014 15:50, Olaf Hering wrote:
> >+Variables recognized by make
> >+==========================
> 
> There is a bunch of variables missing in this section such as:
>    - XEN_TARGET_ARCH: specify for which architecture we want to build Xen
>    - CROSS_COMPILE: prefix of the toolchain (including the trailing dash
> "-")
> 
> This is very useful for compiling Xen ARM as it may be very slow to compile
> on the board.

Do you have an example? Perhaps such thing should be added to the
Example section. So far I have not attempted a build on ARM.

> >+Do a build to for coverage.
> 
> Did you meant "Do a build for coverage"?

Yes, thanks for the review.

Olaf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-17 14:50 [PATCH] Add INSTALL file Olaf Hering
  2014-10-18 20:47 ` Julien Grall
@ 2014-10-20  9:10 ` Andrew Cooper
  2014-10-20  9:13   ` Ian Campbell
  2014-10-21 10:01   ` Olaf Hering
  1 sibling, 2 replies; 12+ messages in thread
From: Andrew Cooper @ 2014-10-20  9:10 UTC (permalink / raw)
  To: Olaf Hering, xen-devel

On 17/10/14 15:50, Olaf Hering wrote:
> Document how to use configure and what to pass to make(1).
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Fantastic document.

Is it possible to put a canonical list of build dependences in here?

> ---
>
> Just to get it out of the door, finally...
>
>  INSTALL | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  README  |   3 +-
>  2 files changed, 288 insertions(+), 2 deletions(-)
>
> diff --git a/INSTALL b/INSTALL
> new file mode 100644
> index 0000000..99c1383
> --- /dev/null
> +++ b/INSTALL
> @@ -0,0 +1,287 @@
> +
> +Compiling Xen from source
> +
> +* Overview
> +* Options recognized by configure
> +* Variables recognized by make
> +* History of options
> +* Examples
> +
> +Overview
> +========
> +
> +The xen source contains four subsystems: xen, tools, stubdom and docs.
> +All but xen has to be prepared for build with a configure script in the

"All but xen have to be"

> +toplevel directory. configure recognizes certain arguments and
> +environment variables which is used to adjust various aspects of the

"variables which are used"

> +following compile process. Once configure is done, make(1) has to be
> +called. Also make recognizes certain arguments. The following sections
> +will give an overview.
> +
> +Options recognized by configure
> +===============================
> +
> +The configure script in the toplevel directory will recognize these
> +options. It will pass them to the configure scripts in the tools,
> +stubdomw and docs directory.
> +
> +Individual subsystems can be selected by one of the following options.
> +Please note that stubdom requires tools. 
> +  --disable-xen
> +  --disable-tools
> +  --enable-stubdom
> +  --disable-docs
> +
> +The well known GNU configure options to specify the target directories.
> +Note: prefix defaults to /usr/local, sysconfdir defaults to /etc,
> +localstatedir defaults to /var.
> +  --prefix=DIR
> +  --libdir=DIR
> +  --libexecdir=BASEDIR
> +  --bindir=DIR
> +  --sbindir=DIR
> +  --sysconfdir=DIR
> +  --sharedstatedir=DIR
> +  --localstatedir=DIR
> +  --includedir=DIR
> +  --datarootdir=DIR
> +  --datadir=DIR
> +  --mandir=DIR
> +  --docdir=DIR
> +
> +To automatically run the toolstack in dom0 during system startup some
> +sysv runlevel scripts are installed. This option allows to set the path
> +for a given system. Possible values are /etc/init.d, /etc/rc.d/init.d or
> +/etc/rc.d. If not specified configure tries to guess the path.
> +  --with-initddir=DIR
> +
> +The runlevel scripts load certain configuration files. They are
> +typically located in a subdirectory of /etc. Possible values are this
> +subdirectory are "sysconfig" or "default". If not specified configure
> +tries to guess the subdir.
> +  --with-sysconfig-leaf-dir=SUBDIR
> +
> +If the tools are configured with a non-standard --prefix the runtime
> +linker will either not find the required libraries or it will load them
> +from a wrong location. Compiling the tools with rpath will force the
> +linker to look in the correct location.
> +  --enable-rpath
> +
> +During build in a git checkout the buildsystem needs to download
> +additional tools such as qemu. This is done with either the native git
> +protocol, or via http if this option is enabled.
> +  --enable-githttp
> +
> +Disable xenstat and xentop monitoring tools.
> +  --disable-monitors
> +
> +Disable build of certain ocaml libaries and tools. To actually build
> +them ocaml development packages must be installed. If they are missing
> +configure will automatically disable this option.
> +  --disable-ocamltools
> +
> +Disable XSM policy compilation.
> +  --disable-xsmpolicy
> +
> +Attempt to build of an OVMF firmware binary. This requires special
> +versions of development tools. Use at your own risk.
> +  --enable-ovmf
> +
> +Use the given OVMF binary instead of compiling a private copy.
> +  --with-system-ovmf=PATH
> +
> +Build a private copy of SeaBIOS.
> +  --disable-seabios
> +
> +Use the given SeaBIOS binary instead of compiling a private copy.
> +  --with-system-seabios=PATH
> +
> +Build the old qemu used by xm/xend. This is required if existing domUs
> +should be migrated to this host, or if existing domU snapshots should be
> +started with this version of the tools. Only if all domUs used the new
> +upstream qemu during initial start it is safe to disable this option.
> +The old qemu requires rombios, wich can be disable along with
> +qemu-traditional.
> +  --enable-qemu-traditional
> +  --enable-rombios
> +
> +The libxl toolstack uses the upstream qemu per default. A private copy
> +will be built. If desired this private copy can be configured with
> +additional options passed to its configure script.
> +  --with-extra-qemuu-configure-args="arg1 arg2"
> +
> +Use the given qemu binary instead of compiling a private copy.
> +  --with-system-qemu=PATH
> +
> +A dom0 requires a set of backend drivers. The configure script already
> +supplies a list of known drivers which are automatically loaded in dom0.
> +This internal list can be changed with this option.
> +  --with-linux-backend-modules="kmod1 kmod2"
> +
> +Two variants of a xenstored exist: the original xenstored written in C
> +(xenstored) or the newer and robust one written in Ocaml (oxenstored).
> +The oxenstored daemon is the default but can only be used if the
> +required ocaml packages are installed. In case they are missing the
> +original xenstored will be used. Valid names are xenstored and
> +oxenstored.
> +  --with-xenstored=name
> +
> +Using additional CFLAGS to build tools running in dom0 is required when
> +building distro packages. This is the option to pass things like
> +RPM_OPT_FLAGS.
> +  --with-extra-cflags-tools=EXTRA_CFLAGS
> +  --with-extra-cflags-qemu-traditional=EXTRA_CFLAGS
> +  --with-extra-cflags-qemu-upstream=EXTRA_CFLAGS
> +
> +Instead of starting the tools in dom0 with sysv runlevel scripts they
> +can also be started by systemd. If this option is enabled xenstored will
> +receive the communication socked directly from systemd. So starting it
> +manually will not work anymore. The paths to systemd internals can also
> +be changed in case the default paths do not fit anymore.
> +NOTE: if systemd development packages are installed the systemd support
> +will be the enabled per default. Using --disable-systemd will override
> +this detection and the sysv runlevel scripts have to be used.
> +  --enable-systemd
> +  --with-systemd=DIR
> +  --with-systemd-modules-load=DIR
> +
> +The old backend drivers are disabled because qdisk is now the default.
> +This option can be used to build them anyway.
> +  --enable-blktap1
> +  --enable-blktap2
> +  
> +Build various stubom components, some are only example code. Its usually
> +enough to specify just --enable-stubdom and leave these options alone.
> +  --enable-ioemu-stubdom
> +  --enable-c-stubdom
> +  --enable-caml-stubdom
> +  --disable-pv-grub
> +  --disable-xenstore-stubdom
> +  --enable-vtpm-stubdom
> +  --enable-vtpmmgr-stubdom
> +  --disable-extfiles
> +
> +Per default some parts of the tools code will print additional runtime
> +debug. This option can be used to disable such code paths.
> +  --disable-debug
> +
> +Variables recognized by make
> +==========================

What about some reference to .config in the top level?  It is what I use
for providing most of these parameters in a XenServer build.

~Andrew

> +
> +The following variables are recognized by the build system. They have to
> +be passed as make options, like 'make variable=value'. Having these
> +variables in the environment, like 'env variable=value make', will not
> +work for most of them.
> +
> +The well known variable to specify an offset during make install,
> +useful for packaing.
> +DESTDIR=
> +
> +Per default some parts of the tools code will print additional runtime
> +debug. This option can be used to disable such code paths. 
> +debug=y
> +debug_symbols=y
> +
> +If --prefix= was used during configure the and ocaml was enabled the
> +resuling libraries will not be installed in the specified path. Instead
> +the path provided by ocamlfind(1) will be used. This variable can be
> +used to override this path. Using the environment variable
> +OCAMLFIND_DESTDIR= and OCAMLFIND_METADIR= will have the same effect.
> +OCAMLDESTDIR=
> +
> +The xen subsystem will install the hypervisor into fixed locations.
> +BOOT_DIR defaults to /boot, EFI_DIR to /usr/lib64/efi.
> +BOOT_DIR=
> +EFI_DIR=
> +
> +The make target 'rpmball' will build a xen.rpm. This variable can be
> +used to append a custom string to the name.
> +PKG_SUFFIX=
> +
> +The hypervisor will report a certain version string. This variable can
> +be used to append a custom string to the version.
> +XEN_VENDORVERSION=
> +
> +During boot xen will report a certain user@host string, which can be
> +changed with these variables.
> +XEN_WHOAMI=
> +XEN_DOMAIN=
> +
> +The following variables can be used to tweak some aspects of the
> +hypervisor build.
> +verbose=y
> +perfc=y
> +perfc_arrays=y
> +lock_profile=y
> +crash_debug=y
> +frame_pointer=y
> +lto=y
> +
> +During tools build external repos will be cloned into the source tree.
> +This variable can be used to point to a different git binary to be used.
> +GIT=
> +
> +During tools build external repos will be cloned into the source tree.
> +During stubdom build external packages will be downloaded into the
> +source tree. These variables can be used to point to a different
> +locations.
> +XEN_EXTFILES_URL=
> +OVMF_UPSTREAM_URL=
> +QEMU_UPSTREAM_URL=
> +QEMU_TRADITIONAL_URL=
> +SEABIOS_UPSTREAM_URL=
> +
> +This variable can be used to use DIR/include and DIR/lib during build.
> +This is the same as PREPEND_LIB and PREPEND_INCLUDES. APPEND_LIB and
> +APPEND_INCLUDES= will be appendend to the CFLAGS/LDFLAGS variable.
> +EXTRA_PREFIX=DIR
> +PREPEND_LIB=DIR
> +PREPEND_INCLUDES=DIR
> +APPEND_LIB=DIR
> +APPEND_INCLUDES=DIR
> +
> +While the tools build will set the path to the python binary with the
> +configure script, the hypervisor build has to use this variable to use a
> +different python binary.
> +PYTHON=
> +
> +Building the python tools may fail unless certain options are passed to
> +setup.py. Config.mk contains additional info how to use this variable.
> +PYTHON_PREFIX_ARG=
> +
> +The hypervisor may be build with XSM support, which can be changed with
> +the following variables.
> +XSM_ENABLE=y
> +FLASK_ENABLE=y
> +
> +Do a build to for coverage.
> +coverage=y
> +
> +Use clang instead of GCC.
> +clang=y
> +
> +
> +History of options
> +==================
> +
> +Prior to xen-4.5 configure recognized essentially only the --prefix= and
> +--libdir= option to specify target directories. Starting with xen-4.5
> +all paths can be adjusted once with configure.
> +
> +
> +Examples
> +========
> +
> +To build a private copy of tools and xen:
> +configure --prefix=/odd/path --sysconfdir=/odd/path/etc --enable-rpath
> +make
> +sudo make install BOOT_DIR=/ood/path/boot EFI_DIR=/odd/path/efi
> +
> +
> +TODO
> +====
> +
> + - DESTDIR should be empty, not "/"
> + - add make uninstall targets
> + - replace private path variables as needed (SBINDIR/sbindir)
> + - ...
> diff --git a/README b/README
> index 414e5b9..8e5eb5e 100644
> --- a/README
> +++ b/README
> @@ -110,8 +110,7 @@ performed with root privileges.]
>      # make world
>      # make install
>  
> -   If you want, you can run ./configure --help to see the list of
> -   options available options when building and installing Xen.
> +   See the documentation in the INSTALL file for more info.
>  
>     This will create and install onto the local machine. It will build
>     the xen binary (xen.gz), the tools and the documentation.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-20  9:10 ` Andrew Cooper
@ 2014-10-20  9:13   ` Ian Campbell
  2014-10-21 10:01   ` Olaf Hering
  1 sibling, 0 replies; 12+ messages in thread
From: Ian Campbell @ 2014-10-20  9:13 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Olaf Hering, xen-devel

On Mon, 2014-10-20 at 10:10 +0100, Andrew Cooper wrote:
> On 17/10/14 15:50, Olaf Hering wrote:
> > Document how to use configure and what to pass to make(1).
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> Fantastic document.
> 
> Is it possible to put a canonical list of build dependences in here?

Please don't duplicate the list from README. (Whether that means "move
and improve" or just "improve" I have no strong opinion)

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-20  8:11   ` Olaf Hering
@ 2014-10-20 12:24     ` Julien Grall
  2014-10-21  9:40       ` Olaf Hering
  0 siblings, 1 reply; 12+ messages in thread
From: Julien Grall @ 2014-10-20 12:24 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Stefano Stabellini, Ian Campbell, xen-devel

Hi Olaf,

On 10/20/2014 09:11 AM, Olaf Hering wrote:
> On Sat, Oct 18, Julien Grall wrote:
> 
>> On 17/10/2014 15:50, Olaf Hering wrote:
>>> +Variables recognized by make
>>> +==========================
>>
>> There is a bunch of variables missing in this section such as:
>>    - XEN_TARGET_ARCH: specify for which architecture we want to build Xen
>>    - CROSS_COMPILE: prefix of the toolchain (including the trailing dash
>> "-")
>>
>> This is very useful for compiling Xen ARM as it may be very slow to compile
>> on the board.
> 
> Do you have an example? Perhaps such thing should be added to the
> Example section. So far I have not attempted a build on ARM.

The typical command line to build arm is:

make XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- ....


If the user want to build arm64:

make XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

The parameter CROSS_COMPILE needs to be modified following the toolchain
used by the user.

Regards,



-- 
Julien Grall

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-20 12:24     ` Julien Grall
@ 2014-10-21  9:40       ` Olaf Hering
  2014-10-21  9:48         ` Ian Campbell
  0 siblings, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2014-10-21  9:40 UTC (permalink / raw)
  To: Julien Grall; +Cc: Stefano Stabellini, Ian Campbell, xen-devel

On Mon, Oct 20, Julien Grall wrote:

> The typical command line to build arm is:
> 
> make XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- ....

What gets cross compiled in this case? I can imagine its just for xen
itself? I think the tools build would need a cross-pkgconfig and all
that?

Olaf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-21  9:40       ` Olaf Hering
@ 2014-10-21  9:48         ` Ian Campbell
  2014-10-21 12:43           ` Olaf Hering
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Campbell @ 2014-10-21  9:48 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Julien Grall, Stefano Stabellini, xen-devel

On Tue, 2014-10-21 at 11:40 +0200, Olaf Hering wrote:
> On Mon, Oct 20, Julien Grall wrote:
> 
> > The typical command line to build arm is:
> > 
> > make XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- ....
> 
> What gets cross compiled in this case? I can imagine its just for xen
> itself? I think the tools build would need a cross-pkgconfig and all
> that?

It is possible to cross-compile both (as it happens I do my precommit
arm64 build test that way), see
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling

But yes, you need a full cross build environment for the tools portion.

Ian.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-20  9:10 ` Andrew Cooper
  2014-10-20  9:13   ` Ian Campbell
@ 2014-10-21 10:01   ` Olaf Hering
  2014-10-21 10:17     ` Andrew Cooper
  1 sibling, 1 reply; 12+ messages in thread
From: Olaf Hering @ 2014-10-21 10:01 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel

On Mon, Oct 20, Andrew Cooper wrote:

> On 17/10/14 15:50, Olaf Hering wrote:
> > +Variables recognized by make
> > +==========================
> What about some reference to .config in the top level?  It is what I use
> for providing most of these parameters in a XenServer build.

Like this?

In addition to pass variables as make options it is also supported to
create a ".config" file in the toplevel directory. The file will be
sourced by make(1). It should contain the variables in the form
"variable := value". The usage of ":=" is prefered to override earlier
assignments to that variable by make(1).


Olaf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-21 10:01   ` Olaf Hering
@ 2014-10-21 10:17     ` Andrew Cooper
  2014-10-21 12:07       ` Olaf Hering
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Cooper @ 2014-10-21 10:17 UTC (permalink / raw)
  To: Olaf Hering; +Cc: xen-devel

On 21/10/14 11:01, Olaf Hering wrote:
> On Mon, Oct 20, Andrew Cooper wrote:
>
>> On 17/10/14 15:50, Olaf Hering wrote:
>>> +Variables recognized by make
>>> +==========================
>> What about some reference to .config in the top level?  It is what I use
>> for providing most of these parameters in a XenServer build.
> Like this?
>
> In addition to pass variables as make options it is also supported to
> create a ".config" file in the toplevel directory. The file will be
> sourced by make(1). It should contain the variables in the form
> "variable := value". The usage of ":=" is prefered to override earlier
> assignments to that variable by make(1).
>
>
> Olaf

Thats ok, although I am not sure a description of ":=" is strictly
needed - we are not teaching people to use make(1).  I think "will be
sourced by make(1)" is sufficient to describe that it is a makefile snippet.

~Andrew

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-21 10:17     ` Andrew Cooper
@ 2014-10-21 12:07       ` Olaf Hering
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2014-10-21 12:07 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: xen-devel

On Tue, Oct 21, Andrew Cooper wrote:

> On 21/10/14 11:01, Olaf Hering wrote:
> > On Mon, Oct 20, Andrew Cooper wrote:
> >
> >> On 17/10/14 15:50, Olaf Hering wrote:
> >>> +Variables recognized by make
> >>> +==========================
> >> What about some reference to .config in the top level?  It is what I use
> >> for providing most of these parameters in a XenServer build.
> > Like this?
> >
> > In addition to pass variables as make options it is also supported to
> > create a ".config" file in the toplevel directory. The file will be
> > sourced by make(1). It should contain the variables in the form
> > "variable := value". The usage of ":=" is prefered to override earlier
> > assignments to that variable by make(1).
> >
> >
> > Olaf
> 
> Thats ok, although I am not sure a description of ":=" is strictly
> needed - we are not teaching people to use make(1).  I think "will be
> sourced by make(1)" is sufficient to describe that it is a makefile snippet.

Looks like = vs. := works anyway:

var := val1
$(info var $(var))
var = val2
$(info var $(var))
var := val3
$(info var $(var))
var = val4
$(info var $(var))
all:

# make -f x.mk
var val1
var val2
var val3
var val4


I have removed the part about :=.

Olaf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] Add INSTALL file
  2014-10-21  9:48         ` Ian Campbell
@ 2014-10-21 12:43           ` Olaf Hering
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Hering @ 2014-10-21 12:43 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Julien Grall, Stefano Stabellini, xen-devel

On Tue, Oct 21, Ian Campbell wrote:

> On Tue, 2014-10-21 at 11:40 +0200, Olaf Hering wrote:
> > On Mon, Oct 20, Julien Grall wrote:
> > 
> > > The typical command line to build arm is:
> > > 
> > > make XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- ....
> > 
> > What gets cross compiled in this case? I can imagine its just for xen
> > itself? I think the tools build would need a cross-pkgconfig and all
> > that?
> 
> It is possible to cross-compile both (as it happens I do my precommit
> arm64 build test that way), see
> http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling
> 
> But yes, you need a full cross build environment for the tools portion.

Would this example work?


* To build xen and tools using a cross compiler:
./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
make XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
make XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
        DESTDIR=/some/path install


Is --build= required or does configure detect this properly?

Olaf

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-10-21 12:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 14:50 [PATCH] Add INSTALL file Olaf Hering
2014-10-18 20:47 ` Julien Grall
2014-10-20  8:11   ` Olaf Hering
2014-10-20 12:24     ` Julien Grall
2014-10-21  9:40       ` Olaf Hering
2014-10-21  9:48         ` Ian Campbell
2014-10-21 12:43           ` Olaf Hering
2014-10-20  9:10 ` Andrew Cooper
2014-10-20  9:13   ` Ian Campbell
2014-10-21 10:01   ` Olaf Hering
2014-10-21 10:17     ` Andrew Cooper
2014-10-21 12:07       ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.