Loading an ELF file above 0x80000000

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

Moderators: cheriff, Herben

Post Reply
Mega Man
Posts: 260
Joined: Sat Jun 18, 2005 3:14 am
Contact:

Re: sound modules

Post by Mega Man »

deba5er wrote:Would the sound modules be hard to replace with free kernelloader modules? Is the coding difficulty high or nigh on impossible? ;-)
Currently RTE SBIOS need to be loaded by kernelloader to get sound working. I added code to TGE SBIOS. In theory it should do the same as RTE, but it is not working and I don't know what is wrong. So this also need to be fixed.

My plan was not to use free modules. I wanted to use the modules from rom1:, but I detected that these modules are incompatible with RTE SBIOS. So when some day my TGE SBIOS will work with RTE modules, it will not be compatible with rom1: modules.

I think reverse engineering of sdrdrv.irx is more difficult than the TGE SBIOS sound functions or dmarelay.irx. dmarelay.irx include debug symbols. sdrdrv.irx doesn't include debug symbols. You can easily reverse engineer 80% in a short time. When you have reverse engineered with accuracy of 99.99% the module will not work. It will only work when you reverse engineer 100%.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

So why use the PS2 sound drivers at all? Just bang on the hardware directly. Enough is known about the SPU2 that the driver isn't needed anymore. Even if every last bit isn't completely understood, it's well enough understood for basic drivers for linux.
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

Post by deba5er »

I can see where writing from scratch would be a daunting task, even if the SPU is well documented. Are there versions of sdrdrv.irx with debug symbols? Early releases, etc? Googling sdrdrv.irx produces plenty of hits.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Well, you can look at the sound library some guy wrote for the original SPU on the PSX, then look at the includes for the SPU2 that are part of PCSX2. That would be a good place to start.
Riff M-33
Posts: 2
Joined: Thu Jun 12, 2008 2:21 am

@ Mega Man

Post by Riff M-33 »

Tried to load via AR Media Player but it hangs up at step 3. (select kernel usb stick!) All files (kernel 1.0, vmlinux, vmlinux.devfs, initrd.gz and blackrhino_baseimage-1.0.tar.gz) are on the stick but it doesn t load...

I also tried this with kernel 1.8... the same

If I would try to burn a DVD-R/CD-R what burn program do I need?

Note: You can t buy the Linux-Kit anymore. www.linuxplay.com doesn t existist anylonger. Sonyś technical support told me, its now an linux exclusive thing.
Questions are a burden to others, answers a prison for oneself
Mega Man
Posts: 260
Joined: Sat Jun 18, 2005 3:14 am
Contact:

Post by Mega Man »

Riff M-33 wrote:Tried to load via AR Media Player but it hangs up at step 3. (select kernel usb stick!) All files (kernel 1.0, vmlinux, vmlinux.devfs, initrd.gz and blackrhino_baseimage-1.0.tar.gz) are on the stick but it doesn t load..
One month ago I posted a version with different USB driver. It is possible that this version will work:
http://rapidshare.com/files/115436157/kloader.elf.html

Note:I got some problems with the keyboard when using this version.

You can copy kernel and initrd on a PS2 memory card using a program like LaunchELF. The kernel can be compressed with gzip to get more files on a memory card. The tar archive can be read from USB directly, because Linux supports more USB hardware than the kernelloader.
Riff M-33 wrote: If I would try to burn a DVD-R/CD-R what burn program do I need?
I use the Linux command:

growisofs -dvd-compat -Z /dev/hdd -dvd-video -V "DVDNAME" DVDPATH

But you need some video files also.
startreksg1
Posts: 2
Joined: Fri Oct 24, 2008 3:32 am

Post by startreksg1 »

on step 7 it say to Create Linux partitions on hard disk how do i do that?
(i'am new to linux)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

startreksg1 wrote:on step 7 it say to Create Linux partitions on hard disk how do i do that?
(i'am new to linux)
Good old fdisk. :)
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

p2fdisk is good too

Post by deba5er »

http://playstation2-linux.com/project/s ... ase_id=440

ps2fdisk has the ability to create the linux partition alongside other ps2 hdd partitions (Aligned Partition Allocation - APA compatible)
startreksg1
Posts: 2
Joined: Fri Oct 24, 2008 3:32 am

Post by startreksg1 »

i try to Create a partitions on the hard disc by using the command

fdisk /dev/ide/host0/bus0/target0/lun0/disc

but it says no such file or directory

i'am very new to linux so can you dume it down for me thanks
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

/dev /hda1

Post by deba5er »

my linux boot partition is /dev/hda1 and swap partition is /dev/hda2

Hope this helps
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

ps2 linux distribution

Post by deba5er »

In the ps2linux-distro directory: http://www.4shared.com/dir/8728191/2a84 ... aring.html

This is a pre-configured PS2-Linux (hdd/NTSC) installation with initial password "changeme".

It mingetty autoboots into X-Windows (NTSC configured), Fluxbox 0.9.14 window manager, right click for app menus. Fox Toolkit 1.6.34 apps, Xmms 1.2.11 music player, Feh 1.3.4 image viewer, conky 1.6.1 system monitor, latest openssl/openssh included, along with most importantly Dillo Browser 0.8.6 with tabs/internationalization/download progress bar.

Don't know if this is useful to folks, but the distro is <150MB and might save folks a lot of compiling ;-)
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Post by bee7 »

im using PS Two Slim SCPH 90006CB
i tried kloader 1.9, enable "PS Two Slim" option, using all kernels one by one,
if i use standard initrd its working, but my usb keyboard cant type anything
if i use initrd usb its not working, got error message "USB device not accepting new address"

finally, i got it working on testing version kloader and kernel
but it cant set ip, eth0 not detected..

any other way to try?
citronalco
Posts: 15
Joined: Sat Apr 19, 2008 7:47 pm

Post by citronalco »

I also have the slim PS2 and got stuck at the missing network device just like you. Mega Man then suggested trying to find some patched network drivers. Found a few, but not a single one addressing this problem. However, tried them, but neither did help.
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Post by bee7 »

citronalco, is yours can mount usb drive?
mine cannot mount anything, it display error in module
im using testing version kernel, and its only 1 mb in size,
i believe its not full functionality, maybe network driver is missing
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Re: ps2 linux distribution

Post by cosmito »

deba5er wrote:This is a pre-configured PS2-Linux (hdd/NTSC) installation with initial password "changeme".
A lazy question before trying : is it possible to anyone reconfigure it to PAL starting from the NTSC package you share?
citronalco
Posts: 15
Joined: Sat Apr 19, 2008 7:47 pm

Post by citronalco »

@bee7:
On May 7th Mega Man posted some more details about USB mass storage, so creating device nodes with mknod might be sufficient (see page 5).

The network interface is not functional with the PS2 slim.
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

PAL

Post by deba5er »

@cosmito - I have no way to test PAL configurations, but prior to booting you may edit the /usr/local/bin/win* scripts (changing NTSC to PAL). You might need to add margins if you can't tune your TV output for displayable image (the example shows margins of 5 pixels):
export TV_MARGIN_X=5
export TV_MARGIN_Y=5

After this things *should* work, but if they don't, comment out the last line in /home/adent/.bash_profile (one of the win scripts), so that you can troubleshoot the problem outside of the graphical interface.
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Post by bee7 »

citronalco wrote:@bee7:
On May 7th Mega Man posted some more details about USB mass storage, so creating device nodes with mknod might be sufficient (see page 5).

The network interface is not functional with the PS2 slim.
i tried this:

cd /dev
mknod sda b 8 0
mknod sda1 b 8 1

cd ..
mkdir mnt
cd mnt
mkdir flashdisk1
mount -t vfat /dev/sda /mnt/flashdisk1

result:
modprobe: modprobe: Can't open dependencies file /lib/modules/2.4.17_mv121/modules.dep (No such file or directory)
mount: /dev/sda is not a valid block device

mount -t vfat /dev/sda1 /mnt/flashdisk1

result:
modprobe: modprobe: Can't open dependencies file /lib/modules/2.4.17_mv121/modules.dep (No such file or directory)
mount: /dev/sda1 is not a valid block device

which kernel and kloader version u tried?
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

2.4.17_mvl21-kernel-modules.tar.gz

Post by deba5er »

@bee7
you are missing the kernel modules for 2.4 kernel.

You must create a login on the www.playstation2-linux.com site.

You can then download this file which has the missing modules:
2.4.17_mvl21-kernel-modules.tar.gz
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Re: 2.4.17_mvl21-kernel-modules.tar.gz

Post by bee7 »

deba5er wrote:@bee7
you are missing the kernel modules for 2.4 kernel.

You must create a login on the www.playstation2-linux.com site.

You can then download this file which has the missing modules:
2.4.17_mvl21-kernel-modules.tar.gz
i already downloaded the file, but dont know how to include it,
i try searching by myself, thanx alot!
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Post by bee7 »

i open file 2.4.17_mvl21-kernel-modules.tar.gz, cant find modules.dep inside it
i've found the way to modify initrd.img file by mounting it to linux in my pc, should i copy all file in 2.4.17_mvl21-kernel-modules.tar.gz to initrd image?

i tried command depmod too:
depmod: Can't open /lib/modules/2.4.17_mv121/modules.dep for writing

i see another version in modules directory:
2.2.21-pre1-xr7, and there is modules.dep in it, i think it finds modules.dep in wrong version
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

2.4 kernel modules

Post by deba5er »

@bee7 - sorry about that. try this:
http://www.4shared.com/file/72277762/13 ... 21tar.html
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Re: 2.4 kernel modules

Post by bee7 »

deba5er wrote:@bee7 - sorry about that. try this:
http://www.4shared.com/file/72277762/13 ... 21tar.html
cannot include it into initrd img,size too big, its 2mb total, initrd only have freespace 824KB after the old module deleted. anything i unused that i can remove it?

thanx 4 ur help :)
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Post by bee7 »

