[Kernel] [MAINLINE] [Linux-5.XX BASED] [GCC9] Mainline Linux For Xiaomi Mi6 [New Update 5.11.14]

Search This thread
Aug 13, 2013
29
5
Code:

* Your warranty is now void.
* I'm not responsible for anything that may happen to your phone by installing any custom kernels.
* You do it at your own risk and take the responsibility upon yourself and you are not to blame us or XDA and its respected developers.

Code:

This is a mainline linux port with some out of tree patch for DRM/PANEL and GPU
not tested on Android yet . Only ARM Linux distributions are been tested

How to test :

Make a new folder on /data/.stowaways
Grab any Linux OS you want to test place the rootfs on /data/. stowaways/postmarketOS.img
mount your rootfs and copy kernel modules on /lib/modules/ and also copy firmware file to /lib/firmware/
Than flash the kernel bellow and reboot


Note:

Wifi currently dos not works out of the box but if anyone want to try it just flow below guide


Update 25/04/2021:
+ update linux to 5.11.14
+ battery status are working now (charging may or may not work)
+ wifi working with some additional step along with firmware attached below
+ Bluetooth working fine
+ DRM/PANEL working via JDI-FHD-R63452
+ GPU working with mesa gallium driver
+ Haptics
+ Touchscreen using mainline RMI4
+ Vol Up key
+ Power button


NB: for wifi you will need
  • Install the following packages: pd-mapper, tqftpserv, qrtr & rmtfs
using your package manager if they are available if not clone than from this repo <https://github.com/jhugo/linux/tree/5.5rc2_wifi> and build and install
than clone & build & install diag-router from <https://github.com/andersson/diag>
run:
/bin/diag-router &
systemctl start rmtfs tqftpserv pd-mapper
After that you will be able to connect to the wifi successful




See screenshot bellow of a running Manjaro plasma-mobile OS

Screenshot_20210416_174020~2.pngScreenshot_19700308_181633.png

Screenshot_20210416_174837.pngScreenshot_19700308_181422.png

Ubuntu 21.04

Screenshot from 2021-03-17 14-43-20.png Screenshot from 2021-03-17 13-46-19.png
Screenshot from 2021-03-17 13-55-35.pngScreenshot from 2021-03-17 14-50-11.png
and this thered edited on Debian 11 with phosh gui

Source :

 

Attachments

  • 5.11-rc4-xiaomi-msm8998.img
    21.8 MB · Views: 293
  • 5.11.14-xiaomi-msm8998.img
    7.9 MB · Views: 237
  • 5.11.14-xiaomi-msm8998.zip
    17.4 MB · Views: 324
  • firmware.zip
    45 MB · Views: 371
  • Screenshot_19700308_180851.png
    Screenshot_19700308_180851.png
    208 KB · Views: 2,047
Last edited:
Aug 13, 2013
29
5

artful

Member
Mar 28, 2006
7
8
Fstab is empty。
I think it is possible that the SDCard is not decrypted, so I will try it when I have spare time.
 

Attachments

  • fstab.txt
    126 bytes · Views: 46

hajking

Member
May 18, 2014
38
5
Istanbul
Yes the kernel has been compiled with anbox support as well

so where is the complete installation guide? i mean step by step. i downloaded manjaro lomiri from here but no chance amd i tried kde beta4. it gives kernel panic. am i doing right?
1. copy postmarketOS.img
2. flash kernel.img
3. reboot
should i change file system to f2fs?
 
Last edited:
Aug 13, 2013
29
5
so where is the complete installation guide? i mean step by step. i downloaded manjaro lomiri from here but no chance amd i tried kde beta4. it gives kernel panic. am i doing right?
1. copy postmarketOS.img
2. flash kernel.img
3. reboot
should i change file system to f2fs?
For manjaro lomiri you will need to empty /etc/fstab from any partition mount point
Also can you provide pic or dmesg to see the error
 
Aug 13, 2013
29
5
is there any created log file?
how can i empty fstab?
is the kernel verison of img file important?
it's depending on what os your using . But most of than log file will be under /var/log.

just open it with a text editor and remove all line there.

I recommend you to use the last kernel version I uploaded Wich you will have to Copy the kernel modules to rootfs .
 
Last edited:

pugna

New member
Aug 24, 2021
1
0
Hello , I got error saids "
Error: ../arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi:516.1-17 syntax error
FATAL ERROR: Unable to parse input tree " while compling with pmboostrap or "envkernel.sh".

Would u please help check this?
 
