6

General - [INFO] PostmarketOS Linux boot on Xiaomi Pad 5 (nabu) | Page 4 | XDA F...

 1 year ago
source link: https://forum.xda-developers.com/t/info-postmarketos-linux-boot-on-xiaomi-pad-5-nabu.4454143/page-4#post-87511875
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

[INFO] PostmarketOS Linux boot on Xiaomi Pad 5 (nabu)

Right now i have triple boot, MIUI android on boot_a, pmos and windows on boot_b depending on what boot.img you write on boot_b or load with fastboot, pmos and windows have different partitions as i did repartition the storage and used 50% for android (64gb) and the rest in two new partitions for Windows and PostmarketOS.
In the near future i will create a boot loader to have a real triple boot upon reboot.
Nbau as of now can run phosh as the GPU, panel and brightness are working, however, i didn't tested phosh, i am using plasma desktop which is more appropriate for a tablet.

You got me interested. I'm looking forward to the release in pmbootstap and will try to install GSI + PMOS.
Thank you very much for the development.🥰

Reactions: serdeliuk

I have a bit of progress as mentioned on post #1, bluetooth, gpu, panel and brightness are working now.
Basically sound, sensors, cameras and not the last power/battery management remained.
In regards to the power is still WIP, with just a bit of success and still a lot to do.

wow that is so cool, are the drivers for those functions not open-source? I see that often with other devices these functions are partly working(or not at all). Amazing to hear your progress with this! Looking forward to hearing more in the future. I would love to hear more details on struggles with porting PMOS to this tablet.
Good work!

wow that is so cool, are the drivers for those functions not open-source? I see that often with other devices these functions are partly working(or not at all). Amazing to hear your progress with this! Looking forward to hearing more in the future. I would love to hear more details on struggles with porting PMOS to this tablet.
Good work!

All the drivers are opensource and are ported from downstream android kernel (vendor kernel), except panel driver which is extracted from vendor dts. Probably a kernel developer can make this more easy, but to me is fun and learn a lot during the process. While porting a driver you find that the driver has dependencies on other drivers or headers from old kernel, which should be ported either, each new dependency lead to another one and so on, to solve each issue along you need to compile the kernel, operation that sometimes require full recompilation of the kernel, imagine to compile the kernel "100" times.... on a reasonably good computer a full compilation can take around 10 minutes, at least on my i7-12700H with 16GB ram, on my old computer a full compile took approx 30 minutes... the struggle is with time afterall, and with differences between old kernel and the new kernel as som existing functions changed over time, most of them have more or less parameters.

And when you think is done, then you need to add the nodes to the device tree....
And when you think is done, then you need to add the nodes to the device tree....

I would like to see the work of pmos even at this stage. (I once tried to use PMOS on Nexus 10, but gave it up and bought a T550). I mean, some devices do not even have the same functionality that nabu has now. And it's very cool.

I would like to see the work of pmos even at this stage. (I once tried to use PMOS on Nexus 10, but gave it up and bought a T550). I mean, some devices do not even have the same functionality that nabu has now. And it's very cool.

And then is another work to be done, make the stuff public at this stage, without power/battery management, is very risky, it is easy to loose time and get your battery empty, it happened to me and with the fast charger took a lot to recover, initially i thought that i did something wrong that bricked the tablet, well, after an hour in the charger started to display the empty battery icon.
Due to this reason, i am afraid to publish the source of my work and delay this until at least the battery status will work, i see that all pmos developers publish their work as is, but i know how easy is to destroy a lipo battery so i try to avoid this by not publishing the source.

All the drivers are opensource and are ported from downstream android kernel (vendor kernel), except panel driver which is extracted from vendor dts. Probably a kernel developer can make this more easy, but to me is fun and learn a lot during the process. While porting a driver you find that the driver has dependencies on other drivers or headers from old kernel, which should be ported either, each new dependency lead to another one and so on, to solve each issue along you need to compile the kernel, operation that sometimes require full recompilation of the kernel, imagine to compile the kernel "100" times.... on a reasonably good computer a full compilation can take around 10 minutes, at least on my i7-12700H with 16GB ram, on my old computer a full compile took approx 30 minutes... the struggle is with time afterall, and with differences between old kernel and the new kernel as som existing functions changed over time, most of them have more or less parameters.

