[okl4-developer] Question about Build system (Platform related)
Geoffrey Lee
glee at ok-labs.com
Thu May 8 15:02:00 EST 2008
On Thu, May 08, 2008 at 11:03:15AM +0800, Sean wrote:
> Dear all
>
> Now I want to port the OKL4 to a new platform. But I had some questions
> about the build system.
>
> 1. Does anyone give me some explanation of the relationship between
> platform/s3c2410/tools/machine.py and the source codes in
> platform/s3c2410/pistachio/src/
Hi Sean
There is a brief location outline of the source files in the README
file at the top level source directory of the OKL4 distribution.
>
> For example, the content in machine.py
> class s3c2410(arm920t):
> platform = "s3c2410"
> platform_dir = "s3c2410"
> memory = arm920t.memory.copy()
> timer_driver = "s3c2410_timer"
> rtc_driver = "s3c2410_rtc"
> serial_driver = "s3c2410_uart"
> lcd_driver = "s3c2410_lcd"
> touch_driver = "s3c2410_touch"
> spi_driver = "s3c2410_spi"
> drivers = [timer_driver, serial_driver, lcd_driver]
> memory_timer = [(0x51000000, 0x51001000)]
> interrupt_timer = [11, 12]
> memory_serial = [(0x50000000, 0x50001000)]
> interrupt_serial = [32, 33]
> memory_lcd = [(0x4d000000, 0x4d001000)]
> interrupt_lcd = [16]
> memory_rtc = [(0x57000000, 0x57001000)]
> interrupt_rtc = [30]
> v2_drivers = [("s3c2410_timer", "vtimer", memory_timer,
> interrupt_timer),
> ("s3c2410_uart", "vserial", memory_serial,
> interrupt_serial),
> ("s3c2410_lcd", "vlcd", memory_lcd, interrupt_lcd),
> ("s3c2410_rtc", "vrtc", memory_rtc, interrupt_rtc)
> # ("s3c2410_spi", "vbus"),
> # ("s3c2410_touch", "vtouch"),
> ]
>
> and the function startup_system_mmu() in arch/arm/pistachio/src/init.cc
> if (!Platform::init(Platform::API_VERSION,
> PlatformSupport::API_VERSION))
> for(;;);
>
> How does the class "Platform" declare?
The Platform is a namespace, it is located for ARM in
arch/arm/pistachio/include/platform.h.
To find specifically where something is located, I like to follow
the rule outlined in the README and then use grep(1) to look for it.
>
>
> 2. Where is the directories of the include files, and the relationship on
> different paths
> For example:
> in platform/s3c2410/pistachio/src/head.spp
> #include <kernel/l4.h>
> #include <kernel/arch/asm.h>
> #include <kernel/cpu/syscon.h>
>
> I can't find the path like "include/kernel/" in the source tree.
The include files are copied over from the source to the build directory.
So for example,
#include <kernel/l4.h>
is actually located in:
build/pistachio/include/kernel/l4.h
If you would like to see how the build system exactly works in copying
these files over and what the include paths look like, you can
specify verbose_str=True on the build line.
>
> Really need your helps, thanks very much!
>
> Best Regards,
> Sean
-gl
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
--
More information about the Developer
mailing list