The above video goes away if you are a member and logged in, so log in now!
While Mega Man don't sharing his secrets of toolchain, i have a luck to compile this toolchain - i found suitable glibc! But i was necessary to neglect by two assertions in binutils...
At all that is it what i got:
headers from kernel-18.104.22.168 (what has "stolen" from another mipsel-toolchain)
glibc-2.11.1-1 from Fedora12 mips64 (Index of /Fedora-12-RPMS-MIPS/Packages)
gcc-4.2.0 (maybe and 4.3.0, i tried to compile only 4.2.0) with languages c and c++.
It has compiled for target "mips64r5900el-unknown-linux-gnu" with shared libraries and c++!
Ok, compiling of "Hello,World!" - success! But then i launch it on ps2linux, system didn't see file and it wrote "No such file or dir." - that's ok and so it should be.
Compiling kernel-22.214.171.124 from not-complete Mega Man's kernel for ubuntu toolchain... there is an error from cc1 that it don't know some command line option -mno-llsc
Compiling by this toolchain, that constructed by such way, of any new glibc with ports... well, it didn't compile. Also i try to compile tar-1.22 - it didn't compile too. Bad headers. I wonder whence headers in general undertake?! Maybe someone will tell me?
And AGAIN Mega Man will tell me that this work is useless! And from one hand he wiil be right...
Ok, i recompiled gcc-4.2.0 with all patches as it wrote in build.sh.
And even now there is no option -mno-llsc.
I tried to add these lines by own hands from link that you has given me before. Some functions cannot be fixed because they doesn't exist!.. but i found that looks like this patch already applied in gcc-4.3.0
And gcc-4.3.0 don't compiling.
Is there a way to apply this patch to gcc-4.2.0?..
I has compiled vmlinux and (simple)initrd again. I understood that "CVS" it is the repository where instruction for compiling kernel-126.96.36.199-mipsel-ps2 is placed.
I'm also understood why you third time advising me toolchain from CVS. Just, it is unusually installing toolchain with apt-get install) What where has installed?)
But i want to compile mips64r5900el toolchain and i still need headers and includes from this kernel-188.8.131.52. After i compiled vmlinux, maybe they are placed somewhere? Some command to enter? make headers_install installing only headers (i don't know how to explain in Eng. Better enter it please and see)
After compiling the kernel, mips64r5900el toolchain will be useful for cross-compiling. Am i right?)
There is no way to compile mips64r5900el-toolchain for non-programmer.
gcc-4.2.0 may be compiled, but there is no option -mno-llsc in cc1 (maybe some another need options is absent too). We can cross-compiling with it only packages, that do not need option -mno-llsc (for example gmp and mpfr). And kernel compiling NEED this option. Someone need to create patch with adding such option.
gcc-4.3.0 cannot be compiled because the links search libs in /lib (and perhaps includes in /usr/include). Specially cross-compiled libtool doesn't give an effect. Someone need to fix they to search in /$prefix/$target/lib (and for includes to search in /$prefix/$target/include and /$prefix/$target/sys-include)
And because Mega Man won't edit this toolchain, i think someone is no one.
Last edited by archicharmer; 12-18-2010 at 11:13 AM.
The "-mno-llsc" patch should be applied to the GCC since years. So you don't need to apply the patch. The error message will appear if you use an old GCC 3.
I uploaded the test files to Kernelloader - Browse /Linux 2.6/Linux 2.6 Test Files Version 1 at SourceForge.net. There you can see, it is working.
Using mips64r5900el is a bad idea, because the length of an address pointer is 32 bit on the EE and not 64 bit. There is no program which is written for this configuration.
I think Chewi was working at mips64r5900el with Gentoo running on the PS2. This is more difficult than my Debian/Ubuntu cross compiling. I prepared it for cross compiling, but it wasn't able to compile it completely. I switched to Ubuntu/Debian because this is already prepared for cross compiling. The old GCC running on the PS2 is also not able to compile a GCC 4.
If you compile user space programs for 32 bit ABI on Linux 2.6, you can use every mipsel cross compiler. This should work with the Linux 2.6 kernel above, but currently you have many limitations (e.g. you can't use the keyboard or store anything).
Which GCC we should compiling for PS2? And how?
Originally Posted by Mega Man
Ok, need testing before a falls of questions!)
I think it should be possible to install Debian 5.0 mipsel in the emulator qemu. Then you have a fully working build system.
No, i can't install any mipsel destribution (even simple, special for qemu) on qemu if it Linux version or for Windows:
in the process, then i launch qemu for installing lenny-or-etch-mipsel by the line:
qemu-system-mipsel -M mips -kernel vmlinux-2.6.18-6-qemu -initrd initrd.gz -hda hda.img -append "root=/dev/ram console=ttyS0"
- opening window with QEMU and nothing happens. No errors but nothing happens.
I installed qemu-manager at windows and there i create such of vmware. Totally line above has changed to:
qemu-system-mipsel -M mips ........ -hda hda.img -boot order=c
(if here add -append "any parameters, even " " " - it not loads. Symptoms as above)
It boot, but i can not see any symbols on the screen. Load, load, and it stops on screen with language choosing (i can't see symbols on it too, but i know that it is). And here system has no reaction on my "Enters" or another buttons.
Changing, changing options - no effect, tried v.0.11.0 - no effect.
Write one more time, situations same on vmware-linux, windows and another PC's windows.
Last edited by archicharmer; 01-01-2011 at 10:35 AM.
I downloaded the files from: Index of /debian/dists/lenny/main/installer-mipsel/current/images/malta/netboot
and used the following command:
It seems to work, but I didn't installed it. You need to add the hard disc parameter. I am not sure if this installs the correct machine. Please post the result of the command "gcc -dumpmachine". We need "mipsel" without 32, 64 or 4kc.
qemu-system-mipsel -M malta -nographic -serial stdio -kernel vmlinux-2.6.26-2-4kc-malta -initrd initrd.gz -append "root=/dev/ram console=ttyS0"
You can quit the emulator with "CTRL + a" and then "x".
Thanks for direct link and correct line) I like it when it all ready for work)
I successfully installed this in vmware-linux's qemu, but there is no gcc (and binaries from binutils too).
Will this line satisfied you? -
2.6.26-2-4kc-malta #1 Sun Nov 11:02:24 UTC 2010 mips GNU/Linux
I was able to fix the USB problems in Linux 2.6. The debian mipsel uses some unsupported instructions on purpose. I fixed what I found. The following works with the initrd above:
Linux 2.6 Test Files Version 2/
The network of the PS2 is not yet supported. So network installation is not working.
You can run the following commands in qemu to get a Linux installation:
The last line copies the installation files to your real linux host into your home directory. You need to have the SSH server running on your Linux. You need to replace username and your-real-linux-host-ip.
sudo apt-get install debootstrap*
sudo debootstrap lenny chroot-debian-lenny
tar -czf ps2-debian-lenny.tgz
scp ps2-debian-lenny.tgz username@your-real-linux-host-ip:~
You can format USB disk with ext2 and copy the files on it, e.g:
My old initrd should be able to start it:
sudo mkfs.ext2 /dev/sda1
sudo mkdir -p /mnt/sda1
sudo mount /dev/sda1 /mnt/sda1
sudo tar -xzf ps2-debian-lenny.tgz -C /mnt/sda1/
sudo umount /mnt/sda1
RAM Disc/Initrd for booting from USB memory stick/
You need to add the kernel parameter:
Note: I didn't tested this, but it should work.
Note: I don't know if USB is running stable on slim PSTwo.