Compare Products, Prices & Stores For:

COMPUTERS, COMPONENTS COMPUTER ACCESSORIES, COMPUTER MEMORY, HARDWARE, INPUT DEVICES, NETWORKING, PDAs & MOBILE ELECTRONICS, SOFTWARE, STORAGE & MEDIA, DIGITAL CAMERAS, HOME AUDIO, TV& VIDEO

Google
 
Web DealDatabase.com
What are you shopping for?


Go Back   DealDatabase Forum - Deals, Freebies, and TiVo & DirecTivo Hacking > Category: NEW TiVo, DTiVo, Extraction FORUMS! > Series 2 Support

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-07-2003, 12:29 PM
tmesis's Avatar
tmesis tmesis is offline
Separating compound words
 
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)
Attached Files
File Type: zip build_tivo_x_compiler.zip (3.6 KB, 422 views)

Last edited by tmesis; 09-07-2003 at 12:45 PM.
Reply With Quote
  #2  
Old 09-28-2003, 03:29 PM
NutKase's Avatar
NutKase NutKase is offline
Diamond Member
 
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
Reply With Quote
  #3  
Old 09-28-2003, 06:24 PM
NutKase's Avatar
NutKase NutKase is offline
Diamond Member
 
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
Reply With Quote
  #4  
Old 09-28-2003, 06:34 PM
mrblack51's Avatar
mrblack51 mrblack51 is offline
Oh captain, my captain
 
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
Reply With Quote
  #5  
Old 09-28-2003, 08:14 PM
NutKase's Avatar
NutKase NutKase is offline
Diamond Member
 
Join Date: Aug 2003
Posts: 2,149
Quote:
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
Reply With Quote
  #6  
Old 12-16-2003, 12:41 PM
InterMurph InterMurph is offline
Charter Member
 
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.
Reply With Quote
  #7  
Old 12-17-2003, 02:28 AM
tmesis's Avatar
tmesis tmesis is offline
Separating compound words
 
Join Date: Jul 2003
Posts: 35
Quote:
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.
Reply With Quote
  #8  
Old 12-17-2003, 12:14 PM
InterMurph InterMurph is offline
Charter Member
 
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.
Reply With Quote
  #9  
Old 12-17-2003, 01:21 PM
InterMurph InterMurph is offline
Charter Member
 
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 01:26 PM.
Reply With Quote
  #10  
Old 12-17-2003, 01:58 PM
InterMurph InterMurph is offline
Charter Member
 
Join Date: Dec 2003
Location: Gloucester, MA
Posts: 30
Now I'm on the second step of the script, which tells me:

Quote:
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:

Quote:
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:

Quote:
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.
Reply With Quote
  #11  
Old 12-17-2003, 11:01 PM
jeffdoering jeffdoering is offline
Member in Training.
 
Join Date: Nov 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...
Reply With Quote
  #12  
Old 12-17-2003, 11:17 PM
tmesis's Avatar
tmesis tmesis is offline
Separating compound words
 
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.
Attached Files
File Type: txt build_tivo_x_compiler.sh.txt (7.8 KB, 249 views)
Reply With Quote
  #13  
Old 12-17-2003, 11:49 PM
InterMurph InterMurph is offline
Charter Member
 
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!
Reply With Quote
  #14  
Old 12-18-2003, 09:54 AM
InterMurph InterMurph is offline
Charter Member
 
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.
Reply With Quote
  #15  
Old 12-18-2003, 11:39 AM
InterMurph InterMurph is offline
Charter Member
 
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...
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2000-2008 © dealdatabase.com.
TiVo® is a registered trademark of TiVo Inc. This site is not affiliated with TiVo Inc.