[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
QEMU/GRUB: No multiboot header found
- Date: Tue, 23 Dec 2008 09:47:38 +1100
- From: chrisj at rtems.org (Chris Johns)
- Subject: QEMU/GRUB: No multiboot header found
Massimo Tipaldi wrote:
> Dear Joel,
> I have followed your suggestions, but unfortunately the same behaviour
> is observed.
> 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:
../rtems-4.9.0/configure --target=m68k-rtems4.9 --enable-multilib \
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
> 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
> 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 ARCH=/d/opt/rtems-4.9/examples-4.9.1/hello_world_c
> After that I have launched the make command in the folder:
> 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.
> 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:
>>> 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
>>> ) and put my hello.exe in the folder /testsuites/samples/hello).
>>> With my Hello Word, the GRUB gives me the message "No multiboot header
>> 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
>>> 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