Makefile 1.57 KB
Newer Older
1 2 3
# NOTE: advised to use lower-case for board name
BOARD = t485

4 5 6
ELMAIP =
ELMAPWD =
ELMASLOT =
7

8
all:
9 10
	mkdir -p ubuntu/$(BOARD)/log
	touch ubuntu/$(BOARD)/log/fan-speeds
11

12
	cp -r config/ ubuntu/$(BOARD)/
13
	cp -r shell/ ubuntu/$(BOARD)/
14

15 16
	mkdir -p	ubuntu/$(BOARD)/pyts/
	cp python/*	ubuntu/$(BOARD)/pyts/
17

18
	chmod a+x rename; ./rename $(BOARD) $(ELMAIP) $(ELMAPWD) $(ELMASLOT)
19

20 21
	cp ubuntu/$(BOARD)/pyts/pts.py	ubuntu/$(BOARD)/pts
	cp ubuntu/$(BOARD)/pyts/jpts.py	ubuntu/$(BOARD)/jpts
22
	cp ubuntu/$(BOARD)/pyts/one.py	ubuntu/$(BOARD)/one
23 24 25 26 27 28 29 30 31 32 33 34
	ln -s pyts/dac_vcxo_pll.py	ubuntu/$(BOARD)/test01.py
	ln -s pyts/leds.py 		ubuntu/$(BOARD)/test02.py
	ln -s pyts/ttl_pulse_switch.py	ubuntu/$(BOARD)/test03.py
	ln -s pyts/rs485_pulse_rtm.py	ubuntu/$(BOARD)/test04.py
	ln -s pyts/therm_id.py		ubuntu/$(BOARD)/test05.py
	ln -s pyts/sfp_eeprom.py	ubuntu/$(BOARD)/test06.py
	ln -s pyts/sfp_test.py		ubuntu/$(BOARD)/test07.py
	ln -s pyts/flashtest.py		ubuntu/$(BOARD)/flashtest.py

	mkdir -p ubuntu/$(BOARD)/boot
	mv ubuntu/$(BOARD)/shell/program	ubuntu/$(BOARD)/boot
	mv ubuntu/$(BOARD)/shell/flash	ubuntu/$(BOARD)/boot
35
	wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3738/pts.bit
36
	wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3710/flash_load.bit
37
	wget -P ubuntu/$(BOARD)/boot http://www.ohwr.org/attachments/download/3733/golden-v0.0_release-v1.0.bin
38

39 40 41 42 43
	chmod a+x ubuntu/$(BOARD)/shell/*
	chmod a+x ubuntu/$(BOARD)/boot/*
	chmod a+x ubuntu/$(BOARD)/jpts
	chmod a+x ubuntu/$(BOARD)/pts
	chmod a+w ubuntu/$(BOARD)/*
44

45 46
	tar czvf ubuntu.tar.gz ubuntu/

47
clean:
48
	rm -rf ubuntu/$(BOARD)
49