Commit 252bdcca authored by Oliver Horst's avatar Oliver Horst
Browse files

[chg] Started to prepare for a baremetal build support

parent 6fd2ad47
Common targets are:
toki-init
You can also run generated qemu images with a command like 'runqemu'
......@@ -26,22 +26,19 @@ def get_toki_sw_core_config(d):
return sw_config
def get_toki_core_config_path(d):
def get_toki_config(d):
import os
core_sw_config = get_toki_sw_core_config(d)
# operating system
config_os = core_sw_config['os']
# determine TOKI_CONFIG for this core
config_name = core_sw_config['config']
# determine boot-mode if master or slave
config_mode = "master" if core_sw_config['boot-mode'] else "slave"
toki_config_path = os.path.join(config_os, config_name, config_mode)
return toki_config_path
toki_config = os.path.join(config_name, config_mode)
return toki_config
def get_toki_hw_image(d):
import os
......@@ -85,6 +82,11 @@ def get_toki_multiconfig_str(d):
return mc_str
def get_toki_os(d):
core_sw_config = get_toki_sw_core_config(d)
return core_sw_config['os']
def get_toki_apps(d):
core_sw_config = get_toki_sw_core_config(d)
......
......@@ -38,8 +38,6 @@
MACHINE = "zcu102-zynqmp"
DISTRO = "toki"
TCLIBC = "newlib"
TARGET_OS = "freertos-elf"
TOKI_CONFIG = "master/baseline"
#
# Where to place downloads
......
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
SRC_URI = "git://git.fortiss.org/toki/components/freertos-portable.git;protocol=https"
PV = "0.1.0+git${SRCPV}"
SRCREV = "fab478e1d955c8e45c2807168bfee407c5cd1a79"
inherit cmake
FILES_${PN}-dev += "${libdir}/cmake/*"
EXTRA_OECMAKE = ""
require freertos-portable-common.inc
S = "${WORKDIR}/git/GCC/ARM_CA53_64_BIT/include"
inherit toki-system
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "components/freertos-portable/GCC/ARM_CA53_64_BIT/include")}"
require freertos-portable-common.inc
S = "${WORKDIR}/git/GCC/ARM_CA53_64_BIT"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "components/freertos-portable/GCC/ARM_CA53_64_BIT")}"
DEPENDS = "freertos-headers"
EXTRA_OECMAKE_append = " -DWITH_HEADERS:BOOL=FALSE"
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/freertos/include"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/freertos/include"
inherit toki-system
inherit toki-externalsrc
EXTERNALSRC := "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/freertos/include")}"
EXTERNALSRC := "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/freertos/include")}"
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/freertos"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/freertos"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/freertos")}"
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/freertos")}"
DEPENDS = "freertos-config-headers"
......
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/lwip/include"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/lwip/include"
inherit toki-system
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/lwip/include")}"
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/lwip/include")}"
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/lwip"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/lwip"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/lwip")}"
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/lwip")}"
DEPENS = "lwip-config-headers"
......
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/taclebench"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/taclebench"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/taclebench")}"
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/taclebench")}"
......@@ -4,7 +4,7 @@ require app-list.inc
S = "${WORKDIR}/git/include"
inherit toki-externalsrc python3native native
EXTERNALSRC = "${@relative_externalsrc(d, "init/src")}"
EXTERNALSRC = "${@relative_externalsrc(d, "init/${MACHINE}/${TOKI_OS}/src")}"
DEPENDS += "\
${TOKI_APPS} \
......
require toki-init-common.inc
S = "${WORKDIR}/git"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "init")}"
EXTERNALSRC = "${@relative_externalsrc(d, "init/${MACHINE}/${TARGET_OS}")}"
DEPENDS = "ldscript app-list"
DEPENDS_append_freertos-elf = " freertos"
DEPENDS = "freertos ldscript app-list"
inherit cmake
TARGET_CFLAGS += "-nostdlib"
TARGET_LDFLAGS += "-nostdlib"
TARGET_CFLAGS += " -nostdlib"
TARGET_LDFLAGS += " -nostdlib"
FILES_${PN}-dev += "${libdir}/cmake/*"
......
require conf/distro/include/target-configs.inc
S = "${WORKDIR}/git/${MACHINE}/${TOKI_CONFIG}/ldscript"
S = "${WORKDIR}/git/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/ldscript"
inherit toki-externalsrc
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TOKI_CONFIG}/ldscript")}"
EXTERNALSRC = "${@relative_externalsrc(d, "configs/${MACHINE}/${TARGET_OS}/${TOKI_CONFIG}/ldscript")}"
FILES_${PN}-dev += "${libdir}/ldscripts/*.ld"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment