Results 1 to 15 of 15

Thread: Anyone able to compile Perl for Series 2?

  1. #1
    Join Date
    Nov 2004
    Location
    Santa Clara, CA
    Posts
    21

    Anyone able to compile Perl for Series 2?

    Since I've done more Perl recently than Tcl, I'd like to have Perl available. I made some quick attempts to build Perl that have failed miserably (I can't even get Configure to run properly on the TiVo at this point - it waits forever for input) and it's looking to be a whole lot harder to cross-compile than most programs.

    If anyone has it, please let me know before I invest more time into it.
    http://marc.abramowitz.info/tivo
    Hughes HDVR2 Series 2 DTiVo (4.0.1b-02-2-240, HMO, TW+, bash, ssh, Perl, etc...)
    Philips HDR110 Series 1 SA (3.0-01-1-000, two hard drives, TurboNet, telnet, jed)

  2. #2
    Join Date
    Jun 2001
    Posts
    3,108
    Quote Originally Posted by msabramo
    Since I've done more Perl recently than Tcl, I'd like to have Perl available. I made some quick attempts to build Perl that have failed miserably (I can't even get Configure to run properly on the TiVo at this point - it waits forever for input) and it's looking to be a whole lot harder to cross-compile than most programs.

    If anyone has it, please let me know before I invest more time into it.
    i know one person in #tivo claimed to have done it. of course, if you set your tivo up with debian, you can use the perl from them rather than compiling it yourself. do a search for debian and alldeadhomiez, you should find the thread.
    Step one: search button!
    Silly Wabbit, guides are for kids

  3. #3
    Join Date
    Nov 2004
    Location
    Santa Clara, CA
    Posts
    21

    Debian

    Quote Originally Posted by mrblack51
    i know one person in #tivo claimed to have done it. of course, if you set your tivo up with debian, you can use the perl from them rather than compiling it yourself. do a search for debian and alldeadhomiez, you should find the thread.
    I ran across the Debian thread last night but only briefly skimmed it as it was late. This seems interesting because you could run all sorts of stuff on the TiVo then, but if you're using Debian, can you still use all the normal TiVo features? Surely, the TiVo features depend on custom stuff in the TiVo kernel, right?
    http://marc.abramowitz.info/tivo
    Hughes HDVR2 Series 2 DTiVo (4.0.1b-02-2-240, HMO, TW+, bash, ssh, Perl, etc...)
    Philips HDR110 Series 1 SA (3.0-01-1-000, two hard drives, TurboNet, telnet, jed)

  4. #4
    Join Date
    Aug 2004
    Posts
    4,087
    Quote Originally Posted by msabramo
    I ran across the Debian thread last night but only briefly skimmed it as it was late. This seems interesting because you could run all sorts of stuff on the TiVo then, but if you're using Debian, can you still use all the normal TiVo features? Surely, the TiVo features depend on custom stuff in the TiVo kernel, right?
    The idea is you run the TiVo kernel with a debian root file system. You also have a TiVo root file system you can chroot into to run the TiVo software. Alternatively, have the TiVo root be your main root filesystem, and chroot into the debian root when you want to run something there.

    I recently tried this and, unfortunately, the current debian-mips stable release doesn't seem to work correctly on my tivo, using the 2.4.18 4.0 kernel. Bash works, but most applications, like ls, tar, etc segfault. I am guessing it is a conflict between the debian libraries and the tivo kernel. I was able to sort of get things to work by building a debian root /lib directory that was a blend of the debian .so's and the tivo .so's, but that wasn't very satisfying to me, and a number of programs still had problems (e.g. anything that uses pam). I gave up, for now, but may eventually look at this again. I might well be doing something stupid that is causing my problems.

  5. #5
    Join Date
    Dec 2004
    Posts
    5

    Compiled version available

    This chap has a compiled version available on his blog: http://marc.abramowitz.info/perl-for-tivo-series-2.html.

    It needs a few more shared libraries not included (libnsl.so.1 and libdl.so.2). They are available in this post.
    Last edited by dressen; 01-25-2005 at 04:27 AM.

  6. #6
    Join Date
    Nov 2004
    Location
    Santa Clara, CA
    Posts
    21

    30 Thanks

    Quote Originally Posted by dressen
    This chap has a compiled version available on his blog: http://marc.abramowitz.info/perl-for-tivo-series-2.html.

    It needs a few more shared libraries not included (libnsl.so.1 and libdl.so.2). They are available in this post.
    Amusing - I am both the guy who started this thread and also the very chap mentioned above :-) I decided I didn't want to go the Debian route and ended up compiling it. I figured that if I posted it, people might find dependencies on libraries that are on my system, but not typically there, but I figured anyone interested enough to try it would be able to figure out how to resolve it and it seems I was right on that count. Thanks for posting the libraries. Would you like to add a comment to my blog?

    -Marc
    http://marc.abramowitz.info/tivo
    Hughes HDVR2 Series 2 DTiVo (4.0.1b-02-2-240, HMO, TW+, bash, ssh, Perl, etc...)
    Philips HDR110 Series 1 SA (3.0-01-1-000, two hard drives, TurboNet, telnet, jed)

  7. #7
    Join Date
    Jul 2001
    Posts
    128
    Does anyone have the Net-Pcap perl module and libpcap library available for the TiVo?
    John

  8. #8
    Join Date
    Nov 2004
    Location
    Santa Clara, CA
    Posts
    21

    Not many people using Perl on TiVo

    It seems that not many people are using Perl (or Python, which I had also built at some point) on the TiVo. I guess most people opt to use Tcl since that is stock and is used by a lot of the TiVo software.
    http://marc.abramowitz.info/tivo
    Hughes HDVR2 Series 2 DTiVo (4.0.1b-02-2-240, HMO, TW+, bash, ssh, Perl, etc...)
    Philips HDR110 Series 1 SA (3.0-01-1-000, two hard drives, TurboNet, telnet, jed)

  9. #9
    Join Date
    Jul 2001
    Posts
    128
    Quote Originally Posted by msabramo View Post
    It seems that not many people are using Perl (or Python, which I had also built at some point) on the TiVo. I guess most people opt to use Tcl since that is stock and is used by a lot of the TiVo software.
    I think part of the problem is that the Perl module environment is not complete. I have a Perl program, part of NCID, that uses SIP to obtain the Caller ID. It does not run on the TiVo because of the required CPAN modules. I figure once the core modules are there, along with the C compiler, adding CPAN modules should be easy. Once Perl is at that point, you will probably see Perl applications on the TiVo.
    John

  10. #10
    Join Date
    Aug 2004
    Posts
    97
    Quote Originally Posted by jlc View Post
    I think part of the problem is that the Perl module environment is not complete. I have a Perl program, part of NCID, that uses SIP to obtain the Caller ID. It does not run on the TiVo because of the required CPAN modules. I figure once the core modules are there, along with the C compiler, adding CPAN modules should be easy. Once Perl is at that point, you will probably see Perl applications on the TiVo.
    I think you're right. Maybe we can try to make it more complete?

    perl-5.8.8/Cross/README:
    Code:
    Other Targets (For Developers)
    ------------------------------
    
    It is possible to extend the cross-compilation to other targets.
    We have sucessfully compiled for the target solaris2.8/x86
    on linux/x86 build system.
    
    To attempt a cross-compile for another target using the methods
    in this directory:
    
    1)    Copy the Perl source code onto your TARGET machine.
    2)    Execute sh Configure as normal and configure as required,
        do not "make".
    3)    Copy the config.sh file that is generated to your BUILD
        machine and place it in the Cross directory with the
        filename config.sh-ARCH-OS.  For example,
        config.sh-i386-pc-solaris2.8.  For the appropriate ARCH
        and OS please refer to your cross-compiler documentation.
    4)    Edit Cross/config to reflect your new target and continue
        with build as above.
    ...so we need to generate a config.sh-mips-TiVo-linux, right? When I tried to copy the source & run ./Configure, I got as far as "Beginning of configuration questions for perl5" before it segfaults. Same thing if I try -d for defaults.

    kernel: Illegal read at 00000000
    kernel: do_page_fault #2: sending signal 11 to Configure(1656)

    nothing seems that weird about the trap command, but it doesn't seem like it's getting to the echo about checking echo (heh).
    Code:
    : Eunice requires " " instead of "", can you believe it
    echo " "
    : Here we go...
    echo "Beginning of configuration questions for $package."
    
    trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
    
    : first determine how to suppress newline on echo command
    echo " "
    echo "Checking echo to see how to suppress newlines..."

  11. #11
    Join Date
    Jul 2001
    Posts
    128
    Quote Originally Posted by singe606 View Post
    ...so we need to generate a config.sh-mips-TiVo-linux, right? When I tried to copy the source & run ./Configure, I got as far as "Beginning of configuration questions for perl5" before it segfaults. Same thing if I try -d for defaults.

    kernel: Illegal read at 00000000
    kernel: do_page_fault #2: sending signal 11 to Configure(1656)

    nothing seems that weird about the trap command, but it doesn't seem like it's getting to the echo about checking echo (heh).
    Code:
    : Eunice requires " " instead of "", can you believe it
    echo " "
    : Here we go...
    echo "Beginning of configuration questions for $package."
    
    trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
    
    : first determine how to suppress newline on echo command
    echo " "
    echo "Checking echo to see how to suppress newlines..."
    The trap seems reasonable, but you can test if it is the cause of the segfault by commenting out the line. However, I never did like using the colon command for comments, so I would comment out those lines first and try it.
    John

  12. #12
    Join Date
    Aug 2004
    Posts
    97
    Quote Originally Posted by jlc View Post
    The trap seems reasonable, but you can test if it is the cause of the segfault by commenting out the line. However, I never did like using the colon command for comments, so I would comment out those lines first and try it.
    Yeah, I did try that later and it was something on that line causing the segfault. Then it complained about needing make, so I cross compiled that and copied it over. Now it gets all the way to checking for a C compiler, which doesn't exist.

    The idea of cross compiling gcc sounds painful. SOooo... Now I'm thinking, if you need to build a native compilation environment in order to generate config.sh, what's the point? I'm relatively new to all of this, so hopefully I'm missing something very simple and obvious.

    I agree the colon does seem weird for comments!

  13. #13
    Join Date
    Dec 2003
    Posts
    24

    don't call it a comeback...

    Quote Originally Posted by mrblack51 View Post
    i know one person in #tivo claimed to have done it. of course, if you set your tivo up with debian, you can use the perl from them rather than compiling it yourself. do a search for debian and alldeadhomiez, you should find the thread.
    dang, didn't realize it's been almost 2 full years since I really worked on my TiVo. To help the community (and ensure other code like this isn't lost for 2 years), maybe we should start a thread dedicated to the cross compile buildscripts. I'll scrounge up the scripts and post them somewhere.
    If only I could figure out how to make my TiVo remote work in reality....

  14. #14
    Join Date
    Dec 2003
    Posts
    24

    lol, found it

    dang. finally found some of my earlier scripts, but no time to test it. I'll start another thread to paste the full buildscript.


    if [ ! -f ${BUILD}/.perl-complete ]; then
    if [ ! -f ${REPOSITORY}/stable.tar.gz ]; then
    echo "Retrieving Perl 5.8.3"
    wget http://www.perl.com/CPAN/src/stable.tar.gz -P ${REPOSITORY}
    fi
    if [ ! -f ${BUILD}/.perl-configured ]; then
    echo "Configuring Perl 5.8.3... "
    cd ${BUILD}
    tar -zxf ${REPOSITORY}/stable.tar.gz
    cd ${BUILD}/perl-5.8.3/Cross
    sed "s,ARCH = arm,#ARCH = arm,g" config | sed "s,CONFIG_TARGET_ARM_SA11X0 = 1,#CONFIG_TARGET_ARM_SA11X0 = 1,g" | sed "s,#ARCH = mips,ARCH = mips-TiVo,g" | sed "s,ARCH = mips-TiVoel,#ARCH = mipsel,g" > config.ife
    mv -vf config config.original
    mv -vf config.ife config
    cp -vf ${PATCHES}/config.sh-$TARGET config.sh-$TARGET
    make patch
    echo "Configured Perl 5.8.3 on `date`" > ${BUILD}/.perl-configured
    fi
    if [ ! -f ${BUILD}/.perl-compiled ]; then
    echo "Compiling Perl 5.8.3... "
    cd ${BUILD}/perl-5.8.3/Cross
    make perl || { echo "**** Perl 5.8.3 Compile Failed"; exit; }
    echo "Compiled Perl 5.8.3 on `date`" > ${BUILD}/.perl-compiled
    fi
    if [ ! -f ${BUILD}/.perl-installed ]; then
    echo "Installing Perl 5.8.3... "
    cd ${BUILD}/perl-5.8.3
    make install DESTDIR=$ROOT || { echo "**** Perl 5.8.3 install Failed"; exit; }
    mkdir -p $ROOT/lib
    ln -sf /usr/lib/perl5/5.8.3/mips-TiVo-linux/CORE/libperl.so $ROOT/lib/libperl.so
    echo "Installed Perl 5.8.3 on `date`" > ${BUILD}/.perl-installed
    fi
    echo "Completed Perl 5.8.3 on `date`" > ${BUILD}/.perl-complete
    fi
    If only I could figure out how to make my TiVo remote work in reality....

  15. #15
    Join Date
    Jul 2001
    Posts
    128
    Thanks, I think a thread dedicated to cross compile build scripts is a good idea. I can even contribute one myself, but it is untested.
    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •