CodeAsm / PS1Linux

Linux for the original sony playstation one.
15 stars 1 forks source link

Mainline? #6

Open upintheairsheep opened 4 months ago

upintheairsheep commented 4 months ago

Would it be possible to mainline PS1Linux into the master Linux kernel, or into ucLinux’s master at least? If it requires to modify the kernel in the ways it could break other systems, then it’s better not to merge it.

Additionally, could you merge PS2 Linux and it’s unofficial patches, as Sony forgot to merge it, but merged PS3 drivers later on.

CodeAsm commented 4 months ago

To be honest, I have no idea. It may be. Some folks rightfully so suggested to maybe ditch the Runix code base and take a newer kernel base, and make our own storage device driver for whatever hardware we are able to connect (there are some reasonable nice USB boards available and existing home-brew code exists)

Those same folks that suggested to go use a more recent version, also said (and probably right) Linux wont be very useful and an RTOS or more light weight kernel and supporting tools would be better.

Anyway, my idea is, get some memory unit storage device format to work (cause we still lack the sources for it from Runix) and then see how far I can get to upgrade the versions. maybe, it turns out i better just take the most recent MIPS R3000A supporting Linux kernel (uClinux or mainline) and write stuff for that.

Merging, getting PS2 (ps3) Linux to work on my systems and work with those are my dream too.but my brain is everywhere. Getting this to work and share the working instructions I hope helps someone in some way. even if this means, Linux based on a more recent (and sane) code base with just the better storage medium (1 mu or a chain of, is not alott of space anyway)

upintheairsheep commented 4 months ago

To be honest, I have no idea. It may be. Some folks rightfully so suggested to maybe ditch the Runix code base and take a newer kernel base, and make our own storage device driver for whatever hardware we are able to connect (there are some reasonable nice USB boards available and existing home-brew code exists)

Those same folks that suggested to go use a more recent version, also said (and probably right) Linux wont be very useful and an RTOS or more light weight kernel and supporting tools would be better.

Anyway, my idea is, get some memory unit storage device format to work (cause we still lack the sources for it from Runix) and then see how far I can get to upgrade the versions. maybe, it turns out i better just take the most recent MIPS R3000A supporting Linux kernel (uClinux or mainline) and write stuff for that.

Merging, getting PS2 (ps3) Linux to work on my systems and work with those are my dream too.but my brain is everywhere. Getting this to work and share the working instructions I hope helps someone in some way. even if this means, Linux based on a more recent (and sane) code base with just the better storage medium (1 mu or a chain of, is not alott of space anyway)

The only thing worth merging if we cannot get the hardware to boot is the memory card filesystem driver, would be handy if someone makes a kernel driver for the PS3 memory card adapter and also people wanting to modify the PS1 memory card for an emulator.

CodeAsm commented 4 months ago

https://github.com/ShendoXT/memcardrex/ memCARDduino mentioned here is what I planned on trying at some point. PS1CardLink I used to backup some saves before and I dont worry much yet due to these two methods of being able to write to a memorycard. the ps3 adapter would be cool, but pretty rare find in and around Europe for a affordable price I think.

With writing and reading in our skillset, I was trying to figure out currently how the driver works, learning lots about the linux driver, partitioning support and filesystem workigs. ive also noticed later documentation in mainline linux mentioning drivers needing code rework for later kernels. so we definitely need to write new kernel drivers anyway at some point if we want to update.

no$psx loads my custom memorycards fine, the kernel seems to detect my first block, read either if its a multicard system or a single one and I think it now "borks" at the partition detection (or FS). I have yet to figure out how and where it does try this (I need more debugging capability or up my skills (probably skill issue))

