Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on Alternative Architectures
  • Search

PlayStation 2 - Major progress, help me finish!

Post here for other supported architectures, or if you are interested in porting Gentoo to a currently unsupported architecture.
Post Reply
Advanced search
286 posts
  • Page 6 of 12
    • Jump to page:
  • Previous
  • 1
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • …
  • 12
  • Next
Author
Message
rmh3093
Advocate
Advocate
User avatar
Posts: 2138
Joined: Wed Aug 06, 2003 10:36 pm
Location: Albany, NY

  • Quote

Post by rmh3093 » Thu Nov 02, 2006 7:41 pm

hows that goin?
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Fri Nov 03, 2006 3:10 am

Sorry, been busy with work.

http://www.linux-mips.org/pub/linux/mip ... .17.tar.gz
http://www.aura-online.co.uk/~chewi/ps2-kernel-1.patch
http://www.aura-online.co.uk/~chewi/ps2-patch-config

Download the MIPS kernel from the first URL. Apply the patch from the second URL. Copy the config from the third URL.

Code: Select all

make oldconfig
make dep
make
You should get the same results I did. There are still a few non-PS2 bits in the patch because when I was stripping down the patch, it wasn't easy to remove non-PS2 bits that appeared very close to PS2-specific bits. These non-PS2 bits should be safe to ignore for now though because they are generally only used when their respective configuration options are enabled. The errors that occur are probably either due to me being a little over-zealous with the stripping in some places and not zealous enough in other places. They may also be down to the fact that the PS2-specific files are making use of things that either don't exist or aren't quite the same. For example, I noticed that the PS2 APA driver tries to access certain properties of the hd_struct structure that simply don't exist in the standard MIPS kernel. You will probably need to consult the standard MIPS kernel, the PS2-specific kernel and perhaps even the 2.2.26 kernel in order to work some of these problems out.

If you make any progress, let me know so we don't waste time on things that have already been fixed. I will probably get back to this at the weekend.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 04, 2006 4:34 am

"Well fuck me sideways!" is what I just said to my friend. :lol: You're not gonna believe this. I've just spent a mere two hours on this and not only did I manage to get the kernel to build but it booted perfectly FIRST TIME. 8O I'm starting to scare myself. Without further ado, here is the latest patch...

http://www.aura-online.co.uk/~chewi/ps2-kernel-2.patch

It still needs a bit of work. I notice there's still some rather nasty compiler warnings in irq.c. I need to trim the patch a bit more because there's still some extra fat in there. Obviously USB support is very important so I need to get that working again but I think I'll try patching this against a later kernel version first because I suspect that the USB code in the later kernels might be easier to work with. I would continue working on this now but it's 4:30am. :P
Top
sh0
n00b
n00b
User avatar
Posts: 5
Joined: Sat Nov 04, 2006 3:23 pm
Location: Germany
Contact:
Contact sh0
Website

  • Quote

Post by sh0 » Sat Nov 04, 2006 3:28 pm

Great work chewi!

Are you going to release a whole gentoo-ps2 overlay (with uclibc etc.) ?

Would be nice to reactivate my old PS2 with Gentoo 8)

I tried this many years ago but none seems to be interested about a PS2 Gentoo
at the PS2 Linux Comunity...
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 04, 2006 3:35 pm

sh0 wrote:Are you going to release a whole gentoo-ps2 overlay (with uclibc etc.) ?
Of course, that's why I set up the wiki and repository. :) I'm working on the kernel patch right now.

You appear to be a new forum member. Out of interest, where did you hear about this?
Top
sh0
n00b
n00b
User avatar
Posts: 5
Joined: Sat Nov 04, 2006 3:23 pm
Location: Germany
Contact:
Contact sh0
Website

  • Quote

Post by sh0 » Sat Nov 04, 2006 3:44 pm

I searched the Forum because I just wanted to know (once again) if there is somebody
who is still interested in PS2 Linux ...

Thats where I found this thread. Iam using Gentoo for a long time now but wasn't much active at the
forums, so my account was droped and I'am back to a 0 poster ...
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 04, 2006 5:38 pm

It's okay, I believe you're not a n00b. :wink:

New, slightly leaner patch. Tested and working! http://www.aura-online.co.uk/~chewi/ps2-kernel-3.patch
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 04, 2006 7:12 pm

And again. About 1200 lines less. Failed to boot on one occasion but I knew why straight away. Gonna take a break for a bit.
http://www.aura-online.co.uk/~chewi/ps2-kernel-4.patch
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 04, 2006 11:08 pm

Hmm need to backtrack a little bit. The PS2 kernel uses its own functions for manipulating the registers. I didn't think this was PS2-specific stuff but I now realise it is. It makes things quite a bit more messy than they would overwise need to be but oh well. At least it's easy to change the normal syntax to the PS2-specific syntax.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sun Nov 05, 2006 5:28 pm

