Signed-off-by: Zhenhua Luo <zhenhua....@freescale.com> --- recipes-bsp/u-boot/u-boot-ls1_2013.10.bb | 109 +++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
diff --git a/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb new file mode 100644 index 0000000..703c6fc --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb @@ -0,0 +1,109 @@ +require recipes-bsp/u-boot/u-boot.inc + +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1" +LIC_FILES_CHKSUM = " \ + file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \ + file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \ + file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ + file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \ +" + +SRC_URI = "git://git.freescale.com/layerscape/ls1021a/u-boot.git;branch=LS1-dev" +SRCREV = "48bfc6985a0524bc5c388bb9a9a6a6bc4a121ec5" + +PROVIDES += "u-boot" + +UBOOT_LOCALVERSION ?= "${SDK_VERSION}" + +S = "${WORKDIR}/git" + +do_stage_endian_swap_tool () { + install -m 755 ${S}/byte_swap.tcl ${STAGING_BINDIR_NATIVE} +} + +addtask stage_endian_swap_tool before do_compile after do_patch + +do_compile () { + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + head=`git rev-parse --verify --short HEAD 2> /dev/null` + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion + printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion + fi + + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES="${UBOOT_MACHINE}" + fi + + for board in ${UBOOT_MACHINES}; do + oe_runmake O=${board} distclean + oe_runmake O=${board} ${board} + oe_runmake O=${board} all + case "${board}" in + *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *nand*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *spi*) UBOOT_TARGET="u-boot-qspiboot_swap" + ${bindir}/tclsh byte_swap.tcl ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;; + *) UBOOT_TARGET="u-boot";; + esac + done +} + +do_install(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES="${UBOOT_MACHINE}" + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *nand*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *spi*) UBOOT_TARGET="u-boot-qspiboot_swap";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + install -d ${D}/boot/ + install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin + fi + done +} + +do_deploy(){ + if [ "x${UBOOT_MACHINES}" = "x" ]; then + UBOOT_MACHINES="${UBOOT_MACHINE}" + fi + + for board in ${UBOOT_MACHINES}; do + case "${board}" in + *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *nand*) UBOOT_TARGET="u-boot-with-spl-pbl";; + *spi*) UBOOT_TARGET="u-boot-qspiboot_swap";; + *) UBOOT_TARGET="u-boot";; + esac + + if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then + mkdir -p ${DEPLOYDIR} + install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin + cd ${DEPLOYDIR} + rm -f ${UBOOT_TARGET}-${board}.bin + ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin + fi + done +} +addtask deploy after do_install + +PACKAGES += "${PN}-images" +FILES_${PN}-images += "/boot" + +ALLOW_EMPTY_${PN} = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)" + -- 1.9.3 -- _______________________________________________ meta-freescale mailing list meta-freescale@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-freescale