wow, interesting. If I had a better PC than u Id spare CPU-cycles to recompile for you. for me compiling a kernel takes a loong time on my old i5 3570. Ive done it on Arch but mostly on Gentoo altho I never got a working system up and running on Gentoo.

Id like to learn more about development, unfortunately Im mostly confused. I know a miniscule amount of Python and some BASH-scripting and thats about it atm.

yeah Im afraid of bricking my tablet, I havent even paid it all off yet. with time and hard work your port will become more polished. Id rather wait and try it out later. Ive tested PMOS on my Oneplus 5t but OTG didnt work so no mouse or keyboard worked and the port was never finished. Id was really fun to use the PMOS-tools to compile it all.

I wish I had your skillsets, I like modifying tech .

Reactions: serdeliuk

yeah Im afraid of bricking my tablet, I havent even paid it all off yet. with time and hard work your port will become more polished. Id rather wait and try it out later. Ive tested PMOS on my Oneplus 5t but OTG didnt work so no mouse or keyboard worked and the port was never finished. Id was really fun to use the PMOS-tools to compile it all.

I wish I had your skillsets, I like modifying tech .

You can fool around with an old device that was not yet ported, or even ported, you can pretend that was not ported and try to reinvent the wheel to see what was done. Any device should do as long as the vendor has the android kernel opensource.

I started to port pmos from an existing device that has a similar CPU, xiaomi cepheus, ported the work of Alexei Min, modified the configs and dts until i had something on screen, from there it was a progression of stuff, making ufs tro work and able to boot from device itself, making usb to work as a network adapter and have access to system messages, then make wifi to work, etc, the, migrating all work to latest available kernel, now i think i am 60% done with PMOS port to nabu. but the most important stuff yet to come, the battery

Tryanks

New member
Sep 15, 2022
And then is another work to be done, make the stuff public at this stage, without power/battery management, is very risky, it is easy to loose time and get your battery empty, it happened to me and with the fast charger took a lot to recover, initially i thought that i did something wrong that bricked the tablet, well, after an hour in the charger started to display the empty battery icon.
Due to this reason, i am afraid to publish the source of my work and delay this until at least the battery status will work, i see that all pmos developers publish their work as is, but i know how easy is to destroy a lipo battery so i try to avoid this by not publishing the source.

Does this mean that there is no reserved power for the battery like the native MIUI does? It continues to consume power until the lithium battery enters a suspended state.

Reactions: ProfessorSparrs

Does this mean that there is no reserved power for the battery like the native MIUI does? It continues to consume power until the lithium battery enters a suspended state.

Without something checking how much power is in the battery, no, there is nothing that will stop your device to completely deplete your battery.... note, there is no such suspend state, battery controllers prevents the battery to go lower than a threshold to prevent irreversible battery damages, but that's all, there is nothing that prevent complete battery depletion until the battery safe trigger kick in.

I started to port pmos from an existing device that has a similar CPU, xiaomi cepheus, ported the work of Alexei Min, modified the configs and dts until i had something on screen, from there it was a progression of stuff, making ufs tro work and able to boot from device itself, making usb to work as a network adapter and have access to system messages, then make wifi to work, etc, the, migrating all work to latest available kernel, now i think i am 60% done with PMOS port to nabu. but the most important stuff yet to come, the battery

very exciting! awsm to hear more on the progress . I wouldnt say no to beta-test it if u get the charging to work, or I mean when u get it to work. I have no idea how Id even recover if battery ran out on PMOS due to not being able to charge. cheers

Tryanks

New member
Sep 15, 2022
I have a bit of progress as mentioned on post #1, bluetooth, gpu, panel and brightness are working now.
Basically sound, sensors, cameras and not the last power/battery management remained.
In regards to the power is still WIP, with just a bit of success and still a lot to do.

