<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: modify u-boot-imx default env at yocto build time in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1376114#M183469</link>
    <description>&lt;P&gt;Thanks for the response. I'll check it out; The reason I posted here is that most changes similar to this, are in the freescale layer. It's not straightforward understanding if the original change is in u-boot or in the board specific code&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 08:51:56 GMT</pubDate>
    <dc:creator>diarmuidcollins</dc:creator>
    <dc:date>2021-11-24T08:51:56Z</dc:date>
    <item>
      <title>modify u-boot-imx default env at yocto build time</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1375458#M183416</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I can successfully build an deploy a yocto image build on the hardknott code base for my custom board. I've successfully patched the DRAM updates into u-boot-imx and it works well.&lt;/P&gt;&lt;P&gt;One aspect I am struggling with is how to modify the u-boot-initial-env at build time.&lt;/P&gt;&lt;P&gt;I know after writing the wic to emmc, I can interrupt the boot and modify the default u-boot env there&lt;/P&gt;&lt;P&gt;I know I can use the userland (fw_setenv) to modify the env there&lt;/P&gt;&lt;P&gt;I can see after I build u-boot-env files in the deploy folder called u-boot-initial-env* and these contain the initial environment I can see once I boot.&lt;/P&gt;&lt;P&gt;What I cannot figure out is how to patch these at build time. Clearly it's some update to the u-boot bbappend file but it seems that these files are generated during the build and cannot be patched in the source code.&lt;/P&gt;&lt;P&gt;Presumably there's some easy and obvious way (how may times have I said that with yocto!) but I can't figure it out.&lt;/P&gt;&lt;P&gt;Any pointers please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 08:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1375458#M183416</guid>
      <dc:creator>diarmuidcollins</dc:creator>
      <dc:date>2021-11-23T08:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: modify u-boot-imx default env at yocto build time</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1375656#M183434</link>
      <description>&lt;P&gt;&lt;SPAN&gt;u-boot-initial-env&amp;nbsp; is from the u-boot default in header file.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You need to do is to patch the u-boot header as modification and create patch's patch for yocto.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you can refer to&amp;nbsp;2000-u-boot-append-emmc-LF_v5.10.9_1.0.0.patch&amp;nbsp; or 2000-u-boot-append-LF_v5.10.9_1.0.0.patch in&amp;nbsp;swupdate_yocto_patches_08102021.tgz&amp;nbsp; of following link.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SWUpdate OTA i.MX8MM EVK / i.MX8QXP MEK:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/SWUpdate-OTA-i-MX8MM-EVK-i-MX8QXP-MEK/ta-p/1307416" target="_blank"&gt;SWUpdate OTA i.MX8MM EVK / i.MX8QXP MEK - NXP Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you can see the "++" is what I called patch's patch for yocto.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;+--- u-boot/include/configs/imx8mm_evk.h.orig 2021-06-15 10:37:39.875399335 +0800&lt;BR /&gt;++++ u-boot/include/configs/imx8mm_evk.h 2021-06-15 10:46:21.606685474 +0800&lt;BR /&gt;+@@ -8,6 +8,7 @@&lt;BR /&gt;+ &lt;BR /&gt;+ #include &amp;lt;linux/sizes.h&amp;gt;&lt;BR /&gt;+ #include &amp;lt;asm/arch/imx-regs.h&amp;gt;&lt;BR /&gt;++#include &amp;lt;version.h&amp;gt;&lt;BR /&gt;+ #include "imx_env.h"&lt;BR /&gt;+ &lt;BR /&gt;+ #define CONFIG_SPL_MAX_SIZE (148 * 1024)&lt;BR /&gt;+@@ -133,7 +134,8 @@&lt;BR /&gt;+ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \&lt;BR /&gt;+ "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \&lt;BR /&gt;+ "mmcautodetect=yes\0" \&lt;BR /&gt;+- "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot}\0 " \&lt;BR /&gt;++ "mmcargs=setenv bootargs ${jh_clk} console=${console} root=${mmcroot} " \&lt;BR /&gt;++ "cur_slot=${bootslot} U-Boot_ver=${u-boot_version}\0"\&lt;BR /&gt;+ "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \&lt;BR /&gt;+ "bootscript=echo Running bootscript from mmc ...; " \&lt;BR /&gt;+ "source\0" \&lt;BR /&gt;+@@ -169,9 +171,32 @@&lt;BR /&gt;+ "else " \&lt;BR /&gt;+ "echo WARN: Cannot load the DT; " \&lt;BR /&gt;+ "fi; " \&lt;BR /&gt;+- "fi;\0"&lt;BR /&gt;++ "fi;\0" \&lt;BR /&gt;++ "bootslot=dualA\0" \&lt;BR /&gt;++ "u-boot_version=null\0" \&lt;BR /&gt;++ "usb_port=1\0" \&lt;BR /&gt;++ "post_opt=saveenv;\0" \&lt;BR /&gt;++ "adjustbootsource=if test ${bootslot} = dualA || test ${bootslot} = singlenormal; then run adjustbootsourceA; fi;" \&lt;BR /&gt;++ "if test ${bootslot} = dualB; then run adjustbootsourceB; fi\0" \&lt;BR /&gt;++ "altbootusb=echo Boot Fail! Get into usb fastboot download.;fastboot usb ${usb_port}\0" \&lt;BR /&gt;++ "altbootsingle=if test ${bootslot} = singlerescue; then run altbootusb; fi; if test ${bootslot} = singlenormal; then run swuboot; fi\0" \&lt;BR /&gt;++ "adjustbootsourceB=echo RootFs Slot B; setenv mmcpart 3; setenv mmcroot /dev/mmcblk${mmcdev}p4 rootwait rw\0" \&lt;BR /&gt;++ "adjustbootsourceA=echo RootFs Slot A; setenv mmcpart 1; setenv mmcroot /dev/mmcblk${mmcdev}p2 rootwait rw\0" \&lt;BR /&gt;++ "altbootRollbackB=echo Rolling back to slot dualB;setenv bootslot dualB;run post_opt;run bootcmd\0" \&lt;BR /&gt;++ "altbootRollbackA=echo Rolling back to slot dualA;setenv bootslot dualA;run post_opt;run bootcmd\0" \&lt;BR /&gt;++ "altbootdual=if test ${bootslot} = dualA ; then run altbootRollbackB; fi; if test ${bootslot} = dualB ; then run altbootRollbackA; fi;\0" \&lt;BR /&gt;++ "swuargs=setenv bootargs console=${console},${baudrate} earlycon=${earlycon},${baudrate} " \&lt;BR /&gt;++ "cur_slot=${bootslot} U-Boot_ver=${u-boot_version}\0"\&lt;BR /&gt;++ "loadswuimage=mmc read ${loadaddr} 0x4000 0xF000\0" \&lt;BR /&gt;++ "loadswufdt=mmc read ${fdt_addr} 0x13000 0x200\0" \&lt;BR /&gt;++ "loadswuramdisk=mmc read ${initrd_addr} 0x15000 0x15000\0" \&lt;BR /&gt;++ "swuboot=echo swuboot ramdisk;run loadswuimage;run loadswufdt;run loadswuramdisk;run swuargs;booti ${loadaddr} ${initrd_addr} ${fdt_addr}\0" \&lt;BR /&gt;++ "altbootcmd=if test ${bootslot} = singlerescue || test ${bootslot} = singlenormal; then run altbootsingle; fi;" \&lt;BR /&gt;++ "if test ${bootslot} = dualA || test ${bootslot} = dualB; then run altbootdual; fi\0" &lt;BR /&gt;+ &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Technically, here is the community for&amp;nbsp;i.MX Processors. not for Yocto.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is the Yocto official site, you should learn from there.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.yoctoproject.org/" target="_blank"&gt;Yocto Project – It's not an embedded Linux distribution – it creates a custom one for you&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;hope you can get some progress.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 13:04:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1375656#M183434</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-11-23T13:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: modify u-boot-imx default env at yocto build time</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1376114#M183469</link>
      <description>&lt;P&gt;Thanks for the response. I'll check it out; The reason I posted here is that most changes similar to this, are in the freescale layer. It's not straightforward understanding if the original change is in u-boot or in the board specific code&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 08:51:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/modify-u-boot-imx-default-env-at-yocto-build-time/m-p/1376114#M183469</guid>
      <dc:creator>diarmuidcollins</dc:creator>
      <dc:date>2021-11-24T08:51:56Z</dc:date>
    </item>
  </channel>
</rss>

