Building a minimalistic otheros.bld?

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
allanl1234
Posts: 4
Joined: Mon Dec 28, 2009 1:32 am

Building a minimalistic otheros.bld?

Post by allanl1234 »

I was wondering if it would be possible to build a minimalistic otheros.bld that immediately boots the linux installation on the internal hdd?

When you only use a local hdd Linux-installation it seems that alot of devices are initialized during the early boot phase (display, usb devices, network devices, waiting for an ip) for no particular reason since they will be initialized again when booting the OS you have installed on the hdd.

Ideally the minimalistic otheros.bld should only be a blank screen that initializes enough devices to boot the hdd installation.

Does anyone know if such an otheros.bld exists - or if it actually possible to build one like this?

If it does not already exists, does anyone know a good starting place for learning how to build your own otheros.bld?
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

If you're willing to compile your own kernel, there is one option that may interest you. I'm fairly sure that a otheros.bld is produced by the linux build system when building for ps3. This may be flashed in as 'otheros' and off you go.

So rather than writing a kernel + mini-userspace whos sole purpose is to load a vmlinuz off the hdd and boot it, we flash our actual kernel and let gameOS start it for us.

I was doing this for a while, but moved back to the separate bootloader as its nice to use to boot live CDs, do some minimal FS recovery in the shell, etc. Fast boot it nice, but its a trade-off against flexibility :)

Some things to watch out for:
* the ps3 hdd driver should be built in, ie not as a module, since there's no option to use an initrd. (I usually build most 'core' stuff in on fixed systems anyway)
* you may have to compile your desired commandline into the kernel as there's no place to specify on a per-boot basis
* maybe more i can't remember any more :(
Damn, I need a decent signature!
allanl1234
Posts: 4
Joined: Mon Dec 28, 2009 1:32 am

Post by allanl1234 »

Thanks for the suggestion.

I've tried to use the otheros.bld created when compiling my kernel, but I'm having problems building the commandline into the kernel.

I've configured a kernel that doesn't use an initrd and made sure that all necessary drivers are compiled into it. I've inserted the commandline into CONFIG_CMDLINE in the .config file for the kernel:

CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="video=ps3fb:mode:162 quiet root/dev/ps3da2"

I tested the kernel with kexec without passing any parameters to the kernel and it clearly is not using the command line. If I pass the commandline manually to the kernel with kexec --append then it works fine.

When I install the otheros.bld in the PS3 XMB and boot other os nothing is initialized and it just hangs at a black screen. My guess is because it does not know what to mount as root folder because the command line is not working.

Any ideas for how to fix this?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

You might have more luck by starting with a kboot/petitboot build and just modifying it to get what you want. Then you'll know when your changes cause it to no longer boot :)
Post Reply