inherit xilinx-utils S = "${WORKDIR}/git" PACKAGE_ARCH = "${MACHINE_ARCH}" # Also deploy u-boot elf file with same file format as bin file UBOOTXTENSION ?= "${XILINX_EXTENSION}-${MACHINE}" SRC_ELF ?= "u-boot" DEST_ELF ?= "u-boot${UBOOTXTENSION}-${PV}-${PR}.elf" ELF_SYMLINK ?= "u-boot${UBOOTXTENSION}.elf" do_deploy_append() { install ${S}/${SRC_ELF} ${DEPLOYDIR}/${DEST_ELF} cd ${DEPLOYDIR} rm -f ${SRC_ELF} ${ELF_SYMLINK} ln -sf ${DEST_ELF} ${ELF_SYMLINK} ln -sf ${DEST_ELF} ${SRC_ELF}.elf } # Appends the '/conf/machine/boards' path to FILESEXTRAPATHS for all # layers (using the ${BBPATH}) FILESEXTRAPATHS_append := "${@get_additional_bbpath_filespath('conf/machine/boards', d)}" # Append the xparameters file to the SRC_URI if set SRC_URI_append += " ${@paths_affix(d.getVar("MACHINE_XPARAMETERS", True) or '', prefix = 'file://')}" # Full path to the xparameters.h file UBOOT_XPARAMETERS ?= "${@expand_workdir_paths("MACHINE_XPARAMETERS", d)}" # Install the MicroBlaze System configuration into the board configuration, # and generate a u-boot specific config.mk do_configure_prepend () { if [ "${SOC_FAMILY}" = "microblaze" -a -e "${UBOOT_XPARAMETERS}" ]; then CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk cp ${UBOOT_XPARAMETERS} ${S}/board/xilinx/microblaze-generic/xparameters.h # Generate the config.mk from CFLAGS and XPARAMETERS file echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK} echo "" >> ${CONFIG_MK} # Export CCARGS for i in ${TUNE_CCARGS}; do echo "PLATFORM_CPPFLAGS += $i" >> ${CONFIG_MK} done echo "" >> ${CONFIG_MK} # Calculate the TEXT_BASE address at RAM_END - 4MB RAM_START=$(grep "XILINX_RAM_START" ${UBOOT_XPARAMETERS} | grep -o "0x.*$") RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${UBOOT_XPARAMETERS} | grep -o "0x.*$") BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]") echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} echo "CONFIG_SYS_TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} fi }