<div dir="ltr">Hi again and sorry for spam. Soon after writing mail to you I found the solution (at least I think so :-D ).<div><br></div><div>I created rtems-boot.img using script from <a href="http://www.rtems.org/wiki/index.php/Building_Grub">http://www.rtems.org/wiki/index.php/Building_Grub</a> .</div>
<div>I wrote grub.cfg with following lines:</div><div><br></div><div><div>serial --unit=0 --speed=115200</div><div>set root='hd1,msdos1'</div><div>terminal_output serial; terminal_input serial;</div></div><div><br>
</div><div>to redirect terminal output and input to serial. Then, I am able to run arbitrary executable using following command (example for ticker):</div><div><br></div><div>qemu-system-i386 -m 128 -boot b -hda $HOME/qemu/hd/rtems-boot.img -hdb fat:$HOME/qemu/hd -serial stdio -no-reboot -nographic -monitor null --exec-trace ticker.exe.cov -kernel /home/rtems/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/ticker/ticker.exe -append "--console=com1;boot"<br>
</div><div><br></div><div>This simply boots executable specified as -kernel argument and appends --console=com1;boot to grub multiboot specification. This results in following output:</div><div><div><br></div><div>*** BEGIN OF TEST CLOCK TICK ***</div>
<div>TA1 - rtems_clock_get_tod - 09:00:00 12/31/1988</div><div>TA2 - rtems_clock_get_tod - 09:00:00 12/31/1988</div><div>TA3 - rtems_clock_get_tod - 09:00:00 12/31/1988</div><div>TA1 - rtems_clock_get_tod - 09:00:05 12/31/1988</div>
<div>TA2 - rtems_clock_get_tod - 09:00:10 12/31/1988</div><div>TA1 - rtems_clock_get_tod - 09:00:10 12/31/1988</div><div>TA3 - rtems_clock_get_tod - 09:00:15 12/31/1988</div><div>TA1 - rtems_clock_get_tod - 09:00:15 12/31/1988</div>
<div>TA2 - rtems_clock_get_tod - 09:00:20 12/31/1988</div><div>TA1 - rtems_clock_get_tod - 09:00:20 12/31/1988</div><div>TA1 - rtems_clock_get_tod - 09:00:25 12/31/1988</div><div>TA3 - rtems_clock_get_tod - 09:00:30 12/31/1988</div>
<div>TA1 - rtems_clock_get_tod - 09:00:30 12/31/1988</div><div>TA2 - rtems_clock_get_tod - 09:00:30 12/31/1988</div><div>*** END OF TEST CLOCK TICK ***</div></div><div><br></div><div>Additionaly, ticker.exe.cov is created. I think this is really good soultion to use in coverage analysis within rtems-test. The question is where rtems-boot.img and grub.cfg should be placed? </div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-06-25 21:11 GMT+02:00 Krzysztof Mięsowicz <span dir="ltr"><<a href="mailto:krzysztof.miesowicz@gmail.com" target="_blank">krzysztof.miesowicz@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I am currently working on rtems-test integration with qemu (especially couverture-qemu) for pc386 BSP. Up to now pc386 used two approaches:</div>
<div><br></div><div>1. It used pc386_fda floppy image which boots test.exe from the same directory</div>
<div><br></div><div>tree:</div><div>qemu/</div><div> hd/</div><div> pc386_fda</div><div> test.exe</div><div> install/</div><div> binaries of qemu</div><div><br></div><div>command to run hello.exe:</div>
<div>cp ${PATH_TO_SAMPLES}/hello/hello.exe ${QEMUDIR}/hd/test.exe</div><div><div>qemu-system-i386 -m 256 -serial stdio -no-reboot -boot a -fda $HOME/qemu/pc386_fda -hda fat:$HOME/qemu/hd</div></div><div><br></div><div>2. pc386 rtems executables can be run on qemu using rtems-boot.img and rtems-grub.cfg. rtems-grub.cfg is specified within rtems-boot.img grub.cfg file as configfile - grub searches for it in specified location. So rtems-grub.cfg must contain grub configuration to boot proper executable. It may contain a lot of menu entries, but it may also look like this below:</div>
<div><br></div><div># start of rtems-grub.cfg file</div><div><div>serial --unit=0 --speed=115200</div><div>set root=(hd0,1)</div><div>multiboot (hd0,1)/hello/hello.exe --console=com1</div><div>boot</div></div><div># end of rtems-grub.cfg file</div>
<div><br></div><div>tree:</div><div>qemu/</div><div> hd/</div><div> rtems-boot.img</div><div> rtems-grub.cfg</div><div><br></div><div>Then, using following command I can run executable specified in rtems-grub.cfg file:</div>
<div>qemu-system-i386 -boot a -fda $HOME/qemu/hd/rtems-boot.img -hda fat:$HOME/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples -hdb fat:$HOME/qemu/hd -monitor null -serial stdio --no-reboot -nographic<br>
</div><div><br></div><div>Knowing these two approaches I wonder what should be best approach to use with rtems-test. I think that second approach is more suitable, however there should be some module which would prepare rtems-grub.cfg file for every test. </div>
<div><br></div><div>Or maybe there exist some way to not writing this rtems-grub.cfg file, but instead specifying script which would be then passed to grub terminal. From what I see gdb is working in such way, where BSPs has specified gdb_script which is then passed to gdb.</div>
<div><br></div><div>I hope you will give me advice how should it be done.</div><div><br></div><div>Regards,</div><div>Krzysztof Miesowicz</div></div>
</blockquote></div><br></div>