[meta-freescale] [meta-fsl-arm-extra][PATCH 1/4] u-boot-compulab: update the build recipe.

Otavio Salvador otavio.salvador at ossystems.com.br
Wed Sep 30 08:27:04 PDT 2015


On Wed, Sep 30, 2015 at 12:13 PM, Valentin Raevsky
<valentin at compulab.co.il> wrote:
> 1) Add the cm-fx6-firmware build and deploy methods.
> 2) Update the u-boot SRC_URI.
>
> Signed-off-by: Valentin Raevsky <valentin at compulab.co.il>
> ---
>  .../u-boot-compulab-2014.10/cm-fx6-firmware.patch  | 14 ++++++++++++++
>  recipes-bsp/u-boot/u-boot-compulab_2014.10.bb      | 22 +++++++++++++++++-----
>  2 files changed, 31 insertions(+), 5 deletions(-)
>  create mode 100644 recipes-bsp/u-boot/u-boot-compulab-2014.10/cm-fx6-firmware.patch
>
> diff --git a/recipes-bsp/u-boot/u-boot-compulab-2014.10/cm-fx6-firmware.patch b/recipes-bsp/u-boot/u-boot-compulab-2014.10/cm-fx6-firmware.patch
> new file mode 100644
> index 0000000..37e40b0
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-compulab-2014.10/cm-fx6-firmware.patch

The patch needs a short description and upstream-status information[1].

1. http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

> @@ -0,0 +1,14 @@
> +diff --git a/Makefile b/Makefile
> +index 6808eab..db6d93d 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -1449,3 +1449,9 @@ FORCE:
> + # Declare the contents of the .PHONY variable as phony.  We keep that
> + # information in a variable so we can use it in if_changed and friends.
> + .PHONY: $(PHONY)
> ++
> ++cm-fx6-firmware:
> ++      @echo cm-fx6-firmware
> ++      $(objtree)/tools/mkimage -n $(objtree)/board/compulab/cm_fx6/imximage.cfg.cfgtmp -T imximage -e 0x00908000 -d $(objtree)/spl/u-boot-spl.bin spl.img
> ++      dd if=/dev/zero count=500 bs=1K | tr '\000' '\377' > cm-fx6-firmware
> ++      dd if=spl.img of=cm-fx6-firmware bs=1K seek=1 conv=notrunc && dd if=u-boot.img of=cm-fx6-firmware bs=1K seek=64 conv=notrunc
> diff --git a/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb b/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb
> index 02651e0..ed5dc78 100644
> --- a/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb
> +++ b/recipes-bsp/u-boot/u-boot-compulab_2014.10.bb
> @@ -6,12 +6,24 @@ LIC_FILES_CHKSUM = "file://configs/cm_fx6_defconfig;md5=549452418e9e099e5fe19ef1
>
>  PROVIDES += "u-boot"
>
> -SRCBRANCH = "utilite/master"
> -SRCREV = "6803a75f3d40bee3b53f56e7b49c70465819b7ca"
> -SRC_URI = "git://github.com/utilite-computer/u-boot.git;branch=${SRCBRANCH}"
> -SRC_URI[md5sum] = "fd8234c5b3a460430689848c1f16acef"
> +SRC_URI[md5sum] = "78c144ab4a84e063829c81a50174dcca"
> +SRC_URI[sha256sum] = "cce769aec902a952e6425e88aa7973680a019ebb2b34359a2417a2bd1f553435"
> +SRC_URI = "https://github.com/utilite-computer/u-boot/archive/v2014.10-cm-fx6-2.2.zip"

Use Git protocol ad Github tarballs are not stable and are generated
from time to time.

> -S = "${WORKDIR}/git"
> +S = "${WORKDIR}/u-boot-2014.10-cm-fx6-2.2"
>
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  COMPATIBLE_MACHINE = "cm-fx6"
> +
> +SRC_URI += "file://cm-fx6-firmware.patch"
> +
> +do_compile_append() {
> +       oe_runmake
> +       oe_runmake cm-fx6-firmware
> +}
> +
> +do_deploy_append() {
> +       install ${S}/cm-fx6-firmware ${DEPLOYDIR}/cm-fx6-firmware
> +       rm ${DEPLOYDIR}/u-boot*imx
> +       dd if=${DEPLOYDIR}/cm-fx6-firmware of=${DEPLOYDIR}/u-boot-cm-fx6.imx skip=2 bs=512
> +}

It seems you could do the dd generation straight in the deploy task.
No? You have the image generated so I fail to see why you are
generating it again?

-- 
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