Jump to content

Xiaomi Redmi Note 8 (xiaomi-ginkgo)

From postmarketOS Wiki
Xiaomi Redmi Note 8
Xiaomi Redmi Note 8 running gnome-mobile after selecting willow(8T) on installer
Xiaomi Redmi Note 8 running gnome-mobile after selecting willow(8T) on installer
Manufacturer Xiaomi
Name Redmi Note 8
Codename xiaomi-ginkgo
Released 2019
Type handset
Hardware
Chipset Qualcomm Snapdragon 665 (SM6125)
CPU Octa-core (4x2.0 GHz Kryo 260 Gold
4x1.8 GHz Kryo 260 Silver)
GPU Adreno 610
Display 1080 x 2340 IPS LCD
Storage 32GB, 64GB, 128GB
Memory 3GB, 4GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android (MIUI) 9 (MIUI 10)
Extended version
The most recent supported version from the manufacturer.
Android (MIUI)
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Broken
Battery
Whether charging and battery level reporting work.
Broken
Screen
Whether the display works; ideally with sleep mode and brightness control.
Broken
Touchscreen
Broken
Multimedia
3D Acceleration
Broken
Audio
Audio playback, microphone, headset and buttons.
Broken
Camera
Broken
Connectivity
WiFi
Broken
Bluetooth
Broken
GPS
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Broken
USB OTG
USB On-The-Go or USB-C Role switching.
Broken
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Broken

Contributors

User:Manigohan

Users owning this device

  • Annaaurora (Notes: daily driver running crdroid)
  • ArminRetro (Notes: Try to port lasted android for this)
  • Biswa96
  • Dumpster (Notes: Backup phone with LineageOS vanilla)
  • Ilya114
  • Kierownik223 (Notes: Runs ArrowOS)
  • Manigohan (Notes: secondary backup, wrote memeline dts)
  • Semfault (Notes: Former main, broken)
  • V6lhost (Notes: Main device, running CrDroid 11.2)
  • Vicenre22 (Notes: with ArrowOS custom ROM and backup device)
  • Wdxvvy (Notes: main device running sailfishos with waydroid)
  • Zeroxonef (Notes: Backup phone 1, simless)


How to enter flash mode

Recovery mode

  • Shutdown the device completely.
  • Hold the Volume Up and Power button simultaneously. When Xiaomi logo appears, release Power and keep pressed Volume Up until recovery screen shows up.

Fastboot

  • Shutdown the device completely.
  • Hold the Volume Down and Power button simultaneously, until the "FASTBOOT" text appears.

Installation

$ pmbootstrap init # Vendor: xiaomi Device codename: ginkgo
$ pmbootstrap install
$ pmbootstrap flasher flash_boot
$ pmbootstrap flasher flash_rootfs
$ fastboot erase dtbo

Hardware

Component Name Status Mainline Notes
Accelerometer/Gyroscope BMI160 N Y
Accelerometer/Gyroscope icm4x6xx N N
ALSPS stk3x3x N Y
Magnetometer ak0991x N Y
Audio max98927 N Y
WCNSS wcn3990 N Y Requires modem to be brought up
Fingerprint fpc1020 N N
Fingerprint Goodix N N

UART/Serial

By default, bootloader logs everything to UART until where the kernel loads.

Board RX should only receive 1.8v. 3.3v on a serial adapter works fine for viewing bootloader logs but NOT for shell over serial.

Baud should be 115200.

Bootloader UART logs:

UEFI Start     [  675]
 - 0x05FC01000 [  682] Sec.efi
