On Tue, 2006-06-27 at 20:48 +0100, Ian Campbell wrote: > 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.
I somehow missed out an 'else' in that one. Here is an updated patch. Sorry for the trouble. Ian. -- Ian Campbell Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy.
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; \
+ then 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
