QEMU/GRUB: No multiboot header found

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Tue Dec 23 10:51:36 UTC 2008


Massimo,

just an idea: what kind of File System are you using on your Windows
machine (disk d:) FAT or NTFS? Maybe the name handling might be an issue
there.

wkr,
Thomas.

Massimo Tipaldi wrote:
> Ok, I have followed your suggestions. Lets sort out at first the Rtems 
> compilation issue.
> 
> I have reinstalled Rtems tools in /d/opt/rtems-4.9 (Rtems tools 4.9 with 
> the Autoconf & Automake + target i386).
> 
> After that, in the MSYS shell, I have typed the following sequence of 
> commands:
> 
> export PATH=/d/opt/rtems-4.9/bin:$PATH
> mkdir -p /d/opt/src/rtems
> cd /d/opt/src/rtems
> tar jxf rtems-4.9.1.tar.bz2
> cd rtems-4.9.1
> ./bootstrap
> cd ..
> mkdir i386
> ../rtems-4.9.1/configure --target=i386-rtems4.9 --enable-multilib 
> --prefix=/d/opt/src/rtems/i386
> 
> 
> During the configuration phase, two messages are appeared:
> ./config.status: 
> libnetworking/netinet/.deps/libnetworking_a-if_ether.Po: No such file or 
> directory
> ./config.status: libmisc/mw-fb/.deps/mw_fb.Po: No such file or directory
> 
> After the configuration phase, in spite of these two messages, I have 
> tried the make:
> make RTEMS_BSP="pc386"
> 
> 
> After several minutes, the make fails with the following messages:
> 
> make[8]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit/libfs'
> Making preinstall in libnetworking
> make[8]: Entering directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit/libnetworking'
> Makefile:1257: netinet/.deps/libnetworking_a-if_ether.Po: No such file 
> or directory
> make[8]: *** No rule to make target 
> `netinet/.deps/libnetworking_a-if_ether.Po'.  Stop.
> make[8]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit/libnetworking'
> make[7]: *** [preinstall-recursive] Error 1
> make[7]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit'
> make[6]: *** [preinstall-stamp] Error 2
> make[6]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit'
> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit'
> make[4]: *** [all] Error 2
> make[4]: Leaving directory 
> `/d/opt/src/rtems/i386/i386-rtems4.9/m486/soft-float/cpukit'
> make[3]: *** [multi-do] Error 1
> make[3]: Leaving directory `/d/opt/src/rtems/i386/i386-rtems4.9/cpukit'
> make[2]: *** [all-multi] Error 2
> make[2]: Leaving directory `/d/opt/src/rtems/i386/i386-rtems4.9/cpukit'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/d/opt/src/rtems/i386/i386-rtems4.9/cpukit'
> make: *** [all-recursive] Error 1
> 
> 
> At this stage, I have had a mistake related to the file 
> libnetworking_a-if_ether.Po.
> 
> As you can see, I have followed completely the instuctions of the RTEMS 
> wiki without renemaing any files.
> 
> 
> Massimo
> 
> 
> 
> 
> 
> 
> Joel Sherrill ha scritto:
>> Chris Johns wrote:
>>> Massimo Tipaldi wrote:
>>>  
>>>> Dear Joel,
>>>>
>>>> I have followed your suggestions, but unfortunately the same 
>>>> behaviour is observed.
>>>>
>>>>     
>> The file hello.ralf should have had bin2boot run on it.
>>
>> All of Chris' comments also apply.  Please use 4.9.1
>> or the CVS head with matching tools.
>>>> In any case, I would like to point out some important points:
>>>>
>>>> 1) to compile RTEMS, in the directory /d/opt/rtems-4.9/bin, I was 
>>>> obliged to rename all the files in order to remove the version number 
>>>> (for instance, i386-rtems4.9-g++.exe --> i386-g++.exe).
>>>>     
>>> This is wrong and should not be done. It usually means you have not 
>>> configured RTEMS correctly. The Wiki entry:
>>>
>>> http://www.rtems.org/wiki/index.php/MinGW_Tools_for_Windows#Building_RTEMS 
>>>
>>>
>>> says:
>>>
>>>   ../rtems-4.9.0/configure --target=m68k-rtems4.9 --enable-multilib \
>>>    --prefix=/c/opt/src/rtems/m68k
>>>
>>> Please note the version number. Could you please try a configure this 
>>> way ?
>>>
>>>  
>>>> 2) to produce my Hello Word, I have updated the Makefile.inc 
>>>> (/d/opt/rtems-4.9/build-rtems/i386/c/pc386/make):
>>>>
>>>> .....
>>>>
>>>> prefix = /d/opt/rtems-4.9/build-rtems/i386/c/pc386
>>>> exec_prefix = /opt/rtems-4.9/i386-rtems
>>>>
>>>> CC_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-gcc --pipe 
>>>> -I/d/opt/rtems-4.9/build-rtems/i386/pc386/lib/include
>>>>
>>>> CXX_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-g++
>>>> AS_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-as
>>>> AR_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-ar
>>>> NM_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-nm
>>>> LD_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-ld
>>>> SIZE_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-size
>>>> OBJCOPY_FOR_TARGET = /d/opt/rtems-4.9/bin/i386-objcopy
>>>>
>>>> CC= $(CC_FOR_TARGET)
>>>> CXX= $(CXX_FOR_TARGET)
>>>> AS= $(AS_FOR_TARGET)
>>>> LD= $(LD_FOR_TARGET)
>>>> NM= $(NM_FOR_TARGET)
>>>> AR= $(AR_FOR_TARGET)
>>>> SIZE= $(SIZE_FOR_TARGET)
>>>> OBJCOPY= $(OBJCOPY_FOR_TARGET)
>>>>
>>>>
>>>> PROJECT_TOOLS = /d/opt/rtems-4.9/build-rtems/i386/pc386/build-tools
>>>> export PROJECT_TOOLS
>>>>
>>>>
>>>> ......
>>>>
>>>> 3) inside the MSYS shell, before launching the make command, I have 
>>>> carried out the following:
>>>> export
>>>> RTEMS_MAKEFILE_PATH=/d/opt/rtems-4.9/build-rtems/i386/c/pc386/make
>>>> export ARCH=/d/opt/rtems-4.9/examples-4.9.1/hello_world_c
>>>>
>>>>
>>>> After that I have launched the make command in the folder:
>>>> /d/opt/rtems-4.9/examples-4.9.1/hello_world_c
>>>> My Hello Word is successfully compiled, but it is not correctly 
>>>> managed by  QEMU ("No multiboot Header found").
>>>> 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 is about 1 Mb.
>>>>
>>>> Does it sound strange? Should I modify the makefiles further in order 
>>>> to produce an executable file in line with the rtems boot loader 
>>>> multiboot specification? Can you suggest me something else?
>>>>     
>>> I would rather you go back and try the correct configure command then 
>>> work though the build issues. Lets sort out one problem at a time.
>>>
>>>  
>>>> Thanks in advance and I wish you a Merry Christmas and Happy New Year.
>>>>
>>>>     
>>> Thanks and to you also.
>>>
>>> Regards
>>> Chris
>>>
>>>  
>>>> Massimo
>>>>
>>>>
>>>>
>>>>
>>>> Joel Sherrill ha scritto:
>>>>    
>>>>> Massimo Tipaldi wrote:
>>>>>      
>>>>>> Dear all,
>>>>>>
>>>>>> I have installed all the RTEMS tools on Windows, compiled RTEMS 4.9
>>>>>> (--target=i386-rtems and bsp=pc386) and installed QEMU as detailed in:
>>>>>>
>>>>>> http://www.rtems.com/wiki/index.php/MinGW_Tools_for_Windows
>>>>>> http://www.rtems.com/wiki/index.php/QEMU
>>>>>>
>>>>>> All these operations went well.
>>>>>>
>>>>>> Therefore, I have tried to launch some RTEMS applications by means of
>>>>>> QEMU/GRUB (in this phase I have taken the executable files produced
>>>>>> during the RTEMS compilation phase, placed in /testsuites/samples): 
>>>>>> this
>>>>>> operation was successfull as well.
>>>>>>
>>>>>> After that I have compiled successfully Hello Word by myself
>>>>>> (examples-4.7.99.2.tar.bz2
>>>>>> ftp://ftp.rtems.com/pub/rtems/4.7.99.2/examples-4.7.99.2.tar.bz2
>>>>>> ) and put my hello.exe in the folder /testsuites/samples/hello).
>>>>>> With my Hello Word, the GRUB gives me the message "No multiboot header
>>>>>> found".
>>>>>>
>>>>>>           
>>>>> Very old examples.  Please use the ones which match 4.9.
>>>>>
>>>>> This sounds like a bug which was fixed between 4.9.0 and 4.9.1.
>>>>>
>>>>> 1337/bsps - Stripping .rodata section produces unusable executables 
>>>>> for the i386-rtems target.
>>>>>      
>>>>>> As far as I have understood, my hello.exe does not have a multiboot 
>>>>>> header.
>>>>>> How can I overcome this issue? Should I modify somehow my source 
>>>>>> code or
>>>>>> the makefiles in order to create this multiboot header into my .exe?
>>>>>>
>>>>>>
>>>>>> Thanks in advance
>>>>>>
>>>>>> Massimo Tipaldi
>>>>>>
>>>>>>           
>>>>     
>>
> 
> 


-- 
--------------------------------------------
embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list