ASLR        : ON
DEP         : ON (RTB)
Timer Delta : +6 mS
RAM Entry 0 : Base 0x0000000040000000  Size 0x000000003DD00000
RAM Entry 1 : Base 0x00000000C0000000  Size 0x0000000080000000
RAM Entry 2 : Base 0x0000000080000000  Size 0x0000000040000000
UART Buffer size set to 0x8000 
Continue booting UEFI on Core 0
UEFI Ver    : 5.0.220617.BOOT.XF.4.0-00219-NICOBARLAZ-2.434494.1
Build Info  : 64b Jun 17 2022 19:03:40
Boot Device : eMMC
PROD Mode   : TRUE
Retail      : TRUE
HW Wdog Setting from PCD : Disabled
PM0: 45, PM1: 37, 
Panel_CDP_GetID: temp1 =0;temp2 =0
DisplayDxe: tianma panel. 
[CheckPanel] panel reg[0xc] value: 0x00000007, uReponseSize:2
DisplayDxe: Resolution 1080x2340 (1 intf)
------ABL FV already mounted
Disp init wait [ 3455] 
DisplayDxe: istatus = 0 !
DisplayDxe: sravank in Panel_Default_Brightness_Level, eBacklightType = 3!
DisplayDxe: i2c_read status = 0 , read_count = 1
DisplayDxe: read backlight ic 0x00 reg, value = 0x18 
DisplayDxe: i2c_write status = 0 , written_count = 1
DisplayDxe: i2c_write status = 0 , written_count = 1
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3
2379, KeyPressed = 0
2412,bootstate = 0, bootreason =0
-----------------------------
Platform Init  [ 3694] BDS
INFO: UEFI NV tables are enabled as VOLATILE!
UEFI Ver   : 5.0.220617.BOOT.XF.4.0-00219-NICOBARLAZ-2.434494.1
Platform           : IDP
Chip Name          : SM_NICOBAR
Chip Ver           : 1.0
Chip Serial Number : 0xF409E6BB
-----------------------------
zjlz 1111 QcomChargerApp:: ChargerLib_Exit Error getting platform type  
UEFI Total : 3045 ms
POST Time      [ 3720] OS Loader
Loader Build Info: Jun 17 2022 19:41:21
smem protocol = 59811078
get_boardid_from_smem,SUCCESS ,board_id=0x101 ,board_id_hwlevel=9,cpu_id=0x0
get_boardid_from_smem, LK product name is ginkgo,PRODUCT_NAME is ginkgo
get_boardid_from_smem, xbl product name is ginkgo
VB: RWDeviceState: Succeed using rpmb!
 PON Reason is 128 cold_boot:1
Total DDR Size: 0x00000000FDD00000 
KeyPress:0, BootReason:0
Fastboot=0, Recovery:0
GetVmData: No Vm data present! Status = (0x3)
VM Hyp calls not present
Booting Into Mission Mode
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3
2379, KeyPressed = 0
2412,bootstate = 1, bootreason =0
DisplayUtils: logo offset x = 388, y=123!
RenderSplashScreen successfully!
VB2: boot_state = 1
UpdateRollbackSyscall: Older TZ, skipping updateLoad Image vbmeta total time: 1 ms 
avb_slot_verify.c:658: ERROR: vbmeta: Public key used to sign data rejected.
Load Image boot total time: 218 ms 
Load Image dtbo total time: 82 ms 
VB2: Authenticate complete! boot state is: orange
VB2: boot state: orange(1)
Display menu is not enabled!
Device is unlocked, Skipping boot verification
BootLinuxMemory Base Address: 0x40000000
Decompressing kernel image total time: 530 ms
Apply Overlay total time: 268 ms 
smem protocol = 59811078
get_boardid_from_smem,SUCCESS ,board_id=0x101 ,board_id_hwlevel=9,cpu_id=0xF409E6BB
get_boardid_from_smem, LK product name is ginkgo,PRODUCT_NAME is ginkgo
get_boardid_from_smem, xbl product name is ginkgo
PONReason HARD_RESET 0 SMPL 0 RTC 0 DC_CHG 0 USB_CHG 0 PON1 0 CBLPWR 0 KPDPWR 1
GetCheckPanelPressGuid:checkPanel = 0x1;Status:0x0
Error Locate MiToken Protocol:
Error Reading the GetDebugPolicyFlagbuqshuai1
VB: readDebugPolicy: ScmSipSysCall Status: (0x7)
Error Reading the GetDebugPolicyFlagbuqshuai2
Error Get DebugPolicy: Device Error
DebugPolicyFlag: 0x0
Error Get DebugPolicy: 
CMDLINE: AsciiStrLen AsciiStrLen (DebugPolicyFlag);
GetCheckPanelPressGuid:checkPanel = 0x1;Status:0x0
get_hwconfig_cmdline, board_id=0x101
get_hwconfig_cmdline, hwlevel=0x9
get_hwconfig_cmdline, maxcount=0x48
aaaaaa
get_hwconfig_cmdline, i=0x7
Cmdline: console=null androidboot.hardware=qcom androidboot.console=ttyMSM0 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=1 loop.max_part=7 cgroup.memory=nokmem,nosocket buildvar
RAM Partitions
Add Base: 0x0000000040000000 Available Length: 0x000000003DD00000 
Add Base: 0x00000000C0000000 Available Length: 0x0000000080000000 
Add Base: 0x0000000080000000 Available Length: 0x0000000040000000 
ERROR: Could not get splash memory region node
pureason = 80080
Update Device Tree total time: 48 ms 

Shutting Down UEFI Boot Services: 5004 ms
Start EBS        [ 5004] 
BDS: LogFs sync skipped, Unsupported
App Log Flush : 91 ms
Exit EBS        [ 5106] UEFI End

