Skip to content
Snippets Groups Projects
  1. Mar 18, 2025
  2. Mar 11, 2025
  3. Mar 03, 2025
  4. Feb 05, 2025
    • Julien Masson's avatar
      bl31: set LIBBASE flag · 72f2981a
      Julien Masson authored
      
      ATF default branch is now on aiot-v2.6, we need to set LIBBASE flag.
      
      Otherwise we have compilation errors, for example on i350 we have
      multiple definitions error:
      /home/julien/Documents/Baylibre/mediatek/bootloaders/toolchains/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin/../lib/gcc/aarch64-none-elf/10.3.1/../../../../aarch64-none-elf/bin/ld: /home/julien/Documents/Baylibre/mediatek/bootloaders/libbase-prebuilts/mt8365/libbase.a(mt_base.c.o): in function `mtk_get_hwid':
      /usr/src/debug/libbase/1.0-r0/libbase-1.0/../../../../../../workspace/sources/libbase/mt_base.c:20: multiple definition of `mtk_get_hwid'; /home/julien/Documents/Baylibre/mediatek/bootloaders/arm-trusted-firmware/build/mt8365/debug/bl31/mtk_hwid.o (symbol from plugin):(.text+0x0): first defined here
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      72f2981a
  5. Jan 21, 2025
  6. Jan 17, 2025
  7. Dec 16, 2024
  8. Dec 11, 2024
  9. Dec 03, 2024
  10. Nov 14, 2024
  11. Nov 08, 2024
  12. Nov 06, 2024
    • Julien Masson's avatar
      uboot: rework defconfig and fragments usage · 7ecc82f6
      Julien Masson authored
      
      With the U-Boot updates to mtk-v2024.10, several configs are not
      present anymore in U-Boot.
      Indeed a single defconfig is provided in U-Boot for each board.
      
      Thus all the configs needed for U-Boot and U-Boot SPL (da and
      mtk-boot) are now placed in defconfig fragments:
      .
      ├── config
      │   └── u-boot
      │       ├── android.config              REQUIRED
      │       ├── debug
      │       │   ├── android.config          OPTIONAL
      │       │   ├── spl-da.config           OPTIONAL
      │       │   └── spl-mtk-boot.config     OPTIONAL
      │       ├── factory
      │       │   ├── android.config          OPTIONAL
      │       │   ├── spl-da.config           OPTIONAL
      │       │   └── spl-mtk-boot.config     OPTIONAL
      │       ├── release
      │       │   ├── android.config          OPTIONAL
      │       │   ├── spl-da.config           OPTIONAL
      │       │   └── spl-mtk-boot.config     OPTIONAL
      │       ├── spl.config                  REQUIRED
      │       ├── spl-da.config               REQUIRED
      │       └── spl-mtk-boot.config         REQUIRED
      
      For external board project (customers):
      ├── config
      │   └── u-boot
      │       └── BOARD-A
      │           ├── debug
      │           │   ├── android.config          OPTIONAL
      │           │   ├── spl-da.config           OPTIONAL
      │           │   └── spl-mtk-boot.config     OPTIONAL
      │           ├── factory
      │           │   ├── android.config          OPTIONAL
      │           │   ├── spl-da.config           OPTIONAL
      │           │   └── spl-mtk-boot.config     OPTIONAL
      │           ├── release
      │           │   ├── android.config          OPTIONAL
      │           │   ├── spl-da.config           OPTIONAL
      │           │   └── spl-mtk-boot.config     OPTIONAL
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      7ecc82f6
  13. Oct 18, 2024
  14. Oct 17, 2024
  15. Oct 14, 2024
    • Julien Masson's avatar
      boards: add i700 EVK support · 73360259
      Julien Masson authored
      
      The project contains now all the necessary files to support mediatek
      i700 EVK board:
      - yaml config with all infos needed to build bootloaders
      - bootloaders.its used to generate bootloader.img
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      73360259
    • Julien Masson's avatar
      bl31: set NEED_BL32 to no · 17dc0957
      Julien Masson authored
      
      According to the ATF documentation (Makefile), we should have
      NEED_BL32 set to yes in case:
      1. BL32 is built from source: then BL32_SOURCES must contain the list
         of source files to build BL32.
      2. BL32 is a prebuilt binary: then BL32 must point to the image file
         that will be included in the FIP.
      
      We don't build BL32 from ATF source and we don't use fip image
      anymore.
      Thus there is no reason to keep NEED_BL32 set to yes.
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      17dc0957
    • Julien Masson's avatar
      bootloaders|u-boot: place bootloaders.its files per plat · d81b3415
      Julien Masson authored
      
      bootloaders.its might change following the platform, indeed some
      binaries are copied at different memory address, the description is
      also different ...
      
      We introduce new yaml entry plat under u-boot which is used to
      determine which folder we should use to find bootloaders.its files.
      
      Example i350 EVK:
      ```
      uboot:
        plat: mt8365
      ```
      bootloaders.its will be located here: config/u-boot/mt8365
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      d81b3415
    • Julien Masson's avatar
      treewide: rework plat handling · a3cfb684
      Julien Masson authored
      
      The plat yaml entry was a global var used for several bootloader
      components: OP-TEE, BL31, libatf ...
      This logic works only if all the projects use the plat name.
      
      With the board i350 EVK we were lucky because all projects are aligned
      with a plat set as mt8365 except for OP-TEE (mt8175).
      
      However this logic has limitation, if one of these projects use a
      different plat name, we had to add condition to handle specific case.
      That can start to be mess if more projects are not aligned with the
      global plat var.
      
      This commit add and handle plat yaml entry for each bootloader
      components.
      
      In that way the build_*.sh won't need to be updated to handle all the
      different cases for future boards.
      
      Each board specify the right plat name for each bootloader components
      in their yaml config.
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      a3cfb684
  16. Oct 10, 2024
  17. Oct 09, 2024
  18. Sep 26, 2024
  19. Sep 24, 2024
    • Julien Masson's avatar
      release_android: clean only optee-ta output directory · bf7b9155
      Julien Masson authored
      
      When we run release_android script, we build binaries for release and
      userdebug mode.
      We should not remove the whole output directory, otherwise the output
      directory will only contains the binaries from the last build.
      We need to have both binaries: release and userdebug.
      
      Except for the optee-ta binaries, we only use the release binaries.
      This folder can be cleaned before copying all the binaries.
      
      Fixes: d8a121a3 release_android: remove all previous build files
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      bf7b9155
  20. Sep 23, 2024
  21. Sep 17, 2024
  22. Sep 02, 2024
    • Julien Masson's avatar
      optee: enable CFG_TA_OPTEE_CORE_API_COMPAT_1_1 flag · e2e9d596
      Julien Masson authored
      
      With OP-TEE version 4.1.0, keymaster TA fail with the following error:
      ```
      D/TA:  TA_InvokeCommandEntryPoint:1877 KM_FINISH_OPERATION
      D/TA:  TA_finish:1687 TA_finish 1687
      D/TA:  TA_deserialize_op_handle:439 TA_deserialize_op_handle 439
      D/TA:  TA_deserialize_blob_akms:54 TA_deserialize_blob_akms 54
      D/TA:  TA_deserialize_auth_set:229 TA_deserialize_auth_set 229
      D/TA:  TA_deserialize_auth_set:252 indirect_data_size:0
      D/TA:  TA_deserialize_auth_set:260 indirect_base:0x1
      D/TA:  TA_deserialize_auth_set:279 elem cnt:0
      D/TA:  TA_deserialize_auth_set:289 elem serialized size:0
      D/TA:  TA_deserialize_auth_set:291 param_set->length:0
      D/TA:  TA_deserialize_blob_akms:54 TA_deserialize_blob_akms 54
      D/TA:  TA_decrypt:221 TA_decrypt 221
      D/TA:  TA_execute:157 TA_execute 157 size = 488
      D/TA:  TA_open_secret_key:36 TA_open_secret_key 36
      D/TA:  TA_open_secret_key:38 Use existing masterKey
      D/TA:  TA_populate_key_attrs:534 padding = 4 *type = 0xa0000010
      D/TA:  TA_populate_key_attrs:539 AES attrs_count = 1 algorithm = 32
      D/TA:  TA_populate_key_attrs:565 *key_size = 256 attrs_count = 1 padding = 8
      D/TA:  TA_populate_key_attrs:570 i = 0 padding = 12 tag = 3221225472
      D/TA:  TA_populate_key_attrs:588 i = 0 padding = 20 attr_size = 32
      D/TA:  TA_populate_key_attrs:604 i = 0 padding = 52 attr_size = 32
      D/TA:  TA_deserialize_param_set:336 TA_deserialize_param_set 336
      D/TA:  TA_deserialize_param_set:357 params->length:14
      D/TA:  TA_deserialize_blob_akms:54 TA_deserialize_blob_akms 54
      D/TA:  TA_add_origin:451 TA_add_origin 451
      D/TA:  TA_restore_key:752 populate attrs is finished with err 0
      D/TA:  TA_possibe_size:176 TA_possibe_size 176
      E/TC:? 0
      E/TC:? 0 TA panicked with code 0xffff0001
      E/LD:  Status of TA dba51a17-0563-11e7-93b1-6fa7b0071a51
      E/LD:   arch: aarch64
      E/LD:  region  0: va 0x80005000 pa 0x43401000 size 0x002000 flags rw-s (ldelf)
      E/LD:  region  1: va 0x80007000 pa 0x43403000 size 0x010000 flags r-xs (ldelf)
      E/LD:  region  2: va 0x80017000 pa 0x43413000 size 0x001000 flags rw-s (ldelf)
      E/LD:  region  3: va 0x80018000 pa 0x43414000 size 0x004000 flags rw-s (ldelf)
      E/LD:  region  4: va 0x8001c000 pa 0x43418000 size 0x001000 flags r--s
      E/LD:  region  5: va 0x8001d000 pa 0x438b8000 size 0x009000 flags rw-s (stack)
      E/LD:  region  6: va 0x80026000 pa 0xfbc11d10 size 0x003000 flags rw-- (param)
      E/LD:  region  7: va 0x80029000 pa 0xfc376d14 size 0x001000 flags rw-- (param)
      E/LD:  region  8: va 0x80071000 pa 0x00001000 size 0x090000 flags r-xs [0]
      E/LD:  region  9: va 0x80101000 pa 0x00091000 size 0x40f000 flags rw-s [0]
      E/LD:   [0] dba51a17-0563-11e7-93b1-6fa7b0071a51 @ 0x80071000
      E/LD:  Call stack:
      E/LD:   0x800a1d2c
      E/LD:   0x8009f26c
      E/LD:   0x800862d8
      E/LD:   0x80075a48
      E/LD:   0x8007606c
      E/LD:   0x800a4a40
      E/LD:   0x800a4b10
      E/LD:   0x8009035c
      D/TC:? 0 user_ta_enter:201 tee_user_ta_enter: TA panicked with code 0xffff0001
      ```
      
      This issue is fixed by enabling CFG_TA_OPTEE_CORE_API_COMPAT_1_1 flag.
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      e2e9d596
    • Julien Masson's avatar
      build_optee: add CFG_DT flag · 57217862
      Julien Masson authored
      
      From OP-TEE 4.1.0, CFG_DT flag must be added, otherwise we have this
      compilation error:
      core/arch/arm/kernel/boot.c:1501: undefined reference to `dt_getprop_as_number'
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      57217862
    • Julien Masson's avatar
      build_optee: update xtest TA list based on OP-TEE 4.1.0 · 4fd86e8e
      Julien Masson authored
      
      With OP-TEE 4.1.0 some TA have been added/removed:
      - aes_perf
      - hash_perf
      + crypto_perf
      
      Signed-off-by: Julien Masson's avatarJulien Masson <jmasson@baylibre.com>
      4fd86e8e
    • Esteban Blanc's avatar
      config: remove i350_sb35 · 2f7856b1
      Esteban Blanc authored
      
      i350_sb35 is not supported by Android 14
      
      Signed-off-by: default avatarEsteban Blanc <eblanc@baylibre.com>
      2f7856b1
    • Esteban Blanc's avatar
      config: remove i350_pumpkin · 96903aad
      Esteban Blanc authored
      
      i350_pumpkin is not supported by Android 14
      
      Signed-off-by: default avatarEsteban Blanc <eblanc@baylibre.com>
      96903aad
    • Esteban Blanc's avatar
      config: remove i500_pumpkin · 6215f8a4
      Esteban Blanc authored
      
      i500_pumpkin is not supported by Android 14
      
      Signed-off-by: default avatarEsteban Blanc <eblanc@baylibre.com>
      6215f8a4
  23. Mar 18, 2024
  24. Feb 01, 2024
  25. Oct 10, 2023
Loading