<?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: Trusty OS forces u-boot into recovery mode in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1420257#M187558</link>
    <description>&lt;P&gt;what you called it " Trusty OS" , I guess it's LK ,&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2022 06:12:06 GMT</pubDate>
    <dc:creator>billchen</dc:creator>
    <dc:date>2022-02-28T06:12:06Z</dc:date>
    <item>
      <title>Trusty OS forces u-boot into recovery mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1281188#M174454</link>
      <description>&lt;P&gt;I've been successful at building/booting u-boot with Trusty for a while.&amp;nbsp; Recently I made a change to u-boot and that resulted in u-boot booting into recovery mode.&lt;/P&gt;&lt;P&gt;Doing the obvious, I suspected something was wrong with the change I made to u-boot, but when I backed out that change, the problem of booting into recovery mode persists.&amp;nbsp; Also, if I just change or delete&amp;nbsp; the "boot_recovery" u-boot variable and save that change to the u-boot environment, when I power cycle the device, the "boot_recovery" variable returns set to "yes".&lt;/P&gt;&lt;P&gt;There was something else odd with the u-boot environment.&amp;nbsp; It has some variables which have the Linux style continuation character in them, and are prefixed with the Linux command line double dashes.&amp;nbsp; Here are those suspicious u-boot environment variables:&lt;/P&gt;&lt;PRE&gt;recovery_command=recovery\&lt;BR /&gt;--prompt_and_wipe_data\&lt;BR /&gt;--reason=init_user0_failed\&lt;/PRE&gt;&lt;P&gt;I was hoping that by finding those strings in the code, I could determine what the problem was, but I was not able to find those strings in the code for U-Boot, Linux or Android.&amp;nbsp; However, I did find them in the Trusty image.&amp;nbsp; Specifically, they trace to the file: "&amp;lt;TRUSTY_ROOT&amp;gt;/trusty/prebuilts/aosp/android/out/target/product/trusty/system.img".&amp;nbsp; Since that is a prebuilt binary file, I can't tell what causes those variables to get placed in the u-boot environment.&amp;nbsp; Turns out that file comes from an AOSP repository, so I'm not sure I'll ever see the code for it.&lt;/P&gt;&lt;P&gt;I do have quite a bit of the debugging information from the Trusty LK turned on at boot.&amp;nbsp; Here's what I see at startup:&lt;/P&gt;&lt;PRE&gt;U-Boot SPL dub-2019.04-r2.1-g7a82280-dirty (May 24 2021 - 12:28:20 +0000)&lt;BR /&gt;Spaulding Normal Boot: 115200&lt;BR /&gt;Trying to boot from MMC1&lt;BR /&gt;Load image from MMC/SD 0x6fc00&lt;BR /&gt;&lt;BR /&gt;welcome to lk/MP&lt;BR /&gt;&lt;BR /&gt;boot args 0x2000000 0xfe000000 0x2000 0x0&lt;BR /&gt;generic_arm64_map_regs: failed -5 name=gic&lt;BR /&gt;initializing trusty (Built: 08:25:28 May 19 2021)&lt;BR /&gt;Initializing Trusted OS SMC handler&lt;BR /&gt;avb: 285: Initializing AVB App&lt;BR /&gt;creating port (com.android.trusty.avb)&lt;BR /&gt;int rebuild_hset_all(struct uctx *):250: Rebuilding all handles set&lt;BR /&gt;hwcrypto: 222: Initializing&lt;BR /&gt;hwrng_caam: 44: Init HWRNG service provider&lt;BR /&gt;hwrng_srv: 256: Start HWRNG service&lt;BR /&gt;creating port (com.android.trusty.hwrng)&lt;BR /&gt;int rebuild_hset_all(struct uctx *):250: Rebuilding all handles set&lt;BR /&gt;hwcrypto_caam: 85: Init HWCRYPTO service provider&lt;BR /&gt;hwcrypto_srv: 360: Start HWCRYPTO service&lt;BR /&gt;creating port (com.android.trusty.hwcrypto)&lt;BR /&gt;hwkey_caam: 213: Init HWKEY service provider&lt;BR /&gt;hwkey_srv: 351: Start HWKEY service&lt;BR /&gt;creating port (com.android.trusty.hwkey)&lt;BR /&gt;hwcrypto: 237: enter main event loop&lt;BR /&gt;creating port (com.android.trusty.keymaster.secure)&lt;BR /&gt;int rebuild_hset_all(struct uctx *):250: Rebuilding all handles set&lt;BR /&gt;creating port (com.android.trusty.keymaster)&lt;BR /&gt;trusty_gatekeeper: 291: Initializing&lt;BR /&gt;creating port (com.android.trusty.gatekeeper)&lt;BR /&gt;int rebuild_hset_all(struct uctx *):250: Rebuilding all handles set&lt;BR /&gt;creating port (com.android.trusty.storage.proxy)&lt;BR /&gt;int rebuild_hset_all(struct uctx *):250: Rebuilding all handles set&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;U-Boot dub-2019.04-r2.1-g7a82280-dirty (May 24 2021 - 12:28:20 +0000)&lt;BR /&gt;&lt;BR /&gt;CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 34C&lt;BR /&gt;DRAM: 2 GiB&lt;BR /&gt;MCA: HW_VER=1 FW_VER=0.12&lt;BR /&gt;MMC: FSL_SDHC: 0, FSL_SDHC: 1&lt;BR /&gt;In: serial&lt;BR /&gt;Out: serial&lt;BR /&gt;Err: serial&lt;BR /&gt;Model: Spaulding Medical OneDevice.&lt;BR /&gt;ConnectCore 8X SOM variant 0x02: Industrial QuadXPlus, 16GB eMMC, 2GB LPDDR4, -40/+85C, Wireless, Bluetooth&lt;BR /&gt;Board version undefined, ID 2105&lt;BR /&gt;Boot: MMC0&lt;BR /&gt;&lt;BR /&gt;BuildInfo:&lt;BR /&gt;- SCFW 494c97f3, SECO-FW dd989819, IMX-MKIMAGE d7f9440d, ATF 31192ca&lt;BR /&gt;- U-Boot dub-2019.04-r2.1-g7a82280-dirty&lt;BR /&gt;&lt;BR /&gt;flash target is MMC:0&lt;BR /&gt;Net: Net Initialization Skipped&lt;BR /&gt;No ethernet found.&lt;BR /&gt;INFO Initializing Trusty device&lt;BR /&gt;INFO selected trusty api version: 3 (requested 3)&lt;BR /&gt;INFO Initializing Trusty IPC device&lt;BR /&gt;INFO Initializing RPMB storage proxy service&lt;BR /&gt;_Bool super_block_valid(const struct block_device *, const struct super_block *):154: bad magic, 0x8c6a2ba476cc72f0&lt;BR /&gt;int fs_init_from_super(struct fs *, const struct super_block *, _Bool):316: loaded super block version 1&lt;BR /&gt;creating port (com.android.trusty.storage.client.tp)&lt;BR /&gt;creating port (com.android.trusty.storage.client.tdea)&lt;BR /&gt;INFO Initializing Trusty AVB client&lt;BR /&gt;INFO Initializing Trusty Keymaster client&lt;BR /&gt;INFO Initializing Trusty Hardware Crypto client&lt;BR /&gt;Fastboot: Normal&lt;BR /&gt;&lt;BR /&gt;******************************************&lt;BR /&gt;* Warning: Booting into recovery mode... *&lt;BR /&gt;******************************************&lt;BR /&gt;&lt;BR /&gt;Hit any key to stop autoboot: 0&lt;BR /&gt;=&amp;gt;&lt;/PRE&gt;&lt;P&gt;Does this sound familiar to anyone?&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 15:43:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1281188#M174454</guid>
      <dc:creator>rob_mclean</dc:creator>
      <dc:date>2021-05-24T15:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trusty OS forces u-boot into recovery mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1281198#M174455</link>
      <description>&lt;P&gt;I should add that I thought I had seen something similar previously.&amp;nbsp; I thought I remember being able to fix it by erasing and reprogramming the Android userdata and cache images along with the bootloader, and resetting the u-boot environment to the defaults with "env default -a -f".&lt;/P&gt;&lt;P&gt;I tried doing that several times (in several different ways) with this problem, and the problem is still there.&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 15:50:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1281198#M174455</guid>
      <dc:creator>rob_mclean</dc:creator>
      <dc:date>2021-05-24T15:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trusty OS forces u-boot into recovery mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1282747#M174583</link>
      <description>&lt;P&gt;I found the problem, and it wasn't directly related to Trusty afterall.&lt;/P&gt;&lt;P&gt;It turned out that our custom partition sizing had only allocated 2M for the bootloader. That was enough for the 1.1M u-boot without Trusty OS, but u-boot with Trusty OS was 2.4M.&amp;nbsp; Given that scenario, I'm not even sure how the device was working at all.&lt;/P&gt;&lt;P&gt;When I increased the space allocated for the bootloader to 8M, the problem went away.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 16:57:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1282747#M174583</guid>
      <dc:creator>rob_mclean</dc:creator>
      <dc:date>2021-05-26T16:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trusty OS forces u-boot into recovery mode</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1420257#M187558</link>
      <description>&lt;P&gt;what you called it " Trusty OS" , I guess it's LK ,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 06:12:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Trusty-OS-forces-u-boot-into-recovery-mode/m-p/1420257#M187558</guid>
      <dc:creator>billchen</dc:creator>
      <dc:date>2022-02-28T06:12:06Z</dc:date>
    </item>
  </channel>
</rss>

