aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend
blob: d40f3cdb6b07c88a5c3fe632035f9b211dbd9a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# We WANT to default to this version when available
DEFAULT_PREFERENCE = "100"

# Reset this
SRC_URI = "${EMBEDDEDSW_SRCURI}"

inherit esw

# Not compatible with Zynq
COMPATIBLE_MACHINE:zynq = "none"
COMPATIBLE_MACHINE:microblaze = "none"

ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src"
ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src"
ESW_COMPONENT_SRC:zynqmp = "/lib/sw_apps/zynqmp_fsbl/src"

DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm"

python() {
    psu_init_path = d.getVar('PSU_INIT_PATH')
    if not psu_init_path:
        psu_init_path = os.path.dirname(d.getVar('SYSTEM_DTFILE'))

    psu_init_c = os.path.join(psu_init_path, 'psu_init.c')
    psu_init_h = os.path.join(psu_init_path, 'psu_init.h')

    add_path = False
    if os.path.exists(psu_init_c):
        d.appendVar('SRC_URI', ' file://psu_init.c')
        add_path = True

    if os.path.exists(psu_init_h):
        d.appendVar('SRC_URI', ' file://psu_init.h')
        add_path = True

    if add_path:
        d.prependVar('FILESEXTRAPATHS', '%s:' % psu_init_path)
}

do_configure:prepend() {
    if [ -e ${WORKDIR}/psu_init.c ]; then
        install -m 0644 ${WORKDIR}/psu_init.c ${S}/${ESW_COMPONENT_SRC}
    else
        bbwarn "Using the default psu_init.c, this may not work correctly."
    fi

    if [ -e ${WORKDIR}/psu_init.h ]; then
        install -m 0644 ${WORKDIR}/psu_init.h ${S}/${ESW_COMPONENT_SRC}
    else
        bbwarn "Using the default psu_init.h, this may not work correctly."
    fi
    install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
}

do_install() {
    :
}

addtask deploy before do_build after do_package

ESW_COMPONENT = "undefined"
ESW_COMPONENT:zynq = "zynq_fsbl.elf"
ESW_COMPONENT:zynqmp = "zynqmp_fsbl.elf"

CFLAGS:append:aarch64 = " -DARMA53_64"
CFLAGS:append:armv7r = " -DARMR5"