diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-25 23:54:25 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-25 23:54:25 +0000 |
commit | a735aa3139c5b9785eac09dcf6384d89c8d8c445 (patch) | |
tree | 8a1737f2ec97203bf19d5efc4b1a0cc6289e3eaf /pc-bios | |
parent | 6b2b6112f872f656ba4c9ef22ff1576e87042bcc (diff) |
added precompiled linux boot sector
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@652 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'pc-bios')
-rw-r--r-- | pc-bios/Makefile | 24 | ||||
-rw-r--r-- | pc-bios/linux_boot.S | 29 | ||||
-rw-r--r-- | pc-bios/linux_boot.bin | bin | 0 -> 512 bytes |
3 files changed, 53 insertions, 0 deletions
diff --git a/pc-bios/Makefile b/pc-bios/Makefile new file mode 100644 index 0000000000..7ae0ff02a0 --- /dev/null +++ b/pc-bios/Makefile @@ -0,0 +1,24 @@ +# +# NOTE: only compilable with x86 cross compile tools +# +include ../config-host.mak + +DEFINES= + +TARGETS= +ifeq ($(ARCH),i386) +TARGETS+=linux_boot.bin +endif + +all: $(TARGETS) + +linux_boot.bin: linux_boot.o + ld --oformat binary -Ttext 0 -o $@ $< + chmod a-x $@ + +%.o: %.S + $(CC) $(DEFINES) -c -o $@ $< + +clean: + rm -f $(TARGETS) *.o *~ + diff --git a/pc-bios/linux_boot.S b/pc-bios/linux_boot.S new file mode 100644 index 0000000000..22fcd4be80 --- /dev/null +++ b/pc-bios/linux_boot.S @@ -0,0 +1,29 @@ +/* + * QEMU Boot sector to launch a preloaded Linux kernel + * Copyright (c) 2004 Fabrice Bellard + */ + +#define LOAD_SEG 0x9000 + +.code16 +.text + .globl _start + +_start: + cli + cld + mov $LOAD_SEG, %ax + mov %ax, %ds + mov %ax, %es + mov %ax, %fs + mov %ax, %gs + mov %ax, %ss + mov $0x8ffe, %sp + ljmp $LOAD_SEG + 0x20, $0 + +1: + .fill 510 - (1b - _start), 1, 0 + + /* boot sector signature */ + .byte 0x55 + .byte 0xaa diff --git a/pc-bios/linux_boot.bin b/pc-bios/linux_boot.bin Binary files differnew file mode 100644 index 0000000000..80f7b5fee1 --- /dev/null +++ b/pc-bios/linux_boot.bin |