aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend
blob: 6a23dc47b558b4c8a3163349a78ee49b7a1ee1e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# QEMU for the Kria SOM requires a section from the FSBL to be extracted

PMU_CONF_NAME ?= "pmu-conf"
PMU_CONF_BASE_NAME ?= "${PMU_CONF_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"

# Required so we can run objcopy in do_compile
DEPENDS:append:zynqmp = " virtual/${TARGET_PREFIX}binutils"

do_compile:append:zynqmp () {
    if [ -z "${SYSTEM_DTFILE}" ]; then
        ${OBJCOPY} --dump-section .sys_cfg_data=${B}/${PMU_CONF_NAME}.bin ${B}/${ESW_COMPONENT}
    fi
}

do_deploy:append:zynqmp () {
    if [ -z "${SYSTEM_DTFILE}" ]; then
        install -Dm 0644 ${B}/${PMU_CONF_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_BASE_NAME}.bin
        ln -s ${PMU_CONF_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_NAME}.bin
    fi
}