[okl4-developer] adding a guest RTOS
Geoffrey Lee
glee at ok-labs.com
Fri Aug 1 10:12:47 EST 2008
On Thu, Jul 31, 2008 at 02:54:37PM +0200, Antonin SUBTIL wrote:
> Thanks....
> Yet I wasn't able to do this compilation...
> I runned GCC to compile, I runned GCC/LD+ELFADORN to link... but it does not
> work. (I've got an elf who refuse to merge with the same mistake).
> " ~/okl4_2.1/tools/pyelf/elfadorn -s -o hello.elf --
> ~/opt/nicta/gcc-3.3.4-glibc-2.3.3/i686-unknown-linux-gnu/bin/i686-unknown-linux-gnu-gcc
> hello_world_elf.o -o hello.elf -lc -lgcc"
If you must compile an executable out of the OKL4 build system
I suggest you try to compile some of our example program and
take a look at the build/link flags that they use. You can enable
verbose mode with verbose_str=True.
-gl
>
>
> Then my question is : what kind of args should I had to GCC, GCC/LD or
> Elfadorn to produce an Elf for OKL4 ?
>
> Thanks
>
> Antonin
>
> Le 29 juillet 2008 12:41, Geoffrey Lee<glee at ok-labs.com> a écrit :
>
> > On Tue, Jul 29, 2008 at 12:33:01PM +0200, Antonin SUBTIL wrote:
> > > hi back,
> > >
> > >
> > > I mean, when I make an small HELLOWORLD -> compile -> elf, then elfweaver
> > > says :
> > >
> > > Error: Unable to handle segments that aren't of type LOAD (found type
> > 0x3)
> > >
> > > ///////////////////////////////////////// command I used
> > > gcc -c helloworld.c
> > > gcc helloworld.o -o hello_world_elf.elf
> > > ~/okl4_2.1/tools/pyelf/elfweaver merge weaver.xml --output=image.elf
> >
> >
> > You should not compile dynamically-linked executables intended for the host
> > system rather than the target system. Type 0x3 is PT_INTERP. For more
> > details on what the segments mean you can check /usr/include/elf.h, which
> > should be available on Linux systems.
> >
> > -gl
> >
> > >
> > > //////////////////////////////////////---------------------- weaver.xml
> > > ------------------------------
> > > <?xml version="1.0"?>
> > > <!DOCTYPE image SYSTEM "weaver-1.1.dtd">
> > > <image>
> > > <machine>
> > > <word_size size="0x20" />
> > > <virtual_memory name="virtual">
> > > <region base="0x200000" size="0x3fe00000" />
> > > </virtual_memory>
> > > <physical_memory name="bios">
> > > <region base="0xf0000" size="0x10000" type="dedicated" />
> > > </physical_memory>
> > > <physical_memory name="vga">
> > > <region base="0xa0000" size="0x20000" type="dedicated" />
> > > </physical_memory>
> > > <physical_memory name="physical">
> > > <region base="0x100000" size="0x7f00000" type="conventional"
> > />
> > > </physical_memory>
> > > <physical_memory name="system_dram">
> > > <region base="0x0" size="0xa000" type="dedicated" />
> > > </physical_memory>
> > > <physical_memory name="rom_expansion">
> > > <region base="0xc0000" size="0x30000" type="dedicated" />
> > > </physical_memory>
> > > <phys_device name="timer_dev">
> > > <interrupt name="int_timer0" number="0" />
> > > </phys_device>
> > > <phys_device name="serial_dev">
> > > <interrupt name="int_serial0" number="4" />
> > > </phys_device>
> > > <phys_device name="rtc_dev">
> > > </phys_device>
> > > <page_size size="0x1000" />
> > > <page_size size="0x400000" />
> > > </machine>
> > > <physical_pool name="bios" direct="true">
> > > <memory src="bios" />
> > > </physical_pool>
> > >
> > > <physical_pool name="vga" direct="true">
> > > <memory src="vga" />
> > > </physical_pool>
> > >
> > > <physical_pool name="physical" direct="true">
> > > <memory src="physical" />
> > > </physical_pool>
> > >
> > > <physical_pool name="system_dram" direct="true">
> > > <memory src="system_dram" />
> > > </physical_pool>
> > >
> > > <virtual_pool name="virtual">
> > > <memory src="virtual" />
> > > </virtual_pool>
> > >
> > > <physical_pool name="rom_expansion" direct="true">
> > > <memory src="rom_expansion" />
> > > </physical_pool>
> > >
> > > <kernel file="/users/antonin/okl4_2.1/build/pistachio/bin/kernel"
> > > xip="false" >
> > > <dynamic max_threads="0x400" />
> > > <config>
> > > <option key="root_caps" value="4096"/>
> > > </config>
> > > </kernel>
> > >
> > > <rootprogram
> > > file="/users/antonin/okl4_2.1/build/iguana_server/bin/ig_server"
> > > virtpool="virtual" physpool="physical" >
> > > </rootprogram>
> > >
> > > <program name="event"
> > > file="/users/antonin/okl4_2.1/build/iguana/bin/event" priority="200"
> > > server="OKL4_EVENT_SERVER" >
> > > </program>
> > >
> > > <program name="vtimer"
> > > file="/users/antonin/okl4_2.1/build/iguana/bin/vtimer" priority="240"
> > > server="OKL4_VTIMER_SERVER" >
> > > <virt_device name="vtimer0" />
> > > <virt_device name="vtimer1" />
> > > <environment>
> > > <entry key="TIMER_RESOURCE" cap="/dev/timer_dev" />
> > > </environment>
> > > </program>
> > >
> > > <program name="vserial"
> > > file="/users/antonin/okl4_2.1/build/iguana/bin/vserial" priority="110"
> > > server="OKL4_VSERIAL_SERVER" >
> > > <virt_device name="vserial0" />
> > > <environment>
> > > <entry key="SERIAL_RESOURCE" cap="/dev/serial_dev" />
> > > <entry key="VTIMER" cap="/dev/vtimer0" />
> > > </environment>
> > > </program>
> > >
> > > <program name="vrtc"
> > > file="/users/antonin/okl4_2.1/build/iguana/bin/vrtc" priority="240"
> > > server="OKL4_VRTC_SERVER" >
> > > <environment>
> > > <entry key="RTC_RESOURCE" cap="/dev/rtc_dev" />
> > > </environment>
> > > </program>
> > >
> > > <program name="hello_world_elf"
> > > file="/users/antonin/okl4_2.1/build/images/hello_world_elf.elf"
> > > priority="100">
> > > </program>
> > >
> > > </image>
> > >
> > > //////////////////////////////////------------ code of HELLO
> > > WORLD-----------------
> > > /*
> > >
> > ============================================================================
> > > Name : hello_world_elf.c
> > > Author :
> > > Version :
> > > Copyright : Your copyright notice
> > > Description : Hello World in C, Ansi-style
> > >
> > ============================================================================
> > > */
> > >
> > > #include <stdio.h>
> > > #include <stdlib.h>
> > >
> > > int main(void) {
> > > puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
> > > return EXIT_SUCCESS;
> > > }
> > >
> > > ---
> > >
> > > Le 29 juillet 2008 11:49, Antonin SUBTIL<antonin.subtil at gmail.com> a
> > écrit :
> > >
> > > >
> > > > Hello,
> > > >
> > > > Here I come with always the same kind of question :s Sorry I'm a slow
> > to
> > > > understand ... (or maybe I'm bad in explaining to my bosses :p )
> > > >
> > > > IF I modify some RTOS called A (nothing similar to linux or so) (with
> > OKL4
> > > > functions, OKL4 .h and OKL4 .a) AND produce an ELF of it,
> > > > CAN I just modify weaver.xml and run elfadorn to ADD this A-OS to OKL4
> > ?
> > > > Will it work?
> > > > What kind of parameters would be compulsory? (I mean, some are obvious,
> > but
> > > > some might not be...)
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Antonin Subtil,
> > > > 35 rue Donissan
> > > > FR-33000 Bordeaux
> > > > +33 (0)6.86.04.41.33
> > > > (anciennement +33 (0)6.77.40.17.69)
> > > >
> > > > Economisez du papier, limitez votre production de déchets : n'imprimez
> > ce
> > > > message que si nécessaire et optez pour le recto-verso.
> > > >
> > > > Ce message est confidentiel. Toute publication, utilisation ou
> > diffusion,
> > > > même partielle, doit être autorisée préalablement. Si vous n'êtes pas
> > > > destinataire de ce message, merci d'en avertir immédiatement
> > l'expéditeur.
> > > >
> > >
> > >
> > >
> > > --
> > > Antonin Subtil,
> > > 35 rue Donissan
> > > FR-33000 Bordeaux
> > > +33 (0)6.86.04.41.33
> > > (anciennement +33 (0)6.77.40.17.69)
> > >
> > > Economisez du papier, limitez votre production de déchets : n'imprimez ce
> > > message que si nécessaire et optez pour le recto-verso.
> > >
> > > Ce message est confidentiel. Toute publication, utilisation ou diffusion,
> > > même partielle, doit être autorisée préalablement. Si vous n'êtes pas
> > > destinataire de ce message, merci d'en avertir immédiatement
> > l'expéditeur.
> >
> > > _______________________________________________
> > > Developer mailing list
> > > Developer at okl4.org
> > > https://lists.okl4.org/mailman/listinfo/developer
> >
> >
> > --
> >
> >
>
>
> --
> Antonin Subtil,
> 35 rue Donissan
> FR-33000 Bordeaux
> +33 (0)6.86.04.41.33
> (anciennement +33 (0)6.77.40.17.69)
>
> Economisez du papier, limitez votre production de déchets : n'imprimez ce
> message que si nécessaire et optez pour le recto-verso.
>
> Ce message est confidentiel. Toute publication, utilisation ou diffusion,
> même partielle, doit être autorisée préalablement. Si vous n'êtes pas
> destinataire de ce message, merci d'en avertir immédiatement l'expéditeur.
--
More information about the Developer
mailing list