Mitch Bradley wrote:
The situation you describe is an intentional "feature", implemented at line 278 of ofw/core/bootparm.fth [snip] One workaround would be to do "false to already-go?" before re-executing the boot command.
Thanks for the explanation Mitch!
The USB hang is because dev/geode/usb.fth explicitly turns off the USB hardware when transferring control to the booted program. This was a precautionary measure for Linux. The USB hardware performs DMA to memory descriptors. We were afraid that might interfere with Linux startup in some cases, so we turned off the USB to make the system "quiet" during Linux startup. (We didn't have specific evidence that the USB DMA was causing problems; we were just being careful. Linux was starting properly before this USB turn-off was added.)
If you know that the USB DMA will not cause problems for your system, you can leave USB turned on by adding this line to fw.bth, anywhere after the "fload ${BP}/dev/geode/usb.fth" line:
' noop to go-hook
go-hook is a defer word that is executed just before transferring control to a loaded program. It can be used to do any platform-specific last-second cleanup that you need to do.
Sound reasonable for Linux booting.
I try it and I found that it is possibile to do it at runtime (by typing the command above on ofw console) Thanks for the suggestion
I got another problem while reading the file from usb device:
Running Lattice programmer Boot device: /usb/disk:\vme.elf Arguments: u:\neptune.vmeBoot device: /usb/disk:\vme.elf Arguments: u:\neptune.vme finddevice ( 105463 -- ff82b044 ) getprop ( 4 ff9e77b8 10546b ff82b044 -- 4 ) getprop ( 4 ff9e77b8 105471 ff82b044 -- 4 ) getproplen ( 105478 ff82b044 -- 40 ) claim ( 4 1000 0 -- ffb73000 ) getprop ( 40 ffb73018 105478 ff82b044 -- 40 ) getproplen ( 105481 ff82b044 -- f ) getprop ( f ffb73074 105481 ff82b044 -- f ) write ( 2e 1058ac ff9b5180 -- Lattice Semiconductor Corp. 2e ) write ( 2 1058ac ff9b5180 -- 2 ) write ( 34 1058ac ff9b5180 -- ispVME(tm) V12.1 Copyright 1998-2008. 34 ) write ( 2 1058ac ff9b5180 -- 2 ) write ( 43 1058ac ff9b5180 -- For daisy chain programming of all in-system programmable devices 43 ) write ( 2 1058ac ff9b5180 -- 2 ) write ( 38 1058ac ff9b5180 -- Processing virtual machine file (u:\neptune.vme).. .... 38 ) write ( 2 1058ac ff9b5180 -- 2 ) open ( ff9e7668 -- ff9df5b4 ) read ( 80 ffb730a8 ff9df5b4 -- 80 ) BOUND range exceeded ok2
the last read() is, in C code a simple fgetc(). Is 'still something about USB device or maybe in client interface? (or.. whatever..)
TIA,