On 6/25/2013 2:22 PM, James Cameron wrote:
On Fri, Sep 14, 2012 at 08:19:28PM +0000, Mark Morgan Lloyd wrote:
Is it possible to put OpenFirmware on an SD card and use it to boot off e.g. a USB-attached mass storage device or using TFTP over a LAN?
I've now a Raspberry Pi (B).
The armforth.static in the openfirmware repository as of now (r3683) seems to run:
% cpu/arm/Linux/armforth.static cpu/arm/build/builder.dic ok bye %
and rebuilding it seems to work fine:
% (cd cpu/arm/Linux; make) ... % cpu/arm/Linux/forth cpu/arm/build/builder.dic ok bye %
and rebuilding the builder seems to work fine:
% (cd cpu/arm/build; make) ... % cpu/arm/Linux/forth cpu/arm/build/basefw.dic ok no-page to-file test words ok bye %
So user-mode is probably okay, and a useful tool.
It is said [1] that the SoC loads various files and runs them on the (closed) GPU. It then loads kernel.img and runs it on the ARM.
% file /boot/kernel.img kernel.img: Linux kernel ARM boot executable zImage (little-endian) %
I'm not planning a port, but I thought I'd mention what I've found so far, in case anybody is interested. The porting would be drivers for serial, SD, ethernet, and USB, possibly using the kernel sources as reference, given that there's very little data available.
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripheral...
describes the peripherals.
The mini UART looks pretty much like the 16550 (PC COM port) UART that everybody seems to use as a programming model these days, so no drama there.
The EMMC controller looks like the common SDHCI programming model. Same old same old.
The USB controller uses Synopsis IP; it seems like you can get the manual if you register.
The Ethernet is on USB - it's inside an SMSC LAN9512 integrated USB hub/ethernet chip. I don't know its details, but in the past, adding OFW support for new USB ethernet interfaces has not proven to be difficult.
References: