[OpenBIOS] Cross Compile Error for Different Arch while compiling
stepan at openbios.org
Tue Aug 24 14:40:25 CEST 2004
* Vishu at soc-soft.com <Vishu at soc-soft.com> [040823 09:12]:
> I'm cross compiling Kernel-1.1 for my embedded processor still I
> havent updated my BSP part but I'll do it later once the dictionary
> and kernel independent part is built properly. Is it ok to go in
> this Way.
OpenBIOS still lacks support for cross compiling, though this would be a
valuable feature. I suggest you also have a look at the latest snapshots
(available at bk://openbios.bkbits.net/unstable or
http://www.openbios.org/snapshots/ since the kernel has been enhanced a
lot since v1.1
> 3. In arch/unix I made the chages with the following line added as per
> the little endian option
> CC := mips_fp_le-gcc
> include $(TOPDIR)/Rules.make
To fix compiler selection in a clean way, we have to distinguish between
a HOSTCC for compiling utilities that are needed during build and CC for
all files that are created for the target platform.
The KConfig mechanism and the bootstrap compiler need HOSTCC rather than
> 4. It gives problems with dictionary file what may be the problem with
> the following error code
> [root at localhost kernel-1.1]# make
> Creating build directory /home/viswa/kernel-1.1/obj-mips
> Checking types... Checkings in types.sh updated by SoCrates
> found 32bit platform, creating "types.h"
> Bootstrapping dictionary.../bin/sh: ./unix: cannot execute binary file
> make: *** [bootstrap.dict] Error 126
> make: *** [dictionary] Error 2
> This error is due to since we are trying to execute on different
> architecture to form the dictionary File.
> Is there anyway to bypass or use Host compiler for dictionary forming
> and finally use this later along
> With the final image formation.
Since ARM is a 32bit little endian platform you can just build a
dictionary for ARM on an x86 machine. The resulting dictionary has the
right platform properties (endianess and bit width)
The build process should then use the bootstrap compiler rather than the
"unix" binary to create the "rest" of the dictionary. This way we can
build the unix hosted binary for the target platform while we have a
native bootstrap compiler.
NOTE: With a little bit of effort it should be possible to create a
bootstrap compiler that can cope with different bit width and endianess
combinations, too. Basically only the memory access primitives (@, !,
w@, w!, l@, l!) have to be adapted.
> 5. Is the image openbios.full a binary image or elf format and how to
> link to ROM i.e using ld sript to
> Map for the Target ROM address.
openbios.full is a static elf binary. I've been using it as a "payload"
for LinuxBIOS which wants such an ELF binary. To create a binary image
you can use objcopy. It's easier to use an IPL program with a small
ELF loader though since it copes with all relocation issues for you..
> 6. But with x86 was able to compile the kernel-1.1 without compiler
> option of forth.html and plugins
> Which could not find some ./config file what is the correction for it
> and why the plugins are needed.
What is the exact error message. Does this still happen with above
With the plugins the unix hosted binaries can be enhanced. It's for
example possible to emulate PCI devices in userspace and test and
develop drivers without booting the target machine.. There's only a
framework for this though and a dummy graphics card emulation using
More information about the OpenBIOS