All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Split off mini-os to a separate tree
@ 2015-02-02 12:58 Wei Liu
  2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
                   ` (7 more replies)
  0 siblings, 8 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:58 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

As far as I can tell there is no incoming mini-os patches at the moment. So I
suggest we commence once we get that last mini-os patch in staging pushed to
master.

I use following runes to split off mini-os:

  git filter-branch --tag-name-filter cat \
    --subdirectory-filter extras/mini-os/ -- --all

  # There is already a tag name 4.3.0-rc2 which points to the same commit.
  git tag -d xen-4.3.0-rc2

  # Add xen- prefix to all tags
  for t in `git tag`; do git tag "xen-$t" "$t"; git tag -d "$t" ; done

  git gc --aggressive
  
The tree can be found at:
  git://xenbits.xen.org/people/liuw/mini-os.git master

Now mini-os builds on its own. I've also done some minor adjustments to
stubdom's build system, so that we can properly issue "make build-stubdom"
in Xen tree top level directory.

Wei.

Wei Liu (7):
  stubdom: fix "make build"
  Makefile: refactor build/clean/distclean targets
  stubdom: don't look for mini-os source file during configure
  git-checkout.sh: use "mkdir -p"
  Mini-OS: standalone build
  build system: stubdom targets now depends on mini-os target
  Remove in-tree mini-os directory

 .gitignore                                         |    7 +-
 Config.mk                                          |    3 +
 Makefile                                           |   58 +-
 Makefile.mini-os                                   |   15 +
 extras/mini-os/COPYING                             |   36 -
 extras/mini-os/Config.mk                           |   57 -
 extras/mini-os/Makefile                            |  226 ---
 extras/mini-os/README                              |   46 -
 extras/mini-os/app.lds                             |   11 -
 extras/mini-os/arch/arm/arm32.S                    |  294 ----
 extras/mini-os/arch/arm/events.c                   |   31 -
 extras/mini-os/arch/arm/hypercalls32.S             |   64 -
 extras/mini-os/arch/arm/minios-arm32.lds           |   83 --
 extras/mini-os/arch/arm/mm.c                       |  139 --
 extras/mini-os/arch/arm/panic.c                    |   98 --
 extras/mini-os/arch/arm/sched.c                    |   47 -
 extras/mini-os/arch/arm/setup.c                    |  119 --
 extras/mini-os/arch/arm/time.c                     |  136 --
 extras/mini-os/arch/x86/Makefile                   |   31 -
 extras/mini-os/arch/x86/arch.mk                    |   22 -
 extras/mini-os/arch/x86/events.c                   |   35 -
 extras/mini-os/arch/x86/ioremap.c                  |   75 -
 extras/mini-os/arch/x86/iorw.c                     |   35 -
 extras/mini-os/arch/x86/minios-x86_32.lds          |   74 -
 extras/mini-os/arch/x86/minios-x86_64.lds          |   74 -
 extras/mini-os/arch/x86/mm.c                       |  957 ------------
 extras/mini-os/arch/x86/sched.c                    |  139 --
 extras/mini-os/arch/x86/setup.c                    |  168 ---
 extras/mini-os/arch/x86/time.c                     |  238 ---
 extras/mini-os/arch/x86/traps.c                    |  333 -----
 extras/mini-os/arch/x86/x86_32.S                   |  305 ----
 extras/mini-os/arch/x86/x86_64.S                   |  383 -----
 extras/mini-os/blkfront.c                          |  736 ----------
 extras/mini-os/console/console.c                   |  164 ---
 extras/mini-os/console/console.h                   |    2 -
 extras/mini-os/console/xenbus.c                    |  195 ---
 extras/mini-os/console/xencons_ring.c              |  195 ---
 extras/mini-os/daytime.c                           |   67 -
 extras/mini-os/domain_config                       |   19 -
 extras/mini-os/events.c                            |  269 ----
 extras/mini-os/fbfront.c                           |  710 ---------
 extras/mini-os/gntmap.c                            |  250 ----
 extras/mini-os/gnttab.c                            |  196 ---
 extras/mini-os/hypervisor.c                        |  132 --
 extras/mini-os/include/arch/cc.h                   |   87 --
 extras/mini-os/include/arch/perf.h                 |   15 -
 extras/mini-os/include/arch/sys_arch.h             |   35 -
 extras/mini-os/include/arm/arch_endian.h           |    7 -
 extras/mini-os/include/arm/arch_limits.h           |    9 -
 extras/mini-os/include/arm/arch_mm.h               |   38 -
 extras/mini-os/include/arm/arch_sched.h            |   19 -
 extras/mini-os/include/arm/arch_spinlock.h         |   36 -
 extras/mini-os/include/arm/arm32/arch_wordsize.h   |    1 -
 extras/mini-os/include/arm/gic.h                   |    1 -
 extras/mini-os/include/arm/hypercall-arm.h         |   98 --
 extras/mini-os/include/arm/os.h                    |  216 ---
 extras/mini-os/include/arm/traps.h                 |   20 -
 extras/mini-os/include/blkfront.h                  |   54 -
 extras/mini-os/include/byteorder.h                 |   36 -
 extras/mini-os/include/byteswap.h                  |   39 -
 extras/mini-os/include/compiler.h                  |   10 -
 extras/mini-os/include/console.h                   |   89 --
 extras/mini-os/include/ctype.h                     |   60 -
 extras/mini-os/include/endian.h                    |   19 -
 extras/mini-os/include/err.h                       |   31 -
 extras/mini-os/include/errno-base.h                |   39 -
 extras/mini-os/include/errno.h                     |  122 --
 extras/mini-os/include/events.h                    |   59 -
 extras/mini-os/include/fbfront.h                   |   46 -
 extras/mini-os/include/fcntl.h                     |   99 --
 extras/mini-os/include/gntmap.h                    |   35 -
 extras/mini-os/include/gnttab.h                    |   17 -
 extras/mini-os/include/hypervisor.h                |   48 -
 extras/mini-os/include/ioremap.h                   |   33 -
 extras/mini-os/include/iorw.h                      |   16 -
 extras/mini-os/include/kernel.h                    |    9 -
 extras/mini-os/include/lib-gpl.h                   |   59 -
 extras/mini-os/include/lib.h                       |  230 ---
 extras/mini-os/include/linux/types.h               |    5 -
 extras/mini-os/include/lwipopts.h                  |   23 -
 extras/mini-os/include/mm.h                        |   82 --
 extras/mini-os/include/netfront.h                  |   24 -
 extras/mini-os/include/pcifront.h                  |   29 -
 extras/mini-os/include/posix/arpa/inet.h           |    7 -
 extras/mini-os/include/posix/dirent.h              |   24 -
 extras/mini-os/include/posix/err.h                 |   15 -
 extras/mini-os/include/posix/fcntl.h               |   11 -
 extras/mini-os/include/posix/limits.h              |   48 -
 extras/mini-os/include/posix/net/if.h              |   85 --
 extras/mini-os/include/posix/netdb.h               |    9 -
 extras/mini-os/include/posix/netinet/in.h          |    7 -
 extras/mini-os/include/posix/netinet/tcp.h         |    6 -
 extras/mini-os/include/posix/poll.h                |    1 -
 extras/mini-os/include/posix/pthread.h             |   64 -
 extras/mini-os/include/posix/signal.h              |   10 -
 extras/mini-os/include/posix/stdlib.h              |    8 -
 extras/mini-os/include/posix/strings.h             |   12 -
 extras/mini-os/include/posix/sys/ioctl.h           |   16 -
 extras/mini-os/include/posix/sys/mman.h            |   22 -
 extras/mini-os/include/posix/sys/poll.h            |   79 -
 extras/mini-os/include/posix/sys/select.h          |    7 -
 extras/mini-os/include/posix/sys/socket.h          |   31 -
 extras/mini-os/include/posix/sys/stat.h            |    7 -
 extras/mini-os/include/posix/syslog.h              |   37 -
 extras/mini-os/include/posix/termios.h             |   87 --
 extras/mini-os/include/posix/time.h                |   11 -
 extras/mini-os/include/posix/unistd.h              |   16 -
 extras/mini-os/include/sched.h                     |   55 -
 extras/mini-os/include/semaphore.h                 |  110 --
 extras/mini-os/include/spinlock.h                  |   55 -
 extras/mini-os/include/sys/lock.h                  |   52 -
 extras/mini-os/include/sys/time.h                  |   47 -
 extras/mini-os/include/time.h                      |   63 -
 extras/mini-os/include/tpm_tis.h                   |   61 -
 extras/mini-os/include/tpmback.h                   |  104 --
 extras/mini-os/include/tpmfront.h                  |   97 --
 extras/mini-os/include/types.h                     |   74 -
 extras/mini-os/include/wait.h                      |  105 --
 extras/mini-os/include/waittypes.h                 |   32 -
 extras/mini-os/include/x86/arch_endian.h           |    7 -
 extras/mini-os/include/x86/arch_limits.h           |   20 -
 extras/mini-os/include/x86/arch_mm.h               |  233 ---
 extras/mini-os/include/x86/arch_sched.h            |   25 -
 extras/mini-os/include/x86/arch_spinlock.h         |   94 --
 extras/mini-os/include/x86/os.h                    |  572 --------
 extras/mini-os/include/x86/traps.h                 |   78 -
 extras/mini-os/include/x86/x86_32/arch_wordsize.h  |    1 -
 .../mini-os/include/x86/x86_32/hypercall-x86_32.h  |  337 -----
 extras/mini-os/include/x86/x86_64/arch_wordsize.h  |    2 -
 .../mini-os/include/x86/x86_64/hypercall-x86_64.h  |  344 -----
 extras/mini-os/include/xenbus.h                    |  120 --
 extras/mini-os/include/xmalloc.h                   |   44 -
 extras/mini-os/kernel.c                            |  198 ---
 extras/mini-os/lib/ctype.c                         |   29 -
 extras/mini-os/lib/math.c                          |  426 ------
 extras/mini-os/lib/printf.c                        |  786 ----------
 extras/mini-os/lib/stack_chk_fail.c                |    8 -
 extras/mini-os/lib/string.c                        |  228 ---
 extras/mini-os/lib/sys.c                           | 1550 --------------------
 extras/mini-os/lib/xmalloc.c                       |  319 ----
 extras/mini-os/lib/xs.c                            |  194 ---
 extras/mini-os/lock.c                              |  112 --
 extras/mini-os/lwip-arch.c                         |  293 ----
 extras/mini-os/lwip-net.c                          |  386 -----
 extras/mini-os/main.c                              |  193 ---
 extras/mini-os/minios.mk                           |   76 -
 extras/mini-os/mm.c                                |  441 ------
 extras/mini-os/netfront.c                          |  675 ---------
 extras/mini-os/pcifront.c                          |  616 --------
 extras/mini-os/sched.c                             |  304 ----
 extras/mini-os/test.c                              |  577 --------
 extras/mini-os/tpm_tis.c                           | 1523 -------------------
 extras/mini-os/tpmback.c                           | 1136 --------------
 extras/mini-os/tpmfront.c                          |  631 --------
 extras/mini-os/xenbus/xenbus.c                     |  870 -----------
 scripts/git-checkout.sh                            |    2 +-
 stubdom/Makefile                                   |    7 +
 stubdom/configure.ac                               |    1 -
 tools/misc/mktarball                               |    4 +-
 159 files changed, 81 insertions(+), 24025 deletions(-)
 create mode 100644 Makefile.mini-os
 delete mode 100644 extras/mini-os/COPYING
 delete mode 100644 extras/mini-os/Config.mk
 delete mode 100644 extras/mini-os/Makefile
 delete mode 100644 extras/mini-os/README
 delete mode 100644 extras/mini-os/app.lds
 delete mode 100644 extras/mini-os/arch/arm/arm32.S
 delete mode 100644 extras/mini-os/arch/arm/events.c
 delete mode 100644 extras/mini-os/arch/arm/hypercalls32.S
 delete mode 100755 extras/mini-os/arch/arm/minios-arm32.lds
 delete mode 100644 extras/mini-os/arch/arm/mm.c
 delete mode 100644 extras/mini-os/arch/arm/panic.c
 delete mode 100644 extras/mini-os/arch/arm/sched.c
 delete mode 100644 extras/mini-os/arch/arm/setup.c
 delete mode 100644 extras/mini-os/arch/arm/time.c
 delete mode 100644 extras/mini-os/arch/x86/Makefile
 delete mode 100644 extras/mini-os/arch/x86/arch.mk
 delete mode 100644 extras/mini-os/arch/x86/events.c
 delete mode 100644 extras/mini-os/arch/x86/ioremap.c
 delete mode 100644 extras/mini-os/arch/x86/iorw.c
 delete mode 100644 extras/mini-os/arch/x86/minios-x86_32.lds
 delete mode 100644 extras/mini-os/arch/x86/minios-x86_64.lds
 delete mode 100644 extras/mini-os/arch/x86/mm.c
 delete mode 100644 extras/mini-os/arch/x86/sched.c
 delete mode 100644 extras/mini-os/arch/x86/setup.c
 delete mode 100644 extras/mini-os/arch/x86/time.c
 delete mode 100644 extras/mini-os/arch/x86/traps.c
 delete mode 100644 extras/mini-os/arch/x86/x86_32.S
 delete mode 100644 extras/mini-os/arch/x86/x86_64.S
 delete mode 100644 extras/mini-os/blkfront.c
 delete mode 100644 extras/mini-os/console/console.c
 delete mode 100644 extras/mini-os/console/console.h
 delete mode 100644 extras/mini-os/console/xenbus.c
 delete mode 100644 extras/mini-os/console/xencons_ring.c
 delete mode 100644 extras/mini-os/daytime.c
 delete mode 100644 extras/mini-os/domain_config
 delete mode 100644 extras/mini-os/events.c
 delete mode 100644 extras/mini-os/fbfront.c
 delete mode 100644 extras/mini-os/gntmap.c
 delete mode 100644 extras/mini-os/gnttab.c
 delete mode 100644 extras/mini-os/hypervisor.c
 delete mode 100644 extras/mini-os/include/arch/cc.h
 delete mode 100644 extras/mini-os/include/arch/perf.h
 delete mode 100644 extras/mini-os/include/arch/sys_arch.h
 delete mode 100644 extras/mini-os/include/arm/arch_endian.h
 delete mode 100644 extras/mini-os/include/arm/arch_limits.h
 delete mode 100644 extras/mini-os/include/arm/arch_mm.h
 delete mode 100644 extras/mini-os/include/arm/arch_sched.h
 delete mode 100755 extras/mini-os/include/arm/arch_spinlock.h
 delete mode 100644 extras/mini-os/include/arm/arm32/arch_wordsize.h
 delete mode 100644 extras/mini-os/include/arm/gic.h
 delete mode 100644 extras/mini-os/include/arm/hypercall-arm.h
 delete mode 100644 extras/mini-os/include/arm/os.h
 delete mode 100644 extras/mini-os/include/arm/traps.h
 delete mode 100644 extras/mini-os/include/blkfront.h
 delete mode 100644 extras/mini-os/include/byteorder.h
 delete mode 100644 extras/mini-os/include/byteswap.h
 delete mode 100644 extras/mini-os/include/compiler.h
 delete mode 100644 extras/mini-os/include/console.h
 delete mode 100644 extras/mini-os/include/ctype.h
 delete mode 100644 extras/mini-os/include/endian.h
 delete mode 100644 extras/mini-os/include/err.h
 delete mode 100644 extras/mini-os/include/errno-base.h
 delete mode 100644 extras/mini-os/include/errno.h
 delete mode 100644 extras/mini-os/include/events.h
 delete mode 100644 extras/mini-os/include/fbfront.h
 delete mode 100644 extras/mini-os/include/fcntl.h
 delete mode 100644 extras/mini-os/include/gntmap.h
 delete mode 100644 extras/mini-os/include/gnttab.h
 delete mode 100644 extras/mini-os/include/hypervisor.h
 delete mode 100644 extras/mini-os/include/ioremap.h
 delete mode 100644 extras/mini-os/include/iorw.h
 delete mode 100644 extras/mini-os/include/kernel.h
 delete mode 100644 extras/mini-os/include/lib-gpl.h
 delete mode 100644 extras/mini-os/include/lib.h
 delete mode 100644 extras/mini-os/include/linux/types.h
 delete mode 100644 extras/mini-os/include/lwipopts.h
 delete mode 100644 extras/mini-os/include/mm.h
 delete mode 100644 extras/mini-os/include/netfront.h
 delete mode 100644 extras/mini-os/include/pcifront.h
 delete mode 100644 extras/mini-os/include/posix/arpa/inet.h
 delete mode 100644 extras/mini-os/include/posix/dirent.h
 delete mode 100644 extras/mini-os/include/posix/err.h
 delete mode 100644 extras/mini-os/include/posix/fcntl.h
 delete mode 100644 extras/mini-os/include/posix/limits.h
 delete mode 100644 extras/mini-os/include/posix/net/if.h
 delete mode 100644 extras/mini-os/include/posix/netdb.h
 delete mode 100644 extras/mini-os/include/posix/netinet/in.h
 delete mode 100644 extras/mini-os/include/posix/netinet/tcp.h
 delete mode 100644 extras/mini-os/include/posix/poll.h
 delete mode 100644 extras/mini-os/include/posix/pthread.h
 delete mode 100644 extras/mini-os/include/posix/signal.h
 delete mode 100644 extras/mini-os/include/posix/stdlib.h
 delete mode 100644 extras/mini-os/include/posix/strings.h
 delete mode 100644 extras/mini-os/include/posix/sys/ioctl.h
 delete mode 100644 extras/mini-os/include/posix/sys/mman.h
 delete mode 100644 extras/mini-os/include/posix/sys/poll.h
 delete mode 100644 extras/mini-os/include/posix/sys/select.h
 delete mode 100644 extras/mini-os/include/posix/sys/socket.h
 delete mode 100644 extras/mini-os/include/posix/sys/stat.h
 delete mode 100644 extras/mini-os/include/posix/syslog.h
 delete mode 100644 extras/mini-os/include/posix/termios.h
 delete mode 100644 extras/mini-os/include/posix/time.h
 delete mode 100644 extras/mini-os/include/posix/unistd.h
 delete mode 100644 extras/mini-os/include/sched.h
 delete mode 100644 extras/mini-os/include/semaphore.h
 delete mode 100644 extras/mini-os/include/spinlock.h
 delete mode 100644 extras/mini-os/include/sys/lock.h
 delete mode 100644 extras/mini-os/include/sys/time.h
 delete mode 100644 extras/mini-os/include/time.h
 delete mode 100644 extras/mini-os/include/tpm_tis.h
 delete mode 100644 extras/mini-os/include/tpmback.h
 delete mode 100644 extras/mini-os/include/tpmfront.h
 delete mode 100644 extras/mini-os/include/types.h
 delete mode 100644 extras/mini-os/include/wait.h
 delete mode 100644 extras/mini-os/include/waittypes.h
 delete mode 100644 extras/mini-os/include/x86/arch_endian.h
 delete mode 100644 extras/mini-os/include/x86/arch_limits.h
 delete mode 100644 extras/mini-os/include/x86/arch_mm.h
 delete mode 100644 extras/mini-os/include/x86/arch_sched.h
 delete mode 100644 extras/mini-os/include/x86/arch_spinlock.h
 delete mode 100644 extras/mini-os/include/x86/os.h
 delete mode 100644 extras/mini-os/include/x86/traps.h
 delete mode 100644 extras/mini-os/include/x86/x86_32/arch_wordsize.h
 delete mode 100644 extras/mini-os/include/x86/x86_32/hypercall-x86_32.h
 delete mode 100644 extras/mini-os/include/x86/x86_64/arch_wordsize.h
 delete mode 100644 extras/mini-os/include/x86/x86_64/hypercall-x86_64.h
 delete mode 100644 extras/mini-os/include/xenbus.h
 delete mode 100644 extras/mini-os/include/xmalloc.h
 delete mode 100644 extras/mini-os/kernel.c
 delete mode 100644 extras/mini-os/lib/ctype.c
 delete mode 100644 extras/mini-os/lib/math.c
 delete mode 100644 extras/mini-os/lib/printf.c
 delete mode 100644 extras/mini-os/lib/stack_chk_fail.c
 delete mode 100644 extras/mini-os/lib/string.c
 delete mode 100644 extras/mini-os/lib/sys.c
 delete mode 100644 extras/mini-os/lib/xmalloc.c
 delete mode 100644 extras/mini-os/lib/xs.c
 delete mode 100644 extras/mini-os/lock.c
 delete mode 100644 extras/mini-os/lwip-arch.c
 delete mode 100644 extras/mini-os/lwip-net.c
 delete mode 100644 extras/mini-os/main.c
 delete mode 100644 extras/mini-os/minios.mk
 delete mode 100644 extras/mini-os/mm.c
 delete mode 100644 extras/mini-os/netfront.c
 delete mode 100644 extras/mini-os/pcifront.c
 delete mode 100644 extras/mini-os/sched.c
 delete mode 100644 extras/mini-os/test.c
 delete mode 100644 extras/mini-os/tpm_tis.c
 delete mode 100644 extras/mini-os/tpmback.c
 delete mode 100644 extras/mini-os/tpmfront.c
 delete mode 100644 extras/mini-os/xenbus/xenbus.c

-- 
1.9.1

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

* [PATCH 1/7] stubdom: fix "make build"
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
@ 2015-02-02 12:58 ` Wei Liu
  2015-02-02 14:53   ` Ian Campbell
  2015-02-02 22:11   ` Samuel Thibault
  2015-02-02 12:58 ` [PATCH 2/7] Makefile: refactor build/clean/distclean targets Wei Liu
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:58 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Cross compiling libxc requires some symlinks to exist.

Note that make -C tools/include requires running tools/configure. But at
least now the error message is much better than just a "file not found"
error.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jakcson <ian.jackson@eu.citrix.com>
---
 stubdom/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 8fb885a..58ca08c 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -333,6 +333,8 @@ $(TARGETS_MINIOS): mini-os-%:
 .PHONY: libxc
 libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a
 libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib
+	$(MAKE) -C $(XEN_ROOT)/tools/include
+	$(MAKE) DESTDIR= -C $(MINI_OS) links
 	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH)
 
  libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a
-- 
1.9.1

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

* [PATCH 2/7] Makefile: refactor build/clean/distclean targets
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
  2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
@ 2015-02-02 12:58 ` Wei Liu
  2015-02-02 14:54   ` Ian Campbell
  2015-02-02 12:58 ` [PATCH 3/7] stubdom: don't look for mini-os source file during configure Wei Liu
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:58 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Factor out per-subsystem build/clean/distclean-% targets, so that we can
build subsystems independently in top level directory.

