You are seeing a copy of a topic from forum.ps2dev.org.  Only the page numbers works, the other links point to the original forum.

Click HERE to go back to index of psq2dev mirror.
Click HERE to go back to PlayStation®2 Linux website.

Link to original post: http://forums.ps2dev.org/viewtopic.php?t=8860&start=30
forums.ps2dev.org :: View topic - Loading an ELF file above 0x80000000
forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loading an ELF file above 0x80000000
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
rafael2k



Joined: 14 Jan 2007
Posts: 18

PostPosted: Wed Jan 16, 2008 6:45 am    Post subject: second try Reply with quote

Wow, keep the great work, MegaMan!!!

Tomorrow I'll try the new loader version in PS2 Slim, to see if keyboard works.

One thing: I'm using ps2link version 1.24, that is the only version that comes w/ a iso image. Is that ok?
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Jan 16, 2008 9:01 am    Post subject: Reply with quote

I don't know if it is working with ps2link version 1.24. Normally I would say that it should also work.

If it is not working you should try to activate ps2link modules in kernelloader configuration menu and then select "Submit Above Config". Then the newer ps2link modules will be loaded. It is possible that this will "repair" something.

Note: You can already use the USB keyboard in kernelloader to select the menu (cursor keys + return key).
Back to top
View user's profile Send private message Visit poster's website
rafael2k



Joined: 14 Jan 2007
Posts: 18

PostPosted: Thu Jan 17, 2008 5:41 am    Post subject: loader 1.1 error Reply with quote

Hi MegaMan,

Using ps2link 1.24 to load "loader 1.1", I got the error:
---
Error Message:

Out of VRAM while loading texture (cloud.rgb).
---

And when I try to boot the kernel, it boots ok, but the usb problem remains the same.

Can you provide me a iso image w/ ps2link that works for you?
Or the exact method you are using to load the loader and the kernel?
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Thu Jan 17, 2008 12:00 pm    Post subject: Reply with quote

The error message is not fatal, but it shows that there is something different with your ps2 console. I only saw this message when I was using non interlaced PAL, so I decided to use interlaced PAL (this is normal for PAL). I believe you have a NTSC console. As far as I know the normal mode for NTSC is non interlaced, so I configured this for NTSC consoles. This requires more VRAM for the display, less is available for textures.
I only tested kernelloader with NTSC before I added the big image. When I started Linux I only saw a rolling screen, which was too fast to read anything. So I don't really know if this was working.
Can someone say if interlaced mode is working with a normal NTSC TV?
Did someone know which NTSC mode is used by Linux?

My ps2link version is uploaded here:
http://mitglied.lycos.de/ps2dev/ps2link12012008/PS2LINK.ELF

I believe you can also load ps2link with your ps2link version.
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Jan 17, 2008 4:08 pm    Post subject: Reply with quote

Mega Man wrote:

Can someone say if interlaced mode is working with a normal NTSC TV?
Did someone know which NTSC mode is used by Linux?


I ran ps2linux in 640x448 NTSC mode. I should really try out these versions you're working on here.
Back to top
View user's profile Send private message AIM Address
rafael2k



Joined: 14 Jan 2007
Posts: 18

PostPosted: Fri Jan 18, 2008 12:04 am    Post subject: NTSC is interlaced Reply with quote

Hi MegaMan,
I could not load the ps2link version you posted w/ the version I'm using (1.24).

Do you have a iso image of this version you are using? (If not, I'll make a .iso for that elf).

I'm using a NTSC console, and I'm sure that NTSC mode is interlaced.
The screen was rolling because PAL is 50Hz (25fps interlaced) and NTSC is 60Hz (30 fps interlaced).

Thanks a lot!!

PS2 is now for U$99, so thats the true U$100 laptop ever thought : )
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Fri Jan 18, 2008 10:06 am    Post subject: Reply with quote

Sorry, I don't have a .iso for my ps2link version.

I changed NTSC mode to interlaced. Now I can read the text when Linux is started. USB keyboard is working.

I've uploaded the new version, but I don't think it will help to get USB on your PS2 working.

