Xiaomi Mi 6 (xiaomi-sagit): Difference between revisions
Tags: mobile edit mobile web edit |
Tags: mobile edit mobile web edit |
||
Line 72: | Line 72: | ||
== USB OTG == | == USB OTG == | ||
Tested USB Hub with ethernet adapter, USB Audio device, and HID peripherals. Everything works well. | Tested USB Hub with ethernet adapter, USB Audio device, and HID peripherals. Everything works well. | ||
NB: only on downstream | NB: only on downstream, on mainline you need to use edk2 UEFI as a bootloader if you want OTG support | ||
== Mainline kernel == | == Mainline kernel == |
Revision as of 07:45, 15 January 2022
![]() Xiaomi Mi 6 | |
Manufacturer | Xiaomi |
---|---|
Name | Mi 6 |
Codename | xiaomi-sagit |
Released | 2017 |
Hardware | |
Chipset | Qualcomm MSM8998 Snapdragon 835 |
CPU | Octa-core (4x 2.45GHz Kryo 280 + 4x 1.9GHz Kryo 280) |
GPU | Adreno 540 |
Display | 1920x1080 IPS LCD |
Storage | 64/128 GB |
Memory | 6 GB |
Architecture | aarch64 |
Software | |
Original software | Android 7.1.1 |
postmarketOS | |
Category | testing |
Pre-built images | no |
Mainline | yes |
Flashing |
Works |
---|---|
USB Networking |
Works |
Internal storage |
No data |
SD card |
No data |
Battery |
Works |
Screen |
Works |
Touchscreen |
Works |
Multimedia | |
3D Acceleration |
Works |
Camera Flash |
No data |
Connectivity | |
WiFi |
Works |
Bluetooth |
Works |
GPS |
Works |
NFC |
Works |
Modem | |
Mobile data |
No data |
Miscellaneous | |
FDE |
Works |
USB OTG |
Partial |
HDMI/DP |
No data |
Sensors | |
Magnetometer |
No data |
Ambient Light |
No data |
Proximity |
No data |
Hall Effect |
No data |
Haptics |
No data |
Barometer |
No data |
Contributors
- Hacker420
- MayeulC
- Illen
- Degdag (mainlining)
Users owning this device
- 202 (Notes: 6/128)
- ArianK16a (Notes: MCE16, 6/64, LineageOS 21)
- Degdag
- Dsankouski (Notes: Daily driver, lineageOS 17.1)
- Rom4nik (Notes: 6/64 model)
How to enter flash mode
- Power + Volume Down buttons or use TWRP reboot bootloader, or adb reboot bootloader
Installation
Use pmbootstrap flasher.
Virtual terminal
Virtual terminal is broken in downstream, causing early reboot without logs in pstore. This patch is needed to make virtual terminal working properly.
Input
Touchscreen works well on gnome. All the buttons except for home button (which is is integrated with fingerprint scanner) are working.
Display
Seems to work well. Currently only xfce4 and mate and gnome have been tested.
USB OTG
Tested USB Hub with ethernet adapter, USB Audio device, and HID peripherals. Everything works well. NB: only on downstream, on mainline you need to use edk2 UEFI as a bootloader if you want OTG support
Mainline kernel
Here's a list of stuff that is currently (Linux 5.15.0-rc5) known to be working (in at least some capacity):
- The kernel itself stays booted (i.e. no random panics) and is "stable"
- UFS internal storage (
CONFIG_PHY_QCOM_UFS=y
) - Display (via Panel via JDI FHD R63452 (not on upstream yet))
- Touchscreen using mainline RMI4
- Xorg & Wayland (tested with MATE & Weston respectively)
- Bluetooth
- Power button
- Volume up
- Volume down
- USB Networking
- GPU
- GPS
- Haptics
- WiFi
- NFC
Check the links below for source code.
Building
It's easiest to build mainline (for pmOS anyway) with pmbootstrap, so get that setup and remember the install location (in this guide ~/pmOS/pmbootstrap
is an example).
After you've run through the installation steps found on this site at least once please pmbootstrap extract
& save the produced downstream boot.img
to a known location as we'll reuse the initramfs found inside later.
Next start following the instructions below:
git clone https://github.com/degdag/W.I.P_sagit_mainline.git cd W.I.P_sagit_mainline/ source ~/pmOS/pmbootstrap/helpers/envkernel.sh # adjust to match where you've cloned PMB yourself make sagit_defconfig make -j`nproc`
Boot image generation
Now that the kernel image and DTBs have been built we can assemble a bootable Android-friendly boot.img (assuming you're still in the root of the cloned kernel dir):
pmbootstrap chroot -- apk add abootimg android-tools mkbootimg dtbtool export DEVICE=`pmbootstrap config device | cut -d'-' -f2` WORK=`pmbootstrap config work` PMOS_BOOT_IMG_PATH="~/pmOS/downstream-boot.img" export TEMP="$WORK/chroot_native/tmp/mainline/" DTB="$PWD/.output/arch/arm64/boot/dts/qcom/msm8998-$DEVICE.dtb" rm -r "$TEMP"; mkdir -p "$TEMP" cat .output/arch/arm64/boot/Image.gz "$DTB" > "$TEMP/Image.gz-dtb" cp "$PMOS_BOOT_IMG_PATH" "$TEMP/boot.img" # replace "$PMOS_BOOT_IMG_PATH" with the known location of a pmOS downstream boot.img pmbootstrap chroot -- abootimg -u /tmp/mainline/boot.img -k /tmp/mainline/Image.gz-dtb -c "bootsize=67108864"
At this point you get to choose whether to boot
the new kernel image or more "permanently" flash
it on the device's boot partition instead ^^
Boot: pmbootstrap chroot -- fastboot boot /tmp/mainline/boot.img
Flash: pmbootstrap chroot -- fastboot flash boot /tmp/mainline/boot.img
Bootloader
An EDK-II port exists.
See also
mainline pmaports fork