[openfirmware] LPC Flash programming
Mitch Bradley
wmb at laptop.org
Thu May 29 19:45:34 CEST 2008
Andrea wrote:
> Dear OFW developers,
>
> I've found that inside
>
> dev/geode/lpcflash.fth
>
> it seem there is the Forth code to program an LPC Flash.
>
> I try to use it (like on OLPC) but I have the following undefines:
>
> ./build neptune.rom
> --- ${BP}/cpu/x86/pc/neptune/devices.fth is newer than the target file
> fw.img
> --- Rebuilding fw.img
> --- Cmd:
> /home/shared/devel/neptune/sw/ofw/openfirmware.git/cpu/x86/Linux/x86forth
> /home/shared/devel/neptune/sw/ofw/openfirmware.git/cpu/x86/build/basefw.dic
> ../fw.bth
>
> ${BP}/dev/geode/lpcflash.fth:57: ?file ?
> ${BP}/dev/geode/lpcflash.fth:68: /flash ?
> ${BP}/dev/geode/lpcflash.fth:70: flash-buf ?
> ${BP}/dev/geode/lpcflash.fth:74: get-file ?
> --- Saving fw.dic ...
> --- Saving fw.img ...
> --- fw.img is newer than the target file neptune.rom
> --- Rebuilding neptune.rom
> --- Cmd:
> /home/shared/devel/neptune/sw/ofw/openfirmware.git/cpu/x86/Linux/forth
> /home/shared/devel/neptune/sw/ofw/openfirmware.git/cpu/x86/Linux/../build/builder.dic
> ../neptune.bth
> --- Saving as neptune.rom - Direct ROM format
>
> As far as I understand this are dependency that are declared inside:
>
> dev/olpc/spiflash
>
> (due the fact that on OLPC LPC flash is an SPI flash connected via
> KB3700, correct me if I'm wrong)
>
> Can this lpcflash.fth device be used for a "standard" LPC flash too? or
> it's only some kind of "wrapper" for the OLPC's SPI flash?
>
It can be used for standard LPC FLASH. The shared functions are related
to the "user interface" task of first getting an image file into
memory. Those functions could be factored out into a separate file for
sharing without having to load the SPI FLASH module, but might as well
be reimplemented, because the details of the OLPC image integrity checks
don't necessarily apply to other platforms.
?file - complains if a file hasn't been loaded yet
/flash - constant returning the size of the FLASH chip
flash-buf - address of a buffer to hold the image prior to flashing
get-file - read image file from disk or whatever and perform integrity
checks
> Thanks in advance and best regards,
>
>
More information about the openfirmware
mailing list