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

An ELF file is added to the latest release compilation script. #1421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HowlingWolfHWC
Copy link

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK or other dependencies
  • Others (please specify below)

Pull Request description

By having the ELF as standalone (instead of inside of a 7z file) it could be grabbed (streamed) and launched right away with no need to store it locally.

@uyjulian
Copy link
Member

Extracting the elf to RAM out of the 7z would be a better option, since it does checksumming so can detect when corruption occurs (instead of silently executing corrupted data)

libarchive can be used for this. See ps2dev/ps2sdk-ports#174

@rickgaiser
Copy link
Member

Can a PS2 launcher be made that downloads and runs a link directly on the PS2? That would be a an awesome feature, not just for OPL.

Would be a lot simpler to just reference:
https://github.com/ps2homebrew/Open-PS2-Loader/releases/download/latest/OPNPS2LD.ELF
Instead of downloading and extracting from:
https://github.com/ps2homebrew/Open-PS2-Loader/releases/download/latest/OPNPS2LD.7z

PR makes sense to me, any objections if I merge?

@KrahJohlito
Copy link
Member

Can a PS2 launcher be made that downloads and runs a link directly on the PS2? That would be a an awesome feature, not just for OPL.

Would be a lot simpler to just reference: https://github.com/ps2homebrew/Open-PS2-Loader/releases/download/latest/OPNPS2LD.ELF Instead of downloading and extracting from: https://github.com/ps2homebrew/Open-PS2-Loader/releases/download/latest/OPNPS2LD.7z

PR makes sense to me, any objections if I merge?

I remember this from years ago:
https://github.com/Based-Skid/iLaunchELF

I think that was the idea behind it?.. never tried it.. no objections

@HowlingWolfHWC
Copy link
Author

HowlingWolfHWC commented Dec 17, 2024

Can a PS2 launcher be made that downloads and runs a link directly on the PS2? That would be a an awesome feature, not just for OPL.

That's the idea and there's already a PoC of that, but happens that when you build it with the latest SDK, it goes BSOD when launching, but the very same source worked fine in an SDK from 2019.
https://github.com/Based-Skid/iLaunchELF
I added the function to download to RAM and launch ELFs to XEB+ this very same week and struggled trying to find why it didn't launch it until I went and tried compiling iLaunchELF, an already known to work application, with an older SDK and a modern SDK and comparing the results. That's when I knew where the issue was.

@rickgaiser
Copy link
Member

Can this stream https also, or only http? Becouse the github downloads are https only if I'm not mistaking. In that case this pr would not help your goal.

..offtopic..
The ps2sdk is constantly being worked on. I understand it can be difficult at times, but your complaint is too general. The ps2sdk cannot provide backwards compatible support to all apps in existence. We can help to find/fix the issue, but you'll have to point to a specific thing that the ps2sdk does wrong.

@HowlingWolfHWC
Copy link
Author

uyjulian is making a launcher that supports modern web and https, but I tried it personally with an http link in my tests and files hosted in another server.

@israpps
Copy link
Member

israpps commented Dec 17, 2024

That ilaunchelf code is probably incompatible with latest SDK.

Daniel Santos was able to download from GitHub IIRC with some sample he made for Athena (see CuRL port on PS2SDK)

@HowlingWolfHWC
Copy link
Author

HowlingWolfHWC commented Dec 17, 2024

Regarding the issue of iLaunchELF, here's what I said to uyjulian:

Original iLaunchELF binary: https://pixeldrain.com/u/kJZow2HP
Source: https://github.com/Based-Skid/iLaunchELF

My updated one + source:
iLaunchELF-modern test.rar
https://pixeldrain.com/u/tcGjtVga

Seems like the new SDK doesn't like launching ELFs from the internet...
My fork updates the source so it can be compiled in the modern SDK, plus, it changes some links to active ones.

Every link in the iLaunch-Demo is offline, but they can be replaced via HxD
I did replaced a link with HxD in the old one and works (Press SQUARE to launch it), while the very same link in the updated one fails.
https://pixeldrain.com/u/M7sz2JJa

The thing is:
iLaunch has his very own ELF loader in it's source
The one compiled with an older SDK works (tested by replacing a dead link with a new one via HxD)
I forked the same source, remove the need of bin2s, updated the links and compiled it in a modern SDK... it fails.
So, the issue is somewhere in the SDK, not in the source of it. And, it is NOT in the loader from the SDK, since it uses his own one.

He said that he's working on something that might fix it:
Quote:
it will be possible to load from archive and from new HTTP versions https://github.com/ps2dev/ps2sdk/pull/488

@HowlingWolfHWC
Copy link
Author

Afterwards I set up an older SDK, compiled iLaunchELF and it worked out of the box...

@10522
Copy link

10522 commented Dec 18, 2024

Maybe VTSPS2-HBDL (iLaunchELF fork) can help?

@VTSTech @Based-Skid

@HowlingWolfHWC
Copy link
Author

Maybe VTSPS2-HBDL (iLaunchELF fork) can help?

@VTSTech @Based-Skid

That fork doesn't launches an ELF from memory. Instead it launches it from the MC.

@AKuHAK
Copy link
Member

AKuHAK commented Dec 20, 2024

PR makes sense to me, any objections if I merge?

I d rather remove then .7z variant, currently there way too many files attached to releases.

@rickgaiser
Copy link
Member

PR makes sense to me, any objections if I merge?

I d rather remove then .7z variant, currently there way too many files attached to releases.

I agree, there's too many files already:
image

They are all double. 1 with and 1 without version number.

@HowlingWolfHWC when and how will this extra file be used? You're referring to a tool @uyjulian is making, but he wants to use .7z files. And you've only tested http, but this adds an https file. So I'm lost as to what the usecase of this PR is.
If it's a non-existing usecase that would perhaps be nice in the future then it's only adding bloat for the time being. Perhaps it's better to test on your own github branch first, then add the file later if it's really needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants