All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] Add Xen 4.6
Date: Tue, 8 Mar 2016 16:32:58 -0800	[thread overview]
Message-ID: <CAKmqyKNK833McXSgMjV2uekMSgP0L-OyKmA4Lb+A14agJbZkGA@mail.gmail.com> (raw)
In-Reply-To: <56BBB604.30903@mind.be>

On Wed, Feb 10, 2016 at 2:13 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 06-02-16 01:37, Alistair Francis wrote:
>> Add support to compile Xen 4.6 and Xen tools.
>>
>> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
>> ---
>>  package/Config.in     |  1 +
>>  package/xen/Config.in | 31 +++++++++++++++++++++++++++++++
>>  package/xen/xen.hash  |  2 ++
>>  package/xen/xen.mk    | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
>>  4 files changed, 83 insertions(+)
>>  create mode 100644 package/xen/Config.in
>>  create mode 100644 package/xen/xen.hash
>>  create mode 100644 package/xen/xen.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index 529ad33..4227195 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -1616,6 +1616,7 @@ endif
>>       source "package/tpm-tools/Config.in"
>>       source "package/unscd/Config.in"
>>       source "package/util-linux/Config.in"
>> +     source "package/xen/Config.in"
>>  endmenu
>>
>>  menu "Text editors and viewers"
>> diff --git a/package/xen/Config.in b/package/xen/Config.in
>> new file mode 100644
>> index 0000000..28da69c
>> --- /dev/null
>> +++ b/package/xen/Config.in
>> @@ -0,0 +1,31 @@
>> +config BR2_PACKAGE_XEN
>> + bool "xen"
>
>  Everything should be indented with a tab, the help text with tab + 2 spaces.

Thanks, fixed

>
>> + depends on BR2_arm || BR2_aarch64 || \
>> + BR2_i386 || BR2_x86_64
>> + depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS
>> + depends on !BR2_STATIC_LIBS # dtc (libfdt)
>> + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
>> + depends on BR2_USE_WCHAR # libglib2, util-linux
>
>  You need to add a coment explaining why xen is not available. See the section
> "Dependencies on target and toolchain options" in the manual.

Fixed

>
>
>> + select BR2_PACKAGE_DTC
>> + select BR2_PACKAGE_LIBAIO
>> + select BR2_PACKAGE_LIBGLIB2
>> + select BR2_PACKAGE_NCURSES
>> + select BR2_PACKAGE_OPENSSL
>> + select BR2_PACKAGE_PIXMAN
>> + select BR2_PACKAGE_UTIL_LINUX
>> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
>> + select BR2_PACKAGE_YAJL
>
>  Are all these needed both for Xen and for the tools?

It looks like most of them are needed for both, but not all.
http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=README;h=5664a93da506ed5a97559e66d60a3d02f9aaee9f;hb=b24ad7ba911a9f0688ab179736476e44c52144f1#l34

I have fixed that.

>
>> + help
>> +  This builds the Xen hypervisor and toolstack
>> +
>> +  http://www.xenproject.org/
>> +
>> +if BR2_PACKAGE_XEN
>> +
>> +config BR2_PACKAGE_XEN_HYPERVISOR
>> + bool "Build the Xen hypervisor"
>
>  It would be nice to add a little help text, for example where the binary will
> be put and how it should be used (refering to the appropriate documentation of
> course).

I have added some help for both the hypervisor and the tools.

>
>> +
>> +config BR2_PACKAGE_XEN_TOOLS
>> + bool "Build the Xen tools"
>> +endif
>
>  If neither of them is selected, only some documentation will be installed. So I
> think at least one of the should default y.

Fair enough, the hypervisor is enabled by default.

>
>> +
>> diff --git a/package/xen/xen.hash b/package/xen/xen.hash
>> new file mode 100644
>> index 0000000..c124b3a
>> --- /dev/null
>> +++ b/package/xen/xen.hash
>> @@ -0,0 +1,2 @@
>> +# Locally computed
>> +sha256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 xen-4.6.0.tar.gz
>> diff --git a/package/xen/xen.mk b/package/xen/xen.mk
>> new file mode 100644
>> index 0000000..4331136
>> --- /dev/null
>> +++ b/package/xen/xen.mk
>> @@ -0,0 +1,49 @@
>> +################################################################################
>> +#
>> +# Xen
>> +#
>> +################################################################################
>> +
>> +XEN_VERSION = 4.6.0
>> +XEN_SITE = http://bits.xensource.com/oss-xen/release/$(XEN_VERSION)
>> +XEN_INSTALL_IMAGES = YES
>
>  Actually, only ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)