The motive behind this is after splitting out mini-os from Xen tree,
stubdom is in effect a downstream of mini-os.  I would like to have the
ability to build it independently and instrument OSSTest to test it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 6e9a4c7..ad6f917 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,9 @@ all: dist
 SUBSYSTEMS?=xen tools stubdom docs
 TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS))
 TARGS_INSTALL=$(patsubst %, install-%, $(SUBSYSTEMS))
+TARGS_BUILD=$(patsubst %, build-%, $(SUBSYSTEMS))
+TARGS_CLEAN=$(patsubst %, clean-%, $(SUBSYSTEMS))
+TARGS_DISTCLEAN=$(patsubst %, distclean-%, $(SUBSYSTEMS))
 
 export XEN_ROOT=$(CURDIR)
 include Config.mk
@@ -23,13 +26,25 @@ export DESTDIR
 install: $(TARGS_INSTALL)
 
 .PHONY: build
-build:
+build: $(TARGS_BUILD)
+
+.PHONY: build-xen
+build-xen:
 	$(MAKE) -C xen build
+
+.PHONY: build-tools
+build-tools:
 	$(MAKE) -C tools build
+
+.PHONY: build-stubdom
+build-stubdom:
 	$(MAKE) -C stubdom build
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
 endif
+
+.PHONY: build-docs
+build-docs:
 	$(MAKE) -C docs build
 
 # The test target is for unit tests that can run without an installation.  Of