i remove some directories:
/kernel/driver/scsi
/fs/isofs
/fs/lockd
/fs/nfs
/fs/nls
/fs/smbfs
/fs/udf

here is modules i include in the directory:

Code: Select all

2.4.17_mvl21/&#58;
total 42
drwxr-xr-x 6 root root  1024 2008-11-20 12&#58;28 kernel
-rw-r--r-- 1 root root  4742 2008-11-20 12&#58;28 modules.dep
-rw-r--r-- 1 root root    31 2008-11-20 12&#58;28 modules.generic_string
-rw-r--r-- 1 root root    81 2008-11-20 12&#58;28 modules.isapnpmap
-rw-r--r-- 1 root root    29 2008-11-20 12&#58;28 modules.parportmap
-rw-r--r-- 1 root root    99 2008-11-20 12&#58;28 modules.pcimap
-rw-r--r-- 1 root root 21809 2008-11-20 12&#58;28 modules.usbmap
drwxr-xr-x 2 root root  1024 2008-11-20 12&#58;28 pcmcia

2.4.17_mvl21/kernel&#58;
total 8
drwxr-xr-x 7 root root 1024 2008-11-20 12&#58;28 drivers
drwxr-xr-x 6 root root 1024 2008-11-20 12&#58;28 fs
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 lib
drwxr-xr-x 3 root root 1024 2008-11-20 12&#58;28 net

2.4.17_mvl21/kernel/drivers&#58;
total 10
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 block
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 input
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 net
drwxr-xr-x 3 root root 1024 2008-11-20 12&#58;28 ps2
drwxr-xr-x 3 root root 1024 2008-11-20 12&#58;28 usb