Anyway, if someone (maybe me) figures out where to put the msdos partion bit and format the internal partition ext2, we might have a happy kernel. (its second boot attempt is on the CF card, I might have a cheap cheatdevice comming to me https://github.com/danhans42/psx232h might be a nice alternative way to attach a storage device. (CF card in 8bit ide mode, I see it can fit that PIO bus) but will be more soldering. The memorycards just seem like a nice way in for now anyway (and emulators support it, easier debugging for now)

for now, my latest public attempt is here: https://github.com/CodeAsm/PS1Linux/blob/main/tools/makemu.c it will write the first block stuff that the kernel needs to think its a Linux memory unit, but obviously fails as I dont yet fully know where to put the msdos partition (i tried a few things, probably just overlooking or overthinking?)

Oichkatzelesfrettschen commented 2 weeks ago

https://github.com/ShendoXT/memcardrex/ memCARDduino mentioned here is what I planned on trying at some point. PS1CardLink I used to backup some saves before and I dont worry much yet due to these two methods of being able to write to a memorycard. the ps3 adapter would be cool, but pretty rare find in and around Europe for a affordable price I think.

With writing and reading in our skillset, I was trying to figure out currently how the driver works, learning lots about the linux driver, partitioning support and filesystem workigs. ive also noticed later documentation in mainline linux mentioning drivers needing code rework for later kernels. so we definitely need to write new kernel drivers anyway at some point if we want to update.

no$psx loads my custom memorycards fine, the kernel seems to detect my first block, read either if its a multicard system or a single one and I think it now "borks" at the partition detection (or FS). I have yet to figure out how and where it does try this (I need more debugging capability or up my skills (probably skill issue))

Anyway, if someone (maybe me) figures out where to put the msdos partion bit and format the internal partition ext2, we might have a happy kernel. (its second boot attempt is on the CF card, I might have a cheap cheatdevice comming to me

https://github.com/danhans42/psx232h might be a nice alternative way to attach a storage device. (CF card in 8bit ide mode, I see it can fit that PIO bus)

but will be more soldering. The memorycards just seem like a nice way in for now anyway (and emulators support it, easier debugging for now)

for now, my latest public attempt is here: https://github.com/CodeAsm/PS1Linux/blob/main/tools/makemu.c

it will write the first block stuff that the kernel needs to think its a Linux memory unit, but obviously fails as I dont yet fully know where to put the msdos partition (i tried a few things, probably just overlooking or overthinking?)

Hey there! Have you considered joining the WiiLinux Discord server?

Can maybe be in the same "brainspace" for a bit and see his announcements and whole thought process and walk through - kind of "piggyback" on ideas?

Like... integrate busybox and mksh into the kernel so it will load a shell and utilities at boot for example and not just hang out uselessly.

--

Also their effort is part of a broader VoidLinuxPPC750 effort, and with this you could maybe get "VoidLinux MIPS" going as well, to bring in even more community support!!

CodeAsm commented 2 weeks ago

Hey there! Have you considered joining the WiiLinux Discord server?

Can maybe be in the same "brainspace" for a bit and see his announcements and whole thought process and walk through - kind of "piggyback" on ideas?

Like... integrate busybox and mksh into the kernel so it will load a shell and utilities at boot for example and not just hang out uselessly.

--

Also their effort is part of a broader VoidLinuxPPC750 effort, and with this you could maybe get "VoidLinux MIPS" going as well, to bring in even more community support!!

Thank you for finding my little update attempt. Ive joined the server, however the Powerpc used in the Wii, like the PS3 both have an mmu and are using a way newer Kernel from the start.

The availeble resources on the PS1 are so small, its questionable for newer kernels to even be able to run on this with similiar goals of that like for the Wii and similiar hardware.

But yes, any interaction and sharing ideas and help can be helpfull in bringing some new life in old projects. thus, thank you nonetheless, and I now also have a project for one of my poor Wii, run Linux on it :smile:

Oichkatzelesfrettschen commented 1 week ago

More projects is always a good thing! :) Your Wii will now get a nice upgrade!!!

I believe the NCommander Discord's project section may also offer you additional support, ideas and testers!


If uClinux used to give 1MB kernels, it seems like modern Linux should also still work with tiny adorable kernels for consoles like ours!


That being said, have you also considered FreeRTOS+BusyBox to get a UNIX-like tiny RTOS installed?

Either way, hopefully you can overcome the current obstacles! I'm doing some research now but I'm... so far behind... dunno if I'll ever catch up to be able to even offer a single idea!

Oichkatzelesfrettschen commented 1 week ago

One more thought is to hit up the mailing lists over at the NetBSD community?

Otherwise I can do that part if you'd like me to?

At least get ideas to get NetBSD booting that may also overcome the issue with Linux not booting...

It's a far shot... yet dual-OS support is kinda good actually and would be pretty cool.

But: as this is your project I would like to get your permission prior to reaching out to other communities for a solution involving their OS + yours.

If I have your approval, I'll start sending some emails. :)