[meta-freescale] ][PATCH 06/31] unify the u-boot recipe for QorIQ ARM and QorIQ PPC

Daiane Angolini daiane.list at gmail.com
Fri Aug 14 06:21:31 PDT 2015


On Wed, Aug 12, 2015 at 11:42 AM, Zhenhua Luo <zhenhua.luo at freescale.com> wrote:
> * update u-boot-qoriq recipe to support QorIQ ARM and QorIQ PPC
> * remove u-boot-ls1 recipe which is replaced by u-boot-qoriq
> * move PREFERRED_PROVIDER_u-boot to qoriq-base.inc
>
> Signed-off-by: Zhenhua Luo <zhenhua.luo at freescale.com>

Acked-by: Daiane Angolini <daiane.angolini at freescale.com>

> ---
>  conf/machine/include/qoriq-arm.inc         |  2 -
>  conf/machine/include/qoriq-base.inc        |  2 +
>  conf/machine/include/qoriq-ppc.inc         |  2 -
>  recipes-bsp/u-boot/u-boot-ls1_2015.01.bb   | 47 ----------------------
>  recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb | 62 ++++++++++++++----------------
>  5 files changed, 31 insertions(+), 84 deletions(-)
>  delete mode 100644 recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
>
> diff --git a/conf/machine/include/qoriq-arm.inc b/conf/machine/include/qoriq-arm.inc
> index 1ec8917..7f07e40 100644
> --- a/conf/machine/include/qoriq-arm.inc
> +++ b/conf/machine/include/qoriq-arm.inc
> @@ -3,8 +3,6 @@ require conf/machine/include/qoriq-base.inc
>  DEFAULTTUNE ?= "cortexa7hf-neon"
>
>  # providers of QorIQ ARM targets
> -PREFERRED_PROVIDER_u-boot ?= "u-boot-ls1"
> -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ls1"
>  PREFERRED_PROVIDER_virtual/kernel ?= "linux-ls1"
>
>  UBOOT_ENTRYPOINT = "0x80008000"
> diff --git a/conf/machine/include/qoriq-base.inc b/conf/machine/include/qoriq-base.inc
> index d6fca93..5f8fea8 100644
> --- a/conf/machine/include/qoriq-base.inc
> +++ b/conf/machine/include/qoriq-base.inc
> @@ -6,6 +6,8 @@ PREFERRED_PROVIDER_cryptodev = "cryptodev-qoriq"
>  PREFERRED_PROVIDER_cryptodev-module = "cryptodev-qoriq-module"
>  PREFERRED_PROVIDER_cryptodev-tests = "cryptodev-qoriq-tests"
>  PREFERRED_PROVIDER_openssl = "openssl-qoriq"
> +PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq"
> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-qoriq"
>
>  # Define the default image type
>  IMAGE_CLASSES ?= "image_types_uboot"
> diff --git a/conf/machine/include/qoriq-ppc.inc b/conf/machine/include/qoriq-ppc.inc
> index 6b77210..cfc1ffb 100644
> --- a/conf/machine/include/qoriq-ppc.inc
> +++ b/conf/machine/include/qoriq-ppc.inc
> @@ -1,8 +1,6 @@
>  require conf/machine/include/qoriq-base.inc
>
>  # providers of QorIQ PPC targets
> -PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq"
> -PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-qoriq"
>  PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq"
>
>  UBOOT_ENTRYPOINT = "0x80008000"
> diff --git a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb b/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
> deleted file mode 100644
> index 0a1fb80..0000000
> --- a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -require recipes-bsp/u-boot/u-boot.inc
> -
> -DESCRIPTION = "U-Boot provided by Freescale with focus on QorIQ Layerscape1 boards"
> -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 \
> -"
> -
> -SRCBRANCH = "master"
> -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH}"
> -SRCREV = "6ba8eedbcdc4b063f59a63e6288b938af739e8ad"
> -
> -LOCALVERSION ?= "+ls1"
> -
> -S = "${WORKDIR}/git"
> -
> -inherit fsl-u-boot-localversion
> -
> -DEPENDS += "change-file-endianess-native dtc-native"
> -PROVIDES += "u-boot"
> -
> -do_compile_append () {
> -    if [ "x${UBOOT_CONFIG}" != "x" ]
> -    then
> -        for config in ${UBOOT_MACHINE}; do
> -            case "${config}" in
> -                *spi*) tclsh ${STAGING_BINDIR_NATIVE}/byte_swap.tcl ${S}/${config}/u-boot-dtb.bin ${S}/${config}/u-boot.swap.bin 8
> -                mv ${S}/${config}/u-boot.swap.bin ${S}/u-boot-${type}.${UBOOT_SUFFIX};;
> -                *nand* | *sdcard*)  mv ${S}/${config}/u-boot-with-spl-pbl.bin  ${S}/${config}/u-boot.bin;;
> -            esac
> -        done
> -    fi
> -
> -}
> -
> -PACKAGES += "${PN}-images"
> -FILES_${PN}-images += "/boot"
> -
> -ALLOW_EMPTY_${PN} = "1"
> -
> -PACKAGE_ARCH = "${MACHINE_ARCH}"
> -COMPATIBLE_MACHINE = "(ls102xa)"
> -
> diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
> index eebd979..f5b258d 100644
> --- a/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
> +++ b/recipes-bsp/u-boot/u-boot-qoriq_2015.01.bb
> @@ -1,4 +1,7 @@
> -DESCRIPTION = "U-boot bootloader"
> +require recipes-bsp/u-boot/u-boot.inc
> +inherit fsl-u-boot-localversion
> +
> +DESCRIPTION = "U-boot provided by Freescale with focus on QorIQ boards"
>  HOMEPAGE = "http://u-boot.sf.net"
>  SECTION = "bootloaders"
>  PROVIDES = "virtual/bootloader u-boot"
> @@ -13,11 +16,14 @@ LIC_FILES_CHKSUM = " \
>
>  PV_append = "+fslgit"
>  INHIBIT_DEFAULT_DEPS = "1"
> -DEPENDS = "boot-format-native libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}"
> +DEPENDS = "libgcc ${@base_contains('TCMODE', 'external-fsl', '', 'virtual/${TARGET_PREFIX}gcc', d)}"
> +DEPENDS_append_qoriq-arm = " change-file-endianess-native dtc-native tcl-native"
> +DEPENDS_append_qoriq-ppc = " boot-format-native"
>
>  inherit deploy
>
> -SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;nobranch=1 \
> +SRCBRANCH = "sdk-v1.8.x"
> +SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH} \
>      file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch \
>      file://gcc5.patch \
>      file://add-fgnu89-inline-option-for-gcc5.patch \
> @@ -45,40 +51,21 @@ WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
>
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>
> -UBOOT_LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}"
> +LOCALVERSION = "${@d.getVar('SDK_VERSION', True).partition(' ')[0]}"
>
> -USRC ?= ""
> -S = '${@base_conditional("USRC", "", "${WORKDIR}/git", "${USRC}", d)}'
> +S = "${WORKDIR}/git"
>
>  EXTRA_OEMAKE = 'CROSS_COMPILE=${WRAP_TARGET_PREFIX} CC="${WRAP_TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}"'
>
> -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
> -
> +do_compile_append_qoriq-ppc() {
>      python ./tools/genboardscfg.py
> -    for board in ${UBOOT_MACHINES}; do
> +
> +    for board in ${UBOOT_MACHINE}; do
>          if ! grep -wq $board ${S}/boards.cfg;then
>              echo "WARNING: $board not supported in boards.cfg"
>              continue
>          fi
>
> -        oe_runmake O=${board} distclean
> -        oe_runmake O=${board} ${board}_config
> -        oe_runmake O=${board} all
> -
>          case "${board}" in
>              *SDCARD*)   UBOOT_TARGET="u-boot-sd";;
>              *SPIFLASH*) UBOOT_TARGET="u-boot-spi";;
> @@ -130,12 +117,21 @@ do_compile () {
>      done
>  }
>
> -do_install(){
> -    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> -        UBOOT_MACHINES=${UBOOT_MACHINE}
> +do_compile_append_qoriq-arm () {
> +    if [ "x${UBOOT_CONFIG}" != "x" ]
> +    then
> +        for config in ${UBOOT_MACHINE}; do
> +            case "${config}" in
> +                *spi*) tclsh ${STAGING_BINDIR_NATIVE}/byte_swap.tcl ${S}/${config}/u-boot-dtb.bin ${S}/${config}/u-boot.swap.bin 8
> +                mv ${S}/${config}/u-boot.swap.bin ${S}/u-boot-${type}.${UBOOT_SUFFIX};;
> +                *nand* | *sdcard*) mv ${S}/${config}/u-boot-with-spl-pbl.bin ${S}/${config}/u-boot.bin;;
> +            esac
> +        done
>      fi
> +}
>
> -    for board in ${UBOOT_MACHINES}; do
> +do_install_append_qoriq-ppc() {
> +    for board in ${UBOOT_MACHINE}; do
>          if ! grep -wq $board ${S}/boards.cfg;then
>              continue
>          fi
> @@ -156,7 +152,7 @@ do_install(){
>      done
>  }
>
> -do_deploy(){
> +do_deploy_append_qoriq-ppc() {
>      if [ "x${UBOOT_MACHINES}" = "x" ]; then
>          UBOOT_MACHINES=${UBOOT_MACHINE}
>      fi
> @@ -189,4 +185,4 @@ addtask deploy after do_install
>  PACKAGES += "${PN}-images"
>  FILES_${PN}-images += "/boot"
>
> -ALLOW_EMPTY_${PN} = "1"
> +COMPATIBLE_MACHINE = "(qoriq)"
> --
> 2.4.3
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


More information about the meta-freescale mailing list