Did you already try some other USB keyboard or USB memory stick or an USB hub? It could be a power problem. It is possible that Linux needs more power than my kernelloader.

http://mitglied.lycos.de/ps2dev/kernelloader1.2/kloader.elf
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Jan 30, 2008 9:57 am    Post subject: Reply with quote

Now I got the hard disc working. ATA interrupts are not working. Every request is terminated by a timeout. I can read and write, but it is very slow.

I copied the code from ps2sdk/atad driver. There is a comment in ata_reset_devices():

Code:

/* Disable ATA interrupts.  */
ata_hwport->r_control = 2;


Did somebody know how the driver reenables the ATA interrupts? I can't find it. Without this line nothing works.

http://mitglied.lycos.de/ps2dev/linux.html
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Sun Feb 03, 2008 10:18 am    Post subject: Reply with quote

While searching for a solution for the interrupt problem, I found something about USB on v14/v15:

Quote:
When Sony redesigned the chipset they made several changes to the IOP chip (I/O Processor) in order to reduce the quantity of parts onboard. Getting rid of the network adapter chip (CXD9731GP) would not only reduce the parts count onboard but also would remove the possibility of adding an ATA port to the PS2.

The CXD9731GP chip contains a PCMCIA interface, an ATA port, an RS232C port (dialup modem) and a ETHERNET MAC controller. They removed this chip and moved the MAC inside the IOP (I/O Processor) along with the simulation of the old PCMCIA protocol (the expansion bay or PCMCIA slot connector electrical signals. Earliest models of PS2 used to have a external HDD with a PCMCIA card as network adapter).

Along with this change on the network circuit they also modified the USB host circuitry to make homebrewn applications unusable (this bombs USB functions in datel stuff like AR, the Pelican CodeBreaker and make USB HDloader clone totally useless.)

Also this is why the newer PS2s have compatibility issues with some PS1 games. Even a few PS2 games fail on it.


Source: http://psx-scene.com/forums/ide-hdd-discussion/61786-working-hd-usage-v14-v15.html

There is something changed in USB. This could be the cause why USB is not working with linux on a new slim line.
I believe that rafael2k uses USB to load the kernel and the initrd, so I think usbd.irx from ps2sdk works with v14/v15.

By the way: Did someone know how to get the manuals for CXD9611, CXD9731GP, CXD9624GG or VS34RH?
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Mon Feb 04, 2008 12:31 pm    Post subject: Reply with quote

Now I can receive network frames. The interrupts were not working. I needed to change the pcic type to "3".
I am not sure how to correctly detect the network adapter and whether the "3" is correct (but it seems to work).
My network adapter is SCPH-10350, Sony sells also a network adapter with product number SCPH-10281. I believe there is also a PCMCIA adpater for the first PS2.
When you believe ps2dev9.irx then my adapter is 16-bit. The function pcic_get_cardtype() has 3 return values. One for 16-bit, one for PCMCIA and one for no card. The linux driver expects a third unknown type. The third unknown type seems to be a PCMCIA or PCI card.
Did somebody know which types of network adapter exist and where it is used?
Did somebody have one of the other adapters?
Back to top
View user's profile Send private message Visit poster's website
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Mon Feb 04, 2008 2:14 pm    Post subject: types of network adapters Reply with quote

>Did somebody know which types of network adapter exist and where it is used?
>Did somebody have one of the other adapters?

I have two fat PS2s one with a SCPH-10281 Date code 3B (Japanese) and the other with a SCPH-10281 Date code 3C (Chinese). They are different in that BlackRhino Linux only autonegotiates with the Japanese model (different chipsets noted in the playstation2-linux forums awhile ago). More info - playstation2-linux.com/forum/message.php?msg_id=48852

The SCPH-10281s (at least the two I have) have a modem jack and a network jack. I've never used the modem jacks, but have run PS2 Linux on both successfully with the original kernel and the 2.4.17 kernel. The BlackRhino kernel works on the Japanese version as noted above. I've been following your post closely as I too am very interested in a working non-RTE Linux on my PS2. I am not a coder, but if I can help with testing let me know.
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Tue Feb 05, 2008 7:28 am    Post subject: Reply with quote

deba5er, can you please try my new version:

http://mitglied.lycos.de/ps2dev/kernelloader1.4/kloader.elf
http://mitglied.lycos.de/ps2dev/initrd.gz
http://mitglied.lycos.de/ps2dev/vmlinux

You need to enable hard disc and network in the configuration menu of kernelloader (you can save the configuration).
When linux starts you need to enter something like:
Code:

ifconfig eth0 192.168.0.23
ping 192.168.0.1


Please try to set the PCIC type to empty, 1, 2 and 3 in the configuration menu. I want to know which is working and which leads to a slow down, so you can't use linux anymore after entering ifconfig.

PCIC type:
0: No card
1: PCMCIA
2: PCMCIA
3: 16-bit, tested with SCPH-10350 with PHY 83847A and MAC CXD9731GP.
Empty: Auto detect

My example linux kernel doesn't include the patch for PHY chip STE100S SB. So I don't know if this is working. When you use your patched kernel version, you need also my initrd patch, because hard disc is too slow (Look at README in http://mitglied.lycos.de/ps2dev/kernelloader1.4.tgz for details).

I recognized that the ps2eth/smap driver in SVN also doesn't support STE100S SB, so ps2link will also not work. Did you ever tried using ps2link?
But I am not sure if this concerns the full network functionallity or only auto-negotiation.
STE100S SB seems also to be used in slim PS2.

Can anybody here use network with any homebrew program on a slim PS2 (SCPH-70000, V14/V15)?

I am not sure if rafael2k uses a newer or older slim PS2.
Back to top
View user's profile Send private message Visit poster's website
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Tue Feb 05, 2008 1:12 pm    Post subject: lost interrupt Reply with quote

I attempted many times under variations of PCIC, but only twice (randomly as far as I can tell) did it even get away from the Loader screen to the Linux boot screen, when the hard drive/network was enabled. For these two times, it repeatedly displayed the message "hda:hda: lost interrupt" until I power-cycled. I always use USB to load your example VMLINUX and INITRD.GZ. When the hard drive/network was disabled it booted fine. Any ideas?

Edit - If I let the hda:hda: lost interrupt repeat until off the screen, maybe about 20 minutes, it reaches the prompt. The network does not function however after normal configuration.
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:04 am    Post subject: Reply with quote

This sounds strange. I think there are two possibilties what is not working:
1. Hard disc
2. Network

1. When you plug out the hard disc, you can see if this is the problem. Hard disc support is not finished.
Note: Currently hard disc detection takes about 1 minute and 14 seconds. An other hard disc could take even longer. It will display the message "lost interrupt" four times and then it is working on my PS2 (SCPH-50004 and SCPH-39004). Mounting of hard disc takes 51 seconds and it requires 9 seconds to list a directory with 15 entries.

2. Please try one of the kernels which were already working with your PS2, because my kernel doesn't include the patch for the new PHY chip in SCPH-10281.
You can't mount anything, but you can see if the kernel starts.
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:06 am    Post subject: Reply with quote

(removed duplicate message)

Last edited by Mega Man on Thu Feb 07, 2008 7:09 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:10 am    Post subject: Reply with quote

(removed duplicate message)

Last edited by Mega Man on Thu Feb 07, 2008 7:08 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:11 am    Post subject: Reply with quote

(removed duplicate message)

Last edited by Mega Man on Thu Feb 07, 2008 7:07 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:14 am    Post subject: Reply with quote

(removed duplicate message)

Last edited by Mega Man on Thu Feb 07, 2008 7:03 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:16 am    Post subject: Reply with quote

(removed duplicate message)

Last edited by Mega Man on Thu Feb 07, 2008 7:05 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 06, 2008 9:18 am    Post subject: Reply with quote

Sometimes posting of messages in this forum is not working.

EDIT:I didn't got a response, now I know the messages were posted. This webserver crashed after I posted this message.


Last edited by Mega Man on Thu Feb 07, 2008 7:13 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Wed Feb 06, 2008 11:26 am    Post subject: ok will try Reply with quote

I didn't think to pull the drive! I'll try that, but failing that I'll have to compile in your patches which may take another day. Thanks for the idea...
Back to top
View user's profile Send private message
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Fri Feb 08, 2008 10:41 am    Post subject: PCIC Type Empty Reply with quote

Test 1 - No Hard Drive attached, PS2 version 3, SCPH-10281 Date code 3B (Japanese), Empty PCIC setting, with your network/hdd driver enabled, your VMLINUX and INITRD.GZ, all loaded from USB flash drive. I removed the kloader config file from the mc0 card to ensure defaults, then saved this configuration as a baseline.

It takes over 15 minutes to go from the "Copying files and start" screen (blue clouds) to the Linux prompt.

"dmesg" shows the last two lines:
eth0: Auto-negotiation complete. 100Mbps Full Duplex Mode.
eth0: dma setup: bind error 1, use PIO

"ifconfig eth0 192.168.0.10" works fine.
"route add default gw 192.168.0.1" works fine.

GOOD PING TO INTERNET ADDRESS

Pinging the gateway and an IP address on the internet work fine (repeated pings until stopped) - normal function of network. Each ping gave one warning line:
Warning: time of day goes back, taking countermeasures.
This may be related to the clock set back to 1999, and even occurs if I reset the date to today.

EDIT - Ignore the dmesg output, I just checked in my PS2 Linux and it is normal. Your network code seems to be great for PCIC empty and 3. I also went back and reran the PCIC = empty to ftp a larger file and filled up the ramdisk (1.75 MB) at around 80 to 86 KB/sec which is close to my internet connection max speed.


Last edited by deba5er on Fri Feb 08, 2008 11:56 am; edited 2 times in total
Back to top
View user's profile Send private message
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Fri Feb 08, 2008 10:56 am    Post subject: PCIC 3 Reply with quote

PCIC 3, same settings otherwise.
Same two eth0 lines at the end of the "dmesg" output.

No discernable difference between PCIC=3 and PCIC=empty

Both take over 15 minutes sitting on the blue cloud background before scrolling quickly through the Linux initialization.

In addition to the internet ping, I used ftp to go to a website and download a text file (c program) and used cat to view it. I did multiple "ls" and "cd" commands while on the ftp site and had no lag or slowdowns at any time. Other than the dma settings error, I see no network problems yet with my network adapter. Great job!!!
Back to top
View user's profile Send private message
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Fri Feb 08, 2008 11:30 am    Post subject: PCIC 1 and PCIC 2 Reply with quote

PCIC 1 and 2 both have problems.
The "dmesg" output is the same.
Like you have noted, all is well until the "ifconfig eth0 192.168.0.10"
After this it was difficult to enter further commands without getting double characters or no characters at each press. I persevered to "ping 192.168.0.1" in both modes, but the ping failed on both modes.

Note that between each test, I power-cycle the PS2, go straight to the kloader from Unofficial Launchelf (ULE) 4.12 mass: so nothing else should be loaded prior to the tests.

Has anyone else experienced the 12+ minute delay on the cloud screen before starting the normal text of Linux initialization?
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Sat Feb 09, 2008 11:38 am    Post subject: Reply with quote

PCIC 3 means that your hardware is similar to my, but my system starts much faster. Without hard disc it takes only some seconds.

So I still don't know if the PCMCIA detection is working. I leave the PCIC configuration option in my kernelloader, in case somebody will test it in future.
Back to top
View user's profile Send private message Visit poster's website
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Sat Feb 09, 2008 12:38 pm    Post subject: slow start Reply with quote

I'll try different module loads on Monday to see if I can determine my issue with slow starting. Sorry for the original delay in posting- I went down the rathole of yet again trying and failing to build a cross compiler on mingw and cygwin. Too many hours I've put into that failure. I've heard Linux is better for cross-compiling, but now I'm just doing all my compiling on the PS2 Linux which although slow, is solid. I didn't use the updated smap.o by the way like you thought, just church's APA modifications so that the Linux filesystem plays well with HDLOADER and other partitiions like +MYPS2.

I also took one evening getting the new XMMS compiled, two quick mods to work on the PS2 (ver 1.2.11), and added Blursk 1.3 with another couple mods to compile to get my visualizations to the music. Just finished Dillo 0.8.6/wget updates. I have a vested interest in this project!
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Sun Feb 10, 2008 7:29 am    Post subject: Reply with quote

I succeeded in enabling the hard disc interrupts. Now the hard disc is fast. I was able to boot directly from my hard disc using Linux 2.4.17. The system installed from Sony's DVDs seems to run normally. The original Linux 2.2.1 was not working (hard disc partition error).

http://mitglied.lycos.de/ps2dev/kernelloader1.5.php

Now everything is working except CDVD, sound and REMOCON. (CDVD also includes the shutdown feature and the time).

I also updated vmlinux on my website, because it need to be smaller to get initrd running stable (with "ee-strip").

http://mitglied.lycos.de/ps2dev/vmlinux
Back to top
View user's profile Send private message Visit poster's website
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Sun Feb 10, 2008 9:30 am    Post subject: Reply with quote

I just detected that the hard disc is only working when kernelloader is started by ps2link (v1.46 is working). The module ps2dev9.irx need to be loaded. The module is not needed, but the initialisation is needed. I copied it 1:1 from IOP to EE, but there must be something wrong.
The system will freeze at startup with the message "Copying files and start...".

When kernelloader is started by ps2link, it will power up the hard disc in this moment. You can hear the motor spinning up. After this Linux normally starts.

To get around this problem I activated loading of ps2link when kloader.ps2link.elf is started. It need not to be loaded later.

The following file should also work when loaded by other loaders:
http://mitglied.lycos.de/ps2dev/kernelloader1.5/kloader.ps2link.elf

It is possible that this will solve the problem of deba5er.
Back to top
View user's profile Send private message Visit poster's website
deba5er



Joined: 04 Feb 2008
Posts: 175

PostPosted: Tue Feb 12, 2008 2:48 pm    Post subject: slow start solved - thanks Reply with quote

version 1.5 with ps2link fixed the slow start issue. However, I can't get a boot from vmlinux24 - what modules are loaded to boot vmlinux from the hard drive (initrd.gz disabled, no ramdisk line in kernel parameters, etc)?
Back to top
View user's profile Send private message
Mega Man



Joined: 18 Jun 2005
Posts: 274

PostPosted: Wed Feb 13, 2008 8:11 am    Post subject: Reply with quote

I don't really understand what you mean with:

Quote:
I can't get a boot from vmlinux24


When you mean with vmlinux24 a file on the PS2 memory card in "/mc0" then you can select it by kernelloader, because it is in the directory mc0:BWLINUX.

When you mean with vmlinux24 a file on the PS2 hard disc (e.g. "/boot") then:

1. Short answer: You need to copy it on the USB memory stick or on the PS2 memory card.

2. Long answer: At the moment the bootloader didn't support the hard disc and it can't read an ext2 filesystem. To get hard disc support the following IOP modules need to be loaded (in addition to the modules which are already loaded for ps2link):
ps2atad.irx, ps2hdd.irx and ps2fs.irx.
The modules are not included in kernelloader and you will only get support for PFS. This native PS2 file system is not originally supported by Linux. I believe it is a bad idea to use this as native file system for Linux. The normal Linux file system ext2 is not supported by my kernelloader. I was thinking about to add support for it. My plan was to copy the source code from GRUB (i386 bootloader). Sony's bootloader also didin't provide a method to load vmlinux from hard disc and it doesn't support initrd.gz at all.

Or did you mean that you can't boot from hard disc?
I try to give a answer:

To boot from hard disc you need to specify the kernel parameters:

Code:

root=/dev/hda2 ro


and replace the last number by the partition number. "ro" means read only. A normal Linux system will remount it writable later.

My vmlinux only supports ext2. It depends on your filesystem used, which modules are needed (e.g. ext3, reiserfs).

In general you should disable the initrd.gz. When you specify a initrd.gz, Linux will first mount the initrd.gz before mounting /dev/hda2. When you enter "exit", it will try to mount /dev/hda2. But there is a bug and it will crash instead. So you must not load the initrd.gz. As you said, you should remove the ram disk parameter to save memory space.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3, ... 9, 10, 11  Next
Page 2 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group