Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tvheadend rules
  • Loading branch information
Schischu committed Jun 21, 2015
1 parent c508c40 commit 210dbaf
Show file tree
Hide file tree
Showing 12 changed files with 1,472 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -59,6 +59,9 @@ include make/neutrino.mk
# Include neutrino-plugins targets
include make/neutrino-plugins.mk

# Include tvheadend targets
include make/tvheadend.mk

# A number of cleaning targets
include make/cleantargets.mk

Expand All @@ -73,6 +76,8 @@ include make/enigma2-release.mk

include make/neutrino-release.mk

include make/tvheadend-release.mk

#keeping all patches in one file
include make/patches.mk

Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Expand Up @@ -37,6 +37,14 @@ AC_ARG_ENABLE(enigma2,
AM_CONDITIONAL(ENABLE_ENIGMA2,test "$enable_enigma2" = "yes")
AC_SUBST(ENIGMA2)

AC_ARG_ENABLE(tvheadend,
AS_HELP_STRING(--enable-tvheadend, Setting up the CDK to build tvheadend),
[case "${enableval}" in
yes) TVHEADEND=tvheadend ;;
esac],[enable_tvheadend=no])
AM_CONDITIONAL(ENABLE_TVHEADEND,test "$enable_tvheadend" = "yes")
AC_SUBST(TVHEADEND)

AC_ARG_ENABLE(wlandriver,
AS_HELP_STRING(--enable-wlandriver, Setting up the CDK to build wlandriver),
[case "${enableval}" in
Expand Down Expand Up @@ -989,6 +997,8 @@ TUXBOX_RULES_MAKE(ethtool)
TUXBOX_RULES_MAKE(xupnpd)
TUXBOX_RULES_MAKE(udpxy)

TUXBOX_RULES_MAKE(tvheadend)

#
# localmacros
#
Expand Down
6 changes: 5 additions & 1 deletion make.sh
Expand Up @@ -341,12 +341,14 @@ case $7 in
*) echo -e "\nWhich Image do you want to build:"
echo " 1) Neutrino"
echo " 2) Enigma2 (includes WLAN drivers)"
read -p "Select Image to build (1-2)? ";;
echo " 3) tvheadend"
read -p "Select Image to build (1-3)? ";;
esac

case "$REPLY" in
1) IMAGE="--enable-neutrino";;
2) IMAGE="--enable-enigma2 --enable-wlandriver";;
3) IMAGE="--enable-tvheadend";;
*) IMAGE="--enable-neutrino";;
esac

Expand Down Expand Up @@ -381,6 +383,8 @@ case "$IMAGE" in
echo " make yaud-neutrino-hd2-exp";;
--enable-enigma2*)
echo " make yaud-enigma2-pli-nightly";;
--enable-tvheadend*)
echo " make yaud-tvheadend";;
*)
esac
echo "----------------------------------------"
2 changes: 1 addition & 1 deletion make/contrib-libs.mk
Expand Up @@ -5,7 +5,7 @@ $(D)/openssl: $(D)/bootstrap @DEPENDS_openssl@
@PREPARE_openssl@
cd @DIR_openssl@ && \
$(BUILDENV) \
./Configure shared linux-sh no-hw no-engine \
./Configure shared linux-sh no-hw \
--prefix=/usr \
--openssldir=/.remove \
&& \
Expand Down
1,048 changes: 1,048 additions & 0 deletions make/tvheadend-release.mk

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions make/tvheadend.mk
@@ -0,0 +1,61 @@
yaud-tvheadend: yaud-none \
boot-elf tvheadend release_tvheadend
@TUXBOX_YAUD_CUSTOMIZE@

TVHEADEND_DEPS = bootstrap openssl python

$(D)/tvheadend.do_prepare: | $(TVHEADEND_DEPS)
rm -rf $(sourcedir)/tvheadend
rm -rf $(sourcedir)/tvheadend.org
rm -rf $(N_OBJDIR)
[ -d "$(archivedir)/tvheadend.git" ] && \
(cd $(archivedir)/tvheadend.git; git pull; cd "$(buildprefix)";); \
[ -d "$(archivedir)/tvheadend.git" ] || \
git clone https://github.com/tvheadend/tvheadend.git $(archivedir)/tvheadend.git; \
cp -ra $(archivedir)/tvheadend.git $(sourcedir)/tvheadend; \
cp -ra $(sourcedir)/tvheadend $(sourcedir)/tvheadend.org
touch $@

$(D)/tvheadend.config.status:
cd $(sourcedir)/tvheadend && \
$(BUILDENV) \
./configure \
--build=$(build) \
--host=$(target) \
--disable-avahi \
--disable-tvhcsa \
--disable-libav \
--disable-dvben50221 \
--disable-dbus_1 \
PKG_CONFIG=$(hostprefix)/bin/$(target)-pkg-config \
PKG_CONFIG_PATH=$(targetprefix)/usr/lib/pkgconfig \
PY_PATH=$(targetprefix)/usr \
$(PLATFORM_CPPFLAGS)

$(D)/tvheadend.do_compile: tvheadend.config.status
cd $(sourcedir)/tvheadend && \
$(MAKE) all
touch $@

$(D)/tvheadend: tvheadend.do_prepare tvheadend.do_compile
$(MAKE) -C $(sourcedir)/tvheadend install DESTDIR=$(targetprefix)
if [ -e $(targetprefix)/usr/bin/tvheadend ]; then \
$(target)-strip $(targetprefix)/usr/bin/tvheadend; \
fi
if [ -e $(targetprefix)/usr/local/bin/tvheadend ]; then \
$(target)-strip $(targetprefix)/usr/local/bin/tvheadend; \
fi
touch $@

