summaryrefslogtreecommitdiffstats
path: root/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-extra.inc34
1 files changed, 26 insertions, 8 deletions
diff --git a/recipes-bsp/u-boot/u-boot-extra.inc b/recipes-bsp/u-boot/u-boot-extra.inc
index f07284a5..329a7754 100644
--- a/recipes-bsp/u-boot/u-boot-extra.inc
+++ b/recipes-bsp/u-boot/u-boot-extra.inc
@@ -12,14 +12,32 @@ do_deploy_append() {
12 ln -sf ${DEST_ELF} ${SRC_ELF}.elf 12 ln -sf ${DEST_ELF} ${SRC_ELF}.elf
13} 13}
14 14
15# Install the MicroBlaze System configuration into the board configuration 15# Install the MicroBlaze System configuration into the board configuration,
16# and generate a u-boot specific config.mk
16do_configure_prepend () { 17do_configure_prepend () {
17 if [ "${SOC_FAMILY}" = "microblaze" ]; then 18 if [ "${SOC_FAMILY}" = "microblaze" -a ! -z "${MACHINE_XPARAMETERS}" ]; then
18 if [ -e ${WORKDIR}/config.mk ]; then 19 if [ ! -z "${MACHINE_XPARAMETERS}" -a -e "${MACHINE_XPARAMETERS}" ]; then
19 cp ${WORKDIR}/config.mk ${S}/board/xilinx/microblaze-generic/ 20 CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk
20 fi 21 cp ${MACHINE_XPARAMETERS} ${S}/board/xilinx/microblaze-generic/xparameters.h
21 if [ -e ${WORKDIR}/xparameters.h ]; then 22
22 cp ${WORKDIR}/xparameters.h ${S}/board/xilinx/microblaze-generic/ 23 # Generate the config.mk from CFLAGS and XPARAMETERS file
24 echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK}
25 echo "" >> ${CONFIG_MK}
26
27 # Export CCARGS
28 for i in ${TUNE_CCARGS}; do
29 echo "PLATFORM_CPPFLAGS += $i" >> ${CONFIG_MK}
30 done
31
32 echo "" >> ${CONFIG_MK}
33
34 # Calculate the TEXT_BASE address at RAM_END - 4MB
35 RAM_START=$(grep "XILINX_RAM_START" ${MACHINE_XPARAMETERS} | grep -o "0x.*$")
36 RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${MACHINE_XPARAMETERS} | grep -o "0x.*$")
37 BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]")
38
39 echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK}
40 echo "CONFIG_SYS_TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK}
23 fi 41 fi
24 fi 42 fi
25} 43} \ No newline at end of file