docker: make awesome
This commit is contained in:
3
Makefile
3
Makefile
@@ -12,6 +12,7 @@ OBJ_EXT ?= .o
|
||||
OUT_EXT ?= .img
|
||||
QEMU ?= qemu-system-i386
|
||||
RUN ?= bios_hello_world
|
||||
RUN_ARGS ?= -soundhw pcspk
|
||||
TMP_EXT ?= .tmp
|
||||
|
||||
OUTS := $(sort $(foreach IN_EXT,$(NASM_EXT) $(GAS_EXT),$(patsubst %$(IN_EXT),%$(OUT_EXT),$(wildcard *$(IN_EXT)))))
|
||||
@@ -40,7 +41,7 @@ clean:
|
||||
rm -fr '$(DOC_OUT)' *$(OBJ_EXT) *$(OUT_EXT) *$(TMP_EXT)
|
||||
|
||||
run: $(RUN_FILE)
|
||||
$(QEMU) -drive 'file=$(RUN_FILE),format=raw' -smp 2 -soundhw pcspk
|
||||
$(QEMU) -drive 'file=$(RUN_FILE),format=raw' -smp 2 $(RUN_ARGS)
|
||||
|
||||
debug: $(RUN_FILE)
|
||||
$(QEMU) -hda '$(RUN_FILE)' -S -s &
|
||||
|
||||
@@ -159,7 +159,7 @@ make
|
||||
To overcome the lack of GUI, we can use QEMU's VNC implementation instead of the default SDL, which is visible on the host due to `--net=host`:
|
||||
|
||||
....
|
||||
qemu-system-i386 -hda bios_hello_world.img -vnc :0
|
||||
./run bios_hello_world run -vnc :0
|
||||
....
|
||||
|
||||
and then on host:
|
||||
@@ -169,6 +169,10 @@ sudo apt-get install vinagre
|
||||
vinagre localhost:5900
|
||||
....
|
||||
|
||||
TODO: get sound working from docker: <<pc-speaker>>: https://stackoverflow.com/questions/41083436/how-to-play-sound-in-a-docker-container
|
||||
|
||||
It should also be possible to run a GUI inside the container, but I haven't tested: https://stackoverflow.com/questions/40658095/how-to-open-ubuntu-gui-inside-a-docker-image/57636624#57636624
|
||||
|
||||
=== GDB step debug
|
||||
|
||||
TODO get it working nicely:
|
||||
|
||||
Reference in New Issue
Block a user