Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build files for the bochs processor simulators on linux64x64
- Loading branch information
1 parent
8cca332
commit 485a6d8
Showing
6 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/sh -e | ||
|
||
# Bochs x64 simulator for the BochsX64Alien plugin. | ||
# this sets up the x64 compile for Cog on linux. Disable as much inessential | ||
# stuff as possible leaving only the cpu/fpu & memory interface | ||
|
||
# build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using | ||
# $ ./conf.COG | ||
# $ ./makeem | ||
|
||
set echo | ||
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS" | ||
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS" | ||
CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions $CFLAGS" | ||
CFLAGS="-g $CFLAGS" | ||
CPPFLAGS="" | ||
CXXFLAGS="$CFLAGS" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--enable-x86-64 \ | ||
--enable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh -e | ||
|
||
# Bochs x64 simulator for the BochsX64Alien plugin. | ||
# this sets up the x64 compile for Cog on linux. Disable as much inessential | ||
# stuff as possible leaving only the cpu/fpu & memory interface | ||
|
||
# build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using | ||
# $ ./conf.COG.dbg | ||
# $ ./makeem | ||
|
||
set echo | ||
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS" | ||
CFLAGS="-pipe -O0 $CFLAGS" | ||
CFLAGS="-g3 $CFLAGS" | ||
CPPFLAGS="" | ||
CXXFLAGS="$CFLAGS" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--enable-x86-64 \ | ||
--enable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
BOCHS=../../../processors/IA32/bochs | ||
BOCHSEX64=$(BOCHS)/explorationx64 | ||
LIBDEPS=../../cpu/libcpu.a | ||
CFLAGS=-m32 -I.. -I$(BOCHS) -I$(BOCHS)/cpu -I$(BOCHS)/instrument/stubs -L../cpu -lcpu | ||
FULLLIBS=-L../fpu -lfpu -L../disasm -ldisasm | ||
|
||
.PHONY: $(LIBDEPS) | ||
|
||
all: BochsX64Alien-regs.st BochsX64Alien-cr.st BochsX64Alien-xmm.st | ||
|
||
BochsX64Alien-regs.st: printcpu | ||
./printcpu >BochsX64Alien-regs.st | ||
|
||
BochsX64Alien-cr.st: printcpucr | ||
./printcpucr >BochsX64Alien-cr.st | ||
|
||
BochsX64Alien-xmm.st: printcpuxmm | ||
./printcpuxmm >BochsX64Alien-xmm.st | ||
|
||
clean: | ||
rm -f BochsX64Alien-regs.st BochsX64Alien-cr.st BochsX64Alien-xmm.st | ||
rm -f printcpu printcpucr printcpuxmm | ||
rm -f printcpu.exe printcpucr.exe printcpuxmm.exe | ||
|
||
printcpu: $(BOCHSEX64)/printcpu.c $(LIBDEPS) | ||
g++ -o $@ $< $(CFLAGS) | ||
|
||
printcpucr: $(BOCHSEX64)/printcpucr.c $(LIBDEPS) | ||
g++ -o $@ $< $(CFLAGS) | ||
|
||
printcpuxmm: $(BOCHSEX64)/printcpuxmm.c $(LIBDEPS) | ||
g++ -o $@ $< $(CFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
exec ../../processors/IA32/bochs/makeem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/sh -e | ||
|
||
# Bochs x86 simulator for the BochsIA32Alien plugin. | ||
# this sets up the x86 compile for Cog on linux. Disable as much inessential | ||
# stuff as possible leaving only the cpu/fpu & memory interface | ||
|
||
# build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using | ||
# $ ./conf.COG | ||
# $ ./makeem | ||
|
||
set echo | ||
# CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS" | ||
CFLAGS="-Dlongjmp=_longjmp -Dsetjmp=_setjmp $CFLAGS" | ||
CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions $CFLAGS" | ||
CFLAGS="-g $CFLAGS" | ||
CPPFLAGS="" | ||
CXXFLAGS="$CFLAGS" | ||
|
||
export CFLAGS | ||
export CPATH | ||
export CPPFLAGS | ||
export CXXFLAGS | ||
export LDFLAGS | ||
|
||
../../processors/IA32/bochs/configure \ | ||
--enable-Cog \ | ||
--enable-cpu-level=6 \ | ||
--enable-sse=2 \ | ||
--enable-assert-checks \ | ||
--with-nogui \ | ||
--disable-x86-64 \ | ||
--disable-pae \ | ||
--disable-large-pages \ | ||
--disable-global-pages \ | ||
--disable-mtrr \ | ||
--disable-sb16 \ | ||
--disable-ne2000 \ | ||
--disable-pci \ | ||
--disable-acpi \ | ||
--disable-apic \ | ||
--disable-clgd54xx \ | ||
--disable-usb \ | ||
--disable-plugins \ | ||
${CONFIGURE_ARGS} | ||
|
||
# apic == Advanced programmable Interrupt Controller | ||
# acpi == Advanced Configuration and Power Interface | ||
# pci == Peripheral Component Interconnect local bus | ||
# clgd54xx == Cirrus Logic GD54xx video card | ||
|
||
# avoid conflict with squeak unix build's config.h | ||
echo cp config.h bochsconfig.h | ||
cp config.h bochsconfig.h | ||
|
||
echo "and don't forget to run ./makeem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
exec ../../processors/IA32/bochs/makeem |