Hi Hans, The test in utils/Makefile for which $(EXES) to build is backwards. It checks if we are on PowerPC and only builds the x86 specific utilities if we are not. This is fine on PowerPC and x86 but not so good anywhere else as we do not want to build x86 specific tools on those architectures.
The attached patch reverses the test and only builds ivtvplay
ivtv-mpegindex and ivtv-encoder if we detect __i386__ or __x86_64__. In
addition the patch also allows ivtvfbctl on non x86 by making the "prep
DMA" functionality conditional.
A previous iteration of this patch was in the 0.6.2 packages for Debian
and built on all Debian architectures (~13 or so I think). I can't
guarantee it was ever used on any of those other than x86 & powerpc
though ;-)
I would have posted this to trac but I couldn't figure out how to create
an account or start a new ticket :-( any pointers would be much
appreciated, as the maintainer of the Debian ivtv packages I'll probably
find it useful!
Ian.
--
Ian Campbell
Never trust an operating system you don't have sources for. ;-)
-- Unknown source
Index: utils/ivtvfbctl.c
===================================================================
--- utils/ivtvfbctl.c (revision 3369)
+++ utils/ivtvfbctl.c (working copy)
@@ -41,6 +41,7 @@
#include "ivtv.h"
+#if defined(__i386__) || defined(__x86_64__)
typedef unsigned long long W64;
static inline W64 rdtsc()
{
@@ -48,6 +49,7 @@
asm volatile ("rdtsc":"=A" (t));
return t;
}
+#endif
inline int bit(unsigned int v, unsigned int i)
{
@@ -176,6 +178,7 @@
//++MTY TODO This is specific to the CPU being tested! Get from /proc/cpuinfo, etc. instead...
#define CPU_HZ (1.6*1000*1000*1000)
+#if defined(__i386__) || defined(__x86_64__)
int ivtv_frame_loop(int fd, int do_sleep)
{
struct ivtvfb_ioctl_dma_host_to_ivtv_args args;
@@ -225,6 +228,7 @@
}
return 0;
}
+#endif
int main(int argc, char **argv)
{
@@ -537,7 +541,11 @@
}
}
if (do_prep_dma) {
+#if defined(__i386__) || defined(__x86_64__)
ivtv_frame_loop(fd, do_sleep);
+#else
+ printf("ivtvfbctl: DMA prepare is currently only available on i386 and x86/64.\n");
+#endif
}
if (do_window) {
printf("ivtvfbctl: Setting window (left: %d top: %d width: %d height: %d)\n",
Index: utils/Makefile
===================================================================
--- utils/Makefile (revision 3369)
+++ utils/Makefile (working copy)
@@ -2,10 +2,15 @@
BINDIR = $(PREFIX)/bin
HDRDIR = /usr/include/linux
-EXES := ivtvctl ivtv-detect ivtv-radio
-EXES := $(shell if echo - | $(CC) -E -dM - | grep __powerpc__ > /dev/null; \
- then echo $(EXES); else \
- echo $(EXES) ivtvfbctl ivtvplay ivtv-mpegindex ivtv-encoder; fi)
+X86 := $(shell if echo - | $(CC) -E -dM - | egrep -e '__i386__|__x86_64__' >/dev/null; \
+ echo y; else echo n; fi)
+
+ifeq ($(X86),y)
+X86_EXES := ivtvplay ivtv-mpegindex ivtv-encoder
+endif
+
+EXES := ivtvctl ivtvfbctl ivtv-detect ivtv-radio $(X86_EXES)
+
BIN := $(EXES) ivtv-tune/ivtv-tune cx25840ctl/cx25840ctl
@@ -45,7 +50,7 @@
rm -f *.o $(EXES)
$(MAKE) -C ivtv-tune clean
$(MAKE) -C cx25840ctl clean
-
+
../driver/ivtv-svnversion.h:
$(MAKE) -C ../driver ivtv-svnversion.h
signature.asc
Description: This is a digitally signed message part
_______________________________________________ ivtv-devel mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-devel
