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

device: add xiaomi-begonia #171

Merged
merged 8 commits into from Jun 29, 2020
Merged

Conversation

@samueldr
Copy link
Member

samueldr commented Jun 26, 2020

This is the first Mediatek device for Mobile NixOS.

Its introduction may help other contributors with similar vintage Meditak devices. The only one I have in mind is the Cosmo communicator.

Quick review of the device

This is not a device you should consider acquiring with the intent of running anything else than the default operating system. It was graciously provided to the project by a friend of mine. The device is extremely fussy and will brick itself harshly with no good reason.

It seems that some validation code for something, maybe the anti-rollback for MIUI, triggers if you look at the device wrongly.

If it weren't for a leaked engineering ROM, this device would be a good e-waste material, and nothing more. Even with the engineering firmware, it is still trivial to brick, the only thing it gives us is a way to unbrick.

Bricks are real enough bricks. Without the engineering firmware, the bricks require an authorized Mi account to fix, which you are unlikely to have (statistically speaking). It's not something trivial like a bootloop where you could go to fastboot to fix. They are real bricks.

I rate this device -1/10, do not buy.

Other things of note

  • Introduction of a clang-based kernel builder (trivial)
  • mkbootimg upgrade (required otherwise it bricks)
samueldr added 3 commits Jun 26, 2020
This is needed to produce boot images that will not brick some MTK
devices, namely xiaomi-begonia.
@samueldr samueldr added the type: port label Jun 26, 2020
@samueldr
Copy link
Member Author

samueldr commented Jun 26, 2020

Hmm, I want to check this out better, but it looks like shutdown is broken. It will boot back up.

It works fine with CFW TWRP, and the non-CFW engineering ROM, even with the CFW installed.

There is also an issue with the battery reporting -1%, but I figure it's "a" battery reporting -1% and other batteries are not, since CFW TWRP reports an appropriate percent.

@samueldr samueldr force-pushed the samueldr-wip:device/xiaomi-begonia branch 2 times, most recently from 556d6f8 to 3557d0c Jun 27, 2020
@samueldr samueldr force-pushed the samueldr-wip:device/xiaomi-begonia branch from 3557d0c to b3563e4 Jun 27, 2020
@samueldr samueldr force-pushed the samueldr-wip:device/xiaomi-begonia branch from b3563e4 to 6e00fa0 Jun 28, 2020
@samueldr
Copy link
Member Author

samueldr commented Jun 28, 2020

Now patched the device tree so the LED defaults to ON, as is the tradition.

@samueldr
Copy link
Member Author

samueldr commented Jun 28, 2020

If #174 had a solution, it would have these caveats listed:

  • Display suspend crashes with a NULL deref in drivers/misc/mediatek/video/mt6785/videox/disp_lcm.c:disp_lcm_suspend
  • Shutdown doesn't stick; it ends up booting back up (the issue hasn't been investigated.)
@samueldr samueldr force-pushed the samueldr-wip:device/xiaomi-begonia branch 2 times, most recently from 6191243 to 6e00fa0 Jun 29, 2020
@samueldr samueldr merged commit 322fdb9 into NixOS:master Jun 29, 2020
6 checks passed
6 checks passed
Parse_nix
Details
Parse_nix
Details
Documentation
Details
Documentation
Details
Instantiation
Details
Instantiation
Details
@samueldr samueldr deleted the samueldr-wip:device/xiaomi-begonia branch Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.