hw: skeleton for building on x86_64

This patch contains the initial code needed to build and bootstrap the
base-hw kernel on x86 64-bit platforms. It gets stuck earlier
because the binary contains 64-bit instructions, but it is started in
32-bit mode. The initial setup of page tables and switch to long mode is
still missing from the crt0 code.
This commit is contained in:
Norman Feske
2015-02-06 17:29:30 +01:00
committed by Christian Helmuth
parent cc00af85bf
commit a974726e26
24 changed files with 1296 additions and 3 deletions

View File

@@ -139,9 +139,14 @@ proc run_boot_dir {binaries {core_type core}} {
# offer ELF image
set elf_img "[run_dir]/image.elf"
#exec cp -L bin/$core_bin $elf_img
exec [cross_dev_prefix]objcopy -O elf32-i386 bin/$core_bin $elf_img
#exec [cross_dev_prefix]strip $elf_img
if {[have_spec "x86_64"]} {
# as startup is done in 32 bit mode, GRUB expects a 32 bit image
exec [cross_dev_prefix]objcopy -O elf32-i386 bin/$core_bin $elf_img
}
if {[expr [have_spec "arm"] || [have_spec "x86_32"]]} {
exec cp -L bin/$core_bin $elf_img
}
exec [cross_dev_prefix]strip $elf_img
if {[have_include "image/iso"] || [have_include "image/disk"]} {
#