diff options
| author | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-08-01 17:45:02 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-08-01 17:45:02 +1000 |
| commit | 505a3f93504e12085ad7b78d12c4eb21f67cda1f (patch) | |
| tree | 4e99daa5ca0ad6d5081eda10711cda4cd7395de0 /recipes-bsp | |
| parent | efc3f819107d88cf630ed521a217e337d042e998 (diff) | |
| download | meta-xilinx-505a3f93504e12085ad7b78d12c4eb21f67cda1f.tar.gz | |
Refactored MACHINE_* usage
* Added 'conf/machine/boards' as a default FILESEXTRAPATH
(for each available layer).
* Change MACHINE_* to rely only on the path being relative to
'conf/machine/boards'.
* Fixed up linux-xlnx.inc and linux-machine-common.inc to use 'MACHINE_*'
for default files.
* Fixed KERNEL_DEVICETREE setting such that the variable is valid before
the base __anonymous function of linux-dtb.inc is executed.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-bsp')
| -rw-r--r-- | recipes-bsp/u-boot/u-boot-extra.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/recipes-bsp/u-boot/u-boot-extra.inc b/recipes-bsp/u-boot/u-boot-extra.inc index 79808a37..e1c89d05 100644 --- a/recipes-bsp/u-boot/u-boot-extra.inc +++ b/recipes-bsp/u-boot/u-boot-extra.inc | |||
| @@ -20,9 +20,16 @@ do_deploy_append() { | |||
| 20 | # and generate a u-boot specific config.mk | 20 | # and generate a u-boot specific config.mk |
| 21 | do_configure_prepend () { | 21 | do_configure_prepend () { |
| 22 | if [ "${SOC_FAMILY}" = "microblaze" -a ! -z "${MACHINE_XPARAMETERS}" ]; then | 22 | if [ "${SOC_FAMILY}" = "microblaze" -a ! -z "${MACHINE_XPARAMETERS}" ]; then |
| 23 | if [ ! -z "${MACHINE_XPARAMETERS}" -a -e "${MACHINE_XPARAMETERS}" ]; then | 23 | # Find the file based on the avaliable layers (using $BBPATH) |
| 24 | MACHINE_XPARAMETERS_ABSOLUTE= | ||
| 25 | for i in ${BBPATH}; do | ||
| 26 | if [ -e $i/conf/machine/boards/${MACHINE_XPARAMETERS} ]; then | ||
| 27 | MACHINE_XPARAMETERS_ABSOLUTE = $i/conf/machine/boards/${MACHINE_XPARAMETERS} | ||
| 28 | fi | ||
| 29 | done | ||
| 30 | if [ -e "${MACHINE_XPARAMETERS_ABSOLUTE}" ]; then | ||
| 24 | CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk | 31 | CONFIG_MK=${S}/board/xilinx/microblaze-generic/config.mk |
| 25 | cp ${MACHINE_XPARAMETERS} ${S}/board/xilinx/microblaze-generic/xparameters.h | 32 | cp ${MACHINE_XPARAMETERS_ABSOLUTE} ${S}/board/xilinx/microblaze-generic/xparameters.h |
| 26 | 33 | ||
| 27 | # Generate the config.mk from CFLAGS and XPARAMETERS file | 34 | # Generate the config.mk from CFLAGS and XPARAMETERS file |
| 28 | echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK} | 35 | echo "# This file is generated by the meta-xilinx layer." > ${CONFIG_MK} |
| @@ -36,8 +43,8 @@ do_configure_prepend () { | |||
| 36 | echo "" >> ${CONFIG_MK} | 43 | echo "" >> ${CONFIG_MK} |
| 37 | 44 | ||
| 38 | # Calculate the TEXT_BASE address at RAM_END - 4MB | 45 | # Calculate the TEXT_BASE address at RAM_END - 4MB |
| 39 | RAM_START=$(grep "XILINX_RAM_START" ${MACHINE_XPARAMETERS} | grep -o "0x.*$") | 46 | RAM_START=$(grep "XILINX_RAM_START" ${MACHINE_XPARAMETERS_ABSOLUTE} | grep -o "0x.*$") |
| 40 | RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${MACHINE_XPARAMETERS} | grep -o "0x.*$") | 47 | RAM_SIZE=$(grep "XILINX_RAM_SIZE" ${MACHINE_XPARAMETERS_ABSOLUTE} | grep -o "0x.*$") |
| 41 | BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]") | 48 | BASE_OFFSET=$(printf "0x%08x" "$[$RAM_START + $RAM_SIZE - 0x400000]") |
| 42 | 49 | ||
| 43 | echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} | 50 | echo "TEXT_BASE = $BASE_OFFSET" >> ${CONFIG_MK} |
