Cross Compiling streamer from xawtv using LTIB

1 – Get source code from http://www.kraxel.org/releases/xawtv/xawtv-3.95.tar.gz

2 – Aplly these patches


diff -urN ../tmp-orig/xawtv-3.95/console/fbtools.c ./console/fbtools.c
--- xawtv-3.95/console/fbtools.c 2003-02-14 14:14:04.000000000 +0000
+++ xawtv-3.95/console/fbtools.c 2011-03-12 10:57:40.000000000 +0000
@@ -21,8 +21,6 @@
#include
#include

-#include
-
#include "fbtools.h"

/* -------------------------------------------------------------------- */
@@ -424,7 +422,7 @@
goto err;
}
#endif
- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK);
+ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & ~(sysconf(_SC_PAGE_SIZE)-1);
fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
if (-1L == (long)fb_mem) {
diff -urN ../tmp-orig/xawtv-3.95/console/matrox.c ./console/matrox.c
--- xawtv-3.95/console/matrox.c 2005-02-03 10:40:41.000000000 +0000
+++ xawtv-3.95/console/matrox.c 2011-03-12 11:09:51.000000000 +0000
@@ -9,7 +9,6 @@
#include
#include

-#include /* PAGE_SIZE */
#include

#include "byteswap.h"
@@ -226,7 +225,7 @@
return -1;
}
off = (unsigned long)fb_fix.mmio_start -
- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1));
+ ((unsigned long)fb_fix.mmio_start & ~(sysconf(_SC_PAGE_SIZE)-1));
bmmio += off;
mmio = (uint32_t*)bmmio;
return 0;


3- Prepare the compilatio using

./configure –disable-xfree-ext  –disable-xvideo  –disable-lirc –disable-quicktime –disable-motif –disable-aa–disable-alsa  –disable-zvbi –disable-gl  –disable-dv  –disable-xft –without-x

4- After configure, modify Makefile

# include stuff
# must come firstinclude $(srcdir)/common/Subdir.mk
# subdirsinclude $(srcdir)/console/Subdir.mkinclude $(srcdir)/debug/Subdir.mkinclude $(srcdir)/frequencies/Subdir.mkinclude $(srcdir)/libng/Subdir.mkinclude $(srcdir)/libng/plugins/Subdir.mk#include $(srcdir)/libng/contrib-plugins/Subdir.mk#include $(srcdir)/man/Subdir.mk#include $(srcdir)/scripts/Subdir.mk#include $(srcdir)/vbistuff/Subdir.mk#include $(srcdir)/x11/Subdir.mk
# dependencies-include $(depfiles)
——————————————————
#Compiling only streamer
# targets to buildTARGETS-console := \    console/streamer
console/streamer: \    console/streamer.o \    common/channel-no-x11.o \    $(OBJS-common-capture)
console/streamer : LDLIBS  += $(THREAD_LIBS) -ljpeg -lm -L${JPEG_ROOT}/libconsole/streamer : LDFLAGS := $(DLFLAGS)
# global targetsall:: $(TARGETS-console)

install::    $(INSTALL_PROGRAM) $(TARGETS-console) $(bindir)
distclean::    rm -f $(TARGETS-console

5- Run make

Thanks to Jeyner Gil Caga  http://lists.zerezo.com/video4linux/msg22603.html

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: