| 100 | |
| 101 | We could generate a hard-disk image ''rtems-boot.img''. Before we start qemu, we also should create some other files. The directories and file structure like following. |
| 102 | {{{ |
| 103 | $ tree |
| 104 | |--- rtems-boot.img |
| 105 | |--- examples |
| 106 | | |--- ticker.exe |
| 107 | |--- grub.cfg |
| 108 | |--- mkimage.sh |
| 109 | |--- qemu.sh |
| 110 | }}} |
| 111 | * rtems-boot.img: generated by ''mkimage.sh'' shell script. |
| 112 | * examples: some RTEMS executable files, such as 'ticker.exe'. |
| 113 | * grub.cfg: the Grub2 configration file, you should edit this file when new RTEMS file add. |
| 114 | * mkimage.sh: script used to generate hard-disk image, 'sudo ./mkimage.sh'. |
| 115 | * qemu.sh: start QEMU, './qemu.sh rtems-boot.img'. |
| 116 | |
| 117 | The qemu.sh: |
| 118 | {{{ |
| 119 | #!/bin/bash |
| 120 | qemu-system-i386 -m 128 -boot b -hda $1 -hdb fat:. -serial stdio -no-reboot |
| 121 | }}} |