]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm, test: Move PIT tests to separate directory
authorPekka Enberg <penberg@cs.helsinki.fi>
Tue, 8 Jun 2010 17:21:40 +0000 (20:21 +0300)
committerPekka Enberg <penberg@cs.helsinki.fi>
Tue, 8 Jun 2010 17:21:40 +0000 (20:21 +0300)
This patch moves PIT tests to separate directory and adds Makefile for it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
tools/kvm/tests/pit/Makefile [new file with mode: 0644]
tools/kvm/tests/pit/README [new file with mode: 0644]
tools/kvm/tests/pit/tick.S [moved from tools/kvm/tests/kernel/tick.S with 100% similarity]

diff --git a/tools/kvm/tests/pit/Makefile b/tools/kvm/tests/pit/Makefile
new file mode 100644 (file)
index 0000000..2fae9b2
--- /dev/null
@@ -0,0 +1,20 @@
+NAME   := tick
+
+BIN    := $(NAME).bin
+ELF    := $(NAME).elf
+OBJ    := $(NAME).o
+
+all: $(BIN)
+
+$(BIN): $(ELF)
+       objcopy -O binary $< $@
+
+$(ELF): $(OBJ)
+       ld -Ttext=0x00 -nostdlib -static $< -o $@
+
+%.o: %.S
+       gcc -nostdinc -c $< -o $@
+
+clean:
+       rm -f $(BIN) $(ELF) $(OBJ)
+.PHONY: clean
diff --git a/tools/kvm/tests/pit/README b/tools/kvm/tests/pit/README
new file mode 100644 (file)
index 0000000..2923777
--- /dev/null
@@ -0,0 +1,16 @@
+Compiling
+---------
+
+You can simply type:
+
+  $ make
+
+to build a 16-bit binary that uses the i8086 instruction set.
+
+Disassembling
+-------------
+
+Use the "-m i8086" command line option with objdump to make sure it knows we're
+dealing with i8086 instruction set:
+
+  $ objdump -d -m i8086 i8086.elf