Add more documentation to Makefile
This commit is contained in:
42
Makefile
42
Makefile
@ -1,5 +1,6 @@
|
|||||||
all: main/system.iso
|
all: main/system.iso
|
||||||
|
|
||||||
|
|
||||||
%/system.elf: %/system.o startup.o
|
%/system.elf: %/system.o startup.o
|
||||||
gcc -Wl,-T linker.ld $^ -m32 -static -nostdlib -Wl,--build-id=none -o $@
|
gcc -Wl,-T linker.ld $^ -m32 -static -nostdlib -Wl,--build-id=none -o $@
|
||||||
|
|
||||||
@ -16,6 +17,14 @@ startup.o: startup.s
|
|||||||
cp grub.cfg $(shell dirname $<)/grub/boot/grub
|
cp grub.cfg $(shell dirname $<)/grub/boot/grub
|
||||||
cp $< $(shell dirname $<)/grub/boot/system.elf
|
cp $< $(shell dirname $<)/grub/boot/system.elf
|
||||||
grub-mkrescue -o $@ $(shell dirname $<)/grub
|
grub-mkrescue -o $@ $(shell dirname $<)/grub
|
||||||
|
@echo "****************************************************************\n\
|
||||||
|
* The next step is to trace a golden run. The golden run executes the\n\
|
||||||
|
* system-under-test (SUT) within the Bochs emulator. A trace file is \n\
|
||||||
|
* produced and saved as main/trace.pb\n\
|
||||||
|
*\n\
|
||||||
|
* $ make trace-$(shell dirname $<)\n\
|
||||||
|
****************************************************************"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
trace-%: %/system.elf %/system.iso
|
trace-%: %/system.elf %/system.iso
|
||||||
@ -27,6 +36,16 @@ trace-%: %/system.elf %/system.iso
|
|||||||
-Wf,--end-symbol=stop_trace \
|
-Wf,--end-symbol=stop_trace \
|
||||||
-Wf,--state-file=$(shell dirname $<)/state \
|
-Wf,--state-file=$(shell dirname $<)/state \
|
||||||
-Wf,--trace-file=$(shell dirname $<)/trace.pb -Wf,--elf-file=$< -q
|
-Wf,--trace-file=$(shell dirname $<)/trace.pb -Wf,--elf-file=$< -q
|
||||||
|
@echo "****************************************************************\n\
|
||||||
|
* The trace is now generated. It can be viewed with\n\
|
||||||
|
*\n\
|
||||||
|
* $ dump-trace $(shell dirname $<)/trace.pb\n\
|
||||||
|
*\n\
|
||||||
|
* Next, we have to import the trace into the database\n\
|
||||||
|
*\n\
|
||||||
|
* $ make import-$(shell dirname $<)\n\
|
||||||
|
****************************************************************"
|
||||||
|
|
||||||
|
|
||||||
import-%: %/trace.pb
|
import-%: %/trace.pb
|
||||||
import-trace -t $< -i mem -e $(shell dirname $<)/system.elf -v $(shell dirname $<) -b mem
|
import-trace -t $< -i mem -e $(shell dirname $<)/system.elf -v $(shell dirname $<) -b mem
|
||||||
@ -38,6 +57,17 @@ import-%: %/trace.pb
|
|||||||
|
|
||||||
prune-trace -v $(shell dirname $<) -b %% --overwrite
|
prune-trace -v $(shell dirname $<) -b %% --overwrite
|
||||||
|
|
||||||
|
@echo "****************************************************************\n\
|
||||||
|
* The golden run sits now within the MySQL database. If you are interested,\n\
|
||||||
|
* use the 'mysql' command to inspect the curent state of the DB. The tables\n\
|
||||||
|
* trace, fsppilot, and fspgroup are of special interest.\n\
|
||||||
|
*\n\
|
||||||
|
* Next, we have to run the campaign sever and the injection client\n\
|
||||||
|
*\n\
|
||||||
|
* $ make server-$(shell dirname $<) &\n\
|
||||||
|
* $ make client-$(shell dirname $<) \n\
|
||||||
|
****************************************************************"
|
||||||
|
|
||||||
server-%:
|
server-%:
|
||||||
generic-experiment-server -v $(subst server-,,$@) -b %
|
generic-experiment-server -v $(subst server-,,$@) -b %
|
||||||
|
|
||||||
@ -52,7 +82,17 @@ client-%:
|
|||||||
-Wf,--ok-marker=stop_trace \
|
-Wf,--ok-marker=stop_trace \
|
||||||
-Wf,--fail-marker=fail_marker \
|
-Wf,--fail-marker=fail_marker \
|
||||||
-Wf,--catch-write-textsegment \
|
-Wf,--catch-write-textsegment \
|
||||||
-Wf,--catch-write-outerspace
|
-Wf,--catch-write-outerspace 2>/dev/null | grep -C 4 'INJECT'
|
||||||
|
|
||||||
|
@echo "****************************************************************\n\
|
||||||
|
* Congratiulations! You've run your first FAIL* injection campaign.\n\
|
||||||
|
* The results can be viewd with\n\
|
||||||
|
* $ make result-$(subst client-,,$@)\n\
|
||||||
|
*\n\
|
||||||
|
* For a more detailed information, have a look at the web-based resultbrowser.\n\
|
||||||
|
*\n\
|
||||||
|
* $ make resultbrowser\n\
|
||||||
|
****************************************************************"
|
||||||
|
|
||||||
result-%:
|
result-%:
|
||||||
@echo "select variant, 'all', resulttype, sum(t.time2 - t.time1 + 1)\
|
@echo "select variant, 'all', resulttype, sum(t.time2 - t.time1 + 1)\
|
||||||
|
|||||||
Reference in New Issue
Block a user