tvheadendclean:
rm -f $(D)/tvheadend
rm -f $(D)/tvheadend.do_compile
cd $(sourcedir)/tvheadend && \
$(MAKE) distclean

tvheadend-distclean:
rm -f $(D)/tvheadend
rm -f $(D)/tvheadend.do_compile
rm -f $(D)/tvheadend.do_prepare
rm -rf $(sourcedir)/tvheadend
rm -rf $(sourcedir)/tvheadend.org
153 changes: 153 additions & 0 deletions root/release/rcS_tvheadend_ufs912
@@ -0,0 +1,153 @@
#!/bin/sh

MODDIR=/lib/modules
insmod $MODDIR/micom.ko

if [ -e /var/etc/.firstboot ]; then
#fp_control does not work here
echo "WAIT 1 min" >/dev/vfd
echo "WAIT 1 min"
rm /var/etc/.firstboot
touch /dev/.devfsd
fi

/etc/init.d/mountvirtfs start

/etc/init.d/portmap start

insmod $MODDIR/e2_proc.ko

/etc/init.d/autofs start

if [ ! -e /var/etc/.firstboot ]; then

echo "Starting DEBUG Interface"
/etc/init.d/mountall start
/etc/init.d/hostname start

fp_control -c

#green led on
#fp_control -l 2 1

#led brightness
fp_control -led 80

echo "starting telnetd"
/usr/sbin/telnetd -l /bin/autologin

echo "init stmfb"
insmod $MODDIR/stmcore-display-sti7111.ko
insmod $MODDIR/stmfb.ko display0=1280x720-32@50:12m:pal:cvbs:yuv;# display1=720x576-16@50:1m:pal:cvbs;

echo "LOADING MODULES"
fp_control -t "LOADING MODULES"

if [ ! -e /lib/firmware/audio.elf ]; then
fp_control -t "FW MISSING!!!"
fi

echo "load video firmware"
/bin/dd if=/dev/zero of=/dev/st231-0 bs=1024 count=4096
# /bin/stslave -t st231.0 -R /lib/firmware/video.elf
/bin/ustslave /dev/st231-0 /lib/firmware/video.elf

echo "load audio firmware"
/bin/dd if=/dev/zero of=/dev/st231-1 bs=1024 count=4096
# /bin/stslave -t st231.1 -R /lib/firmware/audio.elf
/bin/ustslave /dev/st231-1 /lib/firmware/audio.elf

echo "init embx"
insmod $MODDIR/embxshell.ko
insmod $MODDIR/embxmailbox.ko mailbox0=0xfe211000:136:set2 mailbox1=0xfe212000:0 ;
insmod $MODDIR/embxshm.ko mailbox0=shm:0:7:0x60000000:0:256:256:0:512:0x40000000:0x10000000 ;
insmod $MODDIR/mme_host.ko transport0=shm

echo "init AVS"
insmod $MODDIR/avs.ko type=stv6417

echo "init player"
insmod $MODDIR/mmelog.ko
#there is no mpeg2hw on ufs912, will be handled by fw & copos
#insmod $MODDIR/mpeg2hw.ko mmeName=MPEG2_TRANSFORMER0;
insmod $MODDIR/ksound.ko
insmod $MODDIR/p2div64.ko
insmod $MODDIR/stm_v4l2.ko
insmod $MODDIR/stmvout.ko
insmod $MODDIR/stmvbi.ko
insmod $MODDIR/pseudocard.ko

insmod $MODDIR/stv090x.ko
insmod $MODDIR/ufs912_cic.ko
insmod $MODDIR/pti.ko

insmod $MODDIR/stm_monitor.ko
insmod $MODDIR/stmsysfs.ko
insmod $MODDIR/stmdvb.ko
insmod $MODDIR/player2.ko discardlateframe=0
insmod $MODDIR/sth264pp.ko
insmod $MODDIR/stmalloc.ko
insmod $MODDIR/platform.ko
insmod $MODDIR/silencegen.ko

insmod $MODDIR/bpamem.ko

echo "init frontpanel"

#timefix
date -s "200901011200"

# echo "starting telnetd"
# /usr/sbin/telnetd -l /bin/autologin
# /etc/init.d/vsftpd start
/usr/sbin/inetd

NFS=$(grep -c 'nfs' /proc/cmdline)
if [ "$NFS" -eq "1" ]; then
echo "Booting from nfs, don't set network"
else
if [ -e /etc/network/interfaces ]; then
ip addr flush eth0
/etc/init.d/networking stop
TEST=$(grep -c 'dhcp' /etc/network/interfaces)
if [ "$TEST" -eq "1" ]; then
echo dhcp
/etc/init.d/udhcpc start
fi
/etc/init.d/networking start
fi
fi

echo `ifconfig eth0 | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p'` > /dev/vfd

echo "LOADING tvheadend"

until false
do
echo "starting tvheadend ->"
/usr/local/bin/tvheadend --http_port 80 -C
rtv=$?
echo "tvheadend ended <- RTV: " $rtv
case "$rtv" in
0) echo "0"
echo "E2 ERROR"
init 6;;
1) echo "1"
echo "SHUTDOWN"
init 0;;
2) echo "2"
echo "REBOOT"
init 6;;
3) echo "3"
echo "E2 RESTART"
echo "0" > /proc/progress
showiframe -p /var/boot/bootlogo.mvi &;;
*) echo "*"
echo "ERROR"
init 6;;
esac
done
fi

#never reached

0 comments on commit 210dbaf

Please sign in to comment.