Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


fixes for module build system
Jack Lange [Thu, 6 May 2010 00:16:21 +0000 (19:16 -0500)]
symmods/capsule/Makefile
symmods/capsule/binary.S
symmods/linux/test/Makefile

index ae6acb7..9f35bfe 100644 (file)
@@ -1,14 +1,12 @@
-mod_name := test
-mod_dir := /home/jarusl
-mod_obj := bar.o
-mod_type := 1
-
-DEFS := -DMOD_NAME=$(mod_name) -DMOD_DIR=$(mod_dir) -DMOD_OBJ=$(mod_obj) -DMOD_TYPE=$(mod_type)
-
-
 
+DEFS := -DMOD_NAME=$(MOD_NAME) \
+       -DMOD_DIR=$(MOD_DIR) \
+       -DMOD_OBJ=$(MOD_OBJ) \
+       -DMOD_TYPE=$(MOD_TYPE)
 
 module: FORCE
-       gcc $(DEFS) -c binary.S -o module.vo
+       cpp -undef $(DEFS) binary.S -o $(MOD_DIR)/.tmp.binary.S
+       gcc $(DEFS) -c $(MOD_DIR)/.tmp.binary.S -o $(MOD_DIR)/$(MOD_NAME).vo
+       rm -f $(MOD_DIR)/.tmp.binary.S
 
 FORCE:
\ No newline at end of file
index 2c62f50..5ff3796 100644 (file)
 
 .data
 
-#define TOSTR(str) #str
-#define MOD_PATH(dir,name) TOSTR(dir/name)
+#define IDENT(str) str
+#define TOSTR(str) #str 
+#define XSTR(str) TOSTR(str)
+#define MOD_PATH(dir, name)  TOSTR(dir/name)
 #define MOD_NM(name) TOSTR(name)
 
+
+
+
 .globl mod_start
 mod_start:
-.incbin MOD_PATH(MOD_DIR, MOD_OBJ)
+.incbin MOD_PATH(MOD_DIR,MOD_OBJ)
 mod_stop:
 
 mod_name:
@@ -35,8 +40,17 @@ mod_name:
 
 
 .section "_v3_modules"
-.quad mod_name
+IDENT(#ifdef __X86_64__)
+.quad mod_name 
 .quad mod_start
-.quad mod_stop
+.quad mod_stop 
 .long MOD_TYPE
-
+IDENT(#else)
+.long mod_name
+.space 4
+.long mod_start
+.space 4
+.long mod_stop
+.space 4
+.long MOD_TYPE 
+IDENT(#endif)
index 5f2e24e..757010d 100644 (file)
@@ -1 +1,25 @@
-obj-m := test.o
+# This Makefile is a modified version that uses two recursive Make calls
+# First the linux module is compiled via the target kernels build system
+# Second, the module is encapsulated for the Palacios VMM
+
+V3_MOD_NAME := test
+V3_MOD_OBJ := test.ko
+LINUX_MOD_OBJ := test.o
+
+# This is the target used by the Linux build process
+ifneq ($(KERNELRELEASE),)
+       obj-m := $(LINUX_MOD_OBJ)
+else 
+# These are configuration values to be set
+
+       KERNELDIR := /home/jarusl/linux-2.6.30.y
+       PWD := $(shell pwd)
+       PALACIOSDIR := $(PWD)/../../capsule
+       V3_MOD_TYPE := V3_LINUX_MOD
+
+default:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
+       $(MAKE) -C $(PALACIOSDIR) MOD_NAME=$(V3_MOD_NAME) MOD_DIR=$(PWD) \
+               MOD_OBJ=$(V3_MOD_OBJ) MOD_TYPE=$(V3_MOD_TYPE)
+
+endif