16 Jul, 2020

1 commit

  • The old boot control logic and misc data struct is based on the
    'external/avb/libavb_ab' library which is already marked as
    deprecated and won't be maintained by google anymore:

    commit 37f5946d0e1159273eff61dd8041377fedbf55a9
    Author: David Zeuthen
    Date: Wed Sep 20 15:02:32 2017 -0400

    Deprecate libavb_ab and bootctrl.avb code.

    This code was already marked as experimental in anticipation of being
    removed in the future. Officially deprecate it and set Jun 1 2018 as
    the date it will be removed. This should give users of the code ample
    time to fork/migrate.

    To keep using the code AVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED
    must be defined.

    The reason for deprecating this code is twofold:

    - Its policy was optimized for devices without a display with
    e.g. automatic fallback to the other slot if a slot fails to
    boot. Since most A/B stacks in Android devices don't work this
    way this code is confusing.

    - There are no known active users, no good test coverage for the
    bootctrl.avb code, and no plans to use it.

    When the code is removed we'll provide an easy transition path by
    keeping (but renaming) the |ab_ops| member in AvbOps.

    Change-Id: Id5e090a2048076d36ccca2e1c4cb55e226b8b43d

    Google has provided a new boot control v1.1 implementation under
    'hardware/interfaces/boot/1.1/default' which uses a new misc data struct defined
    in the 'include/android_bootloader_message.h'. This commit adds a new boot control
    implementation in bootloader, which combines the new misc data struct and inherit
    some flow in 'libavb_ab', the old 'libavb_ab' library will be removed.

    Test: boot/slot switch/retry count test on single&dual bootloader.

    Signed-off-by: Ji Luo
    Change-Id: I0fa1ee8562c83afec549c8f6aad7a26a2214f626
    (cherry picked from commit 29aafaf065d1688201d014213052863ec9d18e9c)

    Ji Luo
     

16 Jun, 2020

3 commits

  • Decrypt and verify the secure credential in keymaster TA, unlock
    operation can only be allowed after secure credential verify pass.

    Since the mppubk can only be generated on hab closed imx8q, so secure
    unlock feature can only supported when hab is closed.

    Test: secure unlock credential verify on hab closed imx8mm_evk.

    Change-Id: I1ab5e24df28d1e75ff853de3adf29f34da1d0a71
    Signed-off-by: Ji Luo
    (cherry picked from commit 631149fc0fc8ce035311949db643c2708e41435a)

    Ji Luo
     
  • The A/B slot selection is moved to spl, it may lead to hang
    if no bootable slots found. The only way to recover the board
    is re-flash images with uuu tool, which is quite inconvenient
    for some customers who can't enter serial download mode.

    This patch will set "spl recovery mode" which will give us a
    chance to re-flash images with fastboot commands.

    Test: Enter spl recovery mode and flash images when no bootable
    slots found.

    Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516
    Signed-off-by: Ji Luo
    (cherry picked from commit 46cc755cf3f42422ee1d7783394e14e8125df2b6)

    Ji Luo
     
  • Add new keymaster commands to get Manufacure Production key (mppubk).
    Since the mppubk can only be generated in OEM CLOSED imx8q board, so
    we can only use this command when the board is HAB/AHAB closed.

    Commands to extract the mppubk:
    * $fastboot oem get-mppubk
    * $fastboot get_staged mppubk.bin

    Test: Generate and dump the mppubk.bin

    Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4
    Signed-off-by: Ji Luo
    (cherry picked from commit 52300d644a275dfa4fe73ecb51601a8efaff8ab7)

    Ji Luo
     

06 May, 2020

1 commit

  • Porting the android AVB lib from imx u-boot v2018.03. Since 2019 u-boot
    has added latest AVB library, try to reuse it.

    Signed-off-by: Ye Li
    (cherry picked from commit 2105662ada738a271e12a81d775134a5821dc38f)
    (cherry picked from commit f7291d86c4183ce2e299ad271aa5618c71507ffc)
    (cherry picked from commit b871714c519e1bda3de6afbd354bee2cb246e4b7)

    Ye Li