Can the work you've done in pmos help or reduce your workload for porting any other linux distributions in the future? Out of curiosity, this is just a question with no other purpose.

Can the work you've done in pmos help or reduce your workload for porting any other linux distributions in the future? Out of curiosity, this is just a question with no other purpose.

Hi, indeed, my work in porting PMOS is actually done only at kernel level, when i will be done we will have a complete linux kernel that can be used with any other Linux distribution that has binary packages for aarch64, most of them have.

Reactions: russanandres

emretoprak

New member
Oct 1, 2022 Istanbul
Without something checking how much power is in the battery, no, there is nothing that will stop your device to completely deplete your battery.... note, there is no such suspend state, battery controllers prevents the battery to go lower than a threshold to prevent irreversible battery damages, but that's all, there is nothing that prevent complete battery depletion until the battery safe trigger kick in.

Have you try this karnel patch for battery?

Top Liked Posts

  • I have a bit of progress as mentioned on post #1, bluetooth, gpu, panel and brightness are working now.
    Basically sound, sensors, cameras and not the last power/battery management remained.
    In regards to the power is still WIP, with just a bit of success and still a lot to do.
    I started to port pmos from an existing device that has a similar CPU, xiaomi cepheus, ported the work of Alexei Min, modified the configs and dts until i had something on screen, from there it was a progression of stuff, making ufs tro work and able to boot from device itself, making usb to work as a network adapter and have access to system messages, then make wifi to work, etc, the, migrating all work to latest available kernel, now i think i am 60% done with PMOS port to nabu. but the most important stuff yet to come, the battery
    wow that is so cool, are the drivers for those functions not open-source? I see that often with other devices these functions are partly working(or not at all). Amazing to hear your progress with this! Looking forward to hearing more in the future. I would love to hear more details on struggles with porting PMOS to this tablet.
    Good work!

    All the drivers are opensource and are ported from downstream android kernel (vendor kernel), except panel driver which is extracted from vendor dts. Probably a kernel developer can make this more easy, but to me is fun and learn a lot during the process. While porting a driver you find that the driver has dependencies on other drivers or headers from old kernel, which should be ported either, each new dependency lead to another one and so on, to solve each issue along you need to compile the kernel, operation that sometimes require full recompilation of the kernel, imagine to compile the kernel "100" times.... on a reasonably good computer a full compilation can take around 10 minutes, at least on my i7-12700H with 16GB ram, on my old computer a full compile took approx 30 minutes... the struggle is with time afterall, and with differences between old kernel and the new kernel as som existing functions changed over time, most of them have more or less parameters.

    It is very cool. I sometimes use pmos on 1+6.
    Nabu can run phosh or gnome de?
    And 1+6 has perfect dualboot with split userdata (userdata_a/_b). We can make dualboot too? Ex crdroid 8.8 and pmos?

    Right now i have triple boot, MIUI android on boot_a, pmos and windows on boot_b depending on what boot.img you write on boot_b or load with fastboot, pmos and windows have different partitions as i did repartition the storage and used 50% for android (64gb) and the rest in two new partitions for Windows and PostmarketOS.
    In the near future i will create a boot loader to have a real triple boot upon reboot.
    Nabu as of now can run phosh as the GPU, panel and brightness are working, however, i didn't tested phosh, i am using plasma desktop which is more appropriate for a tablet.

    I would like to see the work of pmos even at this stage. (I once tried to use PMOS on Nexus 10, but gave it up and bought a T550). I mean, some devices do not even have the same functionality that nabu has now. And it's very cool.

    And then is another work to be done, make the stuff public at this stage, without power/battery management, is very risky, it is easy to loose time and get your battery empty, it happened to me and with the fast charger took a lot to recover, initially i thought that i did something wrong that bricked the tablet, well, after an hour in the charger started to display the empty battery icon.
    Due to this reason, i am afraid to publish the source of my work and delay this until at least the battery status will work, i see that all pmos developers publish their work as is, but i know how easy is to destroy a lipo battery so i try to avoid this by not publishing the source.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK