diff options
-rw-r--r-- | v4l/firmware/Makefile | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/v4l/firmware/Makefile b/v4l/firmware/Makefile index 4e79fdce5..d108dd0f7 100644 --- a/v4l/firmware/Makefile +++ b/v4l/firmware/Makefile @@ -1,6 +1,6 @@ -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 +DIRS = vicam dabusb ttusb-budget cpia2 av7110 +TARGETS = vicam/firmware.fw dabusb/firmware.fw dabusb/bitstream.bin ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin av7110/bootcode.bin +FW_DIR = /lib/firmware #### @@ -13,35 +13,44 @@ 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 + @echo -n "Installing firmwares at $(FW_DIR): " + -@for i in $(DIRS); do if [ ! -d $(FW_DIR)/$$i ]; then mkdir -p $(FW_DIR)/$$i; fi; done + -@for i in $(TARGETS); do echo -n "$$i "; cp $$i $(FW_DIR)/$$i; done + @echo +rminstall: + @echo "Removing firmwares at $(FW_DIR) " + -for i in $(DIRS); do if [ -d $(FW_DIR)/$$i ]; then rm -rf $(FW_DIR)/$$i; fi; done ###### -mkdir: - -for i in $(DIRS); do if [ ! -d $$i ]; then mkdir -p $$i; fi; done - +mkdir:: + -@for i in $(DIRS); do if [ ! -d $$i ]; then mkdir -p $$i; fi; done ihex2fw: ../../linux/firmware/ihex2fw.c - gcc -Wall -o $@ $< + @echo " CC $@" + @gcc -Wall -o $@ $< vicam/firmware.fw: ../../linux/firmware/vicam/firmware.H16 mkdir ihex2fw - ./ihex2fw -w $< $@ + @echo Generating $@ + @./ihex2fw -w $< $@ dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir ihex2fw - ./ihex2fw $< $@ + @echo Generating $@ + @./ihex2fw $< $@ ttusb-budget/dspbootcode.bin: ../../linux/firmware/ttusb-budget/dspbootcode.bin.ihex mkdir - objcopy -Iihex -Obinary $< $@ - + @echo Generating $@ + @objcopy -Iihex -Obinary $< $@ dabusb/bitstream.bin: ../../linux/firmware/dabusb/bitstream.bin.ihex mkdir - objcopy -Iihex -Obinary $< $@ + @echo Generating $@ + @objcopy -Iihex -Obinary $< $@ cpia2/stv0672_vp4.bin: ../../linux/firmware/cpia2/stv0672_vp4.bin.ihex mkdir - objcopy -Iihex -Obinary $< $@ + @echo Generating $@ + @objcopy -Iihex -Obinary $< $@ av7110/bootcode.bin: ../../linux/firmware/av7110/bootcode.bin.ihex mkdir - objcopy -Iihex -Obinary $< $@ - + @echo Generating $@ + @objcopy -Iihex -Obinary $< $@ |