Native mode reloader "reload1" version 1.0
Moderator: cheriff
Native mode reloader "reload1" version 1.0
I've released version 1.0 of the PS2 Linux Kit Runtime Environment (RTE) to native mode "reloader" here. reload1 now works on the SCPH-50000 series PS2.
reload1 is a tool for launching native (ps2dev) programs from within the PS2 Linux RTE. The most common use for it is to launch Pukklink or ps2link from the PS2 Linux boot menu.
reload1 is a tool for launching native (ps2dev) programs from within the PS2 Linux RTE. The most common use for it is to launch Pukklink or ps2link from the PS2 Linux boot menu.
- DracoLacertae
- Posts: 22
- Joined: Tue Jul 13, 2004 3:49 am
- Location: Berkeley, CA
- Contact:
reload1 + ps2link problem
I am trying to get p2link (using version 1.22) to work with reload1. I am running ps2 linux, and have got ps2link embedded within reload1.elf. I placed this file in /mnt/mc00/BWLINUX and added the appropriate line to ps2lboot.cnf. I've tried placing a IPCONFIG.DAT and all the .IRX files in the PS2LINK directory, since that is what the ps2link readme says to use. Then I read somewhere else that those files should be placed in the same directory ps2link is loaded from, so I tried putting those files in BWLINUX. That didn't work either so I also tried the memory card's root directory, and I still have problems:
Everytime ps2link starts (using any of the places I tried), it says 'booting from host:" and "cannot find ipconfig.dat, using defaults"
What am I doing wrong? Shouldn't it find and load the IRX and DAT from the memory card? Thanks in advance.
Everytime ps2link starts (using any of the places I tried), it says 'booting from host:" and "cannot find ipconfig.dat, using defaults"
What am I doing wrong? Shouldn't it find and load the IRX and DAT from the memory card? Thanks in advance.
One thing that's puzzled me... For people using reload just for ps2link or such, why not just embed an elf that just runs the desired program from a specific place on the memory card? Then you wouldn't have to worry about the size limit or stuff like this...
Of course, if finding an elf to do this is a problem for some people *cough*ps2-independence payload*cough* I could create a quick one and post it somewhere.
Of course, if finding an elf to do this is a problem for some people *cough*ps2-independence payload*cough* I could create a quick one and post it somewhere.
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
-
- Site Admin
- Posts: 72
- Joined: Sat May 22, 2004 9:29 pm
- Location: Copenhagen, Denmark
- Contact:
- DracoLacertae
- Posts: 22
- Joined: Tue Jul 13, 2004 3:49 am
- Location: Berkeley, CA
- Contact:
-
- Posts: 2
- Joined: Tue Jul 27, 2004 3:31 am
i've been working on the ps2 linux kit lately, but sorry i really don't understand what's the purpose of version 1.0 of the PS2 Linux Kit Runtime Environment (RTE), i'm sort of really interesting about it though, pls simply explain what it does for ps2 .. to me, and how does it really works, i've read some of the infor, but still didn't get what exactly i have to do with it, pls reply me, if anyone could help me on it, thanks very much for your attention
- DracoLacertae
- Posts: 22
- Joined: Tue Jul 13, 2004 3:49 am
- Location: Berkeley, CA
- Contact:
The RTE is a program that runs underneath ps2 linux, and controls the ps2's IOP (The ps1-like processor that controls I/O). The RTE acts like a fake device, that ps2 linux can interact with. The RTE then passes information to/from the real hardware. It exists for two reasons,
-Linux likes having complete control over the hardware of the system. You can't really do this on the ps2, since the IOP controls those devices.
-Sony doesn't want all the IOP's secrets out.
The RTE is also a convenient way to boot your own code, using reload1 to load one of the various loader or menu programs, like pukklink and such.
-Linux likes having complete control over the hardware of the system. You can't really do this on the ps2, since the IOP controls those devices.
-Sony doesn't want all the IOP's secrets out.
The RTE is also a convenient way to boot your own code, using reload1 to load one of the various loader or menu programs, like pukklink and such.
I have been thinking along similar lines...Drakonite wrote:One thing that's puzzled me... For people using reload just for ps2link or such, why not just embed an elf that just runs the desired program from a specific place on the memory card? Then you wouldn't have to worry about the size limit or stuff like this...
Why does one need reload at all ? Why can't one just supply a program
in place of the linux kernel ? The linux kernel is fairly huge but doesn't
have the size limitation that reload1 has ?
Or is the reason that reload1 needs to reset the IOP and other things so
they don't interfere with anything booted in place of the linux kernel ?
If we left out all the reload stuff, and just wanted to boot something in
place of the linux kernel, what can we expect as a result ? How difficult
would that be ? Sure the RTE is there but would it be possible to just
work around it ?
Gorim
Um, reload1 "reloads" the native PS2 kernel. There's a size limitation because one of the last things the native kernel does at startup is to zero memory. I could've patched the zero memory call, but I felt I had already patched enough of the kernel for it to be useful (since ps2link, etc. are pretty small programs).
Linux runs strictly under the resident RTE library, so it does not access or use the native kernel - because the native kernel isn't even in RAM once the RTE takes over. You can easily write native programs like the Linux kernel that are RTE-only (I have written several), but then no one without the Linux Kit would be able to use your programs. That's why I wrote reload1.
Linux runs strictly under the resident RTE library, so it does not access or use the native kernel - because the native kernel isn't even in RAM once the RTE takes over. You can easily write native programs like the Linux kernel that are RTE-only (I have written several), but then no one without the Linux Kit would be able to use your programs. That's why I wrote reload1.
mrbrown - that reminds me of something I've wondered about but haven't had a chance to look into. How much of the memory is used by the native kernel in the PS2? Do you have a rough memory chart of memory usage? It would be handy for those projects which will be tight on memory. For example, doing a conversion of a more modern game like Quake 2 or a new conversion of MAME will consume most or all the memory. Having an idea of what's already in use and where would be very handy to avoid fragmenting what's left.
I wasn't very clear where I was coming from, so I will explain a little more :)mrbrown wrote: Linux runs strictly under the resident RTE library, so it does not access or use the native kernel - because the native kernel isn't even in RAM once the RTE takes over. You can easily write native programs like the Linux kernel that are RTE-only (I have written several), but then no one without the Linux Kit would be able to use your programs. That's why I wrote reload1.
I am finally going to begin my porting project of a RTOS to the PS2linux.
I will start first with porting it to the EE, and later I will port it to the IOP.
My goal is to completely replace the existing Sony RTOS way of doing things
and provide a different platform for development. Not necessarily because
I think anyone will use it (though I hope people will) but because it is
interesting for me to do.
Now, I am actually not an expert kernel hacker, embedded expert, or anything
like that, but I like to set high goals and work on challenging projects
in order to become more expert. :)
So having said that, the reason why I am interested in using the PS2Linux
boot method, or reload, or other methods, is to have a variety of ways of
booting a completely new kernel.
THe RTE I don't consider much of a barrier. If I can use the PS2Linux
boot menu to load something else, and have it install its own interupt
and exception handler routines at 0x0,0x80,0x100,0x180, and 0x200, then
the RTE is effectively out of the picture. In fact, since the RTE appears
to install at 0x1000, and nothing else is used up to that point except
interrupt some interrupt routines up to about 0x220, there is nearly
the entire first 1MB of KSEG address space for me to install something
to take over without trampling over anything else until I am ready to
throw the "switch".
The thing I don't know yet is where does the PS2Linux kernel boot
loader install the kernel, does it go to a fixed address or does it do it
based on the elf header ? Elf headers and relocations are areas where
I lack experience, so this is why I am asking questions like "why can't
we just load things directly from the PS2Linux boot loader screen" instead
of going through "reload1". I am sure there are reasons, its just not yet
intuitive to me.
Again, you can load anything from the PS2Linux bootloader, without using reload1. reload1 is only for programs written to use the native PS2 kernel, the one that the browser and games use. If you are writing a RTOS, then it makes no since to use reload1 because it copies the original kernel back in to RAM. You only need reload1 if you want to launch ps2dev programs from the PS2Linux bootloader.
The Linux kernel ELF loads at a fixed address, and that's specified in a linker script inside of the kernel source tree.
You are free to load your own ELF wherever you want if you are using the PS2Linux bootloader. However, if you choose to load your ELF at 0x1000, it will be overwritten by the SBIOS since the SBIOS is loaded after the ELF is loaded. The SBIOS only takes up a bit less than 50K of RAM, IIRC.
The Linux kernel ELF loads at a fixed address, and that's specified in a linker script inside of the kernel source tree.
You are free to load your own ELF wherever you want if you are using the PS2Linux bootloader. However, if you choose to load your ELF at 0x1000, it will be overwritten by the SBIOS since the SBIOS is loaded after the ELF is loaded. The SBIOS only takes up a bit less than 50K of RAM, IIRC.