Page 1 of 5 123 ... LastLast
Results 1 to 15 of 65

Thread: MIPS Tivo cross compiler on cygwin

  1. #1
    Join Date
    Jul 2003
    Posts
    35

    MIPS Tivo cross compiler on cygwin

    Here is a MIPS Tivo cross compiler and cross debugger build script for cygwin.

    Notes:
    1. I could not recompile glibc on cygwin, so I just used libraries and include files from usr.local.mips-tivo.tar.bz2.
    2. It uses a special gcc version patched for MIPS which is available only as a source RPM. I could not figure out how to unpack it under cygwin, so I have directions how to do it under Linux.
    3. By default, everything is installed under "c:\Program Files\TivoGcc".

    Versions used:

    cygwin 1.3.22
    binutils 2.14.90.0.6
    gcc 3.2-7.1
    gdb 20030906
    insight 20030902
    glibc 2.2.3 (not built)
    Last edited by tmesis; 09-07-2003 at 12:45 PM.

  2. #2
    Join Date
    Aug 2003
    Posts
    2,149
    I'm making headway but still haven't gotten a cross-compiler setup up with Cygwin. I'll keep you posted as I work through the errors.

    NutKase
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  3. #3
    Join Date
    Aug 2003
    Posts
    2,149
    Re: Re: Cygwin Compiler Update

    quote:
    --------------------------------------------------------------------------------
    Originally posted by tmesis
    I have /usr/bin/msgfmt. It seems it came from gettext-devel package. Try to install it.
    --------------------------------------------------------------------------------



    Thanks, I already got it. My most current hiccup is with a link to libintl.la and arparse.a and arparse.c

    NutKase

    "If it was easy... everybody would be doing it!"
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  4. #4
    Join Date
    Jun 2001
    Posts
    3,108
    nutkase: did you try installing everything during the cygwin install? if not, that might be faster in the short run (though figuring out the minium install has its benefits)
    Step one: search button!
    Silly Wabbit, guides are for kids

  5. #5
    Join Date
    Aug 2003
    Posts
    2,149
    Originally posted by mrblack51
    nutkase: did you try installing everything during the cygwin install? if not, that might be faster in the short run (though figuring out the minium install has its benefits)
    No. I installed the default then figured out the 'install everything' option. I've about got everything going but seem to be having trouble with the script and patches. If I can't get it soon I'm going to start over. Not feeling too well today and this Cygwin isn't making me feel any better

    NutKase
    "God, and DealDataBase, help those that help themselves." --Shamelessly stolen from psxboy
    ------------------------------------------------
    2 each, SA S2 287hr 7.2.1a's with Lifetime.
    Hacks: 1 Manually Monte'd -140, Bash,Telnet,FTP,TivoWebPlus,
    Superpatch-67all Unscrambled/HMO,MFS_FTP Ver. N,TyTools, tivoserver
    Fully hacked SA S1

  6. #6
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    Has anybody done this on a Windows host?

    I have installed the latest Cygwin, but I can't figure out how to build the appropriate MIPS tool chain.

    Thanks.

  7. #7
    Join Date
    Jul 2003
    Posts
    35
    Originally posted by InterMurph
    Has anybody done this on a Windows host?

    I have installed the latest Cygwin, but I can't figure out how to build the appropriate MIPS tool chain.
    What is the problem you are having?

    I usually cut and paste each command in my script separately into cygwin bash prompt, so that I can notice if anything starts failing. A few days ago I succesfully rebuilt my cross-compiler with gcc 3.3.2, gdb 6.0.

  8. #8
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    Where to begin...

    First, I can't execute the shell script. I start the Cygwin bash shell, and I can see that it is there via 'ls -l', but I don't know how to execute it. This I attribute to my Windows-ness.

    Second, I can't execute the first command in the script by hand (the wget for the binutils file). I have downloaded and installed wget, and I can run it, but I can't get it to use the proxy I need. I have searched on google, and found that I need to specify '--proxy=on' in the wget command line, and put 'http_proxy=http://whatever.com:8080/' in 1) a file called .wgetrc, 2) a file called wgetrc, or 3) an environment variable. I have tried all three, and I can't make it work. I have even tried putting the .wgetrc/wgetrc files in multiple places, and I have even tried using upper- and lower-case for the environment variable.

    But wget never uses the proxy; it just resolves the host and tries to connect to it directly, which of course fails.

    Thanks.

  9. #9
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    EDIT: I figured it out...

    The wgetrc file needs to go in /egc (c:\cygwin\etc).

    I execute the bash script by typing 'bash [script name]' from the Windows CMD.EXE prompt.

    I haven't felt this stupid in 15 years...
    Last edited by InterMurph; 12-17-2003 at 02:26 PM.

  10. #10
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    Now I'm on the second step of the script, which tells me:

    Please get ftp://ftp.linux-mips.org/pub/linux/m.../SRPMS/gcc-3.2
    -7.1.src.rpm, run the following on a Linux system, and put the resulting gcc-3.2
    -7.1.tar.bz2 here
    -------
    rpm -ivh gcc-3.2-7.1.src.rpm
    pushd $PWD && cd /usr/src/RPM/SPECS
    test -f gcc32.spec.old || mv gcc32.spec gcc32.spec.old
    sed s/^BuildRequires:/#BuildRequires:/g < gcc32.spec.old > gcc32.spec
    rpmbuild -bp gcc32.spec && popd
    mv /usr/src/RPM/BUILD/gcc-3.2-20020903 gcc-3.2-7.1
    tar cvf gcc-3.2-7.1.tar gcc-3.2-7.1 && bzip2 -9 gcc-3.2-7.1.tar
    I don't have a Linux system, so I'm trying to do it on my Windows/Cygwin system. I got the .rpm file, but when I try to execute the rpm command, I get this error:

    bash-2.05b$ rpm -ivh gcc-3.2-7.1.src.rpm
    error: gcc-3.2-7.1.src.rpm: MD5 digest: BAD Expected(c0926b6dbf5c21e64494c3756ac
    33769) != (6fd69310a2a211ddadcfab06924b2980)
    error: gcc-3.2-7.1.src.rpm cannot be installed
    I downloaded the file three times, but got the same MD5 error each time. When I try it without the digest check, I get this error:

    bash-2.05b$ rpm -ivh gcc-3.2-7.1.src.rpm
    error: gcc-3.2-7.1.src.rpm: MD5 digest: BAD Expected(c0926b6dbf5c21e64494c3756ac
    33769) != (6fd69310a2a211ddadcfab06924b2980)
    error: gcc-3.2-7.1.src.rpm cannot be installed
    bash-2.05b$ rpm --nodigest -ivh gcc-3.2-7.1.src.rpm
    warning: user hjl does not exist - using root
    warning: group users does not exist - using root
    ...
    warning: user hjl does not exist - using root
    warning: group users does not exist - using root
    1:gcc ########################################### [100%]
    Segmentation fault (core dumped)
    Does anybody have the resulting gcc-3.2-7.1.tar.bz2 that I can just download?

    Thanks again.

  11. #11
    Join Date
    Dec 2003
    Posts
    9
    Unfortunately I don't have a way to post the 40+ MB bz2 file. I was however able to create it myself under cygwin. I'm not sure what problem you're running into, but here's some output from my copies of the files so you can check what you've downloaded.

    RPM VERSION

    C:\Temp\tivocompile\test>rpm
    RPM version 4.1

    MD5 OF DOWNLOADED RPM

    C:\Temp\tivocompile\test>md5sum gcc-3.2-7.1.src.rpm
    75b4f481e1ee55332f381a6fd0bac0ed *gcc-3.2-7.1.src.rpm

    RPM SIGNATURE CHECKS

    C:\Temp\tivocompile\test>rpm -K -v gcc-3.2-7.1.src.rpm
    gcc-3.2-7.1.src.rpm:
    Header SHA1 digest: OK (f2e25d8b76104b79c8fd74eeb4ddf095250e33c4)
    MD5 digest: OK (c0926b6dbf5c21e64494c3756ac33769)

    FILE SIZE
    12/05/2003 05:26 PM 20,807,996 gcc-3.2-7.1.src.rpm


    ACTUAL RPM INSTALL

    C:\Temp\tivocompile\test>rpm -ivh gcc-3.2-7.1.src.rpm
    warning: user hjl does not exist - using root
    <... removed lots of redudant copies of this error message ...>
    warning: user hjl does not exist - using root
    1:gcc ########################################### [100%]

    I don't actually have my cross-compiler working yet, my build fails during testing of the compiled cross-compiler (ld.so.1 can't be loaded during linking of some test program), I haven't spent enough time to dig into the details yet...

  12. #12
    Join Date
    Jul 2003
    Posts
    35

    Updated script

    I updated the script to the newest binutils, gcc, gdb. Seems to work fine on simple tests. Installing is much simplified since there is no need to extract gcc-3.2-7.1 under linux.

    BTW, there is an example of how to use http_proxy env variable as well.

    Enjoy.

  13. #13
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    Thanks, tmesis. Your new script is working so far for me; it downloaded all the files, and it is now building.

    Thanks!

  14. #14
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    I encountered a problem with getting usr.local.mips-tivo.tar.bz2. I ended up with a 15K file called usr.local.mips-tivoltar.bz2@use_mirror=unc, which was an HTML file.

    I replace it with the next-level link, http://unc.dl.sourceforge.net/source...-tivo.tar.bz2, and it is now downloading.

  15. #15
    Join Date
    Dec 2003
    Location
    Gloucester, MA
    Posts
    30
    Next problem:

    On line 36, you get gcc-3.3.2.tar.gz.

    On line 124, you are trying to extract gcc-3.3.2.targ.bz2 via bzip2: 'tar xjf gcc-$GCC_VER.tar.bz2'

    I replaced it with 'tar xfz gcc-$GCC_VER.tar.gz' and it seems to work. Starting again...

Posting Permissions

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