View previous topic :: View next topic |
Author |
Message |
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Thu Oct 26, 2006 11:26 am Post subject: |
|
|
are there any adapters out there that let you write to a ps2 mem card from a computer? _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Thu Oct 26, 2006 3:22 pm Post subject: |
|
|
i can contribute info on the ActionReplay method for the wiki as it quite easy actually _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Thu Oct 26, 2006 3:30 pm Post subject: |
|
|
I'd appreciate that but don't go into too much detail. I'm trying to keep the focus on Linux and away from piracy. There's plenty of specific info around the net. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Thu Oct 26, 2006 7:56 pm Post subject: |
|
|
do you have ebuilds for a cross-compiler yet... or the starts?
EDIT: or are you using crossdev: "crossdev -s4 -t ee-ps2-linux-uclibc" _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 4:27 am Post subject: |
|
|
Okay since you're all desperate to get your hands on this stuff, I've put the stuff that's ready into SVN.
Code: | svn co svn://gps2.aura-online.co.uk/gentoo-ps2 |
Within that is the ps2-overlay folder. I highly recommend that you do not add this overlay to your make.conf. You can add it to your PS2's make.conf when you get to that stage though so you won't always have to specify it on the command line. The distfiles are not to be commited to SVN but can be found in http://gps2.aura-online.co.uk/distfiles. Since the toolchain eclasses often generate their own SRC_URI values, instead of me adding that URL to the toolchain ebuilds, you will need to add http://gps2.aura-online.co.uk to GENTOO_MIRRORS in your make.conf. Please add it as the last value.
As rmh3093 has noticed, crossdev already includes PS2 support but this isn't for Linux. I'm not sure how SpanKY wants to handle this in the long run but for now, you will need to add the following line to /usr/sbin/crossdev under where it says "### linux targets ###" and before the mips* entry.
Code: | mipsEE*) TARCH=mips; KPKG="ps2-headers"; GVER="3.0.4"; BVER="2.14-r1";; |
Once you've done that, you're ready to run crossdev. You may need to select gcc 3 as your compiler first though because gcc 4 seems to have trouble building gcc 3.0.4. Use gcc-config to change your current compiler.
Code: | PORTDIR_OVERLAY="/usr/local/portage /path/to/gentoo-ps2/ps2-overlay" crossdev -s2 -t mipsEEel-scei-linux-uclibc |
It is very important that you add /usr/local/portage first when specifying PORTDIR_OVERLAY because crossdev will create files in this folder and you don't want to mess up your SVN checkout. You can only go as far as stage 2 for now because I haven't added uclibc yet. Stage 2 isn't enough to build a base system with but it is enough to build a kernel so once you've done that, add the following to /etc/portage/package.keywords.
Code: | sys-kernel/ps2-sources mips ~mips |
You can then emerge ps2-sources like so.
Code: | PORTDIR_OVERLAY="/path/to/gentoo-ps2/ps2-overlay" emerge ps2-sources |
Remember that this is a 2.4 kernel. You can configure and build it like so. The resulting vmlinux file can be stripped (which makes it much smaller) but do this on a copy because sometimes the kernel symbols need to be read when building modules.
Code: | make ARCH=mips menuconfig
make ARCH=mips dep
make ARCH=mips
make ARCH=mips modules
make ARCH=mips modules_install
mipsEEel-scei-linux-uclibc-strip -o vmlinux.strip vmlinux |
Have fun! |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 4:40 am Post subject: |
|
|
Oh yeah, I don't think the kernel package includes a useful default configuration. Here's a very minimal configuration for you to start off with. You'll probably want to enable a fair bit more. |
|
Back to top |
|
|
SpanKY Developer
Joined: 18 Apr 2002 Posts: 321 Location: Somerville, MA
|
Posted: Fri Oct 27, 2006 5:03 am Post subject: |
|
|
i want to get things working first and then we fold back into the tree the final solution ... that way we dont waste time adding/removing/changing previous ideas that proved to be unworkable
as for the kernel issue, i too did a diff a while back and found the result completely unwieldy ... any chance someone can find the montavista base code that the ps2 was done against ? that way we could cut out all the montavista noise and focus on the ps2 |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 5:43 am Post subject: |
|
|
I've just had a look around their source site and their FTP servers. I found some interesting stuff but not what we're looking for. What we need might be available in their "developer zone" but you need to buy something to get into that. I'll give them a call tomorrow. It's harder to ignore a phone call. I'll try e-mailing if that doesn't work. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 12:09 pm Post subject: |
|
|
damn, you really have been working your ass off on this project, I didnt realize the CC in crossdev dosent work out of the box..... have you compiled it on an amd64 system though? or are you in a x86 environment? _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 12:27 pm Post subject: |
|
|
I can't take credit for most of it, the patches for both gcc 3.0.4 (what PS2 with Linux uses) and gcc 3.2.2 (what PS2 without Linux uses and what crossdev already supports) were created by very skilled people from the ps2dev.org community. Besides doing what is necessary to tie this in nicely with Gentoo, the only significant stuff I've done is make the framebuffer driver work with kernel 2.4 and a bunch of wrappers to ease the pain of cross compiling in general.
I don't think building it on amd64 will be a problem but I'm on x86 myself. I just found that gcc 4 wouldn't build it because the code isn't strict enough in a few places. I tried to figure it out but it's really not obvious where the problem is.
Regarding the kernel patches, I haven't contacted MontaVista because I have a plan, which I'm working on momentarily. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 1:19 pm Post subject: |
|
|
ahhh yes then gcc4 must be the culprit... I think I am stuck with it though for 64bit _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 1:25 pm Post subject: |
|
|
That shouldn't be a problem unless I'm missing something. We only use the PS2 in 32-bit mode. You can run a 32-bit compiler, can't you? |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 2:36 pm Post subject: |
|
|
can you clear up something im am confused... what ps2-sources is in your distfiles? what is it based on 2.4.17_ps2 from the sony website or is it hacked togther from 2.2? _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 2:45 pm Post subject: |
|
|
It's 2.4.17 from the Sony site with a few patches applied, including my framebuffer patch. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 3:30 pm Post subject: |
|
|
Ah that's interesting! Could be useful for me. What I realised was that none of the PS2-specific files had been touched by MontaVista so I began comparing the trees in various ways and ended up with a diff containing just the PS2-specific files and any changes to files that didn't say "MontaVista" in them anywhere. Unfortunately, it was still pretty big - around 100,000 lines. But I've gone right through it and hastily cut out anything that didn't seem to be PS2-related (there was all sorts in there including Dreamcast stuff!) and got it down to about 53,000 lines. Still pretty big. The problem is that there are a lot of MIPS-specific changes but I'm not sure if they're PS2-specific. They had added support for several other MIPS boards. I might have to see how the earlier kernel differs from Linux/MIPS. I'll probably give it another run through later and then I'll start adjusting the config files to cut out the extra menu options. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 6:04 pm Post subject: |
|
|
actually I found more broken out patches
apply the patches in this order, Delete the Documents folder, delete everying in arch (except mips), delete everything in include except for (-mips -general net scsi video linux), and in arch/mips create folder configs and move defconfig-ps2 into it, delete the other defconfigs, then diff against the ps2-sources from montavista
that strips out a lot of crap
MontaVista: |
+linux-2.4.17
+zboot (http://www.rit.edu/~rmh3093/ps2/patches/zboot-2.4.17.patch)
+preempt_kernel (http://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/preempt-kernel-rml-2.4.17-3.patch)
+preempt_stats (http://www.kernel.org/pub/linux/kernel/people/rml/preempt-stats/v2.4/preempt-stats-rml-2.4.17-2.patch)
+crypto (http://www.rit.edu/~rmh3093/ps2/patches/patch-int-2.4.17.0)
+i2c (http://www.rit.edu/~rmh3093/ps2/patches/i2c-2.4.17.patch)
+lmsensors (http://www.rit.edu/~rmh3093/ps2/patches/lmsensors-2.4.17.patch)
|
_________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Last edited by rmh3093 on Fri Nov 03, 2006 3:43 pm; edited 2 times in total |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 6:47 pm Post subject: |
|
|
im not sure whats going wrong here
Code: | --------------------------------------------------------------------------------------------------------------- * Host Portage ARCH: x86
* Target Portage ARCH: mips
* Target System: mipsEEel-scei-linux-uclibc
* Stage: 2 (kernel headers)
* binutils: binutils-2.14-r1
* gcc: gcc-3.0.4
* headers: ps2-headers-[latest]
* PORTDIR_OVERLAY: /usr/local/xgl-coffee
* PORT_LOGDIR: /var/log/portage
* PKGDIR: /usr/portage/packages/cross/mipsEEel-scei-linux-uclibc
* PORTAGE_TMPDIR: /var/tmp/cross/mipsEEel-scei-linux-uclibc
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ * Using sys-devel/binutils from /usr/local/ps2-overlay instead of /usr/portage
* Using sys-devel/gcc from /usr/local/ps2-overlay instead of /usr/portage
* Using sys-kernel/ps2-headers from /usr/local/ps2-overlay instead of /usr/portage
* Forcing the latest versions of binutils-config/gcc-config ... [ !! ] |
EDIT: emerge -C eselect-compiler && emerge gcc-config
that fixed my issue _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Fri Oct 27, 2006 7:13 pm Post subject: |
|
|
Was gonna say it doesn't look quite right but I didn't see the binutils message over on the right so that's okay. Though it also says it's using /usr/local/xgl-coffee as your overlay directory, which you probably don't want. You should really run it exactly as I said above...
Code: | PORTDIR_OVERLAY="/usr/local/portage /path/to/gentoo-ps2/ps2-overlay" crossdev -s2 -t mipsEEel-scei-linux-uclibc |
|
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Fri Oct 27, 2006 8:14 pm Post subject: |
|
|
i think crossdev displays only the first entry in portdir_overlay because it found the needed packages in ps2-overlay, it finally started to compile ok _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Sat Oct 28, 2006 3:12 am Post subject: |
|
|
i got the toolchain compiled but i get this error trying to compile the kernel
Code: | mipsEEel-scei-linux-uclibc-gcc -I /usr/src/linux-2.4.17-ps2/include/asm/gcc -D__KERNEL__ -I/usr/src/linux-2.4.17-ps2/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -march=r5900 -pipe -c -o init/main.o init/main.c
as: unrecognized option `-G'
make: *** [init/main.o] Error 2
|
_________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Chewi Developer
Joined: 01 Sep 2003 Posts: 886 Location: Edinburgh, Scotland
|
Posted: Sat Oct 28, 2006 3:28 am Post subject: |
|
|
That's strange, I had that problem but I fixed it by adding this to the gcc ebuild.
Code: | EXTRA_ECONF="--with-ld=/usr/bin/${CTARGET}-ld --with-as=/usr/bin/${CTARGET}-as" |
That shouldn't normally be necessary but I found that gcc 3.0.4 has needed it since Gentoo started putting their cross binutils binaries in /usr/${CHOST}/${CTARGET}/binutils-bin instead of /usr/${CTARGET}/binutils-bin. Maybe SpanKY can comment on this? rmh3093, does /usr/bin/mipsEEel-scei-linux-uclibc-as exist for you? If not, try running binutils-config to activate the mipEEel-scei-linux-uclibc profile. Now I think about it, I probably should have pointed the ebuild to /usr/libexec/gcc/${CTARGET} instead of /usr/bin. I can't point it to /usr/${CHOST}/${CTARGET}/binutils-bin because that would involve hardcoding the binutils version. I may make the change to prevent this from happening again. Let me know what happens.
EDIT: Thinking about it some more, pointing to /usr/libexec/gcc/${CTARGET} probably wouldn't fix it either. Am I doing this wrong or do people simply have to run binutils-config for it to work? |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Sat Oct 28, 2006 3:51 am Post subject: |
|
|
i had to compile the toolchain in a 32bit chroot as packages then returned to my main system and emerged the packages.... but anyway I only have mipsEEel-scei-linux-uclibc-cpp mipsEEel-scei-linux-uclibc-gcc, no -as _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Sat Oct 28, 2006 4:02 am Post subject: |
|
|
Code: | ~ # ls /usr/bin/mipsEEel-scei-linux-uclibc-* -ls
0 lrwxrwxrwx 1 root root 53 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-addr2line -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/addr2line
0 lrwxrwxrwx 1 root root 46 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-ar -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/ar
0 lrwxrwxrwx 1 root root 46 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-as -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/as
0 lrwxrwxrwx 1 root root 51 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-c++filt -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/c++filt
12 -rwxr-xr-x 1 root root 11280 Oct 27 21:51 /usr/bin/mipsEEel-scei-linux-uclibc-cpp
12 -rwxr-xr-x 1 root root 11280 Oct 27 21:51 /usr/bin/mipsEEel-scei-linux-uclibc-gcc
0 lrwxrwxrwx 1 root root 46 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-ld -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/ld
0 lrwxrwxrwx 1 root root 46 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-nm -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/nm
0 lrwxrwxrwx 1 root root 51 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-objcopy -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/objcopy
0 lrwxrwxrwx 1 root root 51 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-objdump -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/objdump
0 lrwxrwxrwx 1 root root 50 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-ranlib -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/ranlib
0 lrwxrwxrwx 1 root root 51 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-readelf -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/readelf
0 lrwxrwxrwx 1 root root 48 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-size -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/size
0 lrwxrwxrwx 1 root root 51 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-strings -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/strings
0 lrwxrwxrwx 1 root root 49 Oct 27 16:23 /usr/bin/mipsEEel-scei-linux-uclibc-strip -> /usr/libexec/gcc/mipsEEel-scei-linux-uclibc/strip
|
_________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
|