Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify official Gentoo/MIPS stage3 archive compatibility #16

Closed
frno7 opened this issue Apr 21, 2022 · 35 comments
Closed

Verify official Gentoo/MIPS stage3 archive compatibility #16

frno7 opened this issue Apr 21, 2022 · 35 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@frno7
Copy link
Owner

frno7 commented Apr 21, 2022

I’m happy to say that Gentoo/MIPS lead member Matt Turner applied the -mfix-r5900 GCC option for the R5900 short loop erratum to the Gentoo Catalyst release building tool, which will make official Gentoo/MIPS stage3 downloads compatible with the R5900 and the PlayStation 2.

Verify official Gentoo/MIPS stage3 archives on PlayStation 2 hardware, and with QEMU/R5900, when they become available.

@frno7 frno7 added enhancement New feature or request good first issue Good for newcomers labels Apr 21, 2022
@frno7 frno7 changed the title Verify official Gentoo/MIPS stage3 archive compatibility with the R5900 Verify official Gentoo/MIPS stage3 archive compatibility Apr 21, 2022
@immolo
Copy link

immolo commented Apr 27, 2022

The fixes are now live in the stage3-mipsel3_n32 tarballs from asking in IRC.

Thanks for the work you put into this already and I can't wait to start trying this out on real hardware.

@frno7
Copy link
Owner Author

frno7 commented Apr 27, 2022

@immolo, you’re welcome! At the moment only the o32 ABI is supported. The n32 ABI will hopefully come later.

@immolo
Copy link

immolo commented Apr 27, 2022

I was under the impression the fix in Gentoo was only included in the tarball I highlighted but I'll be back home in a few weeks to test this out and see if I can add anything to the project.

@frno7
Copy link
Owner Author

frno7 commented Apr 27, 2022

The Gentoo Catalyst patch has mipsel3, mipsel3_n32, and mipsel3_multilib. Presumably it covers both o32 and n32. At least I hope so. Gentoo supplies downloads for both o32 and n32 (and n64 which won’t work with the R5900).

@immolo
Copy link

immolo commented Apr 27, 2022

Looking at the mirror list only mipsel2 is available in o32.

If I'm correct I can ask in #gentoo-mips to see what is happening with the build over the weekend.

@immolo
Copy link

immolo commented Apr 28, 2022

@frno7 My workload freed up unexpectedly early this week :)

I just spoke to the dev team and they were unaware of the o32 requirement so we are just waiting on Matt to weight in and should see the builds in the next 24 hours which I'll update here and the wiki with a URL to it.

As an OT point, have you thought about creating an IRC room for this project to hopefully get more people involved? I know at least one other person that uses Linux on the PS2.

@frno7
Copy link
Owner Author

frno7 commented Apr 28, 2022

Thanks, @immolo! :-) I mentioned o32 but it must have been lost. It’ll be interesting to learn how float-point calculations are dealt with in the Gentoo archives. Issue frno7/linux#3 has more about that topic.

I should use IRC more than I do. I think it’s quite good, it’s often popular for projects I like, and it’s independent of proprietary platforms, which is very good. I haven’t yet taken the time to configure a client properly. Some day, some day...

By the way, @AKuHAK told me about Discord for PS2 development, etc. Another thing to try out is Git Hub discussions.

@immolo
Copy link

immolo commented Apr 28, 2022

Well at least I learnt something new about MIPS so it wasn't a waste of time :)

I prefer the sysadmin side more and would be interested to see if MUSL can run one day too, plus FP stuff is way above my skill level :P

Thanks for the discord, I'll check it out later. I'd be happy to sort the chat creation for you as well if you want but if you don't then I'll leave it for now.

@frno7
Copy link
Owner Author

frno7 commented Apr 28, 2022

Musl can run indeed, with significant benefits, see frno7/linux#33 (comment).

@mirh
Copy link

mirh commented Apr 28, 2022

There's already a #ps2linux (or was it #sps2) channel on freenode..

@immolo
Copy link

immolo commented Apr 29, 2022

@frno7 That's great news as any work we do there will benefit the Gentoo MIPS team which they will appreciate.

@immolo
Copy link

immolo commented Apr 29, 2022

@mirh Just checked and it seems like it's dead unfortunately.

@frno7
Copy link
Owner Author

frno7 commented Apr 29, 2022

@immolo, there’s been no response on the Musl patch mentioned in frno7/linux#33 (comment), unfortunately. A reminder is possibly needed.

@immolo
Copy link

immolo commented Apr 29, 2022

@frno7 Once I'm up to speed with it then I'll ask them about it.

In the meantime I can write an ebuild to add the patch for us and see if we can have that merged to portage.

@frno7
Copy link
Owner Author

frno7 commented Apr 29, 2022

Hopefully the Musl people will merge the patch promptly when reminded. I haven’t tested it for a while though. Let us know if it still works with recent Musl, if you’d try it. :-)

@immolo
Copy link

immolo commented Apr 29, 2022

I've heard they aren't the fastest at accepting changes on the grapevine ;)
One of my friends works closely with them though so once I've confirmed the patch for myself I can nudge him to ask about it.

@mirh
Copy link

mirh commented Apr 29, 2022

