[okl4-developer] Question on OKL4 build system: follow-up
Nelson Tam
nelson at ok-labs.com
Fri Jun 6 12:15:17 EST 2008
Hi Guillaume,
On 05/06/2008, at 11:10 PM, Guillaume PETITJEAN wrote:
> I've done some progress in integrating my new application in OKL4
> build
> system (cf. my previous mail).
> Now the OKL4 build system calls the application's own build system
> (ie.
> make) properly. Basically I've created a symbolic link in
> iguana/examples that points to the existing source tree of the app,
> and
> I've written a SConscript at the root of this app.
>
> The problem is in the "weaving" step. I've understand that the build
> system uses elfweaver to merge the application and OKL4 elf files.
> Is it
> correct ? But I don't understand how to use it correctly in the
> SConscripts.
>
> I tried to add :
>
> /weaver = env.WeaverIguanaProgram()/
>
> in the application SConscript (I don't really understand what the
> arguments should be).
First of all, the SConscript. The approach you've taken is correct.
Here is what a barebones SConscript would look like:
Import("*")
obj = env.KengeProgram("nmf",
weaver = env.WeaverIguanaProgram(),
LIBS=["atomic_ops", "c", "circular_buffer",
"iguana", "l4", "l4e", "mutex"])
Return("obj")
> Here is the error I had (nmf is the name of my application):
>
> /scons: *** [build/images/weaver.xml]
> /home/guillaume/OKL4/lhl_integration/okl4_2.1/build/iguana/object/
> iguana_example_nmf/host.axf:
> No such file or directory
> /
What's supposed to happen is that, an ELF binary that contains your
nmf application should end up in build/iguana/bin/nmf.
> Then I copied host.axf (which is the application elf file) into
> iguana_example_nmf. The error is:
So where did you copy host.axf from? Is the build system look at the
wrong place for host.axf in the previous error?
Perhaps you can run 'tree build/iguana/' and send us the output, so we
can see where files at being compiled to. Feel free to cull the bits
that you know are not relevant.
> /[XML ] build/images/weaver.xml
> [ELF ] build/images/image.elf
> An error occurred:
> Now printing a traceback.
>
> Traceback (most recent call last):
> File "tools/pyelf/elfweaver", line 74, in ?
> main(sys.argv)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> main.py",
> line 94, in main
> commands[args[1]](args[2:])
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> merge.py",
> line 187, in merge_cmd
> merge(spec_file, options)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> merge.py",
> line 119, in merge
> namespace, image, machine, pools, bootinfo)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> merge.py",
> line 97, in collect_image_objects
> collect_program_pd_elements(parsed, ignore_name, namespace, image,
> machine, bootinfo, pools)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> prog_pd_xml.py",
> line 583, in collect_program_pd_elements
> collect_program_element(el, ignore_name, namespace, image, machine,
> bootinfo, pools)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> prog_pd_xml.py",
> line 346, in collect_program_element
> pools)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> segments_xml.py",
> line 269, in collect_elf_segments
> pools = pools)
> File
> "/home/guillaume/OKL4/lhl_integration/okl4_2.1/tools/pyelf/weaver/
> image.py",
> line 935, in add_segment
> new_segment = segment.copy()
> File "tools/pyelf/elf/segment.py", line 242, in copy
> assert sect.get_link() is None
> AssertionError
Given that .axf is a kind of ELF file, but somewhat different (I don't
know the details though), it is possible that the pyelf library is not
parsing your .axf properly and that's causing the assertion to fail?
--
(nt)
Nelson Tam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1560 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20080606/bd9addf3/attachment.bin
More information about the Developer
mailing list