Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize Bootsector raffler with Bochs #86

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions jaytaph-bootsector-asm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM debian:jessie

RUN apt-get update
RUN apt-get install -yy dosfstools mtools nasm bochs bochs-x bochs-sdl

# Compile assembly raffler
COPY raffler.S raffler.S
RUN nasm -o bootsector.img raffler.S

# Create an empty 1.44MB floppy image and format it
RUN dd if=/dev/zero of=mr_floppy.img bs=512 count=2880 && \
mkfs.msdos mr_floppy.img

# Todo see if names can be copied to disk on runtime
RUN echo "bla\nbla2" > /tmp/names.txt
RUN cat /tmp/names.txt
RUN mcopy -i mr_floppy.img /tmp/names.txt ::/NAMES.DAT
RUN mdir -i mr_floppy.img

# copy bootsector to the start of the floppy image
RUN dd if=bootsector.img of=mr_floppy.img bs=512 count=1 conv=notrunc


# todo copy names to floppy
# boot floppy in headless Bochs which will send output to VNC
# Set up VNC client to get output

COPY bochsrc bochsrc

CMD bochs -f bochsrc -q
14 changes: 6 additions & 8 deletions jaytaph-bootsector-asm/bochsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# configuration file generated by Bochs
plugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, iodebug=1, ioapic=1
plugin_ctrl: unmapped=1, biosdev=1, extfpuirq=1, iodebug=1, ioapic=1
config_interface: textconfig
display_library: x
display_library: nogui
memory: host=32, guest=32
romimage: file="/usr/local/share/bochs/BIOS-bochs-latest"
vgaromimage: file="/usr/local/share/bochs/VGABIOS-lgpl-latest"
Expand All @@ -21,17 +21,15 @@ com3: enabled=0
com4: enabled=0
usb_uhci: enabled=0
usb_ohci: enabled=0
i440fxsupport: enabled=0
vga_update_interval: 50000
vga: extension=vbe
cpu: count=1, ips=4000000, reset_on_triple_fault=1, ignore_bad_msrs=1
cpuid: cpuid_limit_winnt=0, mmx=1, sse=sse2, xapic=1, sep=1, aes=0, xsave=0, movbe=0
pci: enabled=0
vga: extension=vbe, update_freq=10
cpu: cpuid_limit_winnt=0, count=1, ips=4000000, reset_on_triple_fault=1, ignore_bad_msrs=1
cpuid: mmx=1, sse=sse2, sep=1, aes=0, xsave=0, movbe=0
cpuid: stepping=3, vendor_string="GenuineIntel", brand_string=" Intel(R) Pentium(R) 4 CPU "
print_timestamps: enabled=0
debugger_log: -
magic_break: enabled=1
port_e9_hack: enabled=0
text_snapshot_check: enabled=0
private_colormap: enabled=0
clock: sync=none, time0=local
# no cmosimage
Expand Down
23 changes: 0 additions & 23 deletions jaytaph-bootsector-asm/install.sh

This file was deleted.