Sps2 used to average something like 10 users at least a year ago.
I'm afraid the freenode suicide may have killed that too.
Idk if somebody couldn't have take it elsewhere?
@Ravenslofty @GeekLucanis @rhoenie @myrkraverk @neuschaefer

@immolo
Copy link

immolo commented Apr 29, 2022

@mirh I thought the same and checked libre.chat where everyone moved to from freenode but it's not a registered room at the moment.

@frno7 frno7 transferred this issue from frno7/linux May 5, 2022
@immolo
Copy link

immolo commented May 7, 2022

@frno7
Copy link
Owner Author

frno7 commented May 7, 2022

Nice! I did a quick inspection of both mipsel2 and mipsel3 using the r5900check tool. It reported a few problems, but not significantly more than can be expected with having -mfix-r5900 at the moment. As noted in the article on the R5900 short loop erratum, it may be some stray noreorder directives that remain to be fixed in some libraries. Example:

mipsel3 % r5900check lib/libc.so.6
erratum shortloop path lib/libc.so.6
code 000241f8 -3 c222eb44
code 000241fc -2 24010000
code 00024200 -1 e221eb44
code 00024204  0 1020fffc
code 00024208  1 00200825

So it seems there’s a good chance they’ll work.

@immolo
Copy link

immolo commented May 13, 2022

Sources are verified and after checking only the mipsel3 stage contains the fix we need.

This can be closed now.

@frno7
Copy link
Owner Author

frno7 commented May 14, 2022

Sources are verified and after checking only the mipsel3 stage contains the fix we need.

Hasn’t mipsel2 been given the -mfix-r5900 treatment by Gentoo/MIPS? That’d be a pity since the R5900 to my knowledge is designed/supposed to be compatible with the whole range MIPS I, II and III. If someone for whatever reason likes to use mipsel2 with the R5900, why deny them that?

@immolo
Copy link

immolo commented May 14, 2022

In my opinion it goes against the Gentoo way of optimising for your hardware however I can bring this up next time I'm talking to them.

@frno7
Copy link
Owner Author

frno7 commented May 14, 2022

Thanks! Before the -mfix-r5900 option, the R5900 was mutually incompatible with every other MIPS processor in existence. Now that we have the option, it’d be nice if the R5900 could be part of the mipsel2 family too, and not excluded for being nonoptimal. Sometimes people seek the broadest possible hardware compatibility for various projects, and the R5900 has been on the sideline for so many years. :-)

@immolo
Copy link

immolo commented May 16, 2022

I've discussed the mipsel2 stages and got the message that they didn't see a benefit to us or them from adding this.

My suggestion is we leave this now and I'll come back to it after we have working glibc and musl builds so we can lower the barrier of entry to get more people involved to help.

@frno7
Copy link
Owner Author

frno7 commented May 16, 2022

Ah, well... Indeed, the Musl patch would be nice to have in.

@immolo
Copy link

immolo commented May 16, 2022

Ah, well... Indeed, the Musl patch would be nice to have in.

Briefly spoke about that too in passing, we can have that added Gentoo side once I've tested it and that in turn will get it added upstream faster if it hasn't happened before hand.

On a side note has anyone here submitted a ps2 patch for gnuconfig recently? They were going to remove it until I offered to run some tests to see if we still needed it.

@frno7
Copy link
Owner Author

frno7 commented May 16, 2022

On a side note has anyone here submitted a ps2 patch for gnuconfig recently? They were going to remove it until I offered to run some tests to see if we still needed it.

I have no idea what that thing does. :-) Do you have a link to it?

@immolo
Copy link

immolo commented May 16, 2022

I'm stuck on Windows this week so I can't pull the patch up till I get home as I need more privileges than my work laptop allows me. I'll do some tests when I get back and we can see if it's needed or if it's a left over patch from the old Gentoo PS2 days like it sounds like it is.

They did add though that they would welcome any MIPS patches coming back and this was just a query.

@immolo
Copy link

immolo commented May 20, 2022

0001-add-ps2-targets-to-config.sub.patch

Well it's something pre us as it was submitted in 2008 by one of the PS2 Gentoo devs.

@frno7
Copy link
Owner Author

frno7 commented May 20, 2022

Well it's something pre us as it was submitted in 2008 by one of the PS2 Gentoo devs.

Maybe it was something for the PS2SDK? I don’t think it has any effect on the mipsr5900el target used for PlayStation 2 Linux, or the iopmod repo with its mipsr3000el target.

@immolo
Copy link

immolo commented May 20, 2022

Possibly, Sam (One of the lead devs) seems to think it could be more important for us though and as he is rarely wrong I'll play it safe and test it on a live system with and without before it's removed.

I'll update with the Gentoo bugreport once this is complete.

@immolo
Copy link

immolo commented Jun 10, 2022

gnuconfig is used for configure I've found.

I've done some tests though and this is no longer required for us :)

https://bugs.gentoo.org/851045

@immolo
Copy link

immolo commented Jun 7, 2023

This can now be closed as we have had confirmed mipsel support in the Gentoo mipsel3 stage3 for a year now and also confirmed support for mipsel3 musl stage3s when those become an official stage3 in Gentoo.

https://github.com/gentoo/catalyst/blob/master/arch/mips.toml#L93

@frno7
Copy link
Owner Author

frno7 commented Jun 8, 2023

Thanks!

@frno7 frno7 closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants