RTEMS/QEMU/GRUB on Windows

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jan 8 16:42:13 UTC 2009


Massimo Tipaldi wrote:
> Joel,
>
> from your email, I have understood that I have generated my hello.exe 
> correctly and that the "No multiboot header found" message is due to an 
> format incompatibility between my hello.exe and the grub.
>
> Can you confirm this?
>
>   
hello.exe is an ELF
hello.ralf is netboot

I thought Grub could boot ELF files. 

What Grub can or cannot boot is unknown to me.
> After compiling RTEMS (target=i386-rtems4.9 and RTEMS_BSP=”pc386”),
> I have carried out the following steps to configure QEMU/GRUB(taken from 
> http://www.rtems.com/wiki/index.php/QEMU):
>
> 1) From the RTEMS wiki, download the following files: qemu.bat, 
> rtems-boot.img e rtems-grub.cfg
> 2)Copy the file rtems-boot.img in d:\opt\rtems-4.9
> 3)Copy the file qemu.bat in d:\opt\rtems-4.9
> 4) Copy the file rtems-grub.cfg in 
> /d/opt/src/rtems/i386/i386-rtems4.9/c/pc386/testsuites/samples
> 5)Modify the file qemu.bat as follows:
>
> rem @echo off
> set QEMU=D:\opt\rtems-4.9\qemu-0.9.0-windows
> %QEMU%\qemu -L %QEMU% -m 128 -boot a -fda 
> d:\opt\rtems-4.9\rtems-boot.img -hda fat:%1 %2 %3
>
> 6) In d:\opt\rtems-4.9, launch the batch file batch rtems.bat
> 7) In the DOS shell launch the QEMU virtual machine as follows: qemu 
> d:\opt\src\rtems\i386\i386-rtems4.9\c\pc386\testsuites\samples
> 8)The GRUB is being launched: choose the application to start from the 
> configured menu
>
> As previously written, the hello.exe produced during the RTEMS 
> compilation is correctly booted from QEMU/GRUB. Unfortunately, this does 
> not happen with my hello.exe.
>
> Can you suggest me a way to make compatible Grub with my hello.exe? How 
> can I make my hello.exe an ELF file?
>
> Can you confirm me that I have installed QEMU correctly?
>
> Which ralf files are you referring to? The hello.ralf that comes from my 
> compilation?
>
>
>
> Massimo
>
>
>
> Joel Sherrill ha scritto:
>   
>> Massimo Tipaldi wrote:
>>     
>>> Dear all,
>>>
>>> first of all, I wish you all the best for this year.
>>>
>>> I am still trying to work RTEMS on Windows. I have followed all the 
>>> advices from Joel and Chris (Rtems 4.9.1 with the related examples and 
>>> RTEMS tools 4.9).
>>>
>>> For what concerns the RTEMS installation:
>>> 1) with the option "--enable-multilib", the installation fails 
>>> (libnetworking/netinet/.deps/libnetworking_a-if_ether.Po: No such file 
>>> or directory);
>>> 2) without the option "--enable-multilib", the installation was 
>>> successfully.
>>> Are there any differences with the option --enable-multilib? Can I 
>>> configure RTEMS without this option?
>>>
>>> For what concerns the compilation and execution of Hello_Word via 
>>> QEMU, the issues described in my previous emails remain(see my 
>>> previous emails for more details: the only difference is that RTEMS is 
>>> now installed in d:\opt\src\rtems\i386\):
>>> 1) I have to modify the Makefile.inc 
>>> (d:\opt\src\rtems\i386\i386-rtems4.9\c\pc386\make)
>>> 2) I have to create the two variables RTEMS_MAKEFILE_PATH and ARCH
>>> 3) I have to copy start16.bin into the folder d:/msys1.0/lib
>>>
>>> Even though the hello.exe is created, it is not correctly managed by 
>>> QEMU (the "No multiboot header found" message appears).
>>> What I can further add, is that the dimension of my Hello Word is 17 
>>> Kb, whereas the dimension of the Hello Word that comes from the RTEMS 
>>> compliation (correctly run by QEMU)is about 1 Mb.
>>>
>>>   
>>>       
>> My ".ralf" files are reported as this by file:
>>
>> http://www.rtems.org/wiki/index.php/BoardSupportPackageInformation#PowerPC_BSPs 
>>
>>
>> What about yours?
>>
>> What are you booting RTEMS from? How did you create your grub
>>     
>>> Why should I modify the Makefile.inc? Why is not sufficient to set the 
>>> RTEMS_MAKEFILE_PATH variable (as stated in RTMES manuals)? 
>>>       
>> If you can build the example/hello, then it is OK and there
>> is just a discrepancy between the executable format produced
>> and how you are booting it (grub version, setup, etc?)
>>     
>>> How can I produce a Hello Word application manageable by QEMU?
>>>
>>> Joel, what does it means that the file hello.ralf should have had 
>>> bin2boot run on it? 
>>>       
>> bin2boot converts it to a netboot image.  I do not know the
>> relationship between that and a multiboot image.
>>     
>>> Should QEMU run somehow this file, instead of hello.exe? If yes, how?
>>>
>>>
>>>   
>>>       
>> I am running ELF files from a qemu vfat.  I use the .exe files.
>>     
>>> Thanks in advance
>>>
>>> Massimo
>>>
>>>
>>>
>>>   
>>>       
>>     
>
>
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list