Okay so #4 was really a dud. I think the reason why it worked at all was because I had accidentally removed the "R5900 specific context" option. I assume that option enables R5900 specific optimisations. Adding this option again caused the build to fail. I had also accidentally removed "fast test and set" support. Anyway, both these options are now present and working. :)

http://www.aura-online.co.uk/~chewi/ps2-kernel-5.patch
http://www.aura-online.co.uk/~chewi/ps2-patch-config

If you downloaded the config file before, download it again because it has changed.
Top
sh0
n00b
n00b
User avatar
Posts: 5
Joined: Sat Nov 04, 2006 3:23 pm
Location: Germany
Contact:
Contact sh0
Website

  • Quote

Post by sh0 » Sun Nov 05, 2006 7:17 pm

Sweet,
but it looks like you striped a bit too much from the USB section:

I tried to copy some files from the 2.4.17_ps2 kernel:

Code: Select all

4326  usb-ohci-nonpci.c
12051 usb-ohci-pci.c
1193  usb-ohci-ps2.c
2211  usb-ohci-sa1111.c
70437 usb-ohci.c
17941 usb-ohci.h
Tried to compile with this config options:

Code: Select all

CONFIG_USB=y
CONFIG_USB_OHCI=y
CONFIG_USB_NON_PCI_OHCI=y
CONFIG_USB_OHCI_PS2=y
Results in some warnings but it compiled 8)

Here is a diff based on your latest (5) patch http://devel.sh0.org/usb-ps2-kernel-5.patch
I hope this might help a bit fixing the USB issue...
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sun Nov 05, 2006 8:06 pm

Yeah I know that including all that would fix it but that's probably more than we actually need. I want to keep the patch small for easy maintenance. If I can't figure it out, then yeah, I'll just include it all. Haven't tried yet, just trying to trim the rest of it first. Thanks though. :)
Top
sh0
n00b
n00b
User avatar
Posts: 5
Joined: Sat Nov 04, 2006 3:23 pm
Location: Germany
Contact:
Contact sh0
Website

  • Quote

Post by sh0 » Sun Nov 05, 2006 8:29 pm

OKies,
I could trim it a bit more if you like to.

Wouldn't it be easyer to seperate the patches ?

10-ps2-usb.patch
20-ps2-mcfs.patch
etc.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sun Nov 05, 2006 8:35 pm

I really appreciate the offer but working on this collaboratively is tricky. I haven't got that much more to do anyway.

I don't think separating the patches is really necessary since no one is going to want to apply just some of them. A lot of the code is shared as well so the individual patches wouldn't work in isolation.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sun Nov 05, 2006 10:25 pm

New one. Nearly finished trimming it now! http://www.aura-online.co.uk/~chewi/ps2-kernel-6.patch

From now on, you need to explicity include the CROSS_COMPILE value. This is the norm when cross-compiling a kernel. Don't forget the trailing dash.

Code: Select all

make CROSS_COMPILE=mipsEEel-scei-linux-uclibc-
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Mon Nov 06, 2006 10:24 am

Finished trimming it! More or less anyway. :wink: http://www.aura-online.co.uk/~chewi/ps2-kernel-7.patch

I've got to get back to some real work but the plan now is to try and patch against a later 2.4 and then to get USB and APA working again. I was thinking about which 2.4 I should aim for. I guess I may as well go for gold and try 2.4.33.3. If that proves too difficult, I'll try something a little earlier.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Tue Nov 07, 2006 3:12 am

I've fixed up the patch against 2.4.33.3 and I'm now trying to build it. It gets very far but then the assembler trips over and starts spouting this crap.

Code: Select all

