Patchwork [1/2] image_types_fsl.bbclass: add uboot.mxsboot-nand image generation

login
register
mail settings
Submitter Alexey Ignatov
Date June 2, 2014, 1:24 p.m.
Message ID <1401715474-18181-1-git-send-email-lexszero@gmail.com>
Download mbox | patch
Permalink /patch/73081/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Alexey Ignatov - June 2, 2014, 1:24 p.m.
---
 classes/image_types_fsl.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)
Otavio Salvador - June 2, 2014, 9:49 p.m.
Hello Alexey,

Thanks for sending this for upstreaming. Please see the comments below...

On Mon, Jun 2, 2014 at 10:24 AM, Alexey Ignatov <lexszero@gmail.com> wrote:

Please describe it more extensively in the commitlog, something as:

image_types_fsl.bbclass: Add U-Boot NAND support for i.MX23/i.MX28

This adds support to generate the U-Boot image for use with NAND
(uboot.mxsboot-nand) and allows for custom params to be given for
mxsboot using the MXSBOOT_NAND_ARGS variable which should be defined
in the machine definition file.

Signed-off-by:...

> diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
> index dfa55e4..d585512 100644
> --- a/classes/image_types_fsl.bbclass
> +++ b/classes/image_types_fsl.bbclass
...
> +IMAGE_CMD_uboot.mxsboot-nand = "mxsboot ${MXSBOOT_ARGS} nand \
...

Change it to MXSBOOT_NAND_ARGS as we may want MXSBOOT_SD_ARGS or others later.

You need to add a week definition of MXSBOOT_NAND_ARGS in the began of
the class as:

# Extra params to pass for MXSBOOT_NAND_ARGS
MXSBOOT_NAND_ARGS ?= ""

Patch

diff --git a/classes/image_types_fsl.bbclass b/classes/image_types_fsl.bbclass
index dfa55e4..d585512 100644
--- a/classes/image_types_fsl.bbclass
+++ b/classes/image_types_fsl.bbclass
@@ -59,6 +59,12 @@  IMAGE_DEPENDS_uboot.mxsboot-sdcard = "u-boot-mxsboot-native:do_populate_sysroot
 IMAGE_CMD_uboot.mxsboot-sdcard = "mxsboot sd ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
                                              ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-sdcard"
 
+IMAGE_DEPENDS_uboot.mxsboot-nand = "u-boot-mxsboot-native:do_populate_sysroot \
+                                      u-boot:do_deploy"
+IMAGE_CMD_uboot.mxsboot-nand = "mxsboot ${MXSBOOT_ARGS} nand \
+                                             ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX} \
+                                             ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.uboot.mxsboot-nand"
+
 # Boot partition volume id
 BOOTDD_VOLUME_ID ?= "Boot ${MACHINE}"