[meta-freescale] [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support

Otavio Salvador otavio at ossystems.com.br
Tue Sep 2 05:18:48 PDT 2014


On Tue, Sep 2, 2014 at 7:13 AM, zhenhua.luo at freescale.com
<zhenhua.luo at freescale.com> wrote:
>> -----Original Message-----
>> From: otavio.salvador at gmail.com [mailto:otavio.salvador at gmail.com] On
>> Behalf Of Otavio Salvador
>> Sent: Monday, September 01, 2014 3:54 AM
>>
>> On Thu, Aug 28, 2014 at 8:53 AM, zhenhua.luo at freescale.com
>> <zhenhua.luo at freescale.com> wrote:
>> >> -----Original Message-----
>> >> From: otavio.salvador at gmail.com [mailto:otavio.salvador at gmail.com] On
>> >> Behalf Of Otavio Salvador
>> >> Sent: Wednesday, August 27, 2014 8:55 PM
>> >>
>> >> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo
>> >> <zhenhua.luo at freescale.com>
>> >> wrote:
>> >>
>> >> > +    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)"
>> >> > +
>> >>
>> >> I understand why you are doing this all here but I think we need to
>> >> address this in the uboot-config.bbclass so we have a standard way
>> >> for this.
>> > [Luo Zhenhua-B19537] Does this mean UBOOT_MACHINE usage will be
>> replaced by UBOOT_CONFIG usage?
>> >         Seems like only one u-boot config can be built at one time, is
>> it possible to build multiple u-boot options at one build? This is the
>> reason we rewrite the u-boot compile/install/deploy code.
>>
>> When having several configs, the UBOOT_CONFIG is the way to go. The
>> possibility to build several binaries we need to add in Poky.
> [Luo Zhenhua-B19537] I will inherit the bbclass for LOCALVERSION definition, is it Ok to reserve the code for multiple u-boot binary build until the function is available in poky.

I don't think so; we need to go and work on Poky to fix it. If we
accept  it, it will never be fixed.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the meta-freescale mailing list