Fixed

>
>> +
>> +XEN_DEPENDENCIES += dtc libaio libglib2 ncurses openssl pixman util-linux yajl
>
>  You're missing a LICENSE and LICENSE_FILES.

Fixed

>
>> +
>> +XEN_MAKE_ENV = \
>> + XEN_TARGET_ARCH=arm64 \
>
>  I'm sure that xen works on other architectures as well... You'll need to define
> a XEN_ARCH that converts the buildroot architecture names into the appropriate
> xen architecture names. And maybe it isn't even needed, I think it can do some
> autodetection based on the compiler.

It seems to work with auto detection.

>
>> + CROSS_COMPILE=$(TARGET_CROSS) \
>> + CXXFLAGS="$(TARGET_CXXFLAGS) -D_FILE_OFFSET_BITS=64" \
>> + CFLAGS="$(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64" \
>> + PKG_CONFIG=$(PKG_CONFIG_HOST_BINARY)
>
>  All of this should already be passed into the environment by autotools-package.
> So if it is needed, it's really necessary to explain why.

Ok, removed

>
>> +
>> +XEN_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR)
>> +
>> +ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
>> +XEN_MAKE_OPTS += dist-xen
>> +
>> +define XEN_INSTALL_IMAGES_CMDS
>> + cp $(@D)/xen/xen $(BINARIES_DIR)
>> +endef
>> +else
>> +XEN_CONF_OPTS += --disable-xen
>> +endif
>> +
>> +XEN_CONF_OPTS += --disable-ocamltools
>
>  The unconditional CONF_OPTS should come before all the conditionals.

Fixed.

>
>> +
>> +ifeq ($(BR2_PACKAGE_XEN_TOOLS),y)
>> +XEN_MAKE_OPTS += dist-tools
>> +XEN_INSTALL_TARGET_OPTS += install-tools
>> +
>> +define XEN_RENAME_INIT_SCRIPTS
>> + mv $(TARGET_DIR)/etc/init.d/xencommons $(TARGET_DIR)/etc/init.d/S50xencommons
>> + mv $(TARGET_DIR)/etc/init.d/xen-watchdog $(TARGET_DIR)/etc/init.d/S50xen-watchdog
>> + mv $(TARGET_DIR)/etc/init.d/xendomains $(TARGET_DIR)/etc/init.d/S60xendomains
>> +endef
>
>  Instead of calling this RENAME_INIT_SCRIPTS, you could put it in
> XEN_INSTALL_INIT_SYSV, then you don't need to add it to the hook. Of course,
> then it won't get done under systemd, but in that case the renaming is useless
> anyway.

Ok, thanks. I have fixed this as well.

Thanks for the comments, sorry it has taken me so long to look at.

Thanks,

Alistair

>
>
>  Regards,
>  Arnout
>
>> +else
>> +XEN_CONF_OPTS += --disable-tools
>> +endif
>> +
>> +XEN_POST_INSTALL_TARGET_HOOKS += XEN_RENAME_INIT_SCRIPTS
>> +
>> +$(eval $(autotools-package))
>>
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-03-09  0:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06  0:37 [Buildroot] [PATCH 0/2] Add Xen target support Alistair Francis
2016-02-06  0:37 ` [Buildroot] [PATCH 1/2] Update libaio to 0.3.110 Alistair Francis
2016-02-10 21:52   ` Arnout Vandecappelle
2016-02-10 22:43     ` Alistair Francis
2016-02-11  8:34       ` Arnout Vandecappelle
2016-02-17 18:50         ` Alistair Francis
2016-02-06  0:37 ` [Buildroot] [PATCH 2/2] Add Xen 4.6 Alistair Francis
2016-02-10 22:13   ` Arnout Vandecappelle
2016-03-09  0:32     ` Alistair Francis [this message]
2016-03-06 14:36   ` Thomas Petazzoni
2016-03-09  0:34     ` Alistair Francis
     [not found] <1454717969-30723-1-git-send-email-alistair.francis@xilinx.com>
2016-02-06  0:19 ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKmqyKNK833McXSgMjV2uekMSgP0L-OyKmA4Lb+A14agJbZkGA@mail.gmail.com \
    --to=alistair.francis@xilinx.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.