summaryrefslogtreecommitdiff
path: root/v4l/firmware/Makefile
blob: a1717922dd85ac0339a6543094730db6da4da773 (plain)
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
DIRS = vicam dabusb ttusb-budget cpia2

TARGETS = ihex2fw vicam/firmware.fw dabusb/firmware.fw dabusb/bitstream.bin ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin

####

default: $(TARGETS)

clean:
	@for i in $(TARGETS); do if [ -e $$i ]; then rm $$i; fi; done

distclean: clean
	@for i in $(DIR); do if [ -d $$i ]; then rmdir $$i; fi; done

install: default
	-for i in $(DIRS); do if mkdir /lib/firmware/$$i; done
	-for i in $(TARGETS); do cp $$i /lib/firmware/$$i; done
	

######

mkdir:
	-mkdir $(DIRS)


ihex2fw: ../../linux/firmware/ihex2fw.c
	gcc -Wall -o $@ $<

vicam/firmware.fw: ../../linux/firmware/vicam/firmware.H16 mkdir
	-mkdir vicam
	./ihex2fw -w $< $@

dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir
	./ihex2fw $< $@

ttusb-budget/dspbootcode.bin: ../../linux/firmware/ttusb-budget/dspbootcode.bin.ihex mkdir
	objcopy -Iihex -Obinary $< $@


dabusb/bitstream.bin: ../../linux/firmware/dabusb/bitstream.bin.ihex mkdir
	objcopy -Iihex -Obinary $< $@

cpia2/stv0672_vp4.bin: ../../linux/firmware/cpia2/stv0672_vp4.bin.ihex mkdir
	objcopy -Iihex -Obinary $< $@