diff options
author | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-06-26 15:54:24 +1000 |
---|---|---|
committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-06-26 17:48:14 +1000 |
commit | 6076d11b411a100a1c1c4c61f40428f30e203d74 (patch) | |
tree | 50a36fc4f6d71e5502db46f06f88a1cc07b20328 | |
parent | 2e81ce70fdaca875a665f12690155db35c5de887 (diff) | |
download | meta-xilinx-6076d11b411a100a1c1c4c61f40428f30e203d74.tar.gz |
u-boot-xlnx: Changed MicroBlaze specific configure
* Handles generation of the config.mk, this avoids the need for a manual
config.mk to be provided, it depends on the information provided in
xparameters.h.
* Added 'MACHINE_XPARAMETERS' which points to a machine specific
xparameters.h file.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
-rw-r--r-- | recipes-bsp/u-boot/u-boot-extra.inc | 34 |
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 | ||
16 | do_configure_prepend () { | 17 | do_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 |