@@ -135,28 +150,52 @@ src-tarball: subtree-force-update-all
 	bash ./tools/misc/mktarball $(XEN_ROOT) $$(git describe)
 
 .PHONY: clean
-clean::
+clean: $(TARGS_CLEAN)
+
+.PHONY: clean-xen
+clean-xen:
 	$(MAKE) -C xen clean
+
+.PHONY: clean-tools
+clean-tools:
 	$(MAKE) -C tools clean
+
+.PHONY: clean-stubdom
+clean-stubdom:
 	$(MAKE) -C stubdom crossclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
 endif
+
+.PHONY: clean-docs
+clean-docs:
 	$(MAKE) -C docs clean
 
 # clean, but blow away tarballs
 .PHONY: distclean
-distclean:
+distclean: $(TARGS_DISTCLEAN)
 	rm -f config/Toplevel.mk
+	rm -rf dist
+	rm -rf config.log config.status config.cache autom4te.cache
+
+.PHONY: distclean-xen
+distclean-xen:
 	$(MAKE) -C xen distclean
+
+.PHONY: distclean-tools
+distclean-tools:
 	$(MAKE) -C tools distclean
+
+.PHONY: distclean-stubdom
+distclean-stubdom:
 	$(MAKE) -C stubdom distclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
+
+.PHONY: distclean-docs
+distclean-docs:
 	$(MAKE) -C docs distclean
-	rm -rf dist
-	rm -rf config.log config.status config.cache autom4te.cache
 
 # Linux name for GNU distclean
 .PHONY: mrproper
-- 
1.9.1

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

* [PATCH 3/7] stubdom: don't look for mini-os source file during configure
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
  2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
  2015-02-02 12:58 ` [PATCH 2/7] Makefile: refactor build/clean/distclean targets Wei Liu
@ 2015-02-02 12:58 ` Wei Liu
  2015-02-02 15:09   ` Ian Jackson
  2015-02-02 12:59 ` [PATCH 4/7] git-checkout.sh: use "mkdir -p" Wei Liu
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:58 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Mini-os source code will be fetched during build.

Please rerun autogen.sh after applying this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 stubdom/configure.ac | 1 -
 1 file changed, 1 deletion(-)

