1. configure VM
a. add hardware -> Serial port
b. using named pipe
c. /tmp/isocket
d. this end is server & far end is application
e. check Yield CPU on poll
f. start Virtual Machine
2. socat /tmp/isocket tcp4-listen:9001 &
/tmp/socket: VMware call it 'named piped', actually it is Unix Daemon Socket, so you shouldn't use pipe:/tmp/socket
3. telnet 127.0.0.1 9001
Trouble Shoot: 有时候会遇到错误Connection closed by foreign host,或者telnet一开,socat就能退出,很可能是你没power on虚拟机,有名管道还没创建,你就socat,这样也会创建一个名为isocket的文件但只是普通文件。具体的细节请看socat help
start Virtual Machine first, than run the socat, and telnet
(Note you must have permission to all resource, /tmp/socket, VM and so on)
Vritual Machine ~ Virtual Machine
12345678910111213
1. configure VM
a. add hardware --> serial port
b. Using named pipe, configure /tmp/isocket
c. this end is server & far end is Virtual Machine
d. check Yield CPU on poll
e. start VM
2. Another VM
a. add hardware --> Serial Port
b. Using named pipe, configure /tmp/isocket
c. this end is client & far end is Virtual Machine
d. check Yield CPU on poll
e. start VMs
Windows Host:
Host ~ Virtual Machine
123456789101112131415
1. configure VM
a. add hardware --> serial port
b. using named pipe
c. //./pipe/vmwaredebug
d. this end is client & far end is application
e. check Yield CPU on poll
2. using 3rd-party tool to communicate with named pipe
a. down the tool
b. install service
cmd>vmwaregateway.exe /r
c. start service
c:/> net start vmwaregateway
d. telnet 127.0.0.1 567
3. start Virtual Machine
1. configure VM
a. add hardware --> serial port
b. Using named pipe, //./pipe/vmwaredebug
c. this end is server & far end is Virtual Machine
d. check Yield CPU on poll
e. start VM
2. Another VM
a. add hardware --> Serial Port
b. Using named pipe, //./pipe/vmwaredebug
c. this end is client & far end is Virtual Machine
d. check Yield CPU on poll
e. start VMs
-b byte
–byte= byte
Keep only every byte of the input file (header data is not affected). byte can be
in the range from 0 to interleave-1, where interleave is given by the -i or
–interleave option, or the default of 4. This option is useful for creating files to
program ROM . It is typically used with an srec output target.
-i interleave
–interleave= interleave (interleave 隔行、交叉)
Only copy one out of every interleave bytes. Select which byte to copy with the
-b or –byte option. The default is 4. objcopy ignores this option if you do not
specify either -b or –byte.
–change-addresses incr
–adjust-vma incr
Change the VMA and LMA addresses of all sections, section., as well as the
start address, by adding incr. Some object file formats do not permit section
addresses to be changed arbitrarily.
–set-section-flags section=flags
为section的段设置一个标识。这个flags变量的可以取逗号分隔的多个标识名字符串(这些标识名字符串是能够被Objcopy程序所识别的),合法的标识名有alloc,load,readonly,code,data和rom。
You can set the contents flag for a section which does not havecontents, but it is not meaningful to clear the contents flag of a section which does have contents; just remove the section instead. Not all flags are meaningful for all object file formats.
–change-leading-char
Some object file formats use special characters at the start of symbols. The most
common such character is underscore, which compilers often add before every
symbol. This option tells objcopy to change the leading character of every
symbol when it converts between object file formats. If the object file formats use
the same leading character, this option has no effect. Otherwise, it will add a
character, or remove a character, or change a character, as appropriate.
–remove-leading-char
If the first character of a global symbol is a special symbol leading character used
by the object file format, remove the character. The most common symbol leading
character is underscore. This option will remove a leading underscore from all
global symbols. This can be useful if you want to link together objects of different
file formats with different conventions for symbol names.
–weaken
Change all global symbols in the file to be weak. This can be useful when building
an object that will be linked against other objects using the -R option to the linker.
This option is only effective when using an object file format that supports weak
symbols.
-V
–version
Show the version number of objcopy.
-v
–verbose
Verbose output: list all object files modified. In the case of archives, objcopy -V
lists all members of the archive.