Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
fa0bfee
Add corpus v2 implementation plan
PunishedSnake Aug 25, 2026
3d4b288
Instrument HDL fast path latency distribution
PunishedSnake Aug 25, 2026
8ac93e0
Keep HDL profiling outside transaction I-cache working set
PunishedSnake Aug 25, 2026
36a8aba
Instrument HDL IOP transport stages
PunishedSnake Aug 25, 2026
e3c4d81
Import IOP timing services for HDL profiler
PunishedSnake Aug 25, 2026
e5fd732
Profile USB HDD and SIF stages on IOP
PunishedSnake Aug 25, 2026
eb27da9
Report IOP stage latency distributions
PunishedSnake Aug 25, 2026
514700a
Add R5900 performance counter API
PunishedSnake Aug 25, 2026
7bc3d93
Implement R5900 performance counter harness
PunishedSnake Aug 25, 2026
9da8ad4
Build R5900 performance counter harness
PunishedSnake Aug 25, 2026
df31d64
Generate benchmark provenance manifest
PunishedSnake Aug 25, 2026
88076af
Archive corpus-v2 benchmark provenance
PunishedSnake Aug 25, 2026
a3998f3
Add HDL hardware performance log parser
PunishedSnake Aug 25, 2026
c5a7180
Self-test HDL performance log parser
PunishedSnake Aug 25, 2026
439fbc6
Pin reproducible PS2SDK provenance
PunishedSnake Aug 25, 2026
b9d7666
Pass exact build provenance into PS2 container
PunishedSnake Aug 25, 2026
fc8a2d3
Update corpus-v2 implementation progress
PunishedSnake Aug 25, 2026
fe235ff
Phase 1: add minimal GS UI draw2d primitive subset
PunishedSnake Aug 25, 2026
e8c81a3
Phase 1: shadow unused draw2d archive with minimal UI primitives
PunishedSnake Aug 25, 2026
4a62a65
Remove unused standalone minimal draw source
PunishedSnake Aug 25, 2026
4433756
Restore GS debug compatibility after LTO archive experiment
PunishedSnake Aug 25, 2026
4e01fad
Phase 1: avoid heavyweight fileXio stat path for config existence
PunishedSnake Aug 25, 2026
68d0ec2
Phase 1: remove POSIX stat conversion from backup probe
PunishedSnake Aug 25, 2026
69a242b
Phase 0: add real-hardware instrumentation A/B protocol
PunishedSnake Aug 25, 2026
047c1a0
Phase 1: revert stat-probe experiment after linker audit
PunishedSnake Aug 25, 2026
d0c6122
Phase 1: add non-LTO minimal UI draw primitives
PunishedSnake Aug 25, 2026
c997312
Phase 1: resolve UI primitives before LTO libdraw archive
PunishedSnake Aug 25, 2026
91820c4
Phase 1: fix build overlay object ordering
PunishedSnake Aug 25, 2026
496240e
Phase 1: link trimmed libdraw without monolithic draw2d member
PunishedSnake Aug 25, 2026
0483bb6
Phase 1: keep draw_clear strip primitive in minimal UI subset
PunishedSnake Aug 25, 2026
4b6d148
Phase 1: revert draw2d shim after loaded-text regression
PunishedSnake Aug 25, 2026
26db570
Phase 1: bypass unused PS2SDK graph config archive root
PunishedSnake Aug 25, 2026
57af905
Phase 1: revert graph-config root experiment after zero-size delta
PunishedSnake Aug 25, 2026
bfb82c9
Phase 1: isolate direct-fileXio app from unused POSIX fdman glue
PunishedSnake Aug 25, 2026
1516b4d
Phase 1: guard direct-fileXio policy against POSIX file calls
PunishedSnake Aug 25, 2026
bc07761
Phase 1: enforce direct-fileXio policy in CI
PunishedSnake Aug 25, 2026
5cb0e20
Phase 1: bypass unused timestamp conversion in legacy fio stat adapter
PunishedSnake Aug 25, 2026
425fc40
Phase 1: add formatter contract audit
PunishedSnake Aug 26, 2026
75c341e
Phase 1: run formatter contract audit in CI
PunishedSnake Aug 26, 2026
c336066
Phase 1: bypass unused libcglue timezone bootstrap
PunishedSnake Aug 26, 2026
2644d4f
Phase 1: trace local variadic formatter bridges
PunishedSnake Aug 26, 2026
3267fa7
Phase 1: guard stateless timezone policy
PunishedSnake Aug 26, 2026
5f92915
Phase 1: route bounded app formatting through integer Newlib core
PunishedSnake Aug 26, 2026
d758761
Phase 1: link integer-only bounded formatting policy
PunishedSnake Aug 26, 2026
8ac1448
Phase 1: keep linker wrap shims outside LTO
PunishedSnake Aug 26, 2026
994b7dd
Phase 1: enforce integer-only formatter contract
PunishedSnake Aug 26, 2026
a84df99
Phase 1: enforce libcglue and formatter policies in CI
PunishedSnake Aug 26, 2026
40619e9
Phase 1: reuse committed HDL metadata for read-back
PunishedSnake Aug 26, 2026
dd1adfb
Phase 0: add same-source HDL profiling A/B builds
PunishedSnake Aug 26, 2026
04cf59d
CI: record PR head SHA in benchmark provenance
PunishedSnake Aug 26, 2026
2a8dc25
Phase 0: add hardware profile A/B comparator
PunishedSnake Aug 26, 2026
16a6356
Phase 0: isolate IOP objects by profiler mode
PunishedSnake Aug 26, 2026
61049fa
Phase 0: validate distinct PROFILE IOP binaries
PunishedSnake Aug 26, 2026
16f9614
Phase 0: report EE and IOP profile footprint
PunishedSnake Aug 26, 2026
2e0f2cf
Phase 0: bind benchmark provenance to built binaries
PunishedSnake Aug 26, 2026
7875b14
Phase 0: generate provenance from final profile binaries
PunishedSnake Aug 26, 2026
1386fe1
Phase 0: freeze validated hardware A/B pair
PunishedSnake Aug 26, 2026
165f6ae
Phase 0: add hardware pair preflight verifier
PunishedSnake Aug 26, 2026
4b15ba5
Phase 0: gate frozen pair with host preflight
PunishedSnake Aug 26, 2026
48c43a6
Phase 0: document corrected frozen profile pair
PunishedSnake Aug 26, 2026
24c0fd8
Phase 0: separate artifact SHA from frozen binary identity
PunishedSnake Aug 26, 2026
bd7d1b8
Phase 0: bind A/B samples to frozen binary hashes
PunishedSnake Aug 26, 2026
1bea3e4
Phase 0: align sample provenance with artifact head
PunishedSnake Aug 26, 2026
a26303e
Phase 0: distinguish artifact provenance from binary identity
PunishedSnake Aug 26, 2026
bea7e85
Phase 0: add standalone R5900 counter calibration
PunishedSnake Aug 26, 2026
8507442
Phase 0: add standalone calibration build target
PunishedSnake Aug 26, 2026
2ee4a96
Phase 0: build standalone R5900 calibration artifact
PunishedSnake Aug 26, 2026
a4bff56
Phase 0: fix R5900 calibration format ABI
PunishedSnake Aug 26, 2026
bc4b176
Phase 0: expose calibration reference kernel in CI
PunishedSnake Aug 26, 2026
31dedfb
Phase 0: keep calibration reference kernel uncloned
PunishedSnake Aug 26, 2026
a0d7f3c
ci: validate deterministic R5900 calibration loop
PunishedSnake Aug 26, 2026
6a73b59
ci: enforce R5900 calibration loop shape
PunishedSnake Aug 26, 2026
8a155c8
perf: add portable HDL hash checkpoint format
PunishedSnake Aug 26, 2026
5151b2d
perf: implement HDL hash checkpoint codec
PunishedSnake Aug 26, 2026
7ddddec
test: cover HDL hash checkpoint restore
PunishedSnake Aug 26, 2026
65511dd
perf: add isolated resume hash checkpoint experiment
PunishedSnake Aug 26, 2026
9a88de9
perf: add guarded resume hash sidecar I/O
PunishedSnake Aug 26, 2026
93ee40b
perf: restore source SHA from durable copy checkpoints
PunishedSnake Aug 26, 2026
37e9f42
perf: isolate resume hash experiment from frozen baseline
PunishedSnake Aug 26, 2026
68c93d3
perf: add isolated resume hash experiment build
PunishedSnake Aug 26, 2026
ba9703a
ci: build isolated HDL resume hash experiment
PunishedSnake Aug 26, 2026
01b380f
docs: define HDL resume hash checkpoint hardware gate
PunishedSnake Aug 26, 2026
fe3cb79
bench: record resume-hash build provenance
PunishedSnake Sep 4, 2026
00c4952
bench: build matched resume-hash A/B variants
PunishedSnake Sep 4, 2026
5669b55
bench: add resume-hash A/B preflight
PunishedSnake Sep 4, 2026
7c5f69c
bench: add resume-hash A/B comparator
PunishedSnake Sep 4, 2026
fc82037
bench: parse resume-hash recovery events
PunishedSnake Sep 4, 2026
8e56898
ci: bind resume-hash matched A/B artifacts
PunishedSnake Sep 4, 2026
9d17f68
ci: clean nested IOP state between resume-hash variants
PunishedSnake Sep 4, 2026
c0c1294
docs: freeze matched resume-hash hardware gate
PunishedSnake Sep 4, 2026
4266d45
perf: materialize source-free stage4 resume experiment
PunishedSnake Sep 4, 2026
65fe739
perf: skip source reopen for verified checkpoint resume
PunishedSnake Sep 4, 2026
d910043
docs: define HDL producer consumer ownership contracts
PunishedSnake Sep 4, 2026
56e7632
bench: record source-free stage4 checkpoint restore
PunishedSnake Sep 4, 2026
b9b2f5f
bench: bind source-free stage4 evidence in samples
PunishedSnake Sep 4, 2026
a43b073
bench: validate source-free stage4 sample evidence
PunishedSnake Sep 4, 2026
3edafad
Docs: freeze CI 706 resume-hash hardware gate
PunishedSnake Sep 4, 2026
4e6fd17
Docs: add HDL IOP RAM budget
PunishedSnake Sep 4, 2026
c30c7f6
Docs: record compiler-observed HDL stream sizes
PunishedSnake Sep 4, 2026
8c7191f
Docs: advance storage and IOP corpus plan
PunishedSnake Sep 4, 2026
117add7
Perf: record expected IOP module load order
PunishedSnake Sep 4, 2026
367a865
Perf: derive IOP load order from platform source
PunishedSnake Sep 4, 2026
edb0ec3
Docs: audit explicit 64-byte alignment contracts
PunishedSnake Sep 4, 2026
733676c
Docs: classify allocation lifetimes and reuse candidates
PunishedSnake Sep 4, 2026
eb0e180
Perf: add complete allocation inventory tool
PunishedSnake Sep 4, 2026
2e3f294
CI: archive complete runtime allocation inventory
PunishedSnake Sep 4, 2026
821056b
Perf: guard audited explicit alignment set
PunishedSnake Sep 4, 2026
64c3030
CI: enforce reviewed explicit alignment policy
PunishedSnake Sep 4, 2026
d860bf3
Phase 5: add transaction workspace materializer
PunishedSnake Sep 4, 2026
343d1b2
Phase 5: add transaction workspace experiment build
PunishedSnake Sep 4, 2026
44d6729
Phase 5: bind transaction workspace A/B identity
PunishedSnake Sep 4, 2026
46391b1
Phase 5: build and bind transaction workspace experiment
PunishedSnake Sep 4, 2026
36198e3
Phase 5: fix transaction workspace self-test
PunishedSnake Sep 4, 2026
5c2b4d3
Phase 5: handle final transaction function in materializer
PunishedSnake Sep 4, 2026
e7e01c8
Phase 5: document transaction workspace hardware gate
PunishedSnake Sep 4, 2026
be281f9
Phase 5: record materialized allocation inventory
PunishedSnake Sep 4, 2026
371613f
Phase 5: add source-admission workspace experiment
PunishedSnake Sep 4, 2026
9507804
Phase 5: add transaction workspace v2 build
PunishedSnake Sep 4, 2026
683ac16
Phase 5: bind transaction workspace v2 A/B identity
PunishedSnake Sep 4, 2026
9bd2af3
Phase 5: advance transaction workspace experiment to v2
PunishedSnake Sep 4, 2026
22dc8d4
Phase 5: advance transaction workspace A/B identity to v2
PunishedSnake Sep 4, 2026
1e684b2
Phase 5: remove redundant workspace v2 build wrapper
PunishedSnake Sep 4, 2026
98988fc
Phase 5: remove redundant workspace v2 preflight wrapper
PunishedSnake Sep 4, 2026
97f2ec5
Phase 5: keep workspace v1 as active experiment
PunishedSnake Sep 4, 2026
4ee8764
Phase 5: restore workspace v1 A/B identity after v2 rejection
PunishedSnake Sep 4, 2026
f0287d8
Phase 5: document workspace v2 rejection
PunishedSnake Sep 4, 2026
05335f9
Phase 5: add source fingerprint heap-alignment experiment
PunishedSnake Sep 4, 2026
84d7f3f
Phase 5: test source fingerprint malloc on workspace v1
PunishedSnake Sep 4, 2026
503ac02
Phase 5: bind fingerprint-malloc incremental A/B
PunishedSnake Sep 4, 2026
fe0d282
Phase 5: add storage scratch alignment experiment
PunishedSnake Sep 4, 2026
1644449
Phase 5: document source fingerprint heap alignment experiment
PunishedSnake Sep 4, 2026
86f105d
Phase 5: test natural alignment for storage scratch
PunishedSnake Sep 4, 2026
902f873
Phase 5: bind storage scratch alignment incremental A/B
PunishedSnake Sep 4, 2026
cd2f560
Phase 5: keep fingerprint malloc after no-op scratch alignment
PunishedSnake Sep 4, 2026
de7ada2
Phase 5: restore fingerprint malloc A/B after scratch no-op
PunishedSnake Sep 4, 2026
5554e6a
Phase 5: document storage scratch alignment no-op
PunishedSnake Sep 4, 2026
a182655
Phase 5: add bounded forensic snapshot verify experiment
PunishedSnake Sep 4, 2026
6f3ef16
Phase 5: test bounded forensic snapshot readback
PunishedSnake Sep 4, 2026
08f632a
Phase 5: bind bounded forensic snapshot experiment
PunishedSnake Sep 4, 2026
d366f81
Phase 5: simplify bounded HDDMETA exact readback
PunishedSnake Sep 5, 2026
c143010
Phase 5: build bounded HDDMETA readback v2
PunishedSnake Sep 5, 2026
c219907
Phase 5: bind bounded HDDMETA readback v2 A/B
PunishedSnake Sep 5, 2026
a38c151
Phase 5: include IOP SysMem in allocation inventory
PunishedSnake Sep 5, 2026
1265232
Phase 5: extend allocation lifetime audit to IOP SysMem
PunishedSnake Sep 5, 2026
ab204d8
Phase 5: classify metadata commit IOP verify lifetime
PunishedSnake Sep 5, 2026
cb23838
Phase 5: add independent APAMETA1 reference vector
PunishedSnake Sep 5, 2026
d2d3a9e
Phase 5: gate bounded HDDMETA with reference vector
PunishedSnake Sep 5, 2026
1a00b2b
Phase 5: add streaming APAMETA1 experiment
PunishedSnake Sep 5, 2026
2144618
Phase 5: add active streaming APAMETA1 materializer v2
PunishedSnake Sep 5, 2026
00637fd
Phase 5: preserve snapshot close semantics in streaming v2
PunishedSnake Sep 5, 2026
80ad5df
Phase 5: build streaming APAMETA1 experiment
PunishedSnake Sep 5, 2026
8e1e097
Phase 5: bind streaming APAMETA1 A/B
PunishedSnake Sep 5, 2026
fff3b51
Phase 5: isolate streaming snapshot from repair screen
PunishedSnake Sep 5, 2026
ab77c9f
Phase 5: build cold-isolated streaming APAMETA1 v3
PunishedSnake Sep 5, 2026
bf22db0
Phase 5: bind cold-isolated streaming APAMETA1 v3
PunishedSnake Sep 5, 2026
a334b81
Phase 5: fix streaming v3 attribute selftest
PunishedSnake Sep 5, 2026
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
280 changes: 272 additions & 8 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Corpus-v2 Phase-1 application/runtime link policies.
#
# Keep the normal project Makefile unchanged so every policy remains an explicit
# A/B layer. These small objects are linked before the PS2SDK/Newlib archives and
# replace only contracts that the Phase-1 source audits prove unused.

