Am 10.03.2012 17:52 schrieb Idwer Vollering:
2012/3/10 Carl-Daniel Hailfinger email@example.com:
I'm glad to announce libhwremote 0.1, a library which forwards hardware accesses over a serial line to a machine running SerialICE. No QEMU needed! All you have to do to run lspci/superiotool/... against a remote SerialICE target is to compile those tools against libhwremote, and then just run them like you would run them natively.
libhwremote is an early prototype. Due to that it has quite a few quirks:
- Each run of a libhwremote enabled application requires the application
to be started before SerialICE prints its banner, i.e. start the application, then hit reset on the SerialICE target. The reason is the init code which expects "newline,serialice_banner,newline" to do anything useful. If that banner is not there, the results are undefined.
- The error handling is mostly working but not really nice.
- /dev/ttyUSB0 is hardcoded for serial line access, you may want to
- MMIO functions are totally untested, I didn't find any code which
needed it (except for flashrom, but probing for flash chips might interfere with SerialICE functionality if SerialICE runs from ROM).
- The pciutils patch is totally untested, but I expect it to work.
A big THANK YOU goes to Idwer Vollering who tested a dozen iterations of this code until I had figured out the very surprising and unique properties of the SerialICE protocol.
Another big THANK YOU goes to Ron Minnich who sent a mail titled "[SerialICE] an idea" which motivated me to start this little project: http://serialice.com/pipermail/serialice/2009-November/000043.html
This code sat unfinished on my disk since December 2009, and it's about time I finished it enough to be usable.
- superiotool support is tested and stable
- pciutils (lspci/setpci/...) support is untested, but should work.
Please fetch latest superiotool from the coreboot git tree and latest pciutils from the pciutils git tree to apply the patches.
git clone'd from git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
libhwremote is available at: http://ra.openbios.org/~carldani/libhwremote-0.1.tar.gz
superiotool patch is available at: http://ra.openbios.org/~carldani/superiotool_hwremote.diff
pciutils patch is available at: http://ra.openbios.org/~carldani/pciutils_hwremote.diff
I plan to check this code into a source code repository really soon, but for now a tarball and separate patch downloads have to suffice.
Tests and bug reports appreciated.
Where is i386-io-libhwremote.h?
$ make distclean ; make [...] gcc -O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -c -o i386-ports.o i386-ports.c i386-ports.c:30:33: fatal error: i386-io-libhwremote.h: No such file or directory
Ouch. I forgot to git add that file. Please download the updated http://ra.openbios.org/~carldani/pciutils_hwremote.diff