Debian packages

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Debian packages

Post by pixel »

Hello,

I'm quite new over PS2 homebrew developpment, and I spent quite a hard time compiling the toolchain for unix. I eventually came up building some debian packages from my work, and I saw somewhere on a thread somebody asking for more binary distributions. Well, I know it's quite not the same, but I just post it there in case somebody is interested by it :wink:

The package might not be really well made (they contain lintian errors and a lot of warnings). This is only valid for debian/unstable for now, so if you have this distribution, you can add these two lines into your /etc/apt/sources.list :

deb http://www.nobis-crew.org/debian/ unstable main
deb-src http://www.nobis-crew.org/debian/ unstable main

Since I'm not really sure it will be of interest for many people out there, these are only on my ADSL connection. But if too many people starts downloading them, it might get slow, so, please be patient :wink:


The package list I currently provide is:

iop-binutils
iop-gcc
ee-binutils
ee-gcc-base (providing only a C compiler, for me, mainly to build the newlib, since I use C++)
ee-gcc (replacing ee-gcc-base, contains a C and C++ compiler)
ps2-newlib
ps2lib-cvs
ps2hid-cvs
libcdvd that provides libcdvd-alt.a to avoid conflicts with the ps2lib

The /etc/environment will be modified or created for the PS2LIB variable. Everything else will be safely under your path.

I managed to compile the newlib using the -G0 option, so the library does not contain any GP section, which is quite necessary when building huge C++ code as I'm doing right now.

I also provide a pure binary distribution of the PS2 libraries here: http://www.nobis-crew.org/ps2-libs.zip which are actually host independant. (which also can be useful if you just want to update your newlib to something without GP sections)

I really would appreciate any feedback.

Enjoy! :)
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Wow, nice job. You managed to get both ee-gcc 3.2.2 and iop-gcc 2.8.1 compiled up and running on the same system. That was a lot more work than I felt like doing. Glad to see someone took up the challenge. :) Now make it available to the rest of us not running debian and give us tgz files.

Welcome to ps2dev, you've made quite the contribution. I look forward to seeing what else you're going to do.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Actually, as I'm poking around I notice you have the source available too. Did you patch iop-gcc to compile under gcc 3.x, or did you install a gcc 2.x to compile it then package it up?
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Err, I had no problem at all with iop-gcc actually ^^; I had some with iop-binutils, which leaded me to patch a bit the provided libiberty, but that's all. It compiled fine using my gcc-3.x. What problem should be there exactly?

And I forget to mention:

I patched iop-binutils and ee-binutils in order to add a feature I needed: register aliases. It means you can use $a0 or $t3 instead of $4 or $11 respectively inside of your asm code.

Thanks for your quick feedback :)

I'll try to provide win32 packages and/or other formats like tgz, okay.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

if you make a ee-gcc-linux.tgz and iop-gcc-linux.tgz out of it ( I also assume you have it all under /usr/local/ps2dev ) Id gladly put them up on www.thethirdcreation.net/tools, where Ill be having my *-FreeBSD.tgz and *-OSX.tgz real soon now(tm).

Also make sure you use the latest patch for ee-gcc-3.2.2 ( or atleast added the missing cfc2.ni/i and ctc2.ni/i opcodes yourself)

http://www.oopo.net/consoledev/files/bi ... 1-EE.patch
Kung VU
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Yeah, I'm poking around with iop-binutils right now. I really didn't take too much time looking at it before... Save me some time and tell me how you went about it. I'm still learning my way around the source for binutils/gcc. :)

About the register aliases, did you mean 'instead of' or can both types of register aliases still work? I know most people here use a bunch of defines in their code to get the same result - if this does the same thing maybe I'll roll it into my own patches.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

blackdroid: the patch I'm using right now comes from the http://ps2dev.sf.net website, and it doesn't seem to contain those cfc2.i/ni instructions. I'll upgrade then. Too bad the patches doesn't have version numbers :)

I'm actually putting some things into /usr/local/ps2, not /usr/local/ps2dev, sorry ^^; And I even messed up with the path (which seems cleaner for me actually)

I can convert my .deb files to tgz, but I'm not sure about shared library problems. Maybe it won't be a problem though, but I'll try anyway. I'll fire up some tgz somewhere in a few minutes.

ooPo: here are the patches I made for iop-binutils and ee-binutils.

The iop-binutils's libiberty patch: http://www.nobis-crew.org/~pixel/libiberty.patch
The iop-binutils's register aliases:
http://www.nobis-crew.org/~pixel/tc-mips.patch
The ee-binutils's registers aliases, errr.. whoops, sorry, it seems I didn't make any patches out of it right now... a bit later maybe :)

