Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u-boot-radxa-rk3588/legacy: use 000.patching_config; fix boot from SD when combined with from-factory eMMC blobs (TEE mismatch) #6696

Conversation

rpardini
Copy link
Member

@rpardini rpardini commented Jun 5, 2024

u-boot-radxa-rk3588/legacy: use 000.patching_config; fix boot from SD when combined with from-factory eMMC blobs (TEE mismatch)

  • u-boot-radxa-rk3588/legacy: rewrite u-boot patches, no changes
  • u-boot-radxa-rk3588/legacy: add 0000.patching_config.yaml and move all null-patches into dt and defconfig dirs as bare files
    • DTs and defconfigs should be identical to their null-patch equivalents
  • u-boot-radxa-rk3588/legacy: rewrite nanopc_t6_defconfig -- no changes
    • CONFIG_REGULATOR_RK806=y seems a leftover that's not really used?
  • u-boot-radxa-rk3588/legacy: rewrite nanopc_cm3588_defconfig -- no changes
    • CONFIG_REGULATOR_RK806=y seems a leftover that's not really used?
  • u-boot-radxa-rk3588/legacy: nanopc_cm3588_defconfig: disable OPTEE (for OOB working boot with from-factory blobs in eMMC)
    • makes it compatible with vendor out-of-box blobs (which include TEE) in the from-factory eMMC
    • Armbian itself doesn't ship TEE blobs
    • when combining from-factory eMMC blobs with an Armbian SD card, TEE blobs are in practice found by u-boot
    • but then proceeds to fail with optee api revision is too low
    • disable OPTEE in defconfig fixes it, TEE isn't used in any way by Armbian
  • u-boot-radxa-rk3588/legacy: nanopc_t6_defconfig: disable OPTEE (for OOB working boot with from-factory blobs in eMMC)
    • makes it compatible with vendor out-of-box blobs (which include TEE) in the from-factory eMMC
    • Armbian itself doesn't ship TEE blobs
    • when combining from-factory eMMC blobs with an Armbian SD card, TEE blobs are in practice found by u-boot
    • but then proceeds to fail with optee api revision is too low
    • disable OPTEE in defconfig fixes it, TEE isn't used in any way by Armbian

…l null-patches into `dt` and `defconfig` dirs as bare files

- DTs and defconfigs should be identical to their null-patch equivalents
- `CONFIG_REGULATOR_RK806=y` seems a leftover that's not really used?
…hanges

- `CONFIG_REGULATOR_RK806=y` seems a leftover that's not really used?
…(for OOB working boot with from-factory blobs in eMMC)

- makes it compatible with vendor out-of-box blobs (which include TEE) in the from-factory eMMC
- Armbian itself doesn't ship TEE blobs
- when combining from-factory eMMC blobs with an Armbian SD card, TEE blobs are in practice found by u-boot
- but then proceeds to fail with `optee api revision is too low`
- disable OPTEE in defconfig fixes it, TEE isn't used in any way by Armbian
… OOB working boot with from-factory blobs in eMMC)

- makes it compatible with vendor out-of-box blobs (which include TEE) in the from-factory eMMC
- Armbian itself doesn't ship TEE blobs
- when combining from-factory eMMC blobs with an Armbian SD card, TEE blobs are in practice found by u-boot
- but then proceeds to fail with `optee api revision is too low`
- disable OPTEE in defconfig fixes it, TEE isn't used in any way by Armbian
@github-actions github-actions bot added size/large PR with 250 lines or more Hardware Hardware related like kernel, U-Boot, ... labels Jun 5, 2024
@rpardini rpardini marked this pull request as ready for review June 5, 2024 13:59
@rpardini
Copy link
Member Author

rpardini commented Jun 5, 2024

Bootlog from bare vendor OOB eMMC (Android?)

https://gist.github.com/rpardini/b5714771c8e7c6f389e16ffd42f5e74a

Bootlog from vendor OOB eMMC + Armbian vendor on SD (no boot/TEE crap)

https://gist.github.com/rpardini/b786bcb41fb9065c2d8025004ccefba3

Bootlog with fixed u-boot (PR #6696)

https://gist.github.com/rpardini/b285d106067590a60d97afacb0c95d16

@rpardini
Copy link
Member Author

rpardini commented Jun 5, 2024

When reviewing this, keep in mind: Armbian does not ship TEE blobs in Armbian images

Copy link
Collaborator

@ColorfulRhino ColorfulRhino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new way using patching_config instead of using .patch files 👍

I do wonder though: If OPTEE is removed, why does the log still say the following?

WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK

By the way, NanoPC T6 does have mainline U-Boot support 😉

@igorpecovnik igorpecovnik merged commit d4ee0d3 into armbian:main Jun 5, 2024
6 checks passed
@rpardini
Copy link
Member Author

rpardini commented Jun 6, 2024

I do wonder though: If OPTEE is removed, why does the log still say the following?

WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK

Because that's coming from some other blob (that we do ship), not u-boot. This only disables u-boot OPTEE code.

By the way, NanoPC T6 does have mainline U-Boot support 😉

Yeah, trying it out and will PR soon.

@ColorfulRhino
Copy link
Collaborator

Because that's coming from some other blob (that we do ship), not u-boot. This only disables u-boot OPTEE code.

Ah makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... size/large PR with 250 lines or more
Development

Successfully merging this pull request may close these issues.

4 participants