2013-12-19 15:13:01 +00:00
|
|
|
SUMMARY = "Universal Boot Loader for embedded devices"
|
2008-10-10 11:56:19 +00:00
|
|
|
PROVIDES = "virtual/bootloader"
|
|
|
|
|
2016-08-09 17:15:07 +00:00
|
|
|
B = "${WORKDIR}/build"
|
2014-09-16 23:10:00 +00:00
|
|
|
|
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
|
2016-10-04 13:54:11 +00:00
|
|
|
inherit uboot-config uboot-extlinux-config uboot-sign deploy
|
2010-08-05 13:25:20 +00:00
|
|
|
|
2015-02-10 18:56:00 +00:00
|
|
|
EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1'
|
2015-09-10 10:24:12 +00:00
|
|
|
EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"'
|
|
|
|
|
|
|
|
PACKAGECONFIG ??= "openssl"
|
|
|
|
# u-boot will compile its own tools during the build, with specific
|
|
|
|
# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as
|
|
|
|
# a host build dependency.
|
|
|
|
PACKAGECONFIG[openssl] = ",,openssl-native"
|
2008-10-10 11:56:19 +00:00
|
|
|
|
2013-04-11 13:03:13 +00:00
|
|
|
# Allow setting an additional version string that will be picked up by the
|
|
|
|
# u-boot build system and appended to the u-boot version. If the .scmversion
|
|
|
|
# file already exists it will not be overwritten.
|
|
|
|
UBOOT_LOCALVERSION ?= ""
|
|
|
|
|
2012-02-06 14:16:58 +00:00
|
|
|
# Some versions of u-boot use .bin and others use .img. By default use .bin
|
|
|
|
# but enable individual recipes to change this value.
|
2014-09-16 23:10:01 +00:00
|
|
|
UBOOT_SUFFIX ??= "bin"
|
2012-02-06 14:16:58 +00:00
|
|
|
UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}"
|
|
|
|
UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
|
2011-03-15 13:31:01 +00:00
|
|
|
UBOOT_MAKE_TARGET ?= "all"
|
2008-10-10 11:56:19 +00:00
|
|
|
|
2015-09-09 14:13:19 +00:00
|
|
|
# Output the ELF generated. Some platforms can use the ELF file and directly
|
|
|
|
# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging
|
|
|
|
# purposes.
|
|
|
|
UBOOT_ELF ?= ""
|
|
|
|
UBOOT_ELF_SUFFIX ?= "elf"
|
|
|
|
UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}"
|
|
|
|
UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}"
|
|
|
|
UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}"
|
|
|
|
|
2012-02-06 14:16:58 +00:00
|
|
|
# Some versions of u-boot build an SPL (Second Program Loader) image that
|
|
|
|
# should be packaged along with the u-boot binary as well as placed in the
|
|
|
|
# deploy directory. For those versions they can set the following variables
|
|
|
|
# to allow packaging the SPL.
|
|
|
|
SPL_BINARY ?= ""
|
2016-12-14 21:13:04 +00:00
|
|
|
SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
|
2016-03-25 09:07:12 +00:00
|
|
|
SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
|
|
|
|
SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
|
2012-02-06 14:16:58 +00:00
|
|
|
|
2014-06-24 20:10:18 +00:00
|
|
|
# Additional environment variables or a script can be installed alongside
|
|
|
|
# u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
|
|
|
|
# or 'boot.scr', should be packaged along with u-boot as well as placed in the
|
|
|
|
# deploy directory. Machine configurations needing one of these files should
|
|
|
|
# include it in the SRC_URI and set the UBOOT_ENV parameter.
|
|
|
|
UBOOT_ENV_SUFFIX ?= "txt"
|
|
|
|
UBOOT_ENV ?= ""
|
|
|
|
UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}"
|
|
|
|
UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}"
|
|
|
|
UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}"
|
|
|
|
|
2016-10-04 13:54:11 +00:00
|
|
|
# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf
|
|
|
|
# to find EXTLINUX conf file.
|
|
|
|
UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux"
|
|
|
|
UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf"
|
|
|
|
UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}"
|
|
|
|
|
2008-10-10 11:56:19 +00:00
|
|
|
do_compile () {
|
2017-02-27 13:02:50 +00:00
|
|
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then
|
2016-08-31 14:05:56 +00:00
|
|
|
sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk
|
2012-04-22 18:01:32 +00:00
|
|
|
fi
|
|
|
|
|
2008-10-10 11:56:19 +00:00
|
|
|
unset LDFLAGS
|
|
|
|
unset CFLAGS
|
|
|
|
unset CPPFLAGS
|
2013-04-11 13:03:13 +00:00
|
|
|
|
|
|
|
if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
|
|
|
|
then
|
|
|
|
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
|
|
|
|
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
|
|
|
|
fi
|
2016-05-26 15:13:10 +00:00
|
|
|
|
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
u-boot: extend UBOOT_CONFIG format to support different binary name
When using UBOOT_CONFIG format, the final u-boot binary for each config
may have different names. Extend UBOOT_CONFIG format to support different
binary to be copied.
The new format is supposed to be compatible with old one as ${UBOOT_BINARY}
is copied by default, and images,binary can be empty.
An example format to specify it, in the machine, is:
UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"
(From OE-Core rev: 2a5c484f314ddc75cab5f0d01b0215d7fc405b6b)
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 15:01:10 +00:00
|
|
|
unset i j k
|
2015-01-22 06:27:50 +00:00
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
u-boot: extend UBOOT_CONFIG format to support different binary name
When using UBOOT_CONFIG format, the final u-boot binary for each config
may have different names. Extend UBOOT_CONFIG format to support different
binary to be copied.
The new format is supposed to be compatible with old one as ${UBOOT_BINARY}
is copied by default, and images,binary can be empty.
An example format to specify it, in the machine, is:
UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"
(From OE-Core rev: 2a5c484f314ddc75cab5f0d01b0215d7fc405b6b)
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 15:01:10 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
if [ $j -eq $i ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
2016-08-09 17:15:07 +00:00
|
|
|
oe_runmake -C ${S} O=${B}/${config} ${config}
|
|
|
|
oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
|
u-boot: extend UBOOT_CONFIG format to support different binary name
When using UBOOT_CONFIG format, the final u-boot binary for each config
may have different names. Extend UBOOT_CONFIG format to support different
binary to be copied.
The new format is supposed to be compatible with old one as ${UBOOT_BINARY}
is copied by default, and images,binary can be empty.
An example format to specify it, in the machine, is:
UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"
(From OE-Core rev: 2a5c484f314ddc75cab5f0d01b0215d7fc405b6b)
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 15:01:10 +00:00
|
|
|
for binary in ${UBOOT_BINARIES}; do
|
|
|
|
k=$(expr $k + 1);
|
|
|
|
if [ $k -eq $i ]; then
|
2016-08-09 17:15:07 +00:00
|
|
|
cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX}
|
u-boot: extend UBOOT_CONFIG format to support different binary name
When using UBOOT_CONFIG format, the final u-boot binary for each config
may have different names. Extend UBOOT_CONFIG format to support different
binary to be copied.
The new format is supposed to be compatible with old one as ${UBOOT_BINARY}
is copied by default, and images,binary can be empty.
An example format to specify it, in the machine, is:
UBOOT_CONFIG ??= "sdcard-ifc sdcard-qspi lpuart qspi secure-boot nor"
UBOOT_CONFIG[nor] = "ls1021atwr_nor_config,,u-boot-dtb.bin"
UBOOT_CONFIG[sdcard-ifc] = "ls1021atwr_sdcard_ifc_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[sdcard-qspi] = "ls1021atwr_sdcard_qspi_config,,u-boot-with-spl-pbl.bin"
UBOOT_CONFIG[lpuart] = "ls1021atwr_nor_lpuart_config,,u-boot-dtb.bin"
UBOOT_CONFIG[qspi] = "ls1021atwr_qspi_config,,u-boot-dtb.bin"
UBOOT_CONFIG[secure-boot] = "ls1021atwr_nor_SECURE_BOOT_config"
(From OE-Core rev: 2a5c484f314ddc75cab5f0d01b0215d7fc405b6b)
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-15 15:01:10 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
unset k
|
2015-01-22 06:27:50 +00:00
|
|
|
fi
|
|
|
|
done
|
2015-03-25 09:51:22 +00:00
|
|
|
unset j
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-04-20 19:17:08 +00:00
|
|
|
unset i
|
2015-01-22 06:27:50 +00:00
|
|
|
else
|
2016-08-09 17:15:07 +00:00
|
|
|
oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
|
|
|
|
oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET}
|
2015-01-22 06:27:50 +00:00
|
|
|
fi
|
2013-04-11 13:03:13 +00:00
|
|
|
|
2008-10-10 11:56:19 +00:00
|
|
|
}
|
|
|
|
|
2011-05-30 12:01:49 +00:00
|
|
|
do_install () {
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
if [ $j -eq $i ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
|
|
|
install -d ${D}/boot
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
|
2015-08-13 04:08:52 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
|
2015-03-25 09:51:22 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
|
2015-01-22 06:27:50 +00:00
|
|
|
fi
|
|
|
|
done
|
2015-03-25 09:51:22 +00:00
|
|
|
unset j
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-04-20 19:17:08 +00:00
|
|
|
unset i
|
2015-01-22 06:27:50 +00:00
|
|
|
else
|
|
|
|
install -d ${D}/boot
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
|
2015-01-22 06:27:50 +00:00
|
|
|
ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
|
|
|
|
fi
|
2012-02-06 14:16:58 +00:00
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_ELF}" ]
|
2015-09-09 14:13:19 +00:00
|
|
|
then
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-09-09 14:13:19 +00:00
|
|
|
then
|
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-09-09 14:13:19 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-09-09 14:13:19 +00:00
|
|
|
if [ $j -eq $i ]
|
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
|
2015-09-09 14:13:19 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
|
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
unset j
|
|
|
|
done
|
|
|
|
unset i
|
|
|
|
else
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE}
|
2015-09-09 14:13:19 +00:00
|
|
|
ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-09-07 23:42:56 +00:00
|
|
|
if [ -e ${WORKDIR}/fw_env.config ] ; then
|
|
|
|
install -d ${D}${sysconfdir}
|
|
|
|
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
|
|
|
|
fi
|
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${SPL_BINARY}" ]
|
2012-02-06 14:16:58 +00:00
|
|
|
then
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
if [ $j -eq $i ]
|
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
|
2016-03-25 09:07:12 +00:00
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type}
|
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}
|
2015-03-25 09:51:22 +00:00
|
|
|
fi
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-03-25 09:51:22 +00:00
|
|
|
unset j
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-04-20 19:17:08 +00:00
|
|
|
unset i
|
2015-01-22 06:27:50 +00:00
|
|
|
else
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
|
2016-03-25 09:07:12 +00:00
|
|
|
ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME}
|
2015-01-22 06:27:50 +00:00
|
|
|
fi
|
2012-02-06 14:16:58 +00:00
|
|
|
fi
|
2014-06-24 20:10:18 +00:00
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_ENV}" ]
|
2014-06-24 20:10:18 +00:00
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE}
|
2014-06-24 20:10:18 +00:00
|
|
|
ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY}
|
|
|
|
fi
|
2016-10-04 13:54:11 +00:00
|
|
|
|
|
|
|
if [ "${UBOOT_EXTLINUX}" = "1" ]
|
|
|
|
then
|
|
|
|
install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}
|
|
|
|
fi
|
|
|
|
|
2011-05-30 12:01:49 +00:00
|
|
|
}
|
|
|
|
|
2012-09-07 23:42:56 +00:00
|
|
|
FILES_${PN} = "/boot ${sysconfdir}"
|
2011-05-30 12:01:49 +00:00
|
|
|
|
2008-10-10 11:56:19 +00:00
|
|
|
do_deploy () {
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2012-02-06 14:16:58 +00:00
|
|
|
then
|
2015-01-22 06:27:50 +00:00
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
if [ $j -eq $i ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
|
|
|
install -d ${DEPLOYDIR}
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
|
2015-01-22 06:27:50 +00:00
|
|
|
cd ${DEPLOYDIR}
|
2015-08-13 04:08:52 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
|
2015-03-25 09:51:22 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
|
2015-08-13 04:08:52 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
|
2015-03-25 09:51:22 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
|
2016-05-26 15:13:10 +00:00
|
|
|
fi
|
|
|
|
done
|
2015-03-25 09:51:22 +00:00
|
|
|
unset j
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-04-20 19:17:08 +00:00
|
|
|
unset i
|
2015-01-22 06:27:50 +00:00
|
|
|
else
|
|
|
|
install -d ${DEPLOYDIR}
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
|
2015-01-22 06:27:50 +00:00
|
|
|
cd ${DEPLOYDIR}
|
|
|
|
rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
|
|
|
|
ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
|
|
|
|
ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
|
|
|
|
fi
|
2015-09-09 14:13:19 +00:00
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_ELF}" ]
|
2015-09-09 14:13:19 +00:00
|
|
|
then
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-09-09 14:13:19 +00:00
|
|
|
then
|
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-09-09 14:13:19 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-09-09 14:13:19 +00:00
|
|
|
if [ $j -eq $i ]
|
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
|
2015-09-09 14:13:19 +00:00
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
|
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
|
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
|
|
|
|
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
unset j
|
|
|
|
done
|
|
|
|
unset i
|
|
|
|
else
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
|
2015-09-09 14:13:19 +00:00
|
|
|
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
|
|
|
|
ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
|
|
|
|
fi
|
|
|
|
fi
|
2015-01-22 06:27:50 +00:00
|
|
|
|
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${SPL_BINARY}" ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_CONFIG}" ]
|
2015-01-22 06:27:50 +00:00
|
|
|
then
|
|
|
|
for config in ${UBOOT_MACHINE}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
i=$(expr $i + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
for type in ${UBOOT_CONFIG}; do
|
2016-05-26 15:13:10 +00:00
|
|
|
j=$(expr $j + 1);
|
2015-03-25 09:51:22 +00:00
|
|
|
if [ $j -eq $i ]
|
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
|
2016-03-25 09:07:12 +00:00
|
|
|
rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
|
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
|
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
|
2015-03-25 09:51:22 +00:00
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
|
|
|
|
ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
|
|
|
|
fi
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-03-25 09:51:22 +00:00
|
|
|
unset j
|
2015-01-22 06:27:50 +00:00
|
|
|
done
|
2015-04-20 19:17:08 +00:00
|
|
|
unset i
|
2015-01-22 06:27:50 +00:00
|
|
|
else
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
|
2016-03-25 09:07:12 +00:00
|
|
|
rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
|
|
|
|
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
|
2015-01-22 06:27:50 +00:00
|
|
|
ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-06-24 20:10:18 +00:00
|
|
|
|
2016-05-26 15:13:10 +00:00
|
|
|
if [ -n "${UBOOT_ENV}" ]
|
2014-06-24 20:10:18 +00:00
|
|
|
then
|
2016-09-04 16:20:44 +00:00
|
|
|
install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
|
2014-06-24 20:10:18 +00:00
|
|
|
rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
|
|
|
|
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
|
|
|
|
ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
|
|
|
|
fi
|
2016-10-04 13:54:11 +00:00
|
|
|
|
|
|
|
if [ "${UBOOT_EXTLINUX}" = "1" ]
|
|
|
|
then
|
|
|
|
install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK}
|
|
|
|
ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
|
|
|
|
ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
|
|
|
|
fi
|
2008-10-10 11:56:19 +00:00
|
|
|
}
|
2012-02-06 14:16:58 +00:00
|
|
|
|
2017-03-11 14:16:02 +00:00
|
|
|
addtask deploy before do_build after do_install
|