-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
33 lines (25 loc) · 857 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
MFS_TEMPL=AFS_region_400K.bin
MFSTOOL=mfstool
MEREGIONTOOL=meregiontool
MECONFIGTOOL=meconfigtool
REGION_DIR=region
ROPS_BASE=379784
extract:
$(MEREGIONTOOL) x clean_rom.bin $(REGION_DIR)
# You could also extract the ROM here
rom_image.bin: meregion.bin input_rom.bin
cp input_rom.bin $@
dd conv=notrunc seek=3 bs=4096 if=meregion.bin of=$@
expl/rops.bin: sa86_rops.py
./sa86_rops.py $@
fitc/home/bup/ct: expl/rops.bin sa86_arb_wr.py
./sa86_arb_wr.py $(ROPS_BASE) expl/rops.bin $@
mfs/intel.cfg: $(shell find intel_cfg -type f)
$(MECONFIGTOOL) c $@ intel_cfg
mfs/fitc.cfg: fitc/home/bup/ct $(shell find fitc -type f)
$(MECONFIGTOOL) c $@ fitc
region/MFS.mep: $(MFS_TEMPL) mfs/intel.cfg mfs/fitc.cfg
rm -f region/MFS.mep
$(MFSTOOL) c $@ $(MFS_TEMPL) mfs
meregion.bin: $(shell find $(REGION_DIR) -type f)
$(MEREGIONTOOL) c $@ $(REGION_DIR)