include Makefile

EE_OBJS += filexio_fdman_policy_ps2.o printf_policy_ps2.o
$(EE_BIN): filexio_fdman_policy_ps2.o printf_policy_ps2.o
EE_LDFLAGS += -Wl,--wrap=snprintf -Wl,--wrap=vsnprintf

filexio_fdman_policy_ps2.o: src/filexio_fdman_policy_ps2.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

# GNU ld --wrap rewrites references after the LTO plugin has performed its own
# reachability pass. Keep these two externally-named shims as ordinary object
# code so LTO cannot discard them before ld creates __wrap_* references.
printf_policy_ps2.o: src/printf_policy_ps2.c
$(EE_CC) $(EE_CFLAGS) -fno-lto $(EE_INCS) -c $< -o $@
41 changes: 37 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
EE_BIN = PS2_HDD_BOOTSTRAP_MANAGER.ELF
EE_MAP = PS2_HDD_BOOTSTRAP_MANAGER.map
EE_OBJS = main.o manager_menu_ps2.o app_ui_ps2.o disk_status_ps2.o gs_ui_ps2.o gs_debug_compat_ps2.o app_error.o bootstrap_controller_ps2.o diagnostics_controller_ps2.o forensic_controller_ps2.o platform.o storage.o video_mode.o ui_layout.o ui_font.o spleen_font_data.o header_backup.o repair_snapshot.o forensic_snapshot.o rescue_image.o rescue_storage.o bootstrap_source.o bootstrap_signing.o apa.o apa_repair.o apa_forensic.o repair_health.o hdd_bounds.o hdd_read.o hdd_write.o hdd_repair_ps2.o hdd_forensic_repair_ps2.o repair_controller_ps2.o hdd_recovery_wrap.o bootstrap_transaction.o bootstrap_transaction_ps2.o boot_chain.o boot_chain_ps2.o boot_payload.o boot_payload_ps2.o boot_diagnostics_ps2.o boot_report.o boot_report_ps2.o boot_report_session.o session_log.o kelf.o sha256.o capsule_format.o mbr_compat.o hdl_iso.o hdl_partition.o hdl_transaction.o hdl_installer_ps2.o
EE_OBJS = main.o manager_menu_ps2.o app_ui_ps2.o disk_status_ps2.o gs_ui_ps2.o gs_debug_compat_ps2.o app_error.o bootstrap_controller_ps2.o diagnostics_controller_ps2.o forensic_controller_ps2.o platform.o storage.o video_mode.o ui_layout.o ui_font.o spleen_font_data.o header_backup.o repair_snapshot.o forensic_snapshot.o rescue_image.o rescue_storage.o bootstrap_source.o bootstrap_signing.o apa.o apa_repair.o apa_forensic.o repair_health.o hdd_bounds.o hdd_read.o hdd_write.o hdd_repair_ps2.o hdd_forensic_repair_ps2.o repair_controller_ps2.o hdd_recovery_wrap.o bootstrap_transaction.o bootstrap_transaction_ps2.o boot_chain.o boot_chain_ps2.o boot_payload.o boot_payload_ps2.o boot_diagnostics_ps2.o boot_report.o boot_report_ps2.o boot_report_session.o session_log.o kelf.o sha256.o capsule_format.o mbr_compat.o hdl_iso.o hdl_partition.o hdl_transaction.o hdl_installer_ps2.o r5900_perf.o
EE_LIBS = -ldebug -ldraw -lgraph -lpacket -ldma -lm -lpad -lfileXio -lpatches -lpoweroff -lsecr -lkernel

# Phase-0 profiler perturbation must be measurable with the same source and the
# same optimization flags. HDL_PROFILE=1 is the current instrumented default;
# HDL_PROFILE=0 compiles EE/IOP HDL telemetry out without changing dataflow.
HDL_PROFILE ?= 1
ifeq ($(filter $(HDL_PROFILE),0 1),)
$(error HDL_PROFILE must be 0 or 1)
endif

# Phase-2 recovery experiment. Keep this disabled in the frozen Phase-0 pair:
# the experiment removes already-completed USB rehash work after interruption,
# but must earn its place with real-hardware A/B before becoming the default.
HDL_RESUME_HASH_CHECKPOINT ?= 0
ifeq ($(filter $(HDL_RESUME_HASH_CHECKPOINT),0 1),)
$(error HDL_RESUME_HASH_CHECKPOINT must be 0 or 1)
endif

# LTO lets the R5900 compiler optimize across the deliberately small modules
# while section GC still removes unused recovery/UI helpers from the final ELF.
EE_CFLAGS = -O2 -flto -G0 -Wall -Wextra -Werror -std=gnu99 -fdata-sections -ffunction-sections -Iinclude
EE_CFLAGS = -O2 -flto -G0 -Wall -Wextra -Werror -std=gnu99 -fdata-sections -ffunction-sections -Iinclude -DHDL_PROFILE_ENABLED=$(HDL_PROFILE)
ifeq ($(HDL_RESUME_HASH_CHECKPOINT),1)
EE_CFLAGS += -DHDL_RESUME_HASH_CHECKPOINT_ENABLED=1
EE_OBJS += hdl_hash_checkpoint.o
endif
# Keep a linker map for every build. The R5900 has a 16 KiB I-cache, so archive
# provenance, section growth and final placement are performance data, not just
# link-time trivia. This also lets CI explain why heavyweight Newlib routines
Expand Down Expand Up @@ -43,10 +64,11 @@ HOST_HDD_REPAIR_FIXTURE_TEST = tests/test_hdd_repair_fixtures
HOST_HDL_ISO_TEST = tests/test_hdl_iso
HOST_HDL_PARTITION_TEST = tests/test_hdl_partition
HOST_HDL_TRANSACTION_TEST = tests/test_hdl_transaction
HOST_HDL_HASH_CHECKPOINT_TEST = tests/test_hdl_hash_checkpoint
HOST_SPLEEN_GENERATED = tests/generated_spleen_font_data.c
HOST_HDD_FIXTURE_DIR = tests/generated_hdds
HOST_FORENSIC_FIXTURE_DIR = tests/generated_forensic_hdds
HOST_TESTS = $(HOST_APP_ERROR_TEST) $(HOST_FORMAT_TEST) $(HOST_APA_REPAIR_TEST) $(HOST_APA_FORENSIC_TEST) $(HOST_APA_FORENSIC_DORMANT_TEST) $(HOST_VIDEO_MODE_TEST) $(HOST_UI_LAYOUT_TEST) $(HOST_UI_FONT_TEST) $(HOST_FORENSIC_FIXTURE_TEST) $(HOST_BOOT_CHAIN_TEST) $(HOST_BOOT_PAYLOAD_TEST) $(HOST_BOOT_REPORT_TEST) $(HOST_KELF_TEST) $(HOST_BOOTSTRAP_TRANSACTION_TEST) $(HOST_RESCUE_IMAGE_TEST) $(HOST_HDD_FIXTURE_TEST) $(HOST_HDD_MUTATION_TEST) $(HOST_HDD_REPAIR_FIXTURE_TEST) $(HOST_HDL_ISO_TEST) $(HOST_HDL_PARTITION_TEST) $(HOST_HDL_TRANSACTION_TEST)
HOST_TESTS = $(HOST_APP_ERROR_TEST) $(HOST_FORMAT_TEST) $(HOST_APA_REPAIR_TEST) $(HOST_APA_FORENSIC_TEST) $(HOST_APA_FORENSIC_DORMANT_TEST) $(HOST_VIDEO_MODE_TEST) $(HOST_UI_LAYOUT_TEST) $(HOST_UI_FONT_TEST) $(HOST_FORENSIC_FIXTURE_TEST) $(HOST_BOOT_CHAIN_TEST) $(HOST_BOOT_PAYLOAD_TEST) $(HOST_BOOT_REPORT_TEST) $(HOST_KELF_TEST) $(HOST_BOOTSTRAP_TRANSACTION_TEST) $(HOST_RESCUE_IMAGE_TEST) $(HOST_HDD_FIXTURE_TEST) $(HOST_HDD_MUTATION_TEST) $(HOST_HDD_REPAIR_FIXTURE_TEST) $(HOST_HDL_ISO_TEST) $(HOST_HDL_PARTITION_TEST) $(HOST_HDL_TRANSACTION_TEST) $(HOST_HDL_HASH_CHECKPOINT_TEST)

