xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Offers: days binary retention, 99%+ Completion, and Unlimited Access!
Try Giganews' no obligation free trial!

Support this site - buy the X-Scene Tshirt $17.95


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Quick Cygwin+opendevkits Reinstallation Method
openxdkman
post Nov 2 2006, 09:35 AM
Post #1


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



Quick cygwin+opendevkits reinstallation method

The following method should reduce resintallation time from 1 day to 30mn

(Skip this step if you have already a working cygwin configuration)
1) Install cygwin
-Install full cygwin correctly (to c:/cygwin and c:/cygwin_downloads)
-Install open development kits you need (ps2dev, pspdev, openxdk, etc...)
(Takes a full long day, belgium repository is good)

2) Create cygwin_setup1.reg and cygwin_setup2.reg by exporting two registry keys
- star->execute "regedit"
- Select "HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions", right click->export
- Select "HKEY_CURRENT_USER\Software\Cygnus Solutions", right click->export

2) Burn a DVD-R or DVD+R with Nero (UDF format)
Current full version of cygwin plus downloaded files plus opendevkits just fits in 4.5 Gb!

...later (when you need to reinstall cygwin+opendevkits on a new computer)...

3) Double click .reg files
- double click cygwin_setup1.reg
- double click cygwin_setup2.reg

4) Copy quickly cygwin directory to c:\cygwin
(Here I've got a BIG problem. With my old dvd-drive, it could have taken WEEKS
because motor starts & stops at each file copy. Not sure if it's a common behaviour...)
Workaround :
- Install Alcohol 120% (creates a new virtual drive)
- Create a 4.5Gb mdf DVD image on local hard disk (must be NTFS to allow files larger than 4Gb)
- Mount mdf image in virtual drive
- Copy cygwin to directory from virtual drive to c:\cygwin (now it's very fast!)
(I guess, next time, I won't burn downloaded files, and I will burn the mdf image and alcohol 120%)

5) Recover a valid account in cygwin
- start cygwin.bat
- "mkpasswd -l >/etc/passwd"
- "mkgroup -l >/etc/group"
- close cygwin console window
- restart cygwin.bat

6) Fix the odd ].exe filename (I wonder what this thing is for...)
- rename cygwin\bin\_.exe into cygwin\bin\].exe

...Now you will discover many symbolic links no longer work...
(I'm pretty sure an automatic program can be designed to fix all symbolic links)

7) Repair man
Symbolic links can be repaired with this command :
"ln -f (force overwrite) -s (symbolic link) -T <target> <linkfilename>"
(to know what is target, rename existing bad linkfile as linkfile.txt and read it)
- "ln -f -s -T /usr/bin/gzip.exe /usr/bin/gunzip"

8) Repair make (for openxdk open dev kit)
(you can copy command here, right click cygwin console window top and click modify->paste)
- "ln -f -s -T /usr/lib/gcc/i686-pc-cygwin/3.4.4/cc1.exe /usr/bin/cc1" (couldn't find link to fix, so I added this one)
- "ln -f -s -T /usr/bin/ld /usr/i686-pc-cygwin/bin/ld.exe"

I didn't need any repair for ps2dev

Feel free to post comments in order to improve the method
Thanks

This post has been edited by openxdkman: Nov 2 2006, 09:37 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Dec 11 2006, 09:48 AM
Post #2


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



9)Repair as (assembler command, needed to rebuild openxdk library, for example)
"ln -f -s -T /usr/bin/as /usr/i686-pc-cygwin/bin/as.exe"

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
cypherpunk
post Feb 19 2007, 10:19 PM
Post #3


X-S Enthusiast


Group: Members
Posts: 18
Joined: 12-September 02
Member No.: 3729



QUOTE(openxdkman @ Nov 2 2006, 08:42 AM) *

6) Fix the odd ].exe filename (I wonder what this thing is for...)
- rename cygwin\bin\_.exe into cygwin\bin\].exe


Probably you're referring to "[.exe" , not "].exe", right? [ is an alias for test, so that in shell scripts you do

if [ -e somefile ]; then
...
fi

The [ is actually running [.exe and is synonymous with:

if test -e somefile; then
...
fi

QUOTE

...Now you will discover many symbolic links no longer work...
(I'm pretty sure an automatic program can be designed to fix all symbolic links)


Cygwin creates windows shortcut files (.lnk) for every symlink. These .lnk files have hard-coded paths in them, so if you initially install to C:\cygwin, then restore to a different path (e.g. D:\cygwin) all your .lnk files will point to non-existant paths.

I work around this when making cygwin packages to distribute to many developers by doing:

C:\> mkdir c:\cygwin_install
C:\> subst X: c:\cygwin_install

Now install to X:\cygwin, package up X:\cygwin, and anyone that wants to use cygwin just needs to re-create the subst (pointing to any directory with space) and unpack to X:\

-Nathan
(logged in with standard 'cypherpunk' account to avoid hassle of creating one)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Feb 20 2007, 09:48 AM
Post #4


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



Thanks for the "subst" tip.
But my initial installation was c:\cygwin, I reinstalled it in c:\cygwin, and links still stopped working.
So there is something "hidden" that doesn't survive a simple compress, burn, uncompress operation.
So, I doubt the "ln -f -s -T ..." trick can be avoided at all. Fortunately there aren't too many links to fix.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post May 7 2007, 12:36 PM
Post #5


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



10)Repair aclocal, autoconf & automake (needed to rebuild all openxdk from cvs with autogen.sh)
(check below if versions are appropriate for your cygwin version)
"rm /bin/aclocal.lnk"
"ln -f -s -T /bin/aclocal-1.9 /bin/aclocal"
"rm /bin/autoconf.lnk"
"ln -f -s -T /bin/autoconf-2.5x /bin/autoconf"
"rm /bin/automake.lnk"
"ln -f -s -T /bin/automake-1.9 /bin/automake"
"rm /bin/autom4te.lnk"
"ln -f -s -T /bin/autom4te-2.5x /bin/autom4te"
"rm /bin/autoheader.lnk"
"ln -f -s -T /bin/autoheader-2.5x /bin/autoheader"
"rm /bin/gunzip.lnk"
"ln -f -s -T /bin/gzip.exe /usr/bin/gunzip.exe"
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 9th September 2010 - 08:17 AM