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

arm32 support for UFIs #329

Draft
wants to merge 1 commit into
base: msm8916/6.5.2
Choose a base branch
from

Conversation

185264646
Copy link

@185264646 185264646 commented Sep 14, 2023

All of them already have arm64 support in mainline. But for the following reasons, it might be appropriate to add arm32 aupport:

  1. arm64 is only supoorted with an updated tz. It's quite dangerous to flash tz, and it will break the downstream Android system.
  2. arm64 consumes more RAM than arm32, which can not be ignored due to only 512 MiB of RAM (only ~320MiB available) for these devices.

So add arm32 support for them, even when arm64 is available.

Not tested yet.

@stephan-gh
Copy link
Member

Would appreciate if you send this upstream after testing.

@stephan-gh
Copy link
Member

stephan-gh commented Sep 14, 2023

ARM32 dts commit style is ARM: dts: qcom: ...

@185264646
Copy link
Author

Would appreciate if you send this upstream after testing.

Sure.

ARM32 dts commit style is ARM: dts: qcom: ...

Will fix later.

All of them already have arm64 support in mainline. But for the
following reasons, it might be appropriate to add arm32 aupport:

1. arm64 is only supoorted with an updated tz. It's quite dangerous to
   flash tz, and it will break the downstream Android system.
2. arm64 consumes more RAM than arm32, which can not be ignored due to
   only 512 MiB of RAM (~320MiB available) for these devices.

So add arm32 support for them, even when arm64 is available.

Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
@ttimasdf
Copy link

I own a ufi001c device which could help testing this patch, but before hands on it I have some concerns,

  1. Are there any documentations or basic explanations about the differences of tz firmwares? I'm currently running a community-packaged arm64 Debian image (OpenStick) but the maintainer didn't provide any information on this. This device ships with an 32bit arm Android image, so I assume that reflash the stock tz firmware should be enough?
    image
  2. How much memory could this device benefit from a 32bit system comparing to the original one?

@185264646
Copy link
Author

185264646 commented Nov 13, 2023

I own a ufi001c device which could help testing this patch, but before hands on it I have some concerns,

  1. Are there any documentations or basic explanations about the differences of tz firmwares? I'm currently running a community-packaged arm64 Debian image (OpenStick) but the maintainer didn't provide any information on this. This device ships with an 32bit arm Android image, so I assume that reflash the stock tz firmware should be enough?

Read the relevant pmos wiki page pls. https://wiki.postmarketos.org/wiki/Zhihe_series_LTE_dongles_(generic-zhihe)
I think you can keep new tz as-is. It's compatible with both 64/32 bits OS.

image
2. How much memory could this device benefit from a 32bit system comparing to the original one?

I have no idea actually. I've never booted a 32bit kernel and userspace yet. But most RAM are reserved for modem so you can try disable the modem if you don't need a cellular network. It'll free up ~80MB of RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants