From be1dce088255ee8b88d5dcb06dc4f15bb3ad7b5a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 18 Jul 2008 01:14:44 -0300 Subject: Prepare to allow firmware out-of-tree firmware compilation From: Mauro Carvalho Chehab This patch synchronizes the firmware hex files from Kernel and starts to prepare to allow firmware compilation at the out-of-tree driver. Yet, some work need to be done to make it work. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 60bf0b317..aaba68952 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -39,11 +39,14 @@ endif # TOPDIR ################################################# # default compilation rule -default:: config-compat.h Makefile.media links oss +default:: config-compat.h Makefile.media links oss firmware @echo Kernel build directory is $(OUTDIR) $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules ./scripts/rmmod.pl check # $(MAKE) checkpatch + +firmware:: firmlinks + $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD)/firmware $(MYCFLAGS) modules ################################################# # Object specific rules @@ -249,6 +252,10 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. @find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. +firmlinks:: + for i in `find ../linux/firmware/ -type d|sed s,"../linux/firmware",,`; do mkdir -p firmware/$$i; done >/dev/null + for i in `find ../linux/firmware/ -type f|sed s,"../linux/firmware",,`; do ln -sf $(PWD)/../linux/firmware/$$i firmware/$$i; done + # This link is so code with #include "oss/*.h" will find its header files oss: ln -sf . oss -- cgit v1.2.3 From 2e3b1637aecc92ad8dc8d8e786dd1e038f68f349 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 18 Jul 2008 01:18:19 -0300 Subject: Firmware compilation is not working yet. Disable at makefile From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index aaba68952..57bb4e614 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -39,7 +39,7 @@ endif # TOPDIR ################################################# # default compilation rule -default:: config-compat.h Makefile.media links oss firmware +default:: config-compat.h Makefile.media links oss # firmware @echo Kernel build directory is $(OUTDIR) $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules ./scripts/rmmod.pl check -- cgit v1.2.3 From e68d63cdeb1115d0fd27f54d413ba25c1b3216f9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 18 Jul 2008 08:35:40 -0300 Subject: A few improvements at firmware build From: Mauro Carvalho Chehab make firmware will now create the firmware files, using .ihex, .HEX and .H16 target files, under linux/firmware. TODO: - use the right names for those firmwares; - link them with the module, if desired by enduser. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 57bb4e614..579b85f88 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -45,8 +45,9 @@ default:: config-compat.h Makefile.media links oss # firmware ./scripts/rmmod.pl check # $(MAKE) checkpatch -firmware:: firmlinks - $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD)/firmware $(MYCFLAGS) modules +firmware:: + $(MAKE) -C firmware + ################################################# # Object specific rules @@ -252,10 +253,6 @@ links:: @find ../linux/drivers/media -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. @find ../linux/sound -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. -firmlinks:: - for i in `find ../linux/firmware/ -type d|sed s,"../linux/firmware",,`; do mkdir -p firmware/$$i; done >/dev/null - for i in `find ../linux/firmware/ -type f|sed s,"../linux/firmware",,`; do ln -sf $(PWD)/../linux/firmware/$$i firmware/$$i; done - # This link is so code with #include "oss/*.h" will find its header files oss: ln -sf . oss @@ -280,6 +277,7 @@ clean:: @find . -name '*.h' -type l -exec rm '{}' \; -rm -f *~ *.o *.ko .*.o.cmd .*.ko.cmd *.mod.c av7110_firm.h fdump \ config-compat.h Module.symvers + make -C firmware clean distclean:: clean -rm -f .version .*.o.flags .*.o.d Makefile.media \ -- cgit v1.2.3 From c49e3088c034e1fc59f27b9a97ba1e1d3590320a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 20 Jul 2008 00:37:25 -0300 Subject: Complete firmware compilation scripts From: Mauro Carvalho Chehab This patch completes firmware compilation scripts: - linux/firmware/Makefile is just a copy of kernel script make file. It is not currently used by the building system; - Added two new targets for firmware compilation and instalation; - Fixes the COPYING file to explicitly state that the firmwares aren't covered by GPL; - make distclean will also cleanup the firmwares. Signed-off-by: Mauro Carvalho Chehab --- v4l/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'v4l/Makefile') diff --git a/v4l/Makefile b/v4l/Makefile index 579b85f88..b43b59867 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -39,7 +39,7 @@ endif # TOPDIR ################################################# # default compilation rule -default:: config-compat.h Makefile.media links oss # firmware +default:: config-compat.h Makefile.media links oss @echo Kernel build directory is $(OUTDIR) $(MAKE) -C $(OUTDIR) SUBDIRS=$(PWD) $(MYCFLAGS) modules ./scripts/rmmod.pl check @@ -206,6 +206,9 @@ install:: media-install remove rminstall:: media-rminstall +firmware_install:: + make -C firmware install + ################################################# # Compiling preparation rules @@ -287,6 +290,7 @@ distclean:: clean -rm -f scripts/lxdialog scripts/kconfig oss @find .. -name '*.orig' -exec rm '{}' \; @find .. -name '*.rej' -exec rm '{}' \; + $(MAKE) -C firmware distclean ################################################# # Kernel module insert/removal rules -- cgit v1.2.3