Aug 13, 2013
29
5
Hello , I got error saids "
Error: ../arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi:516.1-17 syntax error
FATAL ERROR: Unable to parse input tree " while compling with pmboostrap or "envkernel.sh".

Would u please help check this?
Look at line 516 on sagit dtsi file under /arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dtsi it has some error
You can link me the source if you want more help
 
Last edited:

xiaoyaozi

Member
Aug 27, 2022
9
0
能不能给个详细的教程,我不知道怎么做 能不能给个详细的教程,我不知道怎么做
 

adryyy

Senior Member
Nov 3, 2012
161
83
Download a compatible image or create one using pmbootstrap (see 1, 2)(advanced).

Pmbootstrap: basically the same standard process, but using split:
Code:
pmbootstrap init -> Xiaomi -> Sagit
pmbootstrap install --split
pmbootstrap export
adb shell mkdir /data/.stowaways
adb push /tmp/postmarketOS-export/xiaomi-sagit-root.img /data/.stowaways/postmarketOS.img
Note: image should contain only the rootfs partition.

This should boot, but there will be errors because lack of this exact kernel moduels, to fix this, edit the .img.
You should be able to do this with other arm64 .img, containg only rootfs, also.

Inside the image:
You can do this on your Linux PC or directly on phone using TWRP.
Copy kernel modules from 5.11.14-xiaomi-msm8998.zip to /lib/modules/
Copy firmware files from firmware.zip to /lib/firmware/.
E.g. using TWRP:
Code:
adb push 5-11-14-xiaomi-msm8998.zip /sdcard
adb push firmware.zip /sdcard
adb shell
cd /sdcard
unzip 5-11-14-xiaomi-msm8998.zip
unzip firmware.zip
mkdir /mnt/rootfs
mount -o loop -t ext4 /data/.stowaways/postmarketOS.img /mnt/rootfs
cp -r 5.11.14-xiaomi-msm8998/ /mnt/rootfs/lib/modules
cp -r firmware/* /mnt/rootfs/lib/firmware/
umount /mnt/rootfs/
reboot
 

wfly

New member
Feb 17, 2015
3
0
hunan
OnePlus 7 Pro
Seems all firmware files was included in postmarketos edge channel now, but wifi isn't working 😔

Update: v6.1_rc3 fixs it.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Code:

    * Your warranty is now void.
    * I'm not responsible for anything that may happen to your phone by installing any custom kernels.
    * You do it at your own risk and take the responsibility upon yourself and you are not to blame us or XDA and its respected developers.

    Code:

    This is a mainline linux port with some out of tree patch for DRM/PANEL and GPU
    not tested on Android yet . Only ARM Linux distributions are been tested

    How to test :

    Make a new folder on /data/.stowaways
    Grab any Linux OS you want to test place the rootfs on /data/. stowaways/postmarketOS.img
    mount your rootfs and copy kernel modules on /lib/modules/ and also copy firmware file to /lib/firmware/
    Than flash the kernel bellow and reboot


    Note:

    Wifi currently dos not works out of the box but if anyone want to try it just flow below guide


    Update 25/04/2021:
    + update linux to 5.11.14
    + battery status are working now (charging may or may not work)
    + wifi working with some additional step along with firmware attached below
    + Bluetooth working fine
    + DRM/PANEL working via JDI-FHD-R63452
    + GPU working with mesa gallium driver
    + Haptics
    + Touchscreen using mainline RMI4
    + Vol Up key
    + Power button


    NB: for wifi you will need
    • Install the following packages: pd-mapper, tqftpserv, qrtr & rmtfs
    using your package manager if they are available if not clone than from this repo <https://github.com/jhugo/linux/tree/5.5rc2_wifi> and build and install
    than clone & build & install diag-router from <https://github.com/andersson/diag>
    run:
    /bin/diag-router &
    systemctl start rmtfs tqftpserv pd-mapper
    After that you will be able to connect to the wifi successful




    See screenshot bellow of a running Manjaro plasma-mobile OS

    Screenshot_20210416_174020~2.pngScreenshot_19700308_181633.png

    Screenshot_20210416_174837.pngScreenshot_19700308_181422.png

    Ubuntu 21.04

    Screenshot from 2021-03-17 14-43-20.png Screenshot from 2021-03-17 13-46-19.png
    Screenshot from 2021-03-17 13-55-35.pngScreenshot from 2021-03-17 14-50-11.png
    and this thered edited on Debian 11 with phosh gui

    Source :