Rtems-test with qemu integration for pc386

Chris Johns chrisj at rtems.org
Wed Jun 25 22:48:17 UTC 2014


On 26/06/2014 5:56 am, Krzysztof Mięsowicz wrote:
> Hi again and sorry for spam. Soon after writing mail to you I found the
> solution (at least I think so :-D ).

Thanks for posting the solution. The pc is the only qemu bsp I know of 
with a boot loader making it more complex.

>
> I created rtems-boot.img using script from
> http://www.rtems.org/wiki/index.php/Building_Grub .
> I wrote grub.cfg with following lines:
>
> serial --unit=0 --speed=115200
> set root='hd1,msdos1'
> terminal_output serial; terminal_input serial;
>
> to redirect terminal output and input to serial. Then, I am able to run
> arbitrary executable using following command (example for ticker):
>
> 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"

This is an excellent solution. Well done.

>
> This simply boots executable specified as -kernel argument and appends
> --console=com1;boot to grub multiboot specification. This results in
> following output:
>
> *** BEGIN OF TEST CLOCK TICK ***
> TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
> TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
> TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:05   12/31/1988
> TA2  - rtems_clock_get_tod - 09:00:10   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:10   12/31/1988
> TA3  - rtems_clock_get_tod - 09:00:15   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:15   12/31/1988
> TA2  - rtems_clock_get_tod - 09:00:20   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:20   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:25   12/31/1988
> TA3  - rtems_clock_get_tod - 09:00:30   12/31/1988
> TA1  - rtems_clock_get_tod - 09:00:30   12/31/1988
> TA2  - rtems_clock_get_tod - 09:00:30   12/31/1988
> *** END OF TEST CLOCK TICK ***
>
> 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?
>

I agree this is the way to go. Please send me the rtems-test patch 
without the coverage option so I can add this bsp to the supported test 
bsps. We can add the coverage option in further changes once we have 
detecting a suitable qemu figured out.

Chris



More information about the devel mailing list