all: $(EE_BIN)

Expand Down Expand Up @@ -140,9 +162,14 @@ test-host:
tests/test_hdl_transaction.c src/hdl_transaction.c src/sha256.c \
-o $(HOST_HDL_TRANSACTION_TEST)
./$(HOST_HDL_TRANSACTION_TEST)
$(HOST_CC) -std=c99 -Wall -Wextra -Werror -Iinclude \
tests/test_hdl_hash_checkpoint.c src/hdl_hash_checkpoint.c src/sha256.c \
-o $(HOST_HDL_HASH_CHECKPOINT_TEST)
./$(HOST_HDL_HASH_CHECKPOINT_TEST)

clean:
rm -f $(EE_BIN) $(EE_MAP) $(EE_OBJS) $(IRX_FILES:.irx=_irx.c) $(HOST_TESTS)
rm -f hdl_hash_checkpoint.o
rm -f $(CUSTOM_IRX) hdl_stream_irx.c iop/hdl_stream/*.o \
iop/hdl_stream/*.elf iop/hdl_stream/*.irx
rm -f ps2hdd_posix_irx.c
Expand Down Expand Up @@ -303,9 +330,15 @@ hdl_partition.o: src/hdl_partition.c
hdl_transaction.o: src/hdl_transaction.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

hdl_hash_checkpoint.o: src/hdl_hash_checkpoint.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

hdl_installer_ps2.o: src/hdl_installer_ps2.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

r5900_perf.o: src/r5900_perf.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

%_irx.c:
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/$*.irx $@ $*_irx

Expand All @@ -316,7 +349,7 @@ ps2hdd_posix_irx.c:
$(PS2SDK)/bin/bin2c $(PS2SDK)/iop/irx/ps2hdd-bdm.irx $@ ps2hdd_posix_irx

hdl_stream.irx:
$(MAKE) -C iop/hdl_stream IOP_BIN=$(abspath $@)
$(MAKE) -C iop/hdl_stream IOP_BIN=$(abspath $@) HDL_PROFILE=$(HDL_PROFILE)

hdl_stream_irx.c: hdl_stream.irx
$(PS2SDK)/bin/bin2c $< $@ hdl_stream_irx
Expand Down
22 changes: 22 additions & 0 deletions bench/r5900_calibration/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
EE_BIN = R5900_COUNTER_CALIBRATION.ELF
EE_OBJS = main.o r5900_perf.o
EE_LIBS = -ldebug -lkernel

EE_CFLAGS = -O2 -G0 -Wall -Wextra -Werror -std=gnu99 -I../../include
EE_LDFLAGS = -Wl,-Map,R5900_COUNTER_CALIBRATION.map

all: $(EE_BIN)

main.o: main.c
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

r5900_perf.o: ../../src/r5900_perf.c ../../include/r5900_perf.h
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c ../../src/r5900_perf.c -o $@

clean:
rm -f $(EE_BIN) R5900_COUNTER_CALIBRATION.map $(EE_OBJS)

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

.PHONY: all clean
Loading
Loading