From 53529e0eeb508f27e9e99630e96fae88611c01d7 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 17 Oct 2012 09:34:23 +0200 Subject: [PATCH] Fiasco.OC: enable i.MX53 platform --- base-foc/config/imx53.kernel | 75 +++++++ base-foc/config/imx53.user | 63 ++++++ base-foc/config/panda.user | 1 + base-foc/config/pbxa9.user | 1 + base-foc/config/vea9x4.user | 1 + base-foc/config/x86_32.user | 57 +++++ base-foc/config/x86_64.user | 42 ++++ base-foc/lib/mk/platform_imx53/platform.mk | 6 + base-foc/lib/mk/x86_32/platform.mk | 2 +- base-foc/lib/mk/x86_64/platform.mk | 2 +- base-foc/mk/spec-foc_imx53.mk | 4 + base-foc/patches/imx53_support.patch | 231 +++++++++++++++++++++ base-foc/src/core/imx53/target.mk | 10 + base-foc/src/kernel/imx53/target.mk | 4 + base/mk/spec-cortex_a8.mk | 14 ++ base/mk/spec-platform_imx53.mk | 14 ++ tool/builddir/etc/build.conf.foc_imx53 | 1 + tool/create_builddir | 8 +- 18 files changed, 532 insertions(+), 4 deletions(-) create mode 100644 base-foc/config/imx53.kernel create mode 100644 base-foc/config/imx53.user create mode 100644 base-foc/config/x86_32.user create mode 100644 base-foc/config/x86_64.user create mode 100644 base-foc/lib/mk/platform_imx53/platform.mk create mode 100644 base-foc/mk/spec-foc_imx53.mk create mode 100644 base-foc/patches/imx53_support.patch create mode 100644 base-foc/src/core/imx53/target.mk create mode 100644 base-foc/src/kernel/imx53/target.mk create mode 100644 base/mk/spec-cortex_a8.mk create mode 100644 base/mk/spec-platform_imx53.mk create mode 100644 tool/builddir/etc/build.conf.foc_imx53 diff --git a/base-foc/config/imx53.kernel b/base-foc/config/imx53.kernel new file mode 100644 index 000000000..574c71924 --- /dev/null +++ b/base-foc/config/imx53.kernel @@ -0,0 +1,75 @@ +# +# Automatically generated file; DO NOT EDIT. +# Fiasco configuration +# + +# +# Target configuration +# +# CONFIG_IA32 is not set +# CONFIG_AMD64 is not set +CONFIG_ARM=y +# CONFIG_PF_REALVIEW is not set +CONFIG_PF_IMX=y +# CONFIG_PF_S3C2410 is not set +# CONFIG_PF_TEGRA2 is not set +# CONFIG_PF_OMAP is not set +# CONFIG_PF_SA1100 is not set +# CONFIG_PF_XSCALE is not set +# CONFIG_PF_KIRKWOOD is not set +# CONFIG_PF_INTEGRATOR is not set +CONFIG_BSP_NAME="imx" +# CONFIG_PF_IMX_21 is not set +# CONFIG_PF_IMX_35 is not set +# CONFIG_PF_IMX_51 is not set +CONFIG_PF_IMX_53=y +CONFIG_PF_IMX_RAM_PHYS_BASE=0x70000000 +CONFIG_ABI_VF=y +CONFIG_CAN_ARM_CPU_CORTEX_A8=y +CONFIG_ARM_CORTEX_A8=y +# CONFIG_ARM_ALIGNMENT_CHECK is not set +# CONFIG_FPU is not set + +# +# Kernel options +# +CONFIG_CONTEXT_4K=y +# CONFIG_FINE_GRAINED_CPUTIME is not set +CONFIG_SCHED_FIXED_PRIO=y + +# +# Debugging +# +CONFIG_INLINE=y +# CONFIG_NDEBUG is not set +# CONFIG_NO_FRAME_PTR is not set +# CONFIG_STACK_DEPTH is not set +# CONFIG_LIST_ALLOC_SANITY is not set +CONFIG_SERIAL=y +CONFIG_JDB=y +# CONFIG_JDB_LOGGING is not set +# CONFIG_JDB_DISASM is not set +# CONFIG_JDB_GZIP is not set +# CONFIG_VMEM_ALLOC_TEST is not set +# CONFIG_DEBUG_KERNEL_PAGE_FAULTS is not set +# CONFIG_WARN_NONE is not set +CONFIG_WARN_WARNING=y +# CONFIG_WARN_ANY is not set + +# +# Compiling +# +CONFIG_CC="gcc" +CONFIG_CXX="g++" +CONFIG_HOST_CC="gcc" +CONFIG_HOST_CXX="g++" +# CONFIG_MAINTAINER_MODE is not set +CONFIG_LABEL="" +# CONFIG_EXPERIMENTAL is not set +CONFIG_PERF_CNT=y +CONFIG_BIT32=y +CONFIG_ARM_V7=y +CONFIG_ARM_V6PLUS=y +CONFIG_WARN_LEVEL=1 +CONFIG_XARCH="arm" +CONFIG_ABI="vf" diff --git a/base-foc/config/imx53.user b/base-foc/config/imx53.user new file mode 100644 index 000000000..ff81b068a --- /dev/null +++ b/base-foc/config/imx53.user @@ -0,0 +1,63 @@ +# +# Automatically generated file; DO NOT EDIT. +# L4Re Configuration +# +# CONFIG_BUILD_ARCH_x86 is not set +# CONFIG_BUILD_ARCH_amd64 is not set +CONFIG_BUILD_ARCH_arm=y +# CONFIG_BUILD_ARCH_ppc32 is not set +# CONFIG_BUILD_ARCH_sparc is not set +CONFIG_BUILD_ARCH="arm" +CONFIG_BUILD_ABI_l4f=y +CONFIG_BUILD_ABI="l4f" +CONFIG_CPU="armv7a" +# CONFIG_CPU_ARM_ARMV4 is not set +# CONFIG_CPU_ARM_ARMV4T is not set +# CONFIG_CPU_ARM_ARMV5 is not set +# CONFIG_CPU_ARM_ARMV5T is not set +# CONFIG_CPU_ARM_ARMV5TE is not set +# CONFIG_CPU_ARM_ARMV6 is not set +# CONFIG_CPU_ARM_ARMV6T2 is not set +# CONFIG_CPU_ARM_ARMV6ZK is not set +CONFIG_CPU_ARM_ARMV7A=y +# CONFIG_CPU_ARM_ARMV7R is not set +CONFIG_CPU_ARMV6KPLUS=y +CONFIG_CPU_ARMV6PLUS=y +# CONFIG_PLATFORM_TYPE_beagleboard is not set +# CONFIG_PLATFORM_TYPE_imx21 is not set +# CONFIG_PLATFORM_TYPE_imx35 is not set +# CONFIG_PLATFORM_TYPE_imx51 is not set +CONFIG_PLATFORM_TYPE_imx53=y +# CONFIG_PLATFORM_TYPE_integrator is not set +# CONFIG_PLATFORM_TYPE_kirkwood is not set +# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set +# CONFIG_PLATFORM_TYPE_omap3evm is not set +# CONFIG_PLATFORM_TYPE_pandaboard is not set +# CONFIG_PLATFORM_TYPE_rv is not set +# CONFIG_PLATFORM_TYPE_rv_pbx is not set +# CONFIG_PLATFORM_TYPE_rv_vexpress is not set +# CONFIG_PLATFORM_TYPE_tegra2 is not set +# CONFIG_PLATFORM_TYPE_custom is not set +CONFIG_PLATFORM_TYPE="imx53" +# CONFIG_USE_DROPS_STDDIR is not set +# CONFIG_USE_DICE is not set +CONFIG_DROPS_STDDIR="/path/to/l4re" +CONFIG_DROPS_INSTDIR="/path/to/l4re" +CONFIG_BID_COLORED_PHASES=y + +# +# Building +# +CONFIG_YACC="yacc" +CONFIG_LEX="flex" +CONFIG_CTAGS="ctags" +CONFIG_ETAGS="etags" +CONFIG_HAVE_LDSO=y +CONFIG_INT_CPP_NAME_SWITCH=y +CONFIG_INT_LD_NAME_SWITCH=y +# CONFIG_BID_STRIP_PROGS is not set +# CONFIG_BID_GCC_OMIT_FP is not set +# CONFIG_BID_GENERATE_MAPFILE is not set +# CONFIG_BID_BUILD_DOC is not set +# CONFIG_RELEASE_MODE is not set +CONFIG_MAKECONFS_ADD="" diff --git a/base-foc/config/panda.user b/base-foc/config/panda.user index 2e737f887..6c5cd0df1 100644 --- a/base-foc/config/panda.user +++ b/base-foc/config/panda.user @@ -27,6 +27,7 @@ CONFIG_CPU_ARMV6PLUS=y # CONFIG_PLATFORM_TYPE_imx21 is not set # CONFIG_PLATFORM_TYPE_imx35 is not set # CONFIG_PLATFORM_TYPE_imx51 is not set +# CONFIG_PLATFORM_TYPE_imx53 is not set # CONFIG_PLATFORM_TYPE_integrator is not set # CONFIG_PLATFORM_TYPE_kirkwood is not set # CONFIG_PLATFORM_TYPE_omap3_am33xx is not set diff --git a/base-foc/config/pbxa9.user b/base-foc/config/pbxa9.user index 26a7536f6..1379c592d 100644 --- a/base-foc/config/pbxa9.user +++ b/base-foc/config/pbxa9.user @@ -27,6 +27,7 @@ CONFIG_CPU_ARMV6PLUS=y # CONFIG_PLATFORM_TYPE_imx21 is not set # CONFIG_PLATFORM_TYPE_imx35 is not set # CONFIG_PLATFORM_TYPE_imx51 is not set +# CONFIG_PLATFORM_TYPE_imx53 is not set # CONFIG_PLATFORM_TYPE_integrator is not set # CONFIG_PLATFORM_TYPE_kirkwood is not set # CONFIG_PLATFORM_TYPE_omap3_am33xx is not set diff --git a/base-foc/config/vea9x4.user b/base-foc/config/vea9x4.user index e42a5ea1d..dea31c644 100644 --- a/base-foc/config/vea9x4.user +++ b/base-foc/config/vea9x4.user @@ -27,6 +27,7 @@ CONFIG_CPU_ARMV6PLUS=y # CONFIG_PLATFORM_TYPE_imx21 is not set # CONFIG_PLATFORM_TYPE_imx35 is not set # CONFIG_PLATFORM_TYPE_imx51 is not set +# CONFIG_PLATFORM_TYPE_imx53 is not set # CONFIG_PLATFORM_TYPE_integrator is not set # CONFIG_PLATFORM_TYPE_kirkwood is not set # CONFIG_PLATFORM_TYPE_omap3_am33xx is not set diff --git a/base-foc/config/x86_32.user b/base-foc/config/x86_32.user new file mode 100644 index 000000000..472d9f696 --- /dev/null +++ b/base-foc/config/x86_32.user @@ -0,0 +1,57 @@ +# +# Automatically generated file; DO NOT EDIT. +# L4Re Configuration +# +CONFIG_BUILD_ARCH_x86=y +# CONFIG_BUILD_ARCH_amd64 is not set +# CONFIG_BUILD_ARCH_arm is not set +# CONFIG_BUILD_ARCH_ppc32 is not set +# CONFIG_BUILD_ARCH_sparc is not set +CONFIG_BUILD_ARCH="x86" +CONFIG_BUILD_ABI_l4f=y +CONFIG_BUILD_ABI="l4f" +CONFIG_CPU_X86_586=y +# CONFIG_CPU_X86_PENTIUM is not set +# CONFIG_CPU_X86_PENTIUMMMX is not set +# CONFIG_CPU_X86_PENTIUMPRO is not set +# CONFIG_CPU_X86_686 is not set +# CONFIG_CPU_X86_PENTIUM2 is not set +# CONFIG_CPU_X86_PENTIUM3 is not set +# CONFIG_CPU_X86_PENTIUMM is not set +# CONFIG_CPU_X86_PENTIUM4 is not set +# CONFIG_CPU_X86_PRESCOTT is not set +# CONFIG_CPU_X86_NOCONA is not set +# CONFIG_CPU_X86_CORE2 is not set +# CONFIG_CPU_X86_K6 is not set +# CONFIG_CPU_X86_K7 is not set +# CONFIG_CPU_X86_ATHLON4 is not set +# CONFIG_CPU_X86_K8 is not set +# CONFIG_CPU_X86_K10 is not set +# CONFIG_CPU_X86_OPTERON is not set +CONFIG_CPU="586" +# CONFIG_PLATFORM_TYPE_imx53 is not set +CONFIG_PLATFORM_TYPE_pc=y +# CONFIG_PLATFORM_TYPE_custom is not set +CONFIG_PLATFORM_TYPE="pc" +# CONFIG_USE_DROPS_STDDIR is not set +# CONFIG_USE_DICE is not set +CONFIG_DROPS_STDDIR="/path/to/l4re" +CONFIG_DROPS_INSTDIR="/path/to/l4re" +CONFIG_BID_COLORED_PHASES=y + +# +# Building +# +CONFIG_YACC="yacc" +CONFIG_LEX="flex" +CONFIG_CTAGS="ctags" +CONFIG_ETAGS="etags" +CONFIG_HAVE_LDSO=y +CONFIG_INT_CPP_NAME_SWITCH=y +CONFIG_INT_LD_NAME_SWITCH=y +# CONFIG_BID_STRIP_PROGS is not set +# CONFIG_BID_GCC_OMIT_FP is not set +# CONFIG_BID_GENERATE_MAPFILE is not set +# CONFIG_BID_BUILD_DOC is not set +# CONFIG_RELEASE_MODE is not set +CONFIG_MAKECONFS_ADD="" diff --git a/base-foc/config/x86_64.user b/base-foc/config/x86_64.user new file mode 100644 index 000000000..2d52587e6 --- /dev/null +++ b/base-foc/config/x86_64.user @@ -0,0 +1,42 @@ +# +# Automatically generated file; DO NOT EDIT. +# L4Re Configuration +# +# CONFIG_BUILD_ARCH_x86 is not set +CONFIG_BUILD_ARCH_amd64=y +# CONFIG_BUILD_ARCH_arm is not set +# CONFIG_BUILD_ARCH_ppc32 is not set +# CONFIG_BUILD_ARCH_sparc is not set +CONFIG_BUILD_ARCH="amd64" +CONFIG_BUILD_ABI_l4f=y +CONFIG_BUILD_ABI="l4f" +CONFIG_CPU_X86_K8=y +# CONFIG_CPU_X86_K10 is not set +# CONFIG_CPU_X86_OPTERON is not set +CONFIG_CPU="K8" +# CONFIG_PLATFORM_TYPE_imx53 is not set +CONFIG_PLATFORM_TYPE_pc=y +# CONFIG_PLATFORM_TYPE_custom is not set +CONFIG_PLATFORM_TYPE="pc" +# CONFIG_USE_DROPS_STDDIR is not set +# CONFIG_USE_DICE is not set +CONFIG_DROPS_STDDIR="/path/to/l4re" +CONFIG_DROPS_INSTDIR="/path/to/l4re" +CONFIG_BID_COLORED_PHASES=y + +# +# Building +# +CONFIG_YACC="yacc" +CONFIG_LEX="flex" +CONFIG_CTAGS="ctags" +CONFIG_ETAGS="etags" +CONFIG_HAVE_LDSO=y +CONFIG_INT_CPP_NAME_SWITCH=y +CONFIG_INT_LD_NAME_SWITCH=y +# CONFIG_BID_STRIP_PROGS is not set +# CONFIG_BID_GCC_OMIT_FP is not set +# CONFIG_BID_GENERATE_MAPFILE is not set +# CONFIG_BID_BUILD_DOC is not set +# CONFIG_RELEASE_MODE is not set +CONFIG_MAKECONFS_ADD="" diff --git a/base-foc/lib/mk/platform_imx53/platform.mk b/base-foc/lib/mk/platform_imx53/platform.mk new file mode 100644 index 000000000..522bf1325 --- /dev/null +++ b/base-foc/lib/mk/platform_imx53/platform.mk @@ -0,0 +1,6 @@ +# +# Configuration for L4 build system (for kernel-bindings, sigma0, bootstrap). +# +L4_CONFIG = $(call select_from_repositories,config/imx53.user) + +include $(REP_DIR)/lib/mk/arm/platform.inc diff --git a/base-foc/lib/mk/x86_32/platform.mk b/base-foc/lib/mk/x86_32/platform.mk index fedc7acf3..9ef0be0ac 100644 --- a/base-foc/lib/mk/x86_32/platform.mk +++ b/base-foc/lib/mk/x86_32/platform.mk @@ -1,7 +1,7 @@ # # Configuration for L4 build system (for kernel-bindings, sigma0, bootstrap). # -L4_CONFIG = $(call select_from_repositories,contrib/l4/mk/defconfig/config.x86) +L4_CONFIG = $(call select_from_repositories,config/x86_32.user) # # Create mirror for architecture-specific L4sys header files diff --git a/base-foc/lib/mk/x86_64/platform.mk b/base-foc/lib/mk/x86_64/platform.mk index 5a12904c7..883be3772 100644 --- a/base-foc/lib/mk/x86_64/platform.mk +++ b/base-foc/lib/mk/x86_64/platform.mk @@ -1,7 +1,7 @@ # # Configuration for L4 build system (for kernel-bindings, sigma0, bootstrap). # -L4_CONFIG = $(call select_from_repositories,contrib/l4/mk/defconfig/config.amd64) +L4_CONFIG = $(call select_from_repositories,config/x86_64.user) # # Create mirror for architecture-specific L4sys header files diff --git a/base-foc/mk/spec-foc_imx53.mk b/base-foc/mk/spec-foc_imx53.mk new file mode 100644 index 000000000..9506be6cc --- /dev/null +++ b/base-foc/mk/spec-foc_imx53.mk @@ -0,0 +1,4 @@ +SPECS += foc_arm platform_imx53 + +include $(call select_from_repositories,mk/spec-platform_imx53.mk) +include $(call select_from_repositories,mk/spec-foc_arm.mk) diff --git a/base-foc/patches/imx53_support.patch b/base-foc/patches/imx53_support.patch new file mode 100644 index 000000000..ed96357a9 --- /dev/null +++ b/base-foc/patches/imx53_support.patch @@ -0,0 +1,231 @@ +From ea7d759fa88778f0f481fbecac3077b8f474527f Mon Sep 17 00:00:00 2001 +From: Nikolay Golikov +Date: Tue, 4 Sep 2012 17:51:47 +0400 +Subject: [PATCH] Added Freescale i.MX53 platform support + +--- + src/kernel/fiasco/src/kern/arm/bsp/imx/Kconfig | 8 ++++++ + src/kernel/fiasco/src/kern/arm/bsp/imx/Modules | 5 ++++ + .../src/kern/arm/bsp/imx/bootstrap-arm-imx.cpp | 2 +- + .../fiasco/src/kern/arm/bsp/imx/config-arm-imx.cpp | 4 +++ + .../src/kern/arm/bsp/imx/mem_layout-arm-imx.cpp | 26 ++++++++++++++++++++ + .../fiasco/src/kern/arm/bsp/imx/pic-arm-imx51.cpp | 4 +-- + .../fiasco/src/kern/arm/bsp/imx/reset-arm-imx.cpp | 2 +- + .../src/kern/arm/bsp/imx/timer-arm-imx_epit.cpp | 2 +- + .../fiasco/src/kern/arm/bsp/imx/uart-imx.cpp | 4 +-- + src/l4/pkg/bootstrap/server/src/Make.rules | 1 + + src/l4/pkg/bootstrap/server/src/platform/imx.cc | 3 +++ + 11 files changed, 54 insertions(+), 7 deletions(-) + +diff --git kernel/fiasco/src/kern/arm/bsp/imx/Kconfig kernel/fiasco/src/kern/arm/bsp/imx/Kconfig +index 6348b4f..61e090d 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/Kconfig ++++ kernel/fiasco/src/kern/arm/bsp/imx/Kconfig +@@ -25,6 +25,13 @@ config PF_IMX_51 + help + Choose for i.MX51 + ++config PF_IMX_53 ++ bool "i.MX53" ++ depends on PF_IMX ++ select CAN_ARM_CPU_CORTEX_A8 ++ help ++ Choose for i.MX53 ++ + endchoice + + config PF_IMX_RAM_PHYS_BASE +@@ -32,3 +39,4 @@ config PF_IMX_RAM_PHYS_BASE + default 0xc0000000 if PF_IMX_21 + default 0x80000000 if PF_IMX_35 + default 0x90000000 if PF_IMX_51 ++ default 0x70000000 if PF_IMX_53 +diff --git kernel/fiasco/src/kern/arm/bsp/imx/Modules kernel/fiasco/src/kern/arm/bsp/imx/Modules +index 7f3021f..78b1ed2 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/Modules ++++ kernel/fiasco/src/kern/arm/bsp/imx/Modules +@@ -7,9 +7,12 @@ PREPROCESS_PARTS += $(if $(CONFIG_PF_IMX_21),imx21 kern_start_0xd) + PREPROCESS_PARTS += $(if $(CONFIG_PF_IMX_35),imx35 imx_epit) + PREPROCESS_PARTS += $(if $(CONFIG_PF_IMX_51),imx51 imx_epit \ + pic_gic pic_gic_mxc_tzic) ++PREPROCESS_PARTS += $(if $(CONFIG_PF_IMX_53),imx53 imx_epit \ ++ pic_gic pic_gic_mxc_tzic) + CONFIG_KERNEL_LOAD_ADDR := $(CONFIG_PF_IMX_RAM_PHYS_BASE) + + INTERFACES_KERNEL += $(if $(CONFIG_PF_IMX_51),gic) ++INTERFACES_KERNEL += $(if $(CONFIG_PF_IMX_53),gic) + + uart_IMPL += uart-imx + config_IMPL += config-arm-imx +@@ -17,10 +20,12 @@ mem_layout_IMPL += mem_layout-arm-imx + pic_IMPL += $(if $(CONFIG_PF_IMX_21),pic-arm-imx) + pic_IMPL += $(if $(CONFIG_PF_IMX_35),pic-arm-imx) + pic_IMPL += $(if $(CONFIG_PF_IMX_51),pic-gic pic-arm-imx51) ++pic_IMPL += $(if $(CONFIG_PF_IMX_53),pic-gic pic-arm-imx51) + bootstrap_IMPL += bootstrap-arm-imx + timer_IMPL += $(if $(CONFIG_PF_IMX_21),timer-arm-imx21) + timer_IMPL += $(if $(CONFIG_PF_IMX_35),timer-arm-imx_epit) + timer_IMPL += $(if $(CONFIG_PF_IMX_51),timer-arm-imx_epit) ++timer_IMPL += $(if $(CONFIG_PF_IMX_53),timer-arm-imx_epit) + timer_tick_IMPL += timer_tick-single-vector + kernel_uart_IMPL += kernel_uart-arm-imx + reset_IMPL += reset-arm-imx +diff --git kernel/fiasco/src/kern/arm/bsp/imx/bootstrap-arm-imx.cpp kernel/fiasco/src/kern/arm/bsp/imx/bootstrap-arm-imx.cpp +index b3023a8..427abc8 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/bootstrap-arm-imx.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/bootstrap-arm-imx.cpp +@@ -25,7 +25,7 @@ enum { + } + + //----------------------------------------------------------------------------- +-IMPLEMENTATION [arm && imx51]: ++IMPLEMENTATION [arm && (imx51 || imx53)]: + void + map_hw(void *pd) + { +diff --git kernel/fiasco/src/kern/arm/bsp/imx/config-arm-imx.cpp kernel/fiasco/src/kern/arm/bsp/imx/config-arm-imx.cpp +index d431214..ef19534 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/config-arm-imx.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/config-arm-imx.cpp +@@ -9,3 +9,7 @@ + INTERFACE [arm && imx51]: + + #define TARGET_NAME "i.MX51" ++ ++INTERFACE [arm && imx53]: ++ ++#define TARGET_NAME "i.MX53" +diff --git kernel/fiasco/src/kern/arm/bsp/imx/mem_layout-arm-imx.cpp kernel/fiasco/src/kern/arm/bsp/imx/mem_layout-arm-imx.cpp +index b86b2b0..5d44072 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/mem_layout-arm-imx.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/mem_layout-arm-imx.cpp +@@ -90,3 +90,29 @@ + Gic_dist_phys_base = 0xe0000000, + }; + }; ++ ++ ++INTERFACE [arm && imx && imx53]: // --------------------------------------- ++ ++EXTENSION class Mem_layout ++{ ++public: ++ enum Virt_layout_imx53 { ++ Timer_map_base = 0xef1ac000, ++ Uart_map_base = 0xef1bc000, ++ Watchdog_map_base = 0xef198000, ++ Gic_cpu_map_base = 0, ++ Gic_dist_map_base = 0xef2fc000, ++ Uart_base = Uart_map_base, ++ }; ++ ++ enum Phys_layout_imx53 { ++ Device_phys_base_1 = 0x53f00000, ++ Device_phys_base_2 = 0x0ff00000, ++ ++ Watchdog_phys_base = 0x53f98000, // wdog1 ++ Timer_phys_base = 0x53fac000, // epit1 ++ Uart_phys_base = 0x53fbc000, // uart1 ++ Gic_dist_phys_base = 0x0fffc000, ++ }; ++}; +diff --git kernel/fiasco/src/kern/arm/bsp/imx/pic-arm-imx51.cpp kernel/fiasco/src/kern/arm/bsp/imx/pic-arm-imx51.cpp +index 02ec945..e4ae3ef 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/pic-arm-imx51.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/pic-arm-imx51.cpp +@@ -1,9 +1,9 @@ +-INTERFACE [arm && pic_gic && imx51]: ++INTERFACE [arm && pic_gic && (imx51 || imx53)]: + + #include "gic.h" + + // ------------------------------------------------------------------------ +-IMPLEMENTATION [arm && pic_gic && imx51]: ++IMPLEMENTATION [arm && pic_gic && (imx51 || imx53)]: + + #include "irq_mgr_multi_chip.h" + #include "kmem.h" +diff --git kernel/fiasco/src/kern/arm/bsp/imx/reset-arm-imx.cpp kernel/fiasco/src/kern/arm/bsp/imx/reset-arm-imx.cpp +index 7e7776f..e3f9277 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/reset-arm-imx.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/reset-arm-imx.cpp +@@ -25,7 +25,7 @@ void __attribute__ ((noreturn)) + } + + // ------------------------------------------------------------------------ +-IMPLEMENTATION [arm && (imx35 || imx51)]: ++IMPLEMENTATION [arm && (imx35 || imx51 || imx53)]: + + #include "io.h" + #include "kmem.h" +diff --git kernel/fiasco/src/kern/arm/bsp/imx/timer-arm-imx_epit.cpp kernel/fiasco/src/kern/arm/bsp/imx/timer-arm-imx_epit.cpp +index 2231f5a..03f5468 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/timer-arm-imx_epit.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/timer-arm-imx_epit.cpp +@@ -39,7 +39,7 @@ + }; + + +-INTERFACE [arm && imx51]: // ---------------------------------------------- ++INTERFACE [arm && (imx51 || imx53)]: // ---------------------------------------------- + + EXTENSION class Timer + { +diff --git kernel/fiasco/src/kern/arm/bsp/imx/uart-imx.cpp kernel/fiasco/src/kern/arm/bsp/imx/uart-imx.cpp +index 2f55d22..e04ec24 100644 +--- kernel/fiasco/src/kern/arm/bsp/imx/uart-imx.cpp ++++ kernel/fiasco/src/kern/arm/bsp/imx/uart-imx.cpp +@@ -25,7 +25,7 @@ IMPLEMENT L4::Uart *Uart::uart() + return &uart; + } + +-IMPLEMENTATION [imx51]: ++IMPLEMENTATION [imx51 || imx53]: + + #include "uart_imx.h" + +@@ -37,7 +37,7 @@ IMPLEMENT L4::Uart *Uart::uart() + return &uart; + } + +-IMPLEMENTATION [imx21 || imx35 || imx51]: ++IMPLEMENTATION [imx21 || imx35 || imx51 || imx53]: + + #include "mem_layout.h" + +diff --git l4/pkg/bootstrap/server/src/Make.rules l4/pkg/bootstrap/server/src/Make.rules +index c6760f6..0872102 100644 +--- l4/pkg/bootstrap/server/src/Make.rules ++++ l4/pkg/bootstrap/server/src/Make.rules +@@ -75,6 +75,7 @@ SUPPORT_CC_arm-tegra2 := platform/tegra2.cc + SUPPORT_CC_arm-imx21 := platform/imx.cc + SUPPORT_CC_arm-imx35 := platform/imx.cc + SUPPORT_CC_arm-imx51 := platform/imx.cc ++SUPPORT_CC_arm-imx53 := platform/imx.cc + SUPPORT_CC_arm-om := platform/om.cc + SUPPORT_CC_arm-kirkwood := platform/kirkwood.cc + DEFAULT_RELOC_arm-imx21 := 0x00200000 # because of blob +diff --git l4/pkg/bootstrap/server/src/platform/imx.cc l4/pkg/bootstrap/server/src/platform/imx.cc +index 628103e..70d8602 100644 +--- l4/pkg/bootstrap/server/src/platform/imx.cc ++++ l4/pkg/bootstrap/server/src/platform/imx.cc +@@ -36,6 +36,9 @@ class Platform_arm_imx : public Platform_single_region_ram + #elif defined(PLATFORM_TYPE_imx51) + static L4::Io_register_block_mmio r(0x73fbc000); + static L4::Uart_imx51 _uart; ++#elif defined(PLATFORM_TYPE_imx53) ++ static L4::Io_register_block_mmio r(0x53fbc000); ++ static L4::Uart_imx51 _uart; + #else + #error Which platform type? + #endif +Index: l4/mk/platforms/imx53.conf +=================================================================== +--- l4/mk/platforms/imx53.conf (revision 0) ++++ l4/mk/platforms/imx53.conf (revision 0) +@@ -0,0 +1,4 @@ ++PLATFORM_NAME = "Freescale i.MX53" ++PLATFORM_ARCH = arm ++PLATFORM_RAM_BASE = 0x70000000 ++PLATFORM_RAM_SIZE_MB = 1024 +\ No newline at end of file diff --git a/base-foc/src/core/imx53/target.mk b/base-foc/src/core/imx53/target.mk new file mode 100644 index 000000000..77717ad4a --- /dev/null +++ b/base-foc/src/core/imx53/target.mk @@ -0,0 +1,10 @@ +include $(PRG_DIR)/../target.inc + +REQUIRES += arm foc_imx53 +SRC_CC += arm/platform_arm.cc +INC_DIR += $(REP_DIR)/src/core/include/arm + +LD_TEXT_ADDR = 0x70140000 + +vpath platform_services.cc $(GEN_CORE_DIR) + diff --git a/base-foc/src/kernel/imx53/target.mk b/base-foc/src/kernel/imx53/target.mk new file mode 100644 index 000000000..8e9c30202 --- /dev/null +++ b/base-foc/src/kernel/imx53/target.mk @@ -0,0 +1,4 @@ +REQUIRES = platform_imx53 +KERNEL_CONFIG = $(REP_DIR)/config/imx53.kernel + +-include $(PRG_DIR)/../target.inc diff --git a/base/mk/spec-cortex_a8.mk b/base/mk/spec-cortex_a8.mk new file mode 100644 index 000000000..bddb8942d --- /dev/null +++ b/base/mk/spec-cortex_a8.mk @@ -0,0 +1,14 @@ +# +# \brief Build-system configurations specifically for the ARM Cortex A8 +# \author Stefan Kalkowski +# \date 2012-10-15 +# + +# denote wich specs are also fullfilled by this spec +SPECS += arm_v7a + +# add repository relative include paths +REP_INC_DIR += include/cortex_a8 + +# include implied specs +include $(call select_from_repositories,mk/spec-arm_v7a.mk) diff --git a/base/mk/spec-platform_imx53.mk b/base/mk/spec-platform_imx53.mk new file mode 100644 index 000000000..2d57050ce --- /dev/null +++ b/base/mk/spec-platform_imx53.mk @@ -0,0 +1,14 @@ +# +# \brief Build-system configurations specific to i.MX53 +# \author Stefan Kalkowski +# \date 2012-10-15 +# + +# denote wich specs are also fullfilled by this spec +SPECS += cortex_a8 imx53 imx + +# add repository relative include paths +REP_INC_DIR += include/platform/imx53 + +# include implied specs +include $(call select_from_repositories,mk/spec-cortex_a8.mk) diff --git a/tool/builddir/etc/build.conf.foc_imx53 b/tool/builddir/etc/build.conf.foc_imx53 new file mode 100644 index 000000000..02565186d --- /dev/null +++ b/tool/builddir/etc/build.conf.foc_imx53 @@ -0,0 +1 @@ +REPOSITORIES = $(GENODE_DIR)/base-foc diff --git a/tool/create_builddir b/tool/create_builddir index 3dd201b54..2ed3725c2 100755 --- a/tool/create_builddir +++ b/tool/create_builddir @@ -33,6 +33,7 @@ usage: @echo " 'foc_x86_32'" @echo " 'foc_x86_64'" @echo " 'foc_pbxa9'" + @echo " 'foc_imx53'" @echo " 'foc_vea9x4'" @echo " 'foc_panda'" @echo " 'lx_hybrid_x86'" @@ -116,7 +117,7 @@ $(BUILD_DIR)/Makefile: # # Add 'ports-foc' repository to Fiasco.OC build directory # -ifeq ($(filter-out foc_x86_32 foc_pbxa9 foc_vea9x4 foc_panda,$(PLATFORM)),) +ifeq ($(filter-out foc_x86_32 foc_imx53 foc_pbxa9 foc_vea9x4 foc_panda,$(PLATFORM)),) $(BUILD_DIR)/etc/build.conf:: @cat $(BUILD_CONF).ports-foc >> $@ endif @@ -132,7 +133,7 @@ endif # # Add ARM drivers repositories to ARM build directories # -ifeq ($(filter-out foc_panda hw_panda,$(PLATFORM)),) +ifeq ($(filter-out foc_panda hw_panda foc_imx53,$(PLATFORM)),) $(BUILD_DIR)/etc/build.conf:: @cat $(BUILD_CONF).drivers_arm >> $@ endif @@ -171,6 +172,9 @@ foc_vea9x4:: foc_panda:: @echo "SPECS = genode foc_panda" > $(BUILD_DIR)/etc/specs.conf +foc_imx53:: + @echo "SPECS = genode foc_imx53" > $(BUILD_DIR)/etc/specs.conf + codezero_vpb926:: @echo "CODEZERO_DIR = $(GENODE_DIR)/base-codezero/contrib" > $(BUILD_DIR)/etc/codezero.conf