[meta-freescale] [meta-fsl-arm-extra][PATCH v2 2/3] cgtqmx6: Update Congatec-QMX6 bootloader support
Otavio Salvador
otavio at ossystems.com.br
Wed Aug 20 06:17:10 PDT 2014
On Wed, Aug 20, 2014 at 5:52 AM, Alex de Cabo
<alejandro.de-cabo-garcia at congatec.com> wrote:
> Provides the recipes and patches to use 2009.08 or 2013.04 U-boot
> versions.
>
> Signed-off-by: Alex de Cabo <alejandro.de-cabo-garcia at congatec.com>
Now I understand better.
Is there any reason to keep the old U-Boot here? I don't think it is
worth keep several providers without a good reason.
> ---
> recipes-bsp/u-boot/u-boot-qmx6/boot.scr | 3 +
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016100.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016101.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016102.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016103.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016104.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016105.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016106.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016110.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016111.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016112.patch | 13 ++++
> .../u-boot/u-boot-qmx6/cgtqmx6/PN016113.patch | 13 ++++
The easiest to maintain, and standard mechanism for this kind of
situation is the UBOOT_CONFIG.
So the best alternative is you to have different U-Boot config files
for each part number and user can set it in local.conf to build.
We also need one default (which I think can be the latest) so it can
be tested, automatically when needed.
...
> diff --git a/recipes-bsp/u-boot/u-boot-qmx6/boot.scr b/recipes-bsp/u-boot/u-boot-qmx6/boot.scr
> new file mode 100644
> index 0000000..ee06444
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-qmx6/boot.scr
> @@ -0,0 +1,3 @@
> +set bootargs $bootargs root=/dev/mmcblk0p1 rootwait rw fixrtc ;
> + fsload mmc ${disk}:1 10800000 /boot/uImage && bootm 10800000 ;
> + echo "Error loading kernel image"
Where is documented the way to generate the SD card or eMMC?
...
> diff --git a/recipes-bsp/u-boot/u-boot-qmx6_2013.04.bb b/recipes-bsp/u-boot/u-boot-qmx6_2013.04.bb
> new file mode 100644
> index 0000000..3eabf20
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-qmx6_2013.04.bb
> @@ -0,0 +1,37 @@
> +# Congatec QMX6 u-boot
> +
> +require recipes-bsp/u-boot/u-boot.inc
> +
> +LICENSE = "GPLv2+"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
> +
> +
> +PROVIDES += "u-boot"
> +
> +PV = "2013.04"
> +
> +SRCREV = "6388c474189b42c07bb865dd604c74483da099f3"
> +CGTBRANCH = "cgt_imx_v2013.04_3.10.17_1.0.0"
All our code user SRCBRANCH, please use the same here.
> +SRC_URI = "git://git.congatec.com/arm/qmx6_uboot.git;protocol=http;branch=${CGTBRANCH} \
> +"
> +
> +UBOOT_MACHINE = "cgt_qmx6_"`echo ${PARTNUMBER} | tr '[:upper:]' '[:lower:]' `"_config"
> +UBOOT_MAKE_TARGET = "u-boot."`echo ${PARTNUMBER} | tr '[:upper:]' '[:lower:]'`".imx"
> +
> +S = "${WORKDIR}/git"
> +EXTRA_OEMAKE += 'HOSTSTRIP=true'
> +
> +do_compile_prepend() {
> + if [ "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', 'ld-is-gold', '', d)}" = "ld-is-gold" ] ; then
> + sed -i 's/$(CROSS_COMPILE)ld/$(CROSS_COMPILE)ld.bfd/g' config.mk
> + fi
> +}
> +
> +do_deploy () {
> + install ${S}/${UBOOT_MAKE_TARGET} \
> + ${DEPLOYDIR}/
> +}
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_MACHINE = "(cgtqmx6)"
The do_compile_prepend and do_deploy seem not needed.
If you look at the recipe of FSL U-Boot[1] it is much cleaner so
please clean this recipe as much as possible as this easy the metadata
maintenance.
1. http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-bsp/u-boot/u-boot-imx_2013.04.bb
--
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