mipsEEel-scei-linux-uclibc-gcc -D__KERNEL__ -I/usr/src/linux-2.4.33.3.test/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /usr/src/linux-2.4.33.3.test/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  -finline-limit=100000 -march=r5900  -c int-handler.S -o int-handler.o
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h: Assembler messages:
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:187: Error: unrecognized opcode `__asm__('
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:188: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:189: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:190: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:191: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:192: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:193: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:194: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:195: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:196: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:197: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:198: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:199: Warning: rest of line ignored; first ignored character is `"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:199: Error: unrecognized opcode `_ssnop'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:199: Error: unrecognized opcode `_ssnop                              \n\t"'
/usr/src/linux-2.4.33.3.test/include/asm/hazards.h:200: Warning: rest of line ignored; first ignored character is `"'
...and so on. I did see this happen once before with 2.4.17. Removing an unneeded #include seemed to fix it but I'm not having the same luck this time. It would suggest some kind of syntax error somewhere but I don't think there is one. I'm thinking that perhaps I need a later binutils version than 2.14. Maybe it's time to give garlicbread's patch a try!
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Tue Nov 07, 2006 11:08 am

Hmm something's up with the binutils patch. The assembler is broken.

Code: Select all

GNU assembler version 2.16.1 (mipsEEel-scei-linux-uclibc) using BFD version 2.16.1
Assembler messages:
Error: internal: bad mips opcode (bits 0x7c0 undefined): dextm t,r,+A,+G
Error: internal: bad mips opcode (bits 0xffc0 undefined): dextu t,r,+E,+H
Error: internal: bad mips opcode (bits 0xffc0 undefined): dinsm t,r,+A,+F
Error: internal: bad mips opcode (bits 0xffc0 undefined): dinsu t,r,+E,+F
Fatal error: Broken assembler.  No assembly attempted.
I'll either have to figure that out, which could be hard, or I'll have to find another way around the kernel problem. I was going to take a look at the binutils patch anyway so that it can be safely applied universally across MIPS.
Top
rmh3093
Advocate
Advocate
User avatar
Posts: 2138
Joined: Wed Aug 06, 2003 10:36 pm
Location: Albany, NY

  • Quote

Post by rmh3093 » Tue Nov 07, 2006 1:50 pm

cd /usr/src/linux-ps2
echo 'mips' > .hhl_target_cpu
echo 'mipsEEel-scei-linux-uclibc-' > .hhl_cross_compile
make

:)
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Tue Nov 07, 2006 1:57 pm

Eh? If you're referring to having to set CROSS_COMPILE all the time, I did that because that's how the standard kernel does is. Those .hhl files were a MontaVista thing.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Wed Nov 08, 2006 3:36 am

Well I sort of fixed binutils by removing some lines from mips-opc.c but the assembler appears to be even more broken.

Code: Select all

mipsEEel-scei-linux-uclibc-gcc -D__KERNEL__ -I/usr/src/linux-2.4.33.3.test/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I /usr/src/linux-2.4.33.3.test/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  -finline-limit=100000 -march=r5900   -nostdinc -iwithprefix include -DKBUILD_BASENAME=ps2dev  -c -o ps2dev.o ps2dev.c
ps2dev.c: In function `ps2dev_init':
ps2dev.c:1063: warning: unused variable `gs_revision'
{standard input}: Assembler messages:
{standard input}:1214: Error: opcode not supported on this processor: mips3 (mips3) `pextlw $8,$7,$6'
{standard input}:1759: Error: opcode not supported on this processor: mips3 (mips3) `pextlw $8,$5,$4'
The binutils patch needs some serious work, I'm afraid.
Top
rmh3093
Advocate
Advocate
User avatar
Posts: 2138
Joined: Wed Aug 06, 2003 10:36 pm
Location: Albany, NY

  • Quote

Post by rmh3093 » Fri Nov 10, 2006 3:20 pm

Chewi wrote:Eh? If you're referring to having to set CROSS_COMPILE all the time, I did that because that's how the standard kernel does is. Those .hhl files were a MontaVista thing.
oh.... yeah i didnt remember ever seeing those.... why dont your just hardcode the ARCH and CROSSCOMPILER into the make file, just put that in a broken out patch or something


PS: class is over in a week and then I will finally get to start playing with this
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Fri Nov 10, 2006 3:34 pm

I have hardcoded ARCH but not CROSS_COMPILE in case someone wants to use a different CHOST. I guess I could set a default value instead.

If anyone can figure what's wrong with binutils, I'd be very grateful. I haven't managed to figure it out yet though I've been very busy with work.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 11, 2006 3:38 am

I managed to fix the first problem again without removing lines from mips-opc.c. Instead, I changed all the + characters to *. The second problem is still present though. It seems my initial assumption about these problems being related was wrong.
Top
Chewi
Developer
Developer
User avatar
Posts: 890
Joined: Mon Sep 01, 2003 4:29 pm
Location: Edinburgh, Scotland
Contact:
Contact Chewi
Website

  • Quote

Post by Chewi » Sat Nov 11, 2006 4:24 am

Okay, there's some good news and some bad news. The good news is that I managed to fix binutils 2.16.1. I'm very pleased about that! The bad news is that the kernel compilation still trips up in the same place that the older binutils did. Damn. I guess it wasn't due to binutils being too old after all. I'll put the new binutils ebuild into the overlay tomorrow... or today since it's like 4:25am. :P
Top
Post Reply

286 posts
  • Page 6 of 12
    • Jump to page:
  • Previous
  • 1
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • …
  • 12
  • Next

Return to “Gentoo on Alternative Architectures”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic