From 0bde54c2340347d2b21b70895dd9ddc7defde618 Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Thu, 22 Aug 2019 13:28:30 +0200 Subject: [PATCH] Add support for Wandboard Quad with Fiasco.OC --- repos/base-foc/config/wand_quad.kernel | 113 ++++++++++++++++++ repos/base-foc/config/wand_quad.user | 87 ++++++++++++++ .../lib/mk/spec/wand_quad/kernel-foc.mk | 3 + .../lib/mk/spec/wand_quad/syscall-foc.mk | 5 + repos/base-foc/ports/foc.hash | 2 +- repos/base-foc/ports/foc.port | 2 +- tool/builddir/build.conf/run_kernel_wand_quad | 2 +- tool/run/boot_dir/foc | 1 + 8 files changed, 212 insertions(+), 3 deletions(-) create mode 100644 repos/base-foc/config/wand_quad.kernel create mode 100644 repos/base-foc/config/wand_quad.user create mode 100644 repos/base-foc/lib/mk/spec/wand_quad/kernel-foc.mk create mode 100644 repos/base-foc/lib/mk/spec/wand_quad/syscall-foc.mk diff --git a/repos/base-foc/config/wand_quad.kernel b/repos/base-foc/config/wand_quad.kernel new file mode 100644 index 000000000..85756bf6a --- /dev/null +++ b/repos/base-foc/config/wand_quad.kernel @@ -0,0 +1,113 @@ +# +# Automatically generated file; DO NOT EDIT. +# Fiasco configuration +# +CONFIG_HAS_FPU_OPTION=y +CONFIG_HAS_VIRT_OBJ_SPACE_OPTION=y +CONFIG_HAS_SERIAL_OPTION=y +CONFIG_HAS_JDB_GZIP_OPTION=y +CONFIG_HAS_MP_OPTION=y + +# +# Target configuration +# +# CONFIG_IA32 is not set +# CONFIG_AMD64 is not set +CONFIG_ARM=y +# CONFIG_MIPS is not set +# CONFIG_PF_INTEGRATOR is not set +# CONFIG_PF_REALVIEW is not set +# CONFIG_PF_SUNXI is not set +# CONFIG_PF_BCM283X is not set +# CONFIG_PF_SA1100 is not set +# CONFIG_PF_XSCALE is not set +# CONFIG_PF_ARMADA38X is not set +# CONFIG_PF_KIRKWOOD is not set +# CONFIG_PF_TEGRA is not set +# CONFIG_PF_LAYERSCAPE is not set +CONFIG_PF_IMX=y +# CONFIG_PF_ARM_VIRT is not set +# CONFIG_PF_RCAR3 is not set +# CONFIG_PF_EXYNOS is not set +# CONFIG_PF_S3C2410 is not set +# CONFIG_PF_OMAP is not set +# CONFIG_PF_ZYNQ is not set +# CONFIG_PF_ZYNQMP is not set +CONFIG_BSP_NAME="imx" +CONFIG_CAN_ARM_CPU_CORTEX_A9=y +CONFIG_CAN_ARM_CACHE_L2CXX0=y +CONFIG_ARM_V7=y +CONFIG_ARM_V6PLUS=y +CONFIG_ARM_V7PLUS=y +# CONFIG_PF_IMX_21 is not set +# CONFIG_PF_IMX_28 is not set +# CONFIG_PF_IMX_35 is not set +# CONFIG_PF_IMX_51 is not set +CONFIG_PF_IMX_6=y +# CONFIG_PF_IMX_6UL is not set +# CONFIG_PF_IMX_7 is not set +CONFIG_PF_IMX_RAM_PHYS_BASE=0x10000000 +CONFIG_PF_IMX_6_TIMER_MPTIMER=y +# CONFIG_PF_IMX_6_TIMER_EPIT is not set +CONFIG_ABI_VF=y +CONFIG_ARM_CORTEX_A9=y +CONFIG_FPU=y +# CONFIG_ARM_ALIGNMENT_CHECK is not set +CONFIG_ARM_EM_STD=y +# CONFIG_ARM_EM_NS is not set +# CONFIG_ARM_EM_TZ is not set +# CONFIG_ARM_SMC_USER is not set +CONFIG_ARM_CACHE_L2CXX0=y +# CONFIG_ARM_ENABLE_SWP is not set +CONFIG_HAS_ARM_PSCI=y +# CONFIG_ARM_PSCI is not set +CONFIG_ARM_CPU_ERRATA=y + +# +# Kernel options +# +CONFIG_MP=y +CONFIG_MP_MAX_CPUS=4 +CONFIG_CONTEXT_4K=y +CONFIG_FINE_GRAINED_CPUTIME=y +CONFIG_SCHED_FIXED_PRIO=y +CONFIG_VIRT_OBJ_SPACE=y + +# +# Debugging +# +CONFIG_INLINE=y +# CONFIG_NDEBUG is not set +CONFIG_NO_FRAME_PTR=y +# CONFIG_STACK_DEPTH is not set +# CONFIG_LIST_ALLOC_SANITY is not set +CONFIG_SERIAL=y +CONFIG_JDB=y +CONFIG_JDB_LOGGING=y +CONFIG_JDB_GZIP=y +# CONFIG_JDB_ACCOUNTING is not set +# CONFIG_WARN_NONE is not set +CONFIG_WARN_WARNING=y +# CONFIG_WARN_ANY is not set + +# +# ARM debugging options +# +# CONFIG_VMEM_ALLOC_TEST is not set +# CONFIG_DEBUG_KERNEL_PAGE_FAULTS 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_WARN_LEVEL=1 +CONFIG_XARCH="arm" +CONFIG_ABI="vf" diff --git a/repos/base-foc/config/wand_quad.user b/repos/base-foc/config/wand_quad.user new file mode 100644 index 000000000..de320871e --- /dev/null +++ b/repos/base-foc/config/wand_quad.user @@ -0,0 +1,87 @@ +# +# Automatically generated file; DO NOT EDIT. +# L4Re Configuration +# +CONFIG_ARCH_ENABLE_STACK_PROTECTOR=y +# CONFIG_BUILD_ARCH_amd64 is not set +CONFIG_BUILD_ARCH_arm=y +# CONFIG_BUILD_ARCH_arm64 is not set +# CONFIG_BUILD_ARCH_mips is not set +# CONFIG_BUILD_ARCH_ppc32 is not set +# CONFIG_BUILD_ARCH_sparc is not set +# CONFIG_BUILD_ARCH_x86 is not set +CONFIG_BUILD_ARCH="arm" +CONFIG_BUILD_ABI_l4f=y +CONFIG_BUILD_ABI="l4f" +# 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="armv7a" +CONFIG_CPU_ARMV6KPLUS=y +CONFIG_CPU_ARMV6PLUS=y +CONFIG_PLATFORM_TYPE_wand_quad=y +# CONFIG_PLATFORM_TYPE_imx6 is not set +# CONFIG_PLATFORM_TYPE_zedboard is not set +# CONFIG_PLATFORM_TYPE_imx35 is not set +# CONFIG_PLATFORM_TYPE_rv_pbx is not set +# CONFIG_PLATFORM_TYPE_rv is not set +# CONFIG_PLATFORM_TYPE_kirkwood is not set +# CONFIG_PLATFORM_TYPE_pandaboard is not set +# CONFIG_PLATFORM_TYPE_arm_virt is not set +# CONFIG_PLATFORM_TYPE_tegra2 is not set +# CONFIG_PLATFORM_TYPE_imx7 is not set +# CONFIG_PLATFORM_TYPE_exynos4 is not set +# CONFIG_PLATFORM_TYPE_cubieboard2 is not set +# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set +# CONFIG_PLATFORM_TYPE_ls1012afrdm is not set +# CONFIG_PLATFORM_TYPE_rpi_b is not set +# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set +# CONFIG_PLATFORM_TYPE_imx51 is not set +# CONFIG_PLATFORM_TYPE_ls1021atwr is not set +# CONFIG_PLATFORM_TYPE_tegra3 is not set +# CONFIG_PLATFORM_TYPE_imx28 is not set +# CONFIG_PLATFORM_TYPE_omap3evm is not set +# CONFIG_PLATFORM_TYPE_exynos5 is not set +# CONFIG_PLATFORM_TYPE_rcar3_m3 is not set +# CONFIG_PLATFORM_TYPE_parallella is not set +# CONFIG_PLATFORM_TYPE_zynqmp is not set +# CONFIG_PLATFORM_TYPE_beagleboard is not set +# CONFIG_PLATFORM_TYPE_imx21 is not set +# CONFIG_PLATFORM_TYPE_imx6ul is not set +# CONFIG_PLATFORM_TYPE_armada38x is not set +# CONFIG_PLATFORM_TYPE_omap5 is not set +# CONFIG_PLATFORM_TYPE_rv_vexpress is not set +# CONFIG_PLATFORM_TYPE_rpi_a is not set +# CONFIG_PLATFORM_TYPE_integrator is not set +# CONFIG_PLATFORM_TYPE_custom is not set +CONFIG_PLATFORM_TYPE="wand_quad" +# 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_GCC_ENABLE_STACK_PROTECTOR=y +# CONFIG_BID_GCC_STACK_PROTECTOR_ALL is not set +CONFIG_BID_GCC_STACK_PROTECTOR=y +# CONFIG_BID_BUILD_DOC is not set +# CONFIG_RELEASE_MODE is not set +CONFIG_MAKECONFS_ADD="" diff --git a/repos/base-foc/lib/mk/spec/wand_quad/kernel-foc.mk b/repos/base-foc/lib/mk/spec/wand_quad/kernel-foc.mk new file mode 100644 index 000000000..8902222a5 --- /dev/null +++ b/repos/base-foc/lib/mk/spec/wand_quad/kernel-foc.mk @@ -0,0 +1,3 @@ +KERNEL_CONFIG := $(REP_DIR)/config/wand_quad.kernel + +include $(REP_DIR)/lib/mk/kernel-foc.inc diff --git a/repos/base-foc/lib/mk/spec/wand_quad/syscall-foc.mk b/repos/base-foc/lib/mk/spec/wand_quad/syscall-foc.mk new file mode 100644 index 000000000..43dcd5121 --- /dev/null +++ b/repos/base-foc/lib/mk/spec/wand_quad/syscall-foc.mk @@ -0,0 +1,5 @@ +L4_CONFIG := $(call select_from_repositories,config/wand_quad.user) + +L4_BIN_DIR := $(LIB_CACHE_DIR)/syscall-foc/build/bin/arm_armv7a + +include $(REP_DIR)/lib/mk/spec/arm/syscall-foc.inc diff --git a/repos/base-foc/ports/foc.hash b/repos/base-foc/ports/foc.hash index cd3aa28e2..fab2d537d 100644 --- a/repos/base-foc/ports/foc.hash +++ b/repos/base-foc/ports/foc.hash @@ -1 +1 @@ -b1ce966e9593cadea9d6d24fd1616ee5a64b6cb7 +f19f59cc0e96514820c1871160576a4e55d75492 diff --git a/repos/base-foc/ports/foc.port b/repos/base-foc/ports/foc.port index f15b72913..b38f75bd7 100644 --- a/repos/base-foc/ports/foc.port +++ b/repos/base-foc/ports/foc.port @@ -2,5 +2,5 @@ LICENSE := GPLv2 VERSION := git DOWNLOADS := foc.git URL(foc) := https://git.mousetrap.xyz/alex/foc.git -REV(foc) := 45bf2c699552d1e2891d322bea479d95f8c93d02 +REV(foc) := 9bdd7cdc46e9e83015545637bf03276caeab0596 DIR(foc) := src/kernel/foc diff --git a/tool/builddir/build.conf/run_kernel_wand_quad b/tool/builddir/build.conf/run_kernel_wand_quad index 96b6f17cf..69d97570b 100644 --- a/tool/builddir/build.conf/run_kernel_wand_quad +++ b/tool/builddir/build.conf/run_kernel_wand_quad @@ -1,3 +1,3 @@ -# kernel to use (hw, sel4) +# kernel to use (hw, sel4, foc) # KERNEL ?= hw diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index b69e605a9..eb99a4ed0 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -16,6 +16,7 @@ proc core_link_address { } { if {[have_spec pbxa9 ]} { return "0x76000000" } if {[have_spec odroid_x2]} { return "0x80100000" } if {[have_spec imx53 ]} { return "0x70140000" } + if {[have_spec imx6 ]} { return "0x10200000" } puts stderr "Error: platform not supported, core link address unknown" exit 1