Module.symvers
modules.order
jailhouse.ko
+jailhouse-version.h
hypervisor/include/jailhouse/config.h
+hypervisor/include/jailhouse/version.h
hypervisor/hypervisor.lds
tools/jailhouse
tools/jailhouse-config-collect
jailhouse-y := driver.o
+define filechk_version
+ $(src)/scripts/gen_version_h $(src)
+endef
+
+clean-files := jailhouse-version.h
+
# out-of-tree build
KERNELDIR = /lib/modules/`uname -r`/build
modules modules_install clean:
$(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` $@
+$(obj)/jailhouse-version.h: $(src)/Makefile FORCE
+ $(call filechk,version)
+
+$(obj)/driver.o: $(obj)/jailhouse-version.h
+
firmware_install:
cp hypervisor/jailhouse.bin /lib/firmware/
--- /dev/null
+<no-version>
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
- * Copyright (c) Siemens AG, 2013
+ * Copyright (c) Siemens AG, 2013, 2014
*
* Authors:
* Jan Kiszka <jan.kiszka@siemens.com>
#include <asm/cacheflush.h>
#include "jailhouse.h"
+#include "jailhouse-version.h"
#include <jailhouse/cell-config.h>
#include <jailhouse/header.h>
#include <jailhouse/hypercall.h>
MODULE_DESCRIPTION("Loader for Jailhouse partitioning hypervisor");
MODULE_LICENSE("GPL");
MODULE_FIRMWARE(JAILHOUSE_FW_NAME);
+MODULE_VERSION(JAILHOUSE_VERSION);
static struct device *jailhouse_dev;
static DEFINE_MUTEX(lock);
arch/$(SRCARCH)/built-in.o hypervisor.lds
targets += $(hypervisor-y)
+define filechk_version
+ $(src)/../scripts/gen_version_h $(src)/..
+endef
+
+clean-files := $(obj)/include/jailhouse/version.h
+
+$(obj)/include/jailhouse/version.h: $(src)/Makefile FORCE
+ $(call filechk,version)
+
+$(obj)/setup.o: $(obj)/include/jailhouse/version.h
+
HYPERVISOR_OBJS = $(addprefix $(obj)/,$(hypervisor-y))
LDFLAGS_hypervisor.o := -T
#include <jailhouse/paging.h>
#include <jailhouse/control.h>
#include <jailhouse/string.h>
+#include <jailhouse/version.h>
#include <asm/spinlock.h>
extern u8 __text_start[], __hv_core_end[];
arch_dbg_write_init();
- printk("\nInitializing Jailhouse hypervisor on CPU %d\n", cpu_id);
+ printk("\nInitializing Jailhouse hypervisor %s on CPU %d\n",
+ JAILHOUSE_VERSION, cpu_id);
printk("Code location: %p\n", __text_start);
error = paging_init();
--- /dev/null
+#!/bin/sh
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2014
+#
+# Authors:
+# Jan Kiszka <jan.kiszka@siemens.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2. See
+# the COPYING file in the top-level directory.
+#
+
+echo -e "/* Auto-generated - leave alone and don't commit! */\n"
+
+if ! git rev-parse 2>/dev/null; then
+ version="`cat $1/VERSION`"
+else
+ cd $1 > /dev/null
+ git diff > diff.log
+ describe="`git describe --long --dirty --match "v[0-9].[0-9]*"`"
+ version="`echo $describe | sed -e 's/\([^-]*\)-\(.*\)/\1 (\2)/'`"
+ cd - > /dev/null
+fi
+
+echo "#define JAILHOUSE_VERSION \"$version\""