And for your question, it's not "instead of", you can use both type.
Last edited by pixel on Sat Jan 31, 2004 3:56 am, edited 1 time in total.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Okay, ooPo, here is the ee-binutils's patch: http://www.nobis-crew.org/~pixel/tc-mips.c.diff (I quickly extracted it...)

blackdroid: you can find some tgz out of my deb files at http://www.nobis-crew.org/ps2-tgzs but please, just try them, do not spread them right now, as they do not contain the latest ee-binutils patch you gave me on your post.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Huzzah!

I've taken your changes and made my own patches, actually. I've put them up on my site (http://www.oopo.net/consoledev) along with an updated autobuild script and newlib patch. I'm running a final test of the script right now but it looks like everything is working fine.

Also, the autobuild script should work on linux, cygwin and osx. At least they did before these new patches. Please test and let me know.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Well, we quite don't have the same policy about file positions in the system tree, but it really doesn't matter actually ;) I just don't have any PS2DEV environment variable, only PS2LIB, and I do not modify the path. Well, you can have a look at the tgz files I just provided so you can see by yourself what I'm talking about.

About your script, I'll give you one hint: around the "newlib" compilation/installation, you're doing:

make ; make install

You'd rather do

CFLAGS='-G0' make ; make install

so the newlib won't be bloated with gp sections.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Added. Anything else?
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

blackdroid: you can find some tgz out of my deb files at http://www.nobis-crew.org/ps2-tgzs but please, just try them, do not spread them right now, as they do not contain the latest ee-binutils patch you gave me on your post.
ok, only problem is that I dont have any linux system to try them on, so I rather wait for some "final release".tgz :)
Last edited by blackdroid on Sat Jan 31, 2004 5:18 am, edited 1 time in total.
Kung VU
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

pixel wrote:Well, we quite don't have the same policy about file positions in the system tree, but it really doesn't matter actually ;) I just don't have any PS2DEV environment variable, only PS2LIB, and I do not modify the path. Well, you can have a look at the tgz files I just provided so you can see by yourself what I'm talking about.
.
/usr/local/ps2dev is legacy, not a strike of ingenuity, but since its printed all over most tutorials its easier to adhere to it ( imagine certain user questions ).
Kung VU
nashdj
Posts: 3
Joined: Tue Jan 27, 2004 1:18 am

Post by nashdj »

Have the binary packages been updated for cfc2..etc?

Edit: I guess not. But it was still simpler than expected to patch your source package, thanks!
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

The repository is yet not updated actually. I'm working on a "clean" DVP assembler right now. I'll update all the packages right after, changing things like the /usr/local/ps2 into /usr/local/ps2dev etc.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Okay, I updated my packages to reflect the following changes:

-) fixed a small conflict problem on the two ee-gcc* packages (you could install both)
-) added the 4 missing instructions to the ee-binutils
-) changed the path /usr/local/ps2 to /usr/local/ps2dev
-) backported DVP assembler from the gnu-ee-binutils-gcc-1.1.tar.gz package to a "clean" patch for binutils-2.9.1 (and backported it to iop-binutils). The assembler is named "ee-dvp-as" thanks to the --program-prefix=ee option of ./configure in order to preserve the same output name as the well known tool.

Only gas works right now. Do not rely on the other binutils tools (objdump, readelf, etc...) For me, this is reaaaaaaaally preliminary work on the dvp support, and I doubt it will grow "seriously". We'd better wait for the actual ee-binutils-2.13.2.1 to get DVP support directly, shouldn't we ? Anyway, this was actually a good experience for me doing this.

Here is my actual diff to binutils-2.9.1:

http://www.nobis-crew.org/~pixel/dvp-bi ... ch.diff.gz

I had a really few changes to that patch in order to adapt it to the "iop-binutils-2.9.1". The "dvp for iop-binutils" patch is inside the debian repository: http://www.nobis-crew.org/debian/dists/ ... -2.diff.gz

What the interest of backporting the dvp assembler to the already existing iop binutils? Well: having a single patch against one upstream binutils distribution, which then can build two targets.

Now it seems to be working, but I did only a really few basic tests on both DVP and IOP assemblers, only by compiling some few lines of asm, and looking if the result was good. (I don't actually know if my backport patch of the DVP hurted the IOP part... it doesn't seems, but well...). And I can't do "Real Life" tests right now, since my PS2 is a bit... err... "sick" ^^. So, if people out there can make further tests, that would be great :-P

Anyway, I created tgz out of all that mess as well, still in the directory http://www.nobis-crew.org/ps2-tgzs

Ho, I almost forgot. I added the ps2client package as well.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

Nice work, ill try to check it out as soon as possible.
Kung VU
Post Reply