summaryrefslogtreecommitdiff
path: root/v4l/firmware/Makefile
blob: 4e79fdce5b535785277e121f3666b46badfd4573 (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
46
47
DIRS = vicam dabusb ttusb-budget cpia2 av7110

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

####

default: $(TARGETS)

clean:
	-rm -f $(TARGETS)

distclean: clean
	-for i in $(DIRS); do if [ -d $$i ]; then rm -rf $$i; fi; done

install: default
	-for i in $(DIRS); do if [ ! -d /lib/firmware/$$i ]; then mkdir -p /lib/firmware/$$i; fi; done
	-for i in $(TARGETS); do cp $$i /lib/firmware/$$i; done


######

mkdir:
	-for i in $(DIRS); do if [ ! -d $$i ]; then mkdir -p $$i; fi; done


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

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

dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir ihex2fw
	./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 $< $@

av7110/bootcode.bin: ../../linux/firmware/av7110/bootcode.bin.ihex mkdir
	objcopy -Iihex -Obinary $< $@