2.4.17_mvl21/kernel/drivers/block&#58;
total 42
-rw-r--r-- 1 root root 27728 2008-11-20 12&#58;28 loop.o
-rw-r--r-- 1 root root 10364 2008-11-20 12&#58;28 rd.o

2.4.17_mvl21/kernel/drivers/input&#58;
total 15
-rw-r--r-- 1 root root 12732 2008-11-20 12&#58;28 joydev.o

2.4.17_mvl21/kernel/drivers/net&#58;
total 131
-rw-r--r-- 1 root root 10032 2008-11-20 12&#58;28 bsd_comp.o
-rw-r--r-- 1 root root 19148 2008-11-20 12&#58;28 ppp_async.o
-rw-r--r-- 1 root root 11136 2008-11-20 12&#58;28 ppp_deflate.o
-rw-r--r-- 1 root root 52112 2008-11-20 12&#58;28 ppp_generic.o
-rw-r--r-- 1 root root 17240 2008-11-20 12&#58;28 ppp_synctty.o
-rw-r--r-- 1 root root 12448 2008-11-20 12&#58;28 slhc.o

2.4.17_mvl21/kernel/drivers/ps2&#58;
total 10
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 mcfs
-rw-r--r-- 1 root root 6754 2008-11-20 12&#58;28 ps2js.o

2.4.17_mvl21/kernel/drivers/ps2/mcfs&#58;
total 63
-rw-r--r-- 1 root root 61894 2008-11-20 12&#58;28 ps2mcfs.o

2.4.17_mvl21/kernel/drivers/usb&#58;
total 47
-rw-r--r-- 1 root root 25892 2008-11-20 12&#58;28 pegasus.o
drwxr-xr-x 2 root root  1024 2008-11-20 12&#58;28 storage
-rw-r--r-- 1 root root 14392 2008-11-20 12&#58;28 usbpd.o

2.4.17_mvl21/kernel/drivers/usb/storage&#58;
total 53
-rw-r--r-- 1 root root 51812 2008-11-20 12&#58;28 usb-storage.o

2.4.17_mvl21/kernel/fs&#58;
total 8
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 fat
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 msdos
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 smbfs
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 vfat

2.4.17_mvl21/kernel/fs/fat&#58;
total 70
-rw-r--r-- 1 root root 69038 2008-11-20 12&#58;28 fat.o

2.4.17_mvl21/kernel/fs/msdos&#58;
total 18
-rw-r--r-- 1 root root 15900 2008-11-20 12&#58;28 msdos.o

2.4.17_mvl21/kernel/fs/smbfs&#58;
total 91
-rw-r--r-- 1 root root 90217 2008-11-20 12&#58;28 smbfs.o

2.4.17_mvl21/kernel/fs/vfat&#58;
total 27
-rw-r--r-- 1 root root 25286 2008-11-20 12&#58;28 vfat.o

2.4.17_mvl21/kernel/lib&#58;
total 59
-rw-r--r-- 1 root root 57364 2008-11-20 12&#58;28 zlib.o

2.4.17_mvl21/kernel/net&#58;
total 2
drwxr-xr-x 2 root root 1024 2008-11-20 12&#58;28 sunrpc

2.4.17_mvl21/kernel/net/sunrpc&#58;
total 134
-rw-r--r-- 1 root root 135007 2008-11-20 12&#58;28 sunrpc.o

2.4.17_mvl21/pcmcia&#58;
total 0
it failed to boot:
ps2mcfs: memory card00 isnt exist
Kernel panic: VFS: Unable to mount root fs on 01:00

