open-power / petitboot

GNU General Public License v2.0
214 stars 56 forks source link

How do I build a install image for Playstation 3? #98

Open kernaltrap8 opened 1 year ago

kernaltrap8 commented 1 year ago

This isnt really a issue, but i wasnt sure were to ask. I've recently gotten into PS3 linux stuff, and all the images floating around the web are very old. How would i go about building a new dtbimage.ps3.bin?

powerpc64 commented 1 year ago

you then you then when its done you

powerpc64 commented 1 year ago

nah but can someone help this man

jk-ozlabs commented 1 year ago

So, this is a bit of a task: petitboot provides a bit of infrastructure for booting from one Linux instance to another; the dtbImage.ps3.bin / otheros.bld also includes all the other components of that first Linux instance: the kernel, a minimal userspace, and petitboot.

So, the (very) general build process is:

  1. build a minimal userspace that includes the petitboot application. We used to use OpenWRT for this, but buildroot would be a good option now. This would give you a rootfs.
  2. build a Linux kernel for the ps3 platform, using that rootfs as a built-in initramfs (check out CONFIG_INITRAMFS_SOURCE for this)

For (1), you'd need a few (relatively) minor changes to buildroot to add a petitboot "package". There's an example here if you're keen!

I'd write up some more detailed instructions, but it has been a loooong time since I've had access to ps3 hardware that could run Linux, so I'd have no way to actually verify those.

kernaltrap8 commented 1 year ago

So, this is a bit of a task: petitboot provides a bit of infrastructure for booting from one Linux instance to another; the dtbImage.ps3.bin / otheros.bld also includes all the other components of that first Linux instance: the kernel, a minimal userspace, and petitboot.

So, the (very) general build process is:

1. build a minimal userspace that includes the petitboot application. We used to use OpenWRT for this, but [buildroot](https://buildroot.org) would be a good option now. This would give you a rootfs.

2. build a Linux kernel for the ps3 platform, using that rootfs as a built-in initramfs (check out `CONFIG_INITRAMFS_SOURCE` for this)

For (1), you'd need a few (relatively) minor changes to buildroot to add a petitboot "package". There's an example here if you're keen!

I'd write up some more detailed instructions, but it has been a loooong time since I've had access to ps3 hardware that could run Linux, so I'd have no way to actually verify those.

ah. i dont want to compile EVERYTHING myself, could i use the example files to build a new dtbimage?

jk-ozlabs commented 1 year ago

ah. i dont want to compile EVERYTHING myself, could i use the example files to build a new dtbimage?

If you're updating petitboot, then you'll need to create a new rootfs to install that into (matching all the existing library versioning), and then build that into a new kernel.

Consuming existing binary files (and getting the ABI versioning right) is just going to be more trouble than rebuilding the whole set.

Badprt23 commented 1 year ago

Currently trying the same, already compiled the kernel. I was wondering what this config might be https://kernel.googlesource.com/pub/scm/linux/kernel/git/geoff/ps3-linux/+/refs/heads/master/arch/powerpc/configs/ps3_petitboot_defconfig Thats geoff levlands ps3 linux kernel source. when compiling it, it outputs a dtbimage, but i tried flashing it and it didnt work. Also makes sense as thats a kernel not petitboot/initrd

Badprt23 commented 1 year ago

Also hi james, long time no see;)

Badprt23 commented 1 year ago

Also the guy from t2 did something with petitboot, i think he build some type of initrd/kernel with kexec to boot on a ps3 but im not sure if he went through with it: https://www.youtube.com/live/st70bZaliMM?feature=share

kernaltrap8 commented 1 year ago

Also hi james, long time no see;)

lol i dont actually remember you

Badprt23 commented 1 year ago

I wasnt directly involved but still the stuff from psx place discord

kernaltrap8 commented 1 year ago

I wasnt directly involved but still the stuff from psx place discord

Playstation Homebrew? yeah.. i dont remember. if you're referring to me getting banned, i have a new server now https://discord.gg/Z6TBvQVHJa

CodeAsm commented 1 year ago

did you succeed ? as I too got some intrest in getting a relativly recent Linux going on my spare PS3. Rene from T2 does still work on his distro, might look into that. altho playing with Buildroot also sounds fun (and get my own "distro" going)

kernaltrap8 commented 1 year ago

did you succeed ? as I too got some intrest in getting a relativly recent Linux going on my spare PS3. Rene from T2 does still work on his distro, might look into that. altho playing with Buildroot also sounds fun (and get my own "distro" going)

to be honest, kinda gave up. as of right now my main focuses in the PS3 scene are modding GH:WoR and getting Gentoo working correctly in OtherOS. might also make my own distro, who knows. wanna get fan speed and temp reading working in Linux, too.