Fwd: Petitboot for PS3

Geoff Levand geoff at infradead.org
Mon Nov 23 05:13:22 AEDT 2020


Hi Carlos,

On 11/19/20 1:07 PM, Carlos Eduardo de Paula wrote:
> I was able in the petitboot shell to set the timeout for booting an image by using ps3-bl-options (that uses ps3-flash-util itself) but if I use these utilities in my booted linux, I get "magic_num failed" error and can't do any flash operations. I tried loading the ps3flash module and /dev/ps3flash device appears but still can't set it. Also in linux, the devices ps3vflash and etc doesn't show up. Any tips on accessing the flash from booted linux?

Your kernel needs to be built with CONFIG_PS3_FLASH set, as it is
with ps3_defconfig.  I guess this is not your problem though since
it seems you can open and read the ps3flash device, but get an
error in the data returned.

You could add the line '#define DEBUG' to the very top of
'drivers/char/ps3flash.c' to print some driver debug output to
the console.

That "magic_num failed" message is coming from the routine
os_area_header_verify() here:
 
 https://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-utils.git/tree/lib/flash.c#n321

Which I guess in your case is called by os_area_header_read().

My recommendation is to compare the os_area header from petitboot
and from the booted kernel to see how it compares.  You could use
the os_area_db_dump_header() routine from ps3-utils (show-settings).
Another thing is to add some code to the built kernel to dump the
os_area header for comparison to the petitboot data.

> Another question, I generated a kernel patch from your tree diff'ing stock 5.8.0 from your 5.8.0, then I fetched mainline 5.9.8 and applied this patch, built it and added to yaboot.
> 
> The kernel boots fine but I don't get network although the interface is there and after some minutes, I get a kernel oops in the gelic driver. Here's a print from the error.
> 20201119_151317.jpg

Not sure about that error, but if I were to guess, you are running out of memory...

-Geoff


More information about the Linuxppc-dev mailing list