hmm, still have no luck.. :(
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

BWLINUX directory on mc00

Post by deba5er »

@bee7 - Did you create a BWLINUX directory on the mc00 (you can do this with uLE)?
bee7
Posts: 20
Joined: Sun Nov 16, 2008 5:42 am
Location: Jakarta

Re: BWLINUX directory on mc00

Post by bee7 »

deba5er wrote:@bee7 - Did you create a BWLINUX directory on the mc00 (you can do this with uLE)?
no, should i create that? what should i do after create the directory?
deba5er
Posts: 166
Joined: Mon Feb 04, 2008 2:01 pm

BWLINUX on mc00

Post by deba5er »

@bee7 - In my configuration, my vmlinux (kernel) and initfs.gz are located in BWLINUX directory on my memory card 0 (as seen for uLaunchElf). Linux might be trying to mount /mnt/mc00 which using Megaman's kernel mounts the BWLINUX directory. If it doesn't exist, you get an error like you noted. It would seem your boot still is trying to find something (kernel maybe) on the memory card. If you have room on your card, try creating the BWLINUX directory in uLaunchElf, then place the vmlinux (kernel) in that directory before attempting to run Megaman's kernelloader.
luncheonticket
Posts: 7
Joined: Sun Nov 30, 2008 2:29 am

Post by luncheonticket »

sorry if this is the wrong thread, but i've been struggling trying to run linux through this great bootloader...

i've got a 79001 slim ntsc slim ps2 with a 4gb usb thumb drive and usb keyboard...

the problem is that regardless of the kernel (or bootloader) i use, neither the usb drive nor the keyboard are detected... if i try the usb-boot initrd then it detects both devices, but then it endlessly loops trying to install them... the error is this one:

usb.c: USB new device connect on bus 1/2, assigned device number 1
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=1 (error=-145)
usb.c: USB new device connect on bus 1/2, assigned device number 2
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=2 (error=-145)
usb.c: USB new device connect on bus 1/2, assigned device number 3
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=3 (error=-145)

and so on, ad infinitum...

i tried enabling and disabling every module, both the standard and specially patched 1.8 and 1.9 versions of the bootloader, several kernel versions (even the IRQ patched one) to no avail, the behaviour is always the same (when using a standard initrd the devices arent detected and when using the 'usb-boot' initrd the devices installation fail)

i also tried everything else mentioned in this thread, to no avail

if anyone got around this, please let me know...

thanks!
Mega Man
Posts: 260
Joined: Sat Jun 18, 2005 3:14 am
Contact:

Post by Mega Man »

luncheonticket wrote:sorry if this is the wrong thread, but i've been struggling trying to run linux through this great bootloader...

i've got a 79001 slim ntsc slim ps2 with a 4gb usb thumb drive and usb keyboard...

the problem is that regardless of the kernel (or bootloader) i use, neither the usb drive nor the keyboard are detected... if i try the usb-boot initrd then it detects both devices, but then it endlessly loops trying to install them... the error is this one:

usb.c: USB new device connect on bus 1/2, assigned device number 1
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=1 (error=-145)
usb.c: USB new device connect on bus 1/2, assigned device number 2
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=2 (error=-145)
usb.c: USB new device connect on bus 1/2, assigned device number 3
usb_control/bulk_msg: timeout
usb-ohci.c: unlink URB timeout
usb.c: USB device not accepting new address=3 (error=-145)

and so on, ad infinitum...

i tried enabling and disabling every module, both the standard and specially patched 1.8 and 1.9 versions of the bootloader, several kernel versions (even the IRQ patched one) to no avail, the behaviour is always the same (when using a standard initrd the devices arent detected and when using the 'usb-boot' initrd the devices installation fail)

i also tried everything else mentioned in this thread, to no avail

if anyone got around this, please let me know...

thanks!
You didn't use the special test version for slim PSTwo:
http://rapidshare.com/files/112377834/vmlinux.gz.html

This version still includes some debug output, which could make it a little bit slow. You need also to select the special interrupt handling modules for slim PSTwo.
Post Reply