[okl4-developer] Getting started with OKL4 - Problems to compile source
Lutz Schönemann
lutz.schoenemann at sit.fraunhofer.de
Mon Oct 13 23:01:30 EST 2008
Am 10.10.2008 um 16:49 schrieb Geoffrey Lee:
> On Fri, Oct 10, 2008 at 04:33:36PM +0200, Lutz Schönemann wrote:
>> Okay, this patch seems to work. But where is the location of the
>> created
>> image? And are there any additional steps to do to run it in a QEMU
>> virtual machine?
>
> The image is located in build/images/ called image.elf. Building for
> IA-32 will also build a bootable hard disk image located in the
> same place, you can either use the simulate target or to save time,
> I sometimes run it manually with:
>
> qemu -nographic -serial stdio -hda /path/to/c.img
>
Thanks. This image works fine with qemu.
>
>>
>> Are there any documentation how to get startet using that system
>> and how
>> to add my own programs?
>
> Would it be possible for us to get some idea on what you plan to use
> it for
> and / or requirements? Also, would it be possible for you to share
> with
> us how you intend the system to be structured, e.g. as a standalone
> application running directly on top of the L4 kernel, as a
> standalone OKL4
> application, as a OK Linux application etc so we can advise with the
> best
> way to proceed.
I plan to use the System with 2 applications. The first one should be
inside a OK Linux and provide a little user interface. The job of the
second application is to install / uninstall applications on that
system and to start / stop them. This one should be directly on top
the L4 kernel. I want these 2 applications communicate over IPC or
other ways.
So what I am looking for in the first place is how to get startet with
the system it self. How switch between running processes, how to start
new processes and so on to get an idea how the system works.
In the next step I need some information how to get started to
implement two simple application sending a "hello world" or something
like that from one to the other app. There seems to be some good
documents on the web but I haven't read all of them because I need to
get familiar with the system.
Would be nice if you can point me to some documents describing this
subject for newbies like me ;-)
Thanks,
Lutz
>
>
>>
>> Lutz
>
> -gl
>
>>
>> Am 10.10.2008 um 14:14 schrieb Geoffrey Lee:
>>
>>> On Fri, Oct 10, 2008 at 01:56:48PM +0200, Lutz Schönemann wrote:
>>>>
>>>> Am 10.10.2008 um 12:25 schrieb Geoffrey Lee:
>>>>
>>>>> On Fri, Oct 10, 2008 at 12:01:26PM +0200, Lutz Schönemann wrote:
>>>>>> Passing the toolchain argument to tools/build.py seems to fix
>>>>>> that
>>>>>> problem. But now I get the following Error
>>>>>>
>>>>>> [ASM ] build/pistachio/object/pistachio/tcb_layout.s
>>>>>> In file included from build/pistachio/include/kernel/arch/
>>>>>> config.h:
>>>>>> 93,
>>>>>> from build/pistachio/include/kernel/config.h:158,
>>>>>> from pistachio/include/l4.h:70,
>>>>>> from build/pistachio/object/pistachio/
>>>>>> tcb_layout.cc:
>>>>>> 3:
>>>>>> build/pistachio/include/kernel/arch/ia32.h:305:3: #error unknown
>>>>>> architecture - specify cache line size
>>>>>> scons: *** [build/pistachio/object/pistachio/tcb_layout.s]
>>>>>> Error 1
>>>>>> scons: building terminated because of errors.
>>>>>
>>>>> I don't think the problem has to do with running the build in a
>>>>> virtual machine.
>>>>>
>>>>> The file is arch/ia32/pistachio/include/ia32.h. Depending on the
>>>>> specific IA-32 CONFIG option set the cache line size is defined
>>>>> there.
>>>>> The CONFIG_CPU_* is set in pistachio/Sconstruct - but the define
>>>>> is built dynamically (arch.upper() and env.machine.cpu.upper().).
>>>>> The
>>>>> define doesn't match any of the values that ia32.h expects so
>>>>> it #errors out. You can pass verbose_str=True to the build
>>>>> command
>>>>> line to get the exact define used.
>>>>>
>>>>>
>>>>> -gl
>>>>
>>>> I've run build.py with verbose_str=True and the compiler is called
>>>> with
>>>> -DCONFIG_CPU_IA32_IDT=1. So the architecture is set right but cpu
>>>> type
>>>> should be P3 or P4. Is ist possible to set this manually using a
>>>> command
>>>> line argument or do I have to hardcode it in pistachio/SConsturct?
>>>
>>> Please try this fix to arch/ia32/tools/machines.py:
>>>
>>> @@ -16,7 +70,7 @@
>>> page_sizes = [0x1000, 0x400000]
>>> default_toolchain = gnu_ia32_nptl_toolchain
>>> cpu = "idt"
>>> - default_toolchain.dict["CPPDEFINES"] +=
>>> ["CONFIG_CPU_IA32_I686"]
>>> + cpp_defines = [("CONFIG_CPU_IA32_I686", 1)]
>>> memory['physical'] = [Region(0x0L, 0x40000000L)]
>>> memory['virtual'] = [Region(0x000000L, 0x40000000L)]
>>>
>>> @@ -28,7 +82,7 @@
>>> page_sizes = [0x1000, 0x400000]
>>> default_toolchain = gnu_ia32_nptl_toolchain
>>> cpu = "acpi"
>>> - default_toolchain.dict["CPPDEFINES"] +=
>>> ["CONFIG_CPU_IA32_I686"]
>>> + cpp_defines = [("CONFIG_CPU_IA32_I686", 1)]
>>> memory['physical'] = [Region(0x0L, 0x40000000L)]
>>> memory['virtual'] = [Region(0x000000L, 0x40000000L)]
>>>
>>> It was supposed to be set but only set for the default toolchain.
>>> This
>>> changes it so that it is always defined as a preprocessor define.
>>>
>>>
>>> -gl
>>>
>>>>
>>>> Lutz
>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Where can I specify the cache line size?
>>>>>> Is it possible that all these problems are because I try to build
>>>>>> OKL4
>>>>>> inside a virtual machine?
>>>>>>
>>>>>> Lutz
>>>>>>
>>>>>> Am 09.10.2008 um 18:00 schrieb Geoffrey Lee:
>>>>>>
>>>>>>> On Thu, Oct 09, 2008 at 02:40:30PM +0200, Lutz Schönemann wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I want to get started with OKL4 and downloaded the source from
>>>>>>>> http://wiki.ok-labs.com/downloads/LATEST/okl4_latest.tar.gz
>>>>>>>>
>>>>>>>> Than I followed the instructions descibed in the "Get Started"
>>>>>>>> section. I
>>>>>>>> also downloaded and extracted the recommended toolchain to my
>>>>>>>> /opt
>>>>>>>> folder.
>>>>>>>> But if I try to build the system calling
>>>>>>>> tools/build.py machine=ia32_pc99 project=l4test
>>>>>>>> the script exits with the following message:
>>>>>>>
>>>>>>>
>>>>>>> It looks like the default is using a different version of the
>>>>>>> gcc-based toolchain. Try passing toolchain=gnu_ia32_toolchain,
>>>>>>> that
>>>>>>> will use the NICTA toolchain.
>>>>>>>
>>>>>>> -gl
>>>>>>>
>>>>>>>>
>>>>>>>> scons: Reading SConscript files ...
>>>>>>>> architecture ia32 is not yet supported by libcompat.
>>>>>>>> architecture ia32 is not yet supported by libcompat.
>>>>>>>> scons: done reading SConscript files.
>>>>>>>> scons: Building targets ...
>>>>>>>> [ASM ] build/pistachio/object/pistachio/tcb_layout.s
>>>>>>>> sh: /opt/okl/Linux-i386/stow/i686-unknown-linux-gnu/bin/i686-
>>>>>>>> unknown-
>>>>>>>> linux-gnu-gcc: not found
>>>>>>>> scons: *** [build/pistiachio/object/pistachio/tcb_layout.s]
>>>>>>>> Error
>>>>>>>> 127
>>>>>>>> scons: building terminated because of errors.
>>>>>>>>
>>>>>>>> Because the path returned from scons doesn't exist I added the
>>>>>>>> build
>>>>>>>> option toolprefix:
>>>>>>>> tools/build.py machine=ia32_pc99 project=l4test toolprefix=/
>>>>>>>> opt/
>>>>>>>> nicta/
>>>>>>>> gcc-3.3.4-glibc-2.3.3/i686-unknown-linux-gnu/i686-unknown-
>>>>>>>> linux-
>>>>>>>> gnu/
>>>>>>>> bin/
>>>>>>>>
>>>>>>>> This call ends with the following error:
>>>>>>>>
>>>>>>>> scons: Reading SConscript files ...
>>>>>>>> architecture ia32 is not yet supported by libcompat.
>>>>>>>> architecture ia32 is not yet supported by libcompat.
>>>>>>>> scons: done reading SConscript files.
>>>>>>>> scons: Building targets ...
>>>>>>>> [ASM ] build/pistachio/object/pistachio/tcb_layout.s
>>>>>>>> gcc: installation problem, cannot exec `cc1plus': No such
>>>>>>>> file or
>>>>>>>> directory
>>>>>>>> scons: *** [build/pistiachio/object/pistachio/tcb_layout.s]
>>>>>>>> Error 1
>>>>>>>> scons: building terminated because of errors.
>>>>>>>>
>>>>>>>>
>>>>>>>> cc1plus is installed on my system but not part of the toolchain
>>>>>>>> that
>>>>>>>> could be downloaded from the OK-Labs website.
>>>>>>>>
>>>>>>>> Have I done something wrong? How can this problem be solved?
>>>>>>>> And is it critical that the script complains about libcompat
>>>>>>>> doesn't
>>>>>>>> support the ia32 architecture?
>>>>>>>>
>>>>>>>> Thanks for help
>>>>>>>> Lutz
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Developer mailing list
>>>>>>>> Developer at okl4.org
>>>>>>>> https://lists.okl4.org/mailman/listinfo/developer
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>
>
>
>
> --
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3676 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20081013/22a6cee6/attachment.bin
More information about the Developer
mailing list