add targets for linux/linux+baremetal

This commit is contained in:
2026-03-08 15:25:33 +01:00
parent e6237cc06e
commit 60fa13573d
6 changed files with 270 additions and 122 deletions

View File

@ -1,17 +1,6 @@
ARCH ?= bochs
BUILD_DIR := build-${ARCH}
FAIL_BIN ?= /home/fail/bin
FAIL_SERVER ?= ${FAIL_BIN}/generic-experiment-server
FAIL_TRACE ?= ${FAIL_BIN}/generic-tracing-client
FAIL_INJECT ?= ${FAIL_BIN}/generic-experiment-client
FAIL_DUMP ?= ${FAIL_BIN}/dump-trace
FAIL_IMPORT ?= ${FAIL_BIN}/import-trace --enable-sanitychecks
FAIL_PRUNE ?= ${FAIL_BIN}/prune-trace
BOCHS_RUNNER ?= ${FAIL_BIN}/bochs-experiment-runner.py
RESULT_BROWSER ?= ${FAIL_BIN}/resultbrowser.py
EXPERIMENTS := $(patsubst %.c,%,$(shell echo *.c))
BUILD_DIR := build-${ARCH}
EXPERIMENTS := $(patsubst %.c,%,$(shell echo *.c))
include arch/${ARCH}.mk
@ -25,42 +14,39 @@ help:
@echo "Current Configuartion"
@echo " ARCH=${ARCH}"
clean:
rm -f *.wasm
rm -f *.aot
rm -f *_wasm.c
rm -f *.d
rm -f *.o
rm -f embed/*_host.c
rm -f *_host.elf
rm -rf ${BUILD_DIR}
# rm -f *.wasm
# rm -f *.aot
# rm -f *_wasm.c
# rm -f *.d
# rm -f *.o
# rm -f embed/*_host.c
# rm -f *_host.elf
rm -rf ${BUILD_DIR}/*
clean-%:
rm -rf ${BUILD_DIR}/$(patsubst clean-%,%,$@)
contrib/clean-db '${ARCH}/$(patsubst clean-%,%,$@)'
build-%:
@echo "****************************************************************\n\
* The next step is to trace a golden run. The golden run executes the\n\
* system-under-test (SUT) within the emulator. A trace file is \n\
* produced and saved as: ${BUILD_DIR}/main/trace.pb\n\
*\n\
* $ make trace-$(patsubst build-%,%,$@)\n\
****************************************************************"
* The next step is to trace a golden run. The golden run executes the\n \
* system-under-test (SUT) within the emulator. A trace file is \n \
* produced and saved as: ${BUILD_DIR}/main/trace.pb\n \
*\n \
* $ make trace-$(patsubst build-%,%,$@)\n \
****************************************************************"
trace-%:
@echo "****************************************************************\n\
* The trace is now generated. It can be viewed with\n\
*\n\
* $ make dump-$(patsubst trace-%,%,$@)\n\
*\n\
* Next, we have to import the trace into the database\n\
*\n\
* $ make import-$(patsubst trace-%,%,$@)\n\
****************************************************************"
* The trace is now generated. It can be viewed with\n \
*\n \
* $ make dump-$(patsubst trace-%,%,$@)\n \
*\n \
* Next, we have to import the trace into the database\n \
*\n \
* $ make import-$(patsubst trace-%,%,$@)\n \
****************************************************************"
dump-%: ${BUILD_DIR}/%/trace.pb
${FAIL_DUMP} $(shell dirname $<)/trace.pb
@ -75,17 +61,17 @@ ${HOME}/.my.cnf:
import-%: import-arch-%
@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-$(patsubst import-%,%,$@) &\n\
* $ make client-$(patsubst import-%,%,$@) \n\n\
* Afterwards, the results can be viewd with\n\
* $ make result-$(subst import-,,$@)\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-$(patsubst import-%,%,$@) &\n \
* $ make client-$(patsubst import-%,%,$@) \n\n \
* Afterwards, the results can be viewd with\n \
* $ make result-$(subst import-,,$@)\n \
****************************************************************"
server-%:
${FAIL_SERVER} -v ${ARCH}/$(subst server-,,$@) -b %
@ -94,16 +80,15 @@ result-%:
@echo "select variant, benchmark, resulttype, sum(t.time2 - t.time1 + 1) as faults\
FROM variant v \
JOIN trace t ON v.id = t.variant_id \
JOIN fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.data_address = t.data_address\
JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id \
JOIN fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.data_address = t.data_address \
JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id \
JOIN fsppilot p ON r.pilot_id = p.id \
WHERE v.variant = \"${ARCH}/$(patsubst result-%,%,$@)\"\
WHERE v.variant = \"${ARCH}/$(patsubst result-%,%,$@)\" \
GROUP BY v.id, resulttype \
ORDER BY variant, benchmark, resulttype;" |mysql -t
resultbrowser:
${RESULT_BROWSER} --host=0.0.0.0 --port=5000
# Do never remove implicitly generated stuff
.SECONDARY: