Kobs-ng mandatory patch for IMX6SX TO1.3 on the older release before Yocto_4.1.15

Document created by Yuan Zhao Employee on May 18, 2016Last modified by Yuan Zhao Employee on May 18, 2016
Version 2Show Document
  • View in full screen mode

It is one mandatory patch if you are in the case:

 

The chip you are using is imx6sx TO1.3 and newer, and use the kobs-ng to flash your image to the Nand memory chip. If you are using MFG, you also need rebuild the kobs-ng, and update the binary into your MFG tool.  The patch have been integrated into the default release yocto_4.1.15, but if you are using the older version release before yocto_4.1.15, please make sure you have integrated the modification when you need to use kobs-ng to flash the image to Nand memory chip.

 

commit 5ecf08703da489a3bd317341f630870a3d07dab9
Author: Han Xu <han.xu@nxp.com>
Date:   Thu Jan 28 14:40:14 2016 -0600

    MMT-105: change the i.mx6sx revision check change the i.mx6sx revision check since v1.3 uses v1.2 boot config as well.

    Signed-off-by: Han Xu <han.xu@nxp.com>
    (cherry picked from commit 1dac0c14d1e2016c2fa804f6628543d8d238c680)

diff --git a/src/plat_boot_config.c b/src/plat_boot_config.c
index 461675a..e1ef6f3 100644
--- a/src/plat_boot_config.c
+++ b/src/plat_boot_config.c
@@ -1,5 +1,5 @@
/*
-* Copyright (C) 2010-2015 Freescale Semiconductor, Inc. All Rights Reserved.
+* Copyright (C) 2010-2016 Freescale Semiconductor, Inc. All Rights Reserved.
*/

/*
@@ -256,10 +256,12 @@ int discover_boot_rom_version(void)
                                        }
                                        fgets(line_buffer, sizeof(line_buffer), revision);
                                        if (!strncmp(line_buffer, "1.0", strlen("1.0")) ||
-                                                       !strncmp(line_buffer, "1.1", strlen("1.1")))
+                                                       !strncmp(line_buffer, "1.1", strlen("1.1"))) {
                                                plat_config_data = &mx6sx_boot_config;
-                                       if (!strncmp(line_buffer, "1.2", strlen("1.2")))
+                                       /* all other revisions should use the latest boot config */
+                                       } else {
                                                plat_config_data = &mx6sx_to_1_2_boot_config;
+                                       }
                                }

                                if (!strncmp(line_buffer, plat_imx6ul, strlen(plat_imx6ul)))

 

How to apply it to older version quickly: 

Apply the patch and rebuild the kobs-ng in yocto_3.14_x environment:

  • bitbake -c compile -v -f imx-kobs
  • cd tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/5.0-r0/imx-kobs-5.0
  • git apply yocto_3_14_x.patch
  • bitbake -c compile -v -f imx-kobs
  • you can find the new binary “kobs-ng” under “tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/5.0-r0/build/src”

Apply the patch and rebuild the kobs-ng in yocto_3.10_53 environment:

  • . ./setup-environment build
  • bitbake -c compile -v -f imx-kobs
  • cd tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/3.10.53-1.1.0-r0/imx-kobs-3.10.53-1.1.0
  • git apply yocto_3_10_53patch
  • bitbake -c compile -v -f imx-kobs
  • you can find t he new binary “kobs-ng” under tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/imx-kobs/3.10.53-1.1.0-r0/imx-kobs-3.10.53-1.1.0/src

 

As one alternation method, you also can download the whole imx-kobs-5.4 package which yocto_4.1.15 is using to build.

2 people found this helpful

Outcomes