-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.11 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
.SHELLFLAGS = -ec
VERSIONING := $(shell git describe --tags)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
DATE := $(shell date)
VAR := 'static const unsigned char version_str[] ='
VAL := ' "$(VERSIONING) $(BRANCH) $(DATE)";'
TGT := $(shell ls -t built | head -n 1)
.ONESHELL:
compile:
@echo $(VAR) > ipmc-user/user_version_def.h
@echo $(VAL) >> ipmc-user/user_version_def.h
echo "Current repository: $(VERSIONING) $(BRANCH) $(DATE)"
$(RM) *.img
python3 scripts/ipmc_config_gen.py
python3 ./compile.py
python3 scripts/wrapping_up.py
activate:
ipmitool -H $(SHM_IP) -P "" -t $(IPMB_ADDR) hpm activate
upgrade:
ipmitool -H $(SHM_IP) -P "" -t $(IPMB_ADDR) hpm upgrade hpm1all.img force activate
sol:
ipmitool -C 0 -I lanplus -H $(IPMC_IP) -U soluser -P solpassword sol activate
reset:
ipmitool -H $(SHM_IP) -P "" -t $(IPMB_ADDR) mc reset cold
cp_pcptracker:
scp "built/$(TGT)" "pcuptracker001:built"
cp_lxplus:
scp "built/$(TGT)" "lxplus.cern.ch:built"
cp_axion:
scp "built/$(TGT)" "axion.bu.edu:built"
clean:
@rm -rf hpm*.img >& /dev/null
@rm -rf config.xml >& /dev/null
@rm -rf nvm.ihx >& /dev/null