diff --git a/stubdom/configure.ac b/stubdom/configure.ac
index 6468203..424b24f 100644
--- a/stubdom/configure.ac
+++ b/stubdom/configure.ac
@@ -4,7 +4,6 @@
 AC_PREREQ([2.67])
 AC_INIT([Xen Hypervisor Stub Domains], m4_esyscmd([../version.sh ../xen/Makefile]),
     [xen-devel@lists.xen.org], [xen], [http://www.xen.org/])
-AC_CONFIG_SRCDIR([../extras/mini-os/kernel.c])
 AC_CONFIG_FILES([../config/Stubdom.mk])
 AC_CONFIG_AUX_DIR([../])
 
-- 
1.9.1

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

* [PATCH 4/7] git-checkout.sh: use "mkdir -p"
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
                   ` (2 preceding siblings ...)
  2015-02-02 12:58 ` [PATCH 3/7] stubdom: don't look for mini-os source file during configure Wei Liu
@ 2015-02-02 12:59 ` Wei Liu
  2015-02-02 14:58   ` Ian Campbell
  2015-02-02 12:59 ` [PATCH 5/7] Mini-OS: standalone build Wei Liu
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:59 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Otherwise mkdir extras/mini-os fails because extras doesn't exist.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 scripts/git-checkout.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
index 15b3ce9..20ae31f 100755
--- a/scripts/git-checkout.sh
+++ b/scripts/git-checkout.sh
@@ -13,7 +13,7 @@ set -e
 
 if test \! -d $DIR-remote; then
 	rm -rf $DIR-remote $DIR-remote.tmp
-	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp
+	mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp
 	$GIT clone $TREE $DIR-remote.tmp
 	if test "$TAG" ; then
 		cd $DIR-remote.tmp
-- 
1.9.1

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

* [PATCH 5/7] Mini-OS: standalone build
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
                   ` (3 preceding siblings ...)
  2015-02-02 12:59 ` [PATCH 4/7] git-checkout.sh: use "mkdir -p" Wei Liu
@ 2015-02-02 12:59 ` Wei Liu
  2015-02-02 14:59   ` Ian Campbell
  2015-02-02 12:59 ` [PATCH 6/7] build system: stubdom targets now depends on mini-os target Wei Liu
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:59 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

In order to keep the tree bisectable all the changes are done in one
single commit.

Things done in this commit:

1. Import necessary .mk files from Xen.
2. Move all XEN_ related variables to MINIOS_ namespace.
3. Import Xen public header files.
4. Import BSD's list.h and helper script.

Mini-OS's vanilla Config.mk is modified to contain some macros copied
from Xen's Config.mk. It also contains compatibility handling logic for
Xen's stubdom build environment.

Files modified:
   Config.mk
   Makefile
   arch/x86/Makefile
   arch/x86/arch.mk
   minios.mk

All other files are just imported from Xen.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 .gitignore                                         |    1 -
 extras/mini-os/Config.mk                           |   50 +-
 extras/mini-os/Makefile                            |   16 +-
 extras/mini-os/arch/x86/Makefile                   |    5 +-
 extras/mini-os/arch/x86/arch.mk                    |    8 +-
 extras/mini-os/config/MiniOS.mk                    |   10 +
 extras/mini-os/config/StdGNU.mk                    |   47 +
 extras/mini-os/config/arm32.mk                     |   22 +
 extras/mini-os/config/arm64.mk                     |   19 +
 extras/mini-os/config/x86_32.mk                    |   20 +
 extras/mini-os/config/x86_64.mk                    |   33 +
 [ import output trimmed ]
 extras/mini-os/minios.mk                           |    4 +-
 76 files changed, 16511 insertions(+), 23 deletions(-)
 [ import output trimmed ]

diff --git a/.gitignore b/.gitignore
index 13ee05b..cdbdca7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,7 +48,6 @@ docs/pdf/
 docs/txt/
 extras/mini-os/include/mini-os
 extras/mini-os/include/x86/mini-os
-extras/mini-os/include/xen
 extras/mini-os/include/list.h
 extras/mini-os/mini-os*
 install/*
diff --git a/extras/mini-os/Config.mk b/extras/mini-os/Config.mk
index 4852443..e5d8ade 100644
--- a/extras/mini-os/Config.mk
+++ b/extras/mini-os/Config.mk
@@ -1,7 +1,49 @@
-# Set mini-os root path, used in mini-os.mk.
+#
+# Compare $(1) and $(2) and replace $(2) with $(1) if they differ
+#
+# Typically $(1) is a newly generated file and $(2) is the target file
+# being regenerated. This prevents changing the timestamp of $(2) only
+# due to being auto regenereated with the same contents.
+define move-if-changed
+        if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi
+endef
+
+# cc-option: Check if compiler supports first option, else fall back to second.
+#
+# This is complicated by the fact that unrecognised -Wno-* options:
+#   (a) are ignored unless the compilation emits a warning; and
+#   (b) even then produce a warning rather than an error
+# To handle this we do a test compile, passing the option-under-test, on a code
+# fragment that will always produce a warning (integer assigned to pointer).
+# We then grep for the option-under-test in the compiler's output, the presence
+# of which would indicate an "unrecognized command-line option" warning/error.
+#
+# Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
+cc-option = $(shell if test -z "`echo 'void*p=1;' | \
+              $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
+              then echo "$(2)"; else echo "$(3)"; fi ;)
+
+# Compatibility with Xen's stubdom build environment.  If we are building
+# stubdom, some XEN_ variables are set, set MINIOS_ variables accordingly.
+#
+ifneq ($(XEN_ROOT),)
 MINI-OS_ROOT=$(XEN_ROOT)/extras/mini-os
+else
+MINI-OS_ROOT=$(TOPLEVEL_DIR)
+endif
 export MINI-OS_ROOT
 
+ifneq ($(XEN_TARGET_ARCH),)
+MINIOS_TARGET_ARCH = $(XEN_TARGET_ARCH)
+else
+MINIOS_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
+                            -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \
+                            -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \
+                            -e s/aarch64/arm64/)
+
+MINIOS_TARGET_ARCH     ?= $(MINIOS_COMPILE_ARCH)
+endif
+
 libc = $(stubdom)
 
 XEN_INTERFACE_VERSION := 0x00030205
@@ -9,11 +51,11 @@ export XEN_INTERFACE_VERSION
 
 # Try to find out the architecture family TARGET_ARCH_FAM.
 # First check whether x86_... is contained (for x86_32, x86_32y, x86_64).
-# If not x86 then use $(XEN_TARGET_ARCH)
-ifeq ($(findstring x86_,$(XEN_TARGET_ARCH)),x86_)
+# If not x86 then use $(MINIOS_TARGET_ARCH)
+ifeq ($(findstring x86_,$(MINIOS_TARGET_ARCH)),x86_)
 TARGET_ARCH_FAM = x86
 else
-TARGET_ARCH_FAM = $(XEN_TARGET_ARCH)
+TARGET_ARCH_FAM = $(MINIOS_TARGET_ARCH)
 endif
 
 # The architecture family directory below mini-os.
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
index 6d6537e..f16520e 100644
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -4,9 +4,8 @@
 # Makefile and a arch.mk.
 #
 
-export XEN_ROOT = $(CURDIR)/../..
-include $(XEN_ROOT)/Config.mk
-OBJ_DIR ?= $(CURDIR)
+OBJ_DIR=$(CURDIR)
+TOPLEVEL_DIR=$(CURDIR)
 
 ifeq ($(MINIOS_CONFIG),)
 include Config.mk
@@ -15,6 +14,8 @@ EXTRA_DEPS += $(MINIOS_CONFIG)
 include $(MINIOS_CONFIG)
 endif
 
+include $(MINI-OS_ROOT)/config/MiniOS.mk
+
 # Configuration defaults
 CONFIG_START_NETWORK ?= y
 CONFIG_SPARSE_BSS ?= y
@@ -51,7 +52,7 @@ flags-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
 DEF_CFLAGS += $(flags-y)
 
 # Symlinks and headers that must be created before building the C files
-GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/xen include/$(TARGET_ARCH_FAM)/mini-os
+GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/$(TARGET_ARCH_FAM)/mini-os
 
 EXTRA_DEPS += $(GENERATED_HEADERS)
 
@@ -65,7 +66,7 @@ include minios.mk
 LDLIBS := 
 APP_LDLIBS := 
 LDARCHLIB := -L$(OBJ_DIR)/$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
-LDFLAGS_FINAL := -T $(TARGET_ARCH_DIR)/minios-$(XEN_TARGET_ARCH).lds
+LDFLAGS_FINAL := -T $(TARGET_ARCH_DIR)/minios-$(MINIOS_TARGET_ARCH).lds
 
 # Prefix for global API names. All other symbols are localised before
 # linking with EXTRA_OBJS.
@@ -125,7 +126,7 @@ $(ARCH_LINKS):
 	$(arch_links)
 endif
 
-include/list.h: $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue.h
+include/list.h: include/minios-external/bsd-sys-queue-h-seddery include/minios-external/bsd-sys-queue.h
 	perl $^ --prefix=minios  >$@.new
 	$(call move-if-changed,$@.new,$@)
 
@@ -133,9 +134,6 @@ include/list.h: $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $
 .PHONY: links
 links: $(GENERATED_HEADERS)
 
-include/xen:
-	ln -sf ../../../xen/include/public $@
-
 include/mini-os:
 	ln -sf . $@
 
diff --git a/extras/mini-os/arch/x86/Makefile b/extras/mini-os/arch/x86/Makefile
index 1073e36..9f04a93 100644
--- a/extras/mini-os/arch/x86/Makefile
+++ b/extras/mini-os/arch/x86/Makefile
@@ -3,8 +3,7 @@
 # It's is used for x86_32, x86_32y and x86_64
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
-include $(XEN_ROOT)/Config.mk
+TOPLEVEL_DIR = $(CURDIR)/../..
 include ../../Config.mk
 
 # include arch.mk has to be before mini-os.mk!
@@ -12,7 +11,7 @@ include ../../Config.mk
 include arch.mk
 include ../../minios.mk
 
-# Sources here are all *.c *.S without $(XEN_TARGET_ARCH).S
+# Sources here are all *.c *.S without $(MINIOS_TARGET_ARCH).S
 # This is handled in $(HEAD_ARCH_OBJ)
 ARCH_SRCS := $(wildcard *.c)
 
diff --git a/extras/mini-os/arch/x86/arch.mk b/extras/mini-os/arch/x86/arch.mk
index b27f322..81e8118 100644
--- a/extras/mini-os/arch/x86/arch.mk
+++ b/extras/mini-os/arch/x86/arch.mk
@@ -3,20 +3,20 @@
 # (including x86_32, x86_32y and x86_64).
 #
 
-ifeq ($(XEN_TARGET_ARCH),x86_32)
+ifeq ($(MINIOS_TARGET_ARCH),x86_32)
 ARCH_CFLAGS  := -m32 -march=i686
 ARCH_LDFLAGS := -m elf_i386
 ARCH_ASFLAGS := -m32
-EXTRA_INC += $(TARGET_ARCH_FAM)/$(XEN_TARGET_ARCH)
+EXTRA_INC += $(TARGET_ARCH_FAM)/$(MINIOS_TARGET_ARCH)
 EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
-ifeq ($(XEN_TARGET_ARCH),x86_64)
+ifeq ($(MINIOS_TARGET_ARCH),x86_64)
 ARCH_CFLAGS := -m64 -mno-red-zone -fno-reorder-blocks
 ARCH_CFLAGS += -fno-asynchronous-unwind-tables
 ARCH_ASFLAGS := -m64
 ARCH_LDFLAGS := -m elf_x86_64
-EXTRA_INC += $(TARGET_ARCH_FAM)/$(XEN_TARGET_ARCH)
+EXTRA_INC += $(TARGET_ARCH_FAM)/$(MINIOS_TARGET_ARCH)
 EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
[ import output trimmed ]

diff --git a/extras/mini-os/minios.mk b/extras/mini-os/minios.mk
index f42f48b..b0d9f71 100644
--- a/extras/mini-os/minios.mk
+++ b/extras/mini-os/minios.mk
@@ -56,12 +56,12 @@ override CPPFLAGS := $(CPPFLAGS) $(extra_incl)
 # The name of the architecture specific library.
 # This is on x86_32: libx86_32.a
 # $(ARCH_LIB) has to built in the architecture specific directory.
-ARCH_LIB_NAME = $(XEN_TARGET_ARCH)
+ARCH_LIB_NAME = $(MINIOS_TARGET_ARCH)
 ARCH_LIB := lib$(ARCH_LIB_NAME).a
 
 # This object contains the entrypoint for startup from Xen.
 # $(HEAD_ARCH_OBJ) has to be built in the architecture specific directory.
-HEAD_ARCH_OBJ := $(XEN_TARGET_ARCH).o
+HEAD_ARCH_OBJ := $(MINIOS_TARGET_ARCH).o
 HEAD_OBJ := $(OBJ_DIR)/$(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
 
 
-- 
1.9.1

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

* [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
                   ` (4 preceding siblings ...)
  2015-02-02 12:59 ` [PATCH 5/7] Mini-OS: standalone build Wei Liu
@ 2015-02-02 12:59 ` Wei Liu
  2015-02-02 15:01   ` Ian Campbell
  2015-02-02 12:59 ` [PATCH 7/7] Remove in-tree mini-os directory Wei Liu
  2015-02-02 14:50 ` [PATCH 0/7] Split off mini-os to a separate tree Ian Campbell
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:59 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Provide mini-os url and revision in Config.mk

Introduce Makefile.mini-os which contains mini-os specific targets.
Target mini-os-dir clones mini-os tree from upstream.

Make stubdom targets depend on mini-os-dir target. Make
subtree-force-update{,-all} depend on mini-os-dir-force-update.

Also make mktarball script generate mini-os archive.

Original mini-os directory is renamed to mini-os-intree to help reduce
patch length. That directory will be deleted in a separate patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 .gitignore                                                |  6 ++----
 Config.mk                                                 |  3 +++
 Makefile                                                  | 15 +++++++++------
 Makefile.mini-os                                          | 15 +++++++++++++++
 [ rename output trimmed ]
 stubdom/Makefile                                          |  5 +++++
 tools/misc/mktarball                                      |  4 +++-
 227 files changed, 37 insertions(+), 11 deletions(-)
 create mode 100644 Makefile.mini-os


[ rename output trimmed ]

diff --git a/.gitignore b/.gitignore
index cdbdca7..4979018 100644
--- a/.gitignore
+++ b/.gitignore
@@ -46,10 +46,8 @@ docs/man1/
 docs/man5/
 docs/pdf/
 docs/txt/
-extras/mini-os/include/mini-os
-extras/mini-os/include/x86/mini-os
-extras/mini-os/include/list.h
-extras/mini-os/mini-os*
+extras/mini-os
+extras/mini-os-remote
 install/*
 stubdom/autom4te.cache/
 stubdom/binutils-*
diff --git a/Config.mk b/Config.mk
index 6324237..aea3450 100644
--- a/Config.mk
+++ b/Config.mk
@@ -245,14 +245,17 @@ OVMF_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/ovmf.git
 QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git
 QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
 SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git
+MINIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/mini-os.git
 else
 OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git
 QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
 QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
+MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
 OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
 QEMU_UPSTREAM_REVISION ?= master
+MINIOS_UPSTREAM_REVISION ?= master
 SEABIOS_UPSTREAM_REVISION ?= rel-1.7.5
 # Thu May 22 16:59:16 2014 -0400
 # python3 fixes for vgabios and csm builds.
diff --git a/Makefile b/Makefile
index ad6f917..d4d0f74 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,8 @@ TARGS_DISTCLEAN=$(patsubst %, distclean-%, $(SUBSYSTEMS))
 export XEN_ROOT=$(CURDIR)
 include Config.mk
 
+include Makefile.mini-os
+
 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
 export XEN_TARGET_ARCH SUBARCH
 export DESTDIR
@@ -37,7 +39,7 @@ build-tools:
 	$(MAKE) -C tools build
 
 .PHONY: build-stubdom
-build-stubdom:
+build-stubdom: mini-os-dir
 	$(MAKE) -C stubdom build
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
@@ -84,7 +86,7 @@ install-tools:
 	$(MAKE) -C tools install
 
 .PHONY: install-stubdom
-install-stubdom: install-tools
+install-stubdom: install-tools mini-os-dir
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
@@ -125,11 +127,11 @@ rpmball: dist
 	bash ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion --no-print-directory)
 
 .PHONY: subtree-force-update
-subtree-force-update:
+subtree-force-update: mini-os-dir-force-update
 	$(MAKE) -C tools subtree-force-update
 
 .PHONY: subtree-force-update-all
-subtree-force-update-all:
+subtree-force-update-all: mini-os-dir-force-update
 	$(MAKE) -C tools subtree-force-update-all
 
 # Make a source tarball, including qemu sub-trees.
@@ -161,7 +163,7 @@ clean-tools:
 	$(MAKE) -C tools clean
 
 .PHONY: clean-stubdom
-clean-stubdom:
+clean-stubdom: mini-os-dir
 	$(MAKE) -C stubdom crossclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
@@ -187,11 +189,12 @@ distclean-tools:
 	$(MAKE) -C tools distclean
 
 .PHONY: distclean-stubdom
-distclean-stubdom:
+distclean-stubdom: mini-os-dir
 	$(MAKE) -C stubdom distclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
+	rm -rf extras/mini-os extras/mini-os-remote
 
 .PHONY: distclean-docs
 distclean-docs:
diff --git a/Makefile.mini-os b/Makefile.mini-os
new file mode 100644
index 0000000..46b1d80
--- /dev/null
+++ b/Makefile.mini-os
@@ -0,0 +1,15 @@
+.PHONY: mini-os-dir
+mini-os-dir:
+	GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh \
+		$(MINIOS_UPSTREAM_URL) \
+		$(MINIOS_UPSTREAM_REVISION) \
+		$(XEN_ROOT)/extras/mini-os
+
+.PHONY: mini-os-dir-force-update
+mini-os-dir-force-update: mini-os-dir
+	set -ex; \
+	if [ "$(MINIOS_UPSTREAM_REVISION)" ]; then \
+		cd extras/mini-os-remote; \
+		$(GIT) fetch origin; \
+		$(GIT) reset --hard $(MINIOS_UPSTREAM_REVISION); \
+	fi

[ rename output trimmed ]

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 58ca08c..ed02950 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -1,6 +1,10 @@
 XEN_ROOT = $(CURDIR)/..
 MINI_OS = $(XEN_ROOT)/extras/mini-os
 
+ifeq ($(wildcard $(MINI_OS)/Config.mk),)
+$(error Please run `make mini-os-dir' in top-level directory)
+endif
+
 export XEN_OS=MiniOS
 
 export stubdom=y
@@ -558,6 +562,7 @@ downloadclean: patchclean
 .PHONY: distclean
 distclean: downloadclean
 	rm -rf config.log config.status config.cache autom4te.cache ../config/Stubdom.mk
+	rm -rf $(MINI_OS) $(MINI_OS)-remote
 
 ifeq (,$(findstring clean,$(MAKECMDGOALS)))
 $(XEN_ROOT)/config/Stubdom.mk:
diff --git a/tools/misc/mktarball b/tools/misc/mktarball
index aad1096..73282b5 100755
--- a/tools/misc/mktarball
+++ b/tools/misc/mktarball
@@ -6,7 +6,7 @@
 set -ex
 
 function git_archive_into {
-    mkdir "$2"
+    mkdir -p "$2"
 
     git --git-dir="$1"/.git \
 	archive --format=tar HEAD | \
@@ -33,6 +33,8 @@ git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu-
 
 git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote $tdir/xen-$desc/tools/qemu-xen-traditional
 
+git_archive_into $xen_root/extras/mini-os-remote $tdir/xen-$desc/extras/mini-os
+
 GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc
 
 echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz"
-- 
1.9.1

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

* [PATCH 7/7] Remove in-tree mini-os directory
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
                   ` (5 preceding siblings ...)
  2015-02-02 12:59 ` [PATCH 6/7] build system: stubdom targets now depends on mini-os target Wei Liu
@ 2015-02-02 12:59 ` Wei Liu
  2015-02-02 15:02   ` Ian Campbell
  2015-02-02 14:50 ` [PATCH 0/7] Split off mini-os to a separate tree Ian Campbell
  7 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 12:59 UTC (permalink / raw)
  To: xen-devel
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	ian.jackson, pooka, samuel.thibault, dgdegra

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>

[ output trimmed ]

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

* Re: [PATCH 0/7] Split off mini-os to a separate tree
  2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
                   ` (6 preceding siblings ...)
  2015-02-02 12:59 ` [PATCH 7/7] Remove in-tree mini-os directory Wei Liu
@ 2015-02-02 14:50 ` Ian Campbell
  2015-02-02 14:59   ` Wei Liu
  7 siblings, 1 reply; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 14:50 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:58 +0000, Wei Liu wrote:
> As far as I can tell there is no incoming mini-os patches at the moment. So I
> suggest we commence once we get that last mini-os patch in staging pushed to
> master.

Is the new xenbits tree (the proper one, not your people one) for
mini-os all setup and in place (but perhaps not populated?)

I was just about to suggest that I apply patch #1, #2 and #4 as
precursors. It sounds like you would prefer that I do not.

> I use following runes to split off mini-os:
> 
>   git filter-branch --tag-name-filter cat \
>     --subdirectory-filter extras/mini-os/ -- --all
> 
>   # There is already a tag name 4.3.0-rc2 which points to the same commit.
>   git tag -d xen-4.3.0-rc2

I wonder if we should just nuke that, it always breaks my tab completion
and is very annoying ;-)

Ian.

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

* Re: [PATCH 1/7] stubdom: fix "make build"
  2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
@ 2015-02-02 14:53   ` Ian Campbell
  2015-02-02 22:11   ` Samuel Thibault
  1 sibling, 0 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 14:53 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:58 +0000, Wei Liu wrote:
> Cross compiling libxc requires some symlinks to exist.
> 
> Note that make -C tools/include requires running tools/configure. But at
> least now the error message is much better than just a "file not found"
> error.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

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

* Re: [PATCH 2/7] Makefile: refactor build/clean/distclean targets
  2015-02-02 12:58 ` [PATCH 2/7] Makefile: refactor build/clean/distclean targets Wei Liu
@ 2015-02-02 14:54   ` Ian Campbell
  0 siblings, 0 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 14:54 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:58 +0000, Wei Liu wrote:
> Factor out per-subsystem build/clean/distclean-% targets, so that we can
> build subsystems independently in top level directory.
> 
> The motive behind this is after splitting out mini-os from Xen tree,
> stubdom is in effect a downstream of mini-os.  I would like to have the
> ability to build it independently and instrument OSSTest to test it.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

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

* Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p"
  2015-02-02 12:59 ` [PATCH 4/7] git-checkout.sh: use "mkdir -p" Wei Liu
@ 2015-02-02 14:58   ` Ian Campbell
  2015-02-02 15:02     ` Ian Jackson
  2015-02-02 15:02     ` Wei Liu
  0 siblings, 2 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 14:58 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> Otherwise mkdir extras/mini-os fails because extras doesn't exist.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

As a future change perhaps we should clone mini-os under stubdom/*
somewhere instead of in extras?

> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  scripts/git-checkout.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
> index 15b3ce9..20ae31f 100755
> --- a/scripts/git-checkout.sh
> +++ b/scripts/git-checkout.sh
> @@ -13,7 +13,7 @@ set -e
>  
>  if test \! -d $DIR-remote; then
>  	rm -rf $DIR-remote $DIR-remote.tmp
> -	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp
> +	mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp
>  	$GIT clone $TREE $DIR-remote.tmp
>  	if test "$TAG" ; then
>  		cd $DIR-remote.tmp

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

* Re: [PATCH 5/7] Mini-OS: standalone build
  2015-02-02 12:59 ` [PATCH 5/7] Mini-OS: standalone build Wei Liu
@ 2015-02-02 14:59   ` Ian Campbell
  0 siblings, 0 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 14:59 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> In order to keep the tree bisectable all the changes are done in one
> single commit.
> 
> Things done in this commit:
> 
> 1. Import necessary .mk files from Xen.
> 2. Move all XEN_ related variables to MINIOS_ namespace.
> 3. Import Xen public header files.
> 4. Import BSD's list.h and helper script.
> 
> Mini-OS's vanilla Config.mk is modified to contain some macros copied
> from Xen's Config.mk. It also contains compatibility handling logic for
> Xen's stubdom build environment.
> 
> Files modified:
>    Config.mk
>    Makefile
>    arch/x86/Makefile
>    arch/x86/arch.mk
>    minios.mk
> 
> All other files are just imported from Xen.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>

I've not reviewed in depth, but:
Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  .gitignore                                         |    1 -
>  extras/mini-os/Config.mk                           |   50 +-
>  extras/mini-os/Makefile                            |   16 +-
>  extras/mini-os/arch/x86/Makefile                   |    5 +-
>  extras/mini-os/arch/x86/arch.mk                    |    8 +-
>  extras/mini-os/config/MiniOS.mk                    |   10 +
>  extras/mini-os/config/StdGNU.mk                    |   47 +
>  extras/mini-os/config/arm32.mk                     |   22 +
>  extras/mini-os/config/arm64.mk                     |   19 +
>  extras/mini-os/config/x86_32.mk                    |   20 +
>  extras/mini-os/config/x86_64.mk                    |   33 +
>  [ import output trimmed ]
>  extras/mini-os/minios.mk                           |    4 +-
>  76 files changed, 16511 insertions(+), 23 deletions(-)
>  [ import output trimmed ]
> 
> diff --git a/.gitignore b/.gitignore
> index 13ee05b..cdbdca7 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -48,7 +48,6 @@ docs/pdf/
>  docs/txt/
>  extras/mini-os/include/mini-os
>  extras/mini-os/include/x86/mini-os
> -extras/mini-os/include/xen
>  extras/mini-os/include/list.h
>  extras/mini-os/mini-os*
>  install/*
> diff --git a/extras/mini-os/Config.mk b/extras/mini-os/Config.mk
> index 4852443..e5d8ade 100644
> --- a/extras/mini-os/Config.mk
> +++ b/extras/mini-os/Config.mk
> @@ -1,7 +1,49 @@
> -# Set mini-os root path, used in mini-os.mk.
> +#
> +# Compare $(1) and $(2) and replace $(2) with $(1) if they differ
> +#
> +# Typically $(1) is a newly generated file and $(2) is the target file
> +# being regenerated. This prevents changing the timestamp of $(2) only
> +# due to being auto regenereated with the same contents.
> +define move-if-changed
> +        if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi
> +endef
> +
> +# cc-option: Check if compiler supports first option, else fall back to second.
> +#
> +# This is complicated by the fact that unrecognised -Wno-* options:
> +#   (a) are ignored unless the compilation emits a warning; and
> +#   (b) even then produce a warning rather than an error
> +# To handle this we do a test compile, passing the option-under-test, on a code
> +# fragment that will always produce a warning (integer assigned to pointer).
> +# We then grep for the option-under-test in the compiler's output, the presence
> +# of which would indicate an "unrecognized command-line option" warning/error.
> +#
> +# Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
> +cc-option = $(shell if test -z "`echo 'void*p=1;' | \
> +              $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
> +              then echo "$(2)"; else echo "$(3)"; fi ;)
> +
> +# Compatibility with Xen's stubdom build environment.  If we are building
> +# stubdom, some XEN_ variables are set, set MINIOS_ variables accordingly.
> +#
> +ifneq ($(XEN_ROOT),)
>  MINI-OS_ROOT=$(XEN_ROOT)/extras/mini-os
> +else
> +MINI-OS_ROOT=$(TOPLEVEL_DIR)
> +endif
>  export MINI-OS_ROOT
>  
> +ifneq ($(XEN_TARGET_ARCH),)
> +MINIOS_TARGET_ARCH = $(XEN_TARGET_ARCH)
> +else
> +MINIOS_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
> +                            -e s/i86pc/x86_32/ -e s/amd64/x86_64/ \
> +                            -e s/armv7.*/arm32/ -e s/armv8.*/arm64/ \
> +                            -e s/aarch64/arm64/)
> +
> +MINIOS_TARGET_ARCH     ?= $(MINIOS_COMPILE_ARCH)
> +endif
> +
>  libc = $(stubdom)
>  
>  XEN_INTERFACE_VERSION := 0x00030205
> @@ -9,11 +51,11 @@ export XEN_INTERFACE_VERSION
>  
>  # Try to find out the architecture family TARGET_ARCH_FAM.
>  # First check whether x86_... is contained (for x86_32, x86_32y, x86_64).
> -# If not x86 then use $(XEN_TARGET_ARCH)
> -ifeq ($(findstring x86_,$(XEN_TARGET_ARCH)),x86_)
> +# If not x86 then use $(MINIOS_TARGET_ARCH)
> +ifeq ($(findstring x86_,$(MINIOS_TARGET_ARCH)),x86_)
>  TARGET_ARCH_FAM = x86
>  else
> -TARGET_ARCH_FAM = $(XEN_TARGET_ARCH)
> +TARGET_ARCH_FAM = $(MINIOS_TARGET_ARCH)
>  endif
>  
>  # The architecture family directory below mini-os.
> diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
> index 6d6537e..f16520e 100644
> --- a/extras/mini-os/Makefile
> +++ b/extras/mini-os/Makefile
> @@ -4,9 +4,8 @@
>  # Makefile and a arch.mk.
>  #
>  
> -export XEN_ROOT = $(CURDIR)/../..
> -include $(XEN_ROOT)/Config.mk
> -OBJ_DIR ?= $(CURDIR)
> +OBJ_DIR=$(CURDIR)
> +TOPLEVEL_DIR=$(CURDIR)
>  
>  ifeq ($(MINIOS_CONFIG),)
>  include Config.mk
> @@ -15,6 +14,8 @@ EXTRA_DEPS += $(MINIOS_CONFIG)
>  include $(MINIOS_CONFIG)
>  endif
>  
> +include $(MINI-OS_ROOT)/config/MiniOS.mk
> +
>  # Configuration defaults
>  CONFIG_START_NETWORK ?= y
>  CONFIG_SPARSE_BSS ?= y
> @@ -51,7 +52,7 @@ flags-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
>  DEF_CFLAGS += $(flags-y)
>  
>  # Symlinks and headers that must be created before building the C files
> -GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/xen include/$(TARGET_ARCH_FAM)/mini-os
> +GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/$(TARGET_ARCH_FAM)/mini-os
>  
>  EXTRA_DEPS += $(GENERATED_HEADERS)
>  
> @@ -65,7 +66,7 @@ include minios.mk
>  LDLIBS := 
>  APP_LDLIBS := 
>  LDARCHLIB := -L$(OBJ_DIR)/$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
> -LDFLAGS_FINAL := -T $(TARGET_ARCH_DIR)/minios-$(XEN_TARGET_ARCH).lds
> +LDFLAGS_FINAL := -T $(TARGET_ARCH_DIR)/minios-$(MINIOS_TARGET_ARCH).lds
>  
>  # Prefix for global API names. All other symbols are localised before
>  # linking with EXTRA_OBJS.
> @@ -125,7 +126,7 @@ $(ARCH_LINKS):
>  	$(arch_links)
>  endif
>  
> -include/list.h: $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue.h
> +include/list.h: include/minios-external/bsd-sys-queue-h-seddery include/minios-external/bsd-sys-queue.h
>  	perl $^ --prefix=minios  >$@.new
>  	$(call move-if-changed,$@.new,$@)
>  
> @@ -133,9 +134,6 @@ include/list.h: $(XEN_ROOT)/tools/include/xen-external/bsd-sys-queue-h-seddery $
>  .PHONY: links
>  links: $(GENERATED_HEADERS)
>  
> -include/xen:
> -	ln -sf ../../../xen/include/public $@
> -
>  include/mini-os:
>  	ln -sf . $@
>  
> diff --git a/extras/mini-os/arch/x86/Makefile b/extras/mini-os/arch/x86/Makefile
> index 1073e36..9f04a93 100644
> --- a/extras/mini-os/arch/x86/Makefile
> +++ b/extras/mini-os/arch/x86/Makefile
> @@ -3,8 +3,7 @@
>  # It's is used for x86_32, x86_32y and x86_64
>  #
>  
> -XEN_ROOT = $(CURDIR)/../../../..
> -include $(XEN_ROOT)/Config.mk
> +TOPLEVEL_DIR = $(CURDIR)/../..
>  include ../../Config.mk
>  
>  # include arch.mk has to be before mini-os.mk!
> @@ -12,7 +11,7 @@ include ../../Config.mk
>  include arch.mk
>  include ../../minios.mk
>  
> -# Sources here are all *.c *.S without $(XEN_TARGET_ARCH).S
> +# Sources here are all *.c *.S without $(MINIOS_TARGET_ARCH).S
>  # This is handled in $(HEAD_ARCH_OBJ)
>  ARCH_SRCS := $(wildcard *.c)
>  
> diff --git a/extras/mini-os/arch/x86/arch.mk b/extras/mini-os/arch/x86/arch.mk
> index b27f322..81e8118 100644
> --- a/extras/mini-os/arch/x86/arch.mk
> +++ b/extras/mini-os/arch/x86/arch.mk
> @@ -3,20 +3,20 @@
>  # (including x86_32, x86_32y and x86_64).
>  #
>  
> -ifeq ($(XEN_TARGET_ARCH),x86_32)
> +ifeq ($(MINIOS_TARGET_ARCH),x86_32)
>  ARCH_CFLAGS  := -m32 -march=i686
>  ARCH_LDFLAGS := -m elf_i386
>  ARCH_ASFLAGS := -m32
> -EXTRA_INC += $(TARGET_ARCH_FAM)/$(XEN_TARGET_ARCH)
> +EXTRA_INC += $(TARGET_ARCH_FAM)/$(MINIOS_TARGET_ARCH)
>  EXTRA_SRC += arch/$(EXTRA_INC)
>  endif
>  
> -ifeq ($(XEN_TARGET_ARCH),x86_64)
> +ifeq ($(MINIOS_TARGET_ARCH),x86_64)
>  ARCH_CFLAGS := -m64 -mno-red-zone -fno-reorder-blocks
>  ARCH_CFLAGS += -fno-asynchronous-unwind-tables
>  ARCH_ASFLAGS := -m64
>  ARCH_LDFLAGS := -m elf_x86_64
> -EXTRA_INC += $(TARGET_ARCH_FAM)/$(XEN_TARGET_ARCH)
> +EXTRA_INC += $(TARGET_ARCH_FAM)/$(MINIOS_TARGET_ARCH)
>  EXTRA_SRC += arch/$(EXTRA_INC)
>  endif
>  
> [ import output trimmed ]
> 
> diff --git a/extras/mini-os/minios.mk b/extras/mini-os/minios.mk
> index f42f48b..b0d9f71 100644
> --- a/extras/mini-os/minios.mk
> +++ b/extras/mini-os/minios.mk
> @@ -56,12 +56,12 @@ override CPPFLAGS := $(CPPFLAGS) $(extra_incl)
>  # The name of the architecture specific library.
>  # This is on x86_32: libx86_32.a
>  # $(ARCH_LIB) has to built in the architecture specific directory.
> -ARCH_LIB_NAME = $(XEN_TARGET_ARCH)
> +ARCH_LIB_NAME = $(MINIOS_TARGET_ARCH)
>  ARCH_LIB := lib$(ARCH_LIB_NAME).a
>  
>  # This object contains the entrypoint for startup from Xen.
>  # $(HEAD_ARCH_OBJ) has to be built in the architecture specific directory.
> -HEAD_ARCH_OBJ := $(XEN_TARGET_ARCH).o
> +HEAD_ARCH_OBJ := $(MINIOS_TARGET_ARCH).o
>  HEAD_OBJ := $(OBJ_DIR)/$(TARGET_ARCH_DIR)/$(HEAD_ARCH_OBJ)
>  
> 

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

* Re: [PATCH 0/7] Split off mini-os to a separate tree
  2015-02-02 14:50 ` [PATCH 0/7] Split off mini-os to a separate tree Ian Campbell
@ 2015-02-02 14:59   ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 14:59 UTC (permalink / raw)
  To: Ian Campbell
  Cc: talex5, Wei Liu, stefano.stabellini, anil, ian.jackson,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 02:50:31PM +0000, Ian Campbell wrote:
> On Mon, 2015-02-02 at 12:58 +0000, Wei Liu wrote:
> > As far as I can tell there is no incoming mini-os patches at the moment. So I
> > suggest we commence once we get that last mini-os patch in staging pushed to
> > master.
> 
> Is the new xenbits tree (the proper one, not your people one) for
> mini-os all setup and in place (but perhaps not populated?)
> 

No, not yet.

> I was just about to suggest that I apply patch #1, #2 and #4 as
> precursors. It sounds like you would prefer that I do not.
> 

You can apply #1, #2 and #4. They are safe.

> > I use following runes to split off mini-os:
> > 
> >   git filter-branch --tag-name-filter cat \
> >     --subdirectory-filter extras/mini-os/ -- --all
> > 
> >   # There is already a tag name 4.3.0-rc2 which points to the same commit.
> >   git tag -d xen-4.3.0-rc2
> 
> I wonder if we should just nuke that, it always breaks my tab completion
> and is very annoying ;-)
> 

Good idea.

Wei.

> Ian.

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 12:59 ` [PATCH 6/7] build system: stubdom targets now depends on mini-os target Wei Liu
@ 2015-02-02 15:01   ` Ian Campbell
  2015-02-02 15:03     ` Ian Campbell
  2015-02-02 15:12     ` Wei Liu
  0 siblings, 2 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 15:01 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> Provide mini-os url and revision in Config.mk
> 
> Introduce Makefile.mini-os which contains mini-os specific targets.

I'm not sure it has enough content to warrant that, those two targets
could easily be inlined.

> +ifeq ($(wildcard $(MINI_OS)/Config.mk),)
> +$(error Please run `make mini-os-dir' in top-level directory)
> +endif

This makes me think that maybe my earlier suggestion to move the clone
under stubdom/ might be better done right away.

In fact, that would avoid the need to play tricks with renaming extras/
too, since you could build both for a commit.

Ian.

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

* Re: [PATCH 7/7] Remove in-tree mini-os directory
  2015-02-02 12:59 ` [PATCH 7/7] Remove in-tree mini-os directory Wei Liu
@ 2015-02-02 15:02   ` Ian Campbell
  0 siblings, 0 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 15:02 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, stefano.stabellini, anil, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> [ output trimmed ]

Acked-by: Ian Campbell <ian.campbell@citrix.com>

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

* Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p"
  2015-02-02 14:58   ` Ian Campbell
@ 2015-02-02 15:02     ` Ian Jackson
  2015-02-02 15:05       ` Andrew Cooper
  2015-02-02 15:02     ` Wei Liu
  1 sibling, 1 reply; 28+ messages in thread
From: Ian Jackson @ 2015-02-02 15:02 UTC (permalink / raw)
  To: Ian Campbell
  Cc: talex5, Wei Liu, stefano.stabellini, anil, xen-devel, pooka,
	samuel.thibault, dgdegra

Ian Campbell writes ("Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p""):
> On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > Otherwise mkdir extras/mini-os fails because extras doesn't exist.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> As a future change perhaps we should clone mini-os under stubdom/*
> somewhere instead of in extras?

Please, no.  The build system under stubdom/ is very bad, and if we
ever want to be able to export some built mini-os bits that don't
interact with the stubdom build system, that would prevent us.

Ian.

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

* Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p"
  2015-02-02 14:58   ` Ian Campbell
  2015-02-02 15:02     ` Ian Jackson
@ 2015-02-02 15:02     ` Wei Liu
  1 sibling, 0 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 15:02 UTC (permalink / raw)
  To: Ian Campbell
  Cc: talex5, Wei Liu, stefano.stabellini, anil, ian.jackson,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 02:58:17PM +0000, Ian Campbell wrote:
> On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > Otherwise mkdir extras/mini-os fails because extras doesn't exist.
> > 
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> As a future change perhaps we should clone mini-os under stubdom/*
> somewhere instead of in extras?
> 

Ian J suggested that I should avoid touching stubdom build at the moment
so I went with the obvious correct approach. :-)

Wei.

> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > ---
> >  scripts/git-checkout.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
> > index 15b3ce9..20ae31f 100755
> > --- a/scripts/git-checkout.sh
> > +++ b/scripts/git-checkout.sh
> > @@ -13,7 +13,7 @@ set -e
> >  
> >  if test \! -d $DIR-remote; then
> >  	rm -rf $DIR-remote $DIR-remote.tmp
> > -	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp
> > +	mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp
> >  	$GIT clone $TREE $DIR-remote.tmp
> >  	if test "$TAG" ; then
> >  		cd $DIR-remote.tmp
> 

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 15:01   ` Ian Campbell
@ 2015-02-02 15:03     ` Ian Campbell
  2015-02-02 17:18       ` Wei Liu
  2015-02-02 15:12     ` Wei Liu
  1 sibling, 1 reply; 28+ messages in thread
From: Ian Campbell @ 2015-02-02 15:03 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, anil, stefano.stabellini, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 15:01 +0000, Ian Campbell wrote:
> On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > Provide mini-os url and revision in Config.mk
> > 
> > Introduce Makefile.mini-os which contains mini-os specific targets.
> 
> I'm not sure it has enough content to warrant that, those two targets
> could easily be inlined.
> 
> > +ifeq ($(wildcard $(MINI_OS)/Config.mk),)
> > +$(error Please run `make mini-os-dir' in top-level directory)
> > +endif
> 
> This makes me think that maybe my earlier suggestion to move the clone
> under stubdom/ might be better done right away.
> 
> In fact, that would avoid the need to play tricks with renaming extras/
> too, since you could build both for a commit.

Retracted after reponse to my earlier suggestion...

> 
> Ian.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

* Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p"
  2015-02-02 15:02     ` Ian Jackson
@ 2015-02-02 15:05       ` Andrew Cooper
  0 siblings, 0 replies; 28+ messages in thread
From: Andrew Cooper @ 2015-02-02 15:05 UTC (permalink / raw)
  To: Ian Jackson, Ian Campbell
  Cc: talex5, Wei Liu, anil, stefano.stabellini, xen-devel, pooka,
	samuel.thibault, dgdegra

On 02/02/15 15:02, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH 4/7] git-checkout.sh: use "mkdir -p""):
>> On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
>>> Otherwise mkdir extras/mini-os fails because extras doesn't exist.
>>>
>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>>
>> As a future change perhaps we should clone mini-os under stubdom/*
>> somewhere instead of in extras?
> Please, no.  The build system under stubdom/ is very bad, and if we
> ever want to be able to export some built mini-os bits that don't
> interact with the stubdom build system, that would prevent us.

Perhaps rename the current stubdom to stubdom-sin-bin and start a new,
more sane, stubdom?

~Andrew

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

* Re: [PATCH 3/7] stubdom: don't look for mini-os source file during configure
  2015-02-02 12:58 ` [PATCH 3/7] stubdom: don't look for mini-os source file during configure Wei Liu
@ 2015-02-02 15:09   ` Ian Jackson
  2015-02-02 15:27     ` Wei Liu
  0 siblings, 1 reply; 28+ messages in thread
From: Ian Jackson @ 2015-02-02 15:09 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, ian.campbell, stefano.stabellini, anil, xen-devel, pooka,
	samuel.thibault, dgdegra

Wei Liu writes ("[PATCH 3/7] stubdom: don't look for mini-os source file during configure"):
> Mini-os source code will be fetched during build.
...
> -AC_CONFIG_SRCDIR([../extras/mini-os/kernel.c])

You should replace this with a different file, surely.

Maybe
 AC_CONFIG_SRCDIR([xenstore-minios.cfg])
?

Ian.

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 15:01   ` Ian Campbell
  2015-02-02 15:03     ` Ian Campbell
@ 2015-02-02 15:12     ` Wei Liu
  2015-02-02 15:15       ` Ian Jackson
  1 sibling, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 15:12 UTC (permalink / raw)
  To: Ian Campbell
  Cc: talex5, Wei Liu, stefano.stabellini, anil, ian.jackson,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 03:01:44PM +0000, Ian Campbell wrote:
> On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > Provide mini-os url and revision in Config.mk
> > 
> > Introduce Makefile.mini-os which contains mini-os specific targets.
> 
> I'm not sure it has enough content to warrant that, those two targets
> could easily be inlined.
> 
> > +ifeq ($(wildcard $(MINI_OS)/Config.mk),)
> > +$(error Please run `make mini-os-dir' in top-level directory)
> > +endif
> 
> This makes me think that maybe my earlier suggestion to move the clone
> under stubdom/ might be better done right away.
> 
> In fact, that would avoid the need to play tricks with renaming extras/
> too, since you could build both for a commit.
> 

I think I made this hack not because of the location, but because I
couldn't get it to clone in a sensible way without breaking stubdom
build. I'm not GNU Make expert so I'm open to suggestion on this issue.

So in this Makefile:

6 export stubdom=y
7 export debug=y
8 include $(XEN_ROOT)/Config.mk

Line 8 includes $(XEN_ROOT)/Config.mk, which in turn includes
$(MINI_OS)/Config.mk. Mini-os's Config.mk contains a bunch of flags.

In GNU Make's manual:

If an included makefile cannot be found in any of these directories, a
warning message is generated, but it is not an immediately fatal error;
processing of the makefile containing the include continues. Once it has
finished reading makefiles, make will try to remake any that are out of
date or don’t exist. See How Makefiles Are Remade. Only after it has
tried to find a way to remake a makefile and failed, will make diagnose
the missing makefile as a fatal error.

So I once had something like:

$(XEN_ROOT)/Config.mk: mini-os-dir

Mini-os got clone and the build proceeded. But stubdom build still broke
miserably, because *FLAGS in stubdom/Makefile are not reevaluated.

Is there a solution to this?

Wei.

> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 15:12     ` Wei Liu
@ 2015-02-02 15:15       ` Ian Jackson
  2015-02-02 15:25         ` Wei Liu
  0 siblings, 1 reply; 28+ messages in thread
From: Ian Jackson @ 2015-02-02 15:15 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, Ian Campbell, stefano.stabellini, anil, xen-devel, pooka,
	samuel.thibault, dgdegra

Wei Liu writes ("Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target"):
> So I once had something like:
> 
> $(XEN_ROOT)/Config.mk: mini-os-dir
> 
> Mini-os got clone and the build proceeded. But stubdom build still broke
> miserably, because *FLAGS in stubdom/Makefile are not reevaluated.

This seems wrong to me because I would expect make to actually read
the relevant file it has just built.  But given how bad the
xen.git/stubdom makefiles are, I'm not convinced that trying to debug
this will be very fruitful :-/.

Ian.

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 15:15       ` Ian Jackson
@ 2015-02-02 15:25         ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 15:25 UTC (permalink / raw)
  To: Ian Jackson
  Cc: talex5, Wei Liu, Ian Campbell, stefano.stabellini, anil,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 03:15:07PM +0000, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target"):
> > So I once had something like:
> > 
> > $(XEN_ROOT)/Config.mk: mini-os-dir
> > 
> > Mini-os got clone and the build proceeded. But stubdom build still broke
> > miserably, because *FLAGS in stubdom/Makefile are not reevaluated.
> 
> This seems wrong to me because I would expect make to actually read
> the relevant file it has just built.  But given how bad the
> xen.git/stubdom makefiles are, I'm not convinced that trying to debug
> this will be very fruitful :-/.
> 

FWIW I did this test myself.

== Config.mk
include New.mk
== end Config.mk

== Makefile
include Config.mk

.PHONY: all
	@echo $(VAR)

New.mk:
	@echo "VAR = 123" > New.mk

VAR += ABC
== end Makefile

And the final result is VAR = "123 ABC".

However this is not the case for stubdom. :-/

I agree it won't be fruitful in debugging this.

Wei.

> Ian.

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

* Re: [PATCH 3/7] stubdom: don't look for mini-os source file during configure
  2015-02-02 15:09   ` Ian Jackson
@ 2015-02-02 15:27     ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2015-02-02 15:27 UTC (permalink / raw)
  To: Ian Jackson
  Cc: talex5, Wei Liu, ian.campbell, stefano.stabellini, anil,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 03:09:32PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH 3/7] stubdom: don't look for mini-os source file during configure"):
> > Mini-os source code will be fetched during build.
> ...
> > -AC_CONFIG_SRCDIR([../extras/mini-os/kernel.c])
> 
> You should replace this with a different file, surely.
> 
> Maybe
>  AC_CONFIG_SRCDIR([xenstore-minios.cfg])
> ?

Ack.

Wei.

> 
> Ian.

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 15:03     ` Ian Campbell
@ 2015-02-02 17:18       ` Wei Liu
  2015-02-03 11:31         ` Ian Campbell
  0 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2015-02-02 17:18 UTC (permalink / raw)
  To: Ian Campbell
  Cc: talex5, Wei Liu, anil, stefano.stabellini, ian.jackson,
	xen-devel, pooka, samuel.thibault, dgdegra

On Mon, Feb 02, 2015 at 03:03:45PM +0000, Ian Campbell wrote:
> On Mon, 2015-02-02 at 15:01 +0000, Ian Campbell wrote:
> > On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > > Provide mini-os url and revision in Config.mk
> > > 
> > > Introduce Makefile.mini-os which contains mini-os specific targets.
> > 
> > I'm not sure it has enough content to warrant that, those two targets
> > could easily be inlined.
> > 
> > > +ifeq ($(wildcard $(MINI_OS)/Config.mk),)
> > > +$(error Please run `make mini-os-dir' in top-level directory)
> > > +endif
> > 
> > This makes me think that maybe my earlier suggestion to move the clone
> > under stubdom/ might be better done right away.
> > 
> > In fact, that would avoid the need to play tricks with renaming extras/
> > too, since you could build both for a commit.
> 
> Retracted after reponse to my earlier suggestion...
> 

I take it you're fine with the current arrangement now?

Wei.

> > 
> > Ian.
> > 
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
> 

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

* Re: [PATCH 1/7] stubdom: fix "make build"
  2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
  2015-02-02 14:53   ` Ian Campbell
@ 2015-02-02 22:11   ` Samuel Thibault
  1 sibling, 0 replies; 28+ messages in thread
From: Samuel Thibault @ 2015-02-02 22:11 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, ian.campbell, stefano.stabellini, anil, ian.jackson,
	xen-devel, pooka, dgdegra

Wei Liu, le Mon 02 Feb 2015 12:58:57 +0000, a écrit :
> Cross compiling libxc requires some symlinks to exist.
> 
> Note that make -C tools/include requires running tools/configure. But at
> least now the error message is much better than just a "file not found"
> error.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jakcson <ian.jackson@eu.citrix.com>

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  stubdom/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/stubdom/Makefile b/stubdom/Makefile
> index 8fb885a..58ca08c 100644
> --- a/stubdom/Makefile
> +++ b/stubdom/Makefile
> @@ -333,6 +333,8 @@ $(TARGETS_MINIOS): mini-os-%:
>  .PHONY: libxc
>  libxc: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a libxc-$(XEN_TARGET_ARCH)/libxenguest.a
>  libxc-$(XEN_TARGET_ARCH)/libxenctrl.a: cross-zlib
> +	$(MAKE) -C $(XEN_ROOT)/tools/include
> +	$(MAKE) DESTDIR= -C $(MINI_OS) links
>  	CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= CONFIG_LIBXC_MINIOS=y -C libxc-$(XEN_TARGET_ARCH)
>  
>   libxc-$(XEN_TARGET_ARCH)/libxenguest.a: libxc-$(XEN_TARGET_ARCH)/libxenctrl.a
> -- 
> 1.9.1
> 

-- 
Samuel
<s> on se croirait en cool : Some browsers close comments on the first ">" character, so to hide script content from such browsers, you can transpose operands for relational and shift operators (e.g., use "y < x" rather than "x > y") or use scripting language-dependent escapes for ">".
 -+- #ens-mim -+-

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

* Re: [PATCH 6/7] build system: stubdom targets now depends on mini-os target
  2015-02-02 17:18       ` Wei Liu
@ 2015-02-03 11:31         ` Ian Campbell
  0 siblings, 0 replies; 28+ messages in thread
From: Ian Campbell @ 2015-02-03 11:31 UTC (permalink / raw)
  To: Wei Liu
  Cc: talex5, anil, stefano.stabellini, ian.jackson, xen-devel, pooka,
	samuel.thibault, dgdegra

On Mon, 2015-02-02 at 17:18 +0000, Wei Liu wrote:
> On Mon, Feb 02, 2015 at 03:03:45PM +0000, Ian Campbell wrote:
> > On Mon, 2015-02-02 at 15:01 +0000, Ian Campbell wrote:
> > > On Mon, 2015-02-02 at 12:59 +0000, Wei Liu wrote:
> > > > Provide mini-os url and revision in Config.mk
> > > > 
> > > > Introduce Makefile.mini-os which contains mini-os specific targets.
> > > 
> > > I'm not sure it has enough content to warrant that, those two targets
> > > could easily be inlined.
> > > 
> > > > +ifeq ($(wildcard $(MINI_OS)/Config.mk),)
> > > > +$(error Please run `make mini-os-dir' in top-level directory)
> > > > +endif
> > > 
> > > This makes me think that maybe my earlier suggestion to move the clone
> > > under stubdom/ might be better done right away.
> > > 
> > > In fact, that would avoid the need to play tricks with renaming extras/
> > > too, since you could build both for a commit.
> > 
> > Retracted after reponse to my earlier suggestion...
> > 
> 
> I take it you're fine with the current arrangement now?

I suppose "willing to tolerate" might be closer, but yes ;-)

Ian.

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

end of thread, other threads:[~2015-02-03 11:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 12:58 [PATCH 0/7] Split off mini-os to a separate tree Wei Liu
2015-02-02 12:58 ` [PATCH 1/7] stubdom: fix "make build" Wei Liu
2015-02-02 14:53   ` Ian Campbell
2015-02-02 22:11   ` Samuel Thibault
2015-02-02 12:58 ` [PATCH 2/7] Makefile: refactor build/clean/distclean targets Wei Liu
2015-02-02 14:54   ` Ian Campbell
2015-02-02 12:58 ` [PATCH 3/7] stubdom: don't look for mini-os source file during configure Wei Liu
2015-02-02 15:09   ` Ian Jackson
2015-02-02 15:27     ` Wei Liu
2015-02-02 12:59 ` [PATCH 4/7] git-checkout.sh: use "mkdir -p" Wei Liu
2015-02-02 14:58   ` Ian Campbell
2015-02-02 15:02     ` Ian Jackson
2015-02-02 15:05       ` Andrew Cooper
2015-02-02 15:02     ` Wei Liu
2015-02-02 12:59 ` [PATCH 5/7] Mini-OS: standalone build Wei Liu
2015-02-02 14:59   ` Ian Campbell
2015-02-02 12:59 ` [PATCH 6/7] build system: stubdom targets now depends on mini-os target Wei Liu
2015-02-02 15:01   ` Ian Campbell
2015-02-02 15:03     ` Ian Campbell
2015-02-02 17:18       ` Wei Liu
2015-02-03 11:31         ` Ian Campbell
2015-02-02 15:12     ` Wei Liu
2015-02-02 15:15       ` Ian Jackson
2015-02-02 15:25         ` Wei Liu
2015-02-02 12:59 ` [PATCH 7/7] Remove in-tree mini-os directory Wei Liu
2015-02-02 15:02   ` Ian Campbell
2015-02-02 14:50 ` [PATCH 0/7] Split off mini-os to a separate tree Ian Campbell
2015-02-02 14:59   ` Wei Liu

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.