Additional info

DTBO partition

This device is using a dedicated partition to store the Device Tree Blob Overlay. Bootloader attempts to overlay the dtb from dtbo onto the kernel's dtb. If it fails, it enters fastboot mode.

Bootloader UART logs without erasing dtbo:

UEFI Start     [  669]
 - 0x05FC01000 [  676] Sec.efi
ASLR        : ON
DEP         : ON (RTB)
Timer Delta : +6 mS
RAM Entry 0 : Base 0x0000000040000000  Size 0x000000003DD00000
RAM Entry 1 : Base 0x00000000C0000000  Size 0x0000000080000000
RAM Entry 2 : Base 0x0000000080000000  Size 0x0000000040000000
UART Buffer size set to 0x8000 
Continue booting UEFI on Core 0
UEFI Ver    : 5.0.220617.BOOT.XF.4.0-00219-NICOBARLAZ-2.434494.1
Build Info  : 64b Jun 17 2022 19:03:40
Boot Device : eMMC
PROD Mode   : TRUE
Retail      : TRUE
HW Wdog Setting from PCD : Disabled
PM0: 45, PM1: 37, 
Panel_CDP_GetID: temp1 =0;temp2 =0
DisplayDxe: tianma panel. 
[CheckPanel] panel reg[0xc] value: 0x00000007, uReponseSize:2
DisplayDxe: Resolution 1080x2340 (1 intf)
------ABL FV already mounted
Disp init wait [ 3455] 
DisplayDxe: istatus = 0 !
DisplayDxe: sravank in Panel_Default_Brightness_Level, eBacklightType = 3!
DisplayDxe: i2c_read status = 0 , read_count = 1
DisplayDxe: read backlight ic 0x00 reg, value = 0x18 
DisplayDxe: i2c_write status = 0 , written_count = 1
DisplayDxe: i2c_write status = 0 , written_count = 1
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3
2379, KeyPressed = 258
2412,bootstate = 0, bootreason =0
-----------------------------
Platform Init  [ 3692] BDS
INFO: UEFI NV tables are enabled as VOLATILE!
UEFI Ver   : 5.0.220617.BOOT.XF.4.0-00219-NICOBARLAZ-2.434494.1
Platform           : IDP
Chip Name          : SM_NICOBAR
Chip Ver           : 1.0
Chip Serial Number : 0xF409E6BB
-----------------------------
zjlz 1111 QcomChargerApp:: ChargerLib_Exit Error getting platform type  
UEFI Total : 3050 ms
POST Time      [ 3719] OS Loader
Loader Build Info: Jun 17 2022 19:41:21
smem protocol = 5980B078
get_boardid_from_smem,SUCCESS ,board_id=0x101 ,board_id_hwlevel=9,cpu_id=0x0
get_boardid_from_smem, LK product name is ginkgo,PRODUCT_NAME is ginkgo
get_boardid_from_smem, xbl product name is ginkgo
VB: RWDeviceState: Succeed using rpmb!
 PON Reason is 128 cold_boot:1
Total DDR Size: 0x00000000FDD00000 
KeyPress:0, BootReason:0
Fastboot=0, Recovery:0
GetVmData: No Vm data present! Status = (0x3)
VM Hyp calls not present
Booting Into Mission Mode
ReadKeyInternal: gEfiSimpleTextInputExProtocolGuid handles = 3
2379, KeyPressed = 0
2412,bootstate = 1, bootreason =0
DisplayUtils: logo offset x = 388, y=123!
RenderSplashScreen successfully!
VB2: boot_state = 1
UpdateRollbackSyscall: Older TZ, skipping updateLoad Image vbmeta total time: 1 ms 
avb_slot_verify.c:658: ERROR: vbmeta: Public key used to sign data rejected.
Load Image boot total time: 219 ms 
Load Image dtbo total time: 82 ms 
VB2: Authenticate complete! boot state is: orange
VB2: boot state: orange(1)
Display menu is not enabled!
Device is unlocked, Skipping boot verification
BootLinuxMemory Base Address: 0x40000000
Decompressing kernel image total time: 18 ms
ApplyOverlay: ufdt apply overlay failed
Error: Dtb overlay failed
Launching fastboot
Fastboot Build Info: Jun 17 2022 19:41:07
Fastboot: Initializing...
Token Length: 128
VB: readDebugPolicy: ScmSipSysCall Status: (0x7)
Error Get DebugPolicy: Device Error
FastbootCmd:Serial Number Is 0xF409E6BB
Fastboot: Processing commands
Display menu is not enabled!

See also

ginkgo dts in linux-next