Search This thread

Tryanks

Member
Sep 15, 2022
13
14
What kind of issues you had with your partitions? I have created a How TO thread that explains how to resize/re-partition the nabu storage
Resize internal storage on Xiaomi Pad 5 (nabu) and install PostmarketOS Preview
I recovered some memories of:
Specifically, I previously used the automation tool to install WOA just to experience the touch and battery drivers.
In order to break the partition limit of the device, the automation tool moved my splash partition from sda to sde.
In my sda space, the original splash location became unused space, and its partition number 21 was inherited by userdata.

I'm sorry that's all the clues I can provide, as I don't understand the above concept at all.

So this guide article of yours may not help me, I need at least a complete and initial partition table for reference and to resolve the redundant splash partition under sde.
 
I recovered some memories of:
Specifically, I previously used the automation tool to install WOA just to experience the touch and battery drivers.
In order to break the partition limit of the device, the automation tool moved my splash partition from sda to sde.
In my sda space, the original splash location became unused space, and its partition number 21 was inherited by userdata.

I'm sorry that's all the clues I can provide, as I don't understand the above concept at all.

So this guide article of yours may not help me, I need at least a complete and initial partition table for reference and to resolve the redundant splash partition under sde.
Did you had a chance to look over there? At some point full initial patitions allocations are provided.
 

khamai

Member
May 18, 2015
7
0
Hello!
Please tell me how you can run any other linux distribution?
I saw that ArchLinux was launched here.
If I understand correctly, then we need to unpack boot.img. Leave the zImage core. Edit the initrd to mount the rootfs of another linux distribution.
If so, can you share your initrd to launch arch?
 
Hello!
Please tell me how you can run any other linux distribution?
I saw that ArchLinux was launched here.
If I understand correctly, then we need to unpack boot.img. Leave the zImage core. Edit the initrd to mount the rootfs of another linux distribution.
If so, can you share your initrd to launch arch?
In order to run another Linux distribution someone should port that distributions first, then make two images, boot.img and system.img at this stage, booting OSes on devices that are made for a single OS (Android) it is possible by replacing the Android boot.img with the one provided by the desired OS. With other words, for multiple OSes you may end with a bunch of system partitions, let say pmos-system,, arch-system, ubuntu-system, etc on your device, and a few boot.img files for each one, in your hand (sdcard) in order to boot arch-system you may need to chose the right boot.img and use fastboot to boot or flash that one.

At some point, a clever programmer will make a bootloader that will be able boot the system OSes directly, system.img usually contains the boot.img too so a boot loader will be able to boot directly from the system partition just selecting the right partition.
 

khamai

Member
May 18, 2015
7
0
In order to run another Linux distribution someone should port that distributions first, then make two images, boot.img and system.img at this stage, booting OSes on devices that are made for a single OS (Android) it is possible by replacing the Android boot.img with the one provided by the desired OS. With other words, for multiple OSes you may end with a bunch of system partitions, let say pmos-system,, arch-system, ubuntu-system, etc on your device, and a few boot.img files for each one, in your hand (sdcard) in order to boot arch-system you may need to chose the right boot.img and use fastboot to boot or flash that one.

At some point, a clever programmer will make a bootloader that will be able boot the system OSes directly, system.img usually contains the boot.img too so a boot loader will be able to boot directly from the system partition just selecting the right partition.
I plan to use your kernel (from post #1).
If we have a working kernel, then in principle we can run any linux distribution further by creating rootfs, which is not a problem.
I think we need to deal with initrd.
There is also an experience of running grub on our device.
 
I plan to use your kernel (from post #1).
If we have a working kernel, then in principle we can run any linux distribution further by creating rootfs, which is not a problem.
I think we need to deal with initrd.
There is also an experience of running grub on our device.
There are a few bootloaders that may work, you need to search for them.

In regards to the kernel is not enough alone, the kernel alone is useless without the kernel drivers, some of the drivers may be compiled in, others are on system partition, some may be included in initrd (ramdisk) you may need to properly study this reading a lot of docs, I suggest you to start with UBports docs, are the most complete and very well documented.
 
  • Like
Reactions: khamai

olegaslav

Member
Dec 12, 2014
11
1
Hello!
What source code is the kernel for pmos built from?
What format is it compressed in? I need to rebuild the stock kernel so that it boots via grub!
Because the kernel from pmos is perfectly loaded through grub, and the stock kernel is not loaded! I would like to rebuild the stock android kernel so that it can be loaded via grub. Then we'll have a great dualboot!
 
Hello!
What source code is the kernel for pmos built from?
What format is it compressed in? I need to rebuild the stock kernel so that it boots via grub!
Because the kernel from pmos is perfectly loaded through grub, and the stock kernel is not loaded! I would like to rebuild the stock android kernel so that it can be loaded via grub. Then we'll have a great dualboot!
The post #1 contain all the informations you need, if you download the patches from the GitHub you will find the default config too in that archive.
 

olegaslav

Member
Dec 12, 2014
11
1
Tell me, what should I do to compile the kernel for android, so that it boots through grub (like the kernel for pmos)?
 
Last edited by a moderator:
Tell me, what should I do to compile the kernel for android, so that it boots through grub (like the kernel for pmos)?
I don't know, i didn't tested Grub, I suspect that you need to enable kernel compressions as well as dtb append, you may need to compare the pmos defconfig with the one extracted from your device (/proc/config.gz) and try to guess what is going on.
 

olegaslav

Member
Dec 12, 2014
11
1
My device is Xiaomi Pad 5.
I think you know what his defconfig is.
And compression in what format should be? It's just that when I load via grub vmlinuz and initramfs, when loading pmos, the touchscreen does not work. And I can't boot via grub the second initramfs-extra! Because of this, I think the touchscreen does not work!
 
Last edited by a moderator:
My device is Xiaomi Pad 5.
I think you know what his defconfig is.
And compression in what format should be? It's just that when I load via grub vmlinuz and initramfs, when loading pmos, the touchscreen does not work. And I can't boot via grub the second initramfs-extra! Because of this, I think the touchscreen does not work!
This thread is not for Grub boot, you may want to open your own thread and ask your questions, maybe someone with more experience with Grub will help.
 

olegaslav

Member
Dec 12, 2014
11
1
I'm more interested in how you collected the kernel !?
By analogy, I wanted to build a kernel for android on Pad 5!
 
Last edited by a moderator:
I'm more interested in how you collected the kernel !?
By analogy, I wanted to build a kernel for android on Pad 5!
As said I do not know how to help you with Grub, if does not boot can be for too many reasons, you may want to try to the already suggested mods/paths, if does not work then you may need to ask your questions elsewhere.

As a side note, I think the Android kernel is dependent on dtbo partition.
 
Without being sarcastic I think you have a wrong idea about what is OpenSource and what is Code, my CODE is OpenSource and the source code of my work is public. I have published only my modifications, the rest is not mine.

OTHER people already take advantage of my OpenSource CODE and they already ported ArchLinux, based on my CODE.

As far as I can see your complain is about that I provide patches instead of regular kernel repo, I explained the reason already, I do not intend to maintain a kernel repo, please clone the official kernel repo, apply my patches and publish your own version if you think this is better.

If you do not know how to apply those patched you can ask this, it is easy, please see the following steps.

Create a temporary folder
Code:
mkdir -p ~/nabu-kernel

Change to that folder:
Code:
cd ~/nabu-kernel/

Download the official Linux kernel
Code:
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.10.tar.xz

Download my patches
Code:
wget https://github.com/serdeliuk/xiaomi-nabu-sm8150-mainline/releases/download/6.1.10/xiaomi-nabu-sm8150-mainline.6.1.10.tar

Extract archives
Code:
tar -xf linux-6.1.10.tar.xz
tar -xf xiaomi-nabu-sm8150-mainline.6.1.10.tar

And apply patches
Code:
cd linux-6.1.10/
for p in $(ls -1 ../*.patch); do patch -p1 < $p ; done

Now, your folder linux-6.1.10 contain the patched kernel for Nabu, you can create your own GitHub repo and upload that folder and play around.
 
Last edited by a moderator:

khamai

Member
May 18, 2015
7
0
Without being sarcastic I think you have a wrong idea about what is OpenSource and what is Code, my CODE is OpenSource and the source code of my work is public. I have published only my modifications, the rest is not mine.

OTHER people already take advantage of my OpenSource CODE and they already ported ArchLinux, based on my CODE.

As far as I can see your complain is about that I provide patches instead of regular kernel repo, I explained the reason already, I do not intend to maintain a kernel repo, please clone the official kernel repo, apply my patches and publish your own version if you think this is better.

If you do not know how to apply those patched you can ask this, it is easy, please see the following steps.

Create a temporary folder
Code:
mkdir -p ~/nabu-kernel

Change to that folder:
Code:
cd ~/nabu-kernel/

Download the official Linux kernel
Code:
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.10.tar.xz

Download my patches
Code:
wget https://github.com/serdeliuk/xiaomi-nabu-sm8150-mainline/releases/download/6.1.10/xiaomi-nabu-sm8150-mainline.6.1.10.tar

Extract archives
Code:
tar -xf linux-6.1.10.tar.xz
tar -xf xiaomi-nabu-sm8150-mainline.6.1.10.tar

And apply patches
Code:
cd linux-6.1.10/
for p in $(ls -1 ../*.patch); do patch -p1 < $p ; done

Now, your folder linux-6.1.10 contain the patched kernel for Nabu, you can create your own GitHub repo and upload that folder and play around.
Hello! Have you created patches based on the open source android kernel for our device?
 

Top Liked Posts

  • 1
    A couple of off-topic posts, one of which attacked moderation, have been deleted. The moderation team is discussing what if anything needs to be done so the thread is in compliance with our rules and will work directly with the OP if needed. Please keep the discussion on topic; I'll be subscribing to the thread to make sure everyone remains civil. If you have any questions, please feel free to send me a PM.

    Thanks,
    coal686
    Senior Moderator
    Developer Relations Team
  • 4
    Moderator announcement

    This thread provides no kernel or ROM. I have deleted the GPL discussion as off-topic.

    regards
    alecxs
    XDA moderator
    2
    Without being sarcastic I think you have a wrong idea about what is OpenSource and what is Code, my CODE is OpenSource and the source code of my work is public. I have published only my modifications, the rest is not mine.

    OTHER people already take advantage of my OpenSource CODE and they already ported ArchLinux, based on my CODE.

    As far as I can see your complain is about that I provide patches instead of regular kernel repo, I explained the reason already, I do not intend to maintain a kernel repo, please clone the official kernel repo, apply my patches and publish your own version if you think this is better.

    If you do not know how to apply those patched you can ask this, it is easy, please see the following steps.

    Create a temporary folder
    Code:
    mkdir -p ~/nabu-kernel

    Change to that folder:
    Code:
    cd ~/nabu-kernel/

    Download the official Linux kernel
    Code:
    wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.10.tar.xz

    Download my patches
    Code:
    wget https://github.com/serdeliuk/xiaomi-nabu-sm8150-mainline/releases/download/6.1.10/xiaomi-nabu-sm8150-mainline.6.1.10.tar

    Extract archives
    Code:
    tar -xf linux-6.1.10.tar.xz
    tar -xf xiaomi-nabu-sm8150-mainline.6.1.10.tar

    And apply patches
    Code:
    cd linux-6.1.10/
    for p in $(ls -1 ../*.patch); do patch -p1 < $p ; done

    Now, your folder linux-6.1.10 contain the patched kernel for Nabu, you can create your own GitHub repo and upload that folder and play around.
    1
    I haven't had time to continue participating in this thread until recently, and I'm glad to see the numerous advances that have been made in that time.
    I would like to try this mirror, but I've been through too much with my tablet before this time. This resulted in its partition table being unknown to me, especially since the splash partition was moved by an automated tool.
    Is there any way to recover my partition and clear my WOA?
    1
    I plan to use your kernel (from post #1).
    If we have a working kernel, then in principle we can run any linux distribution further by creating rootfs, which is not a problem.
    I think we need to deal with initrd.
    There is also an experience of running grub on our device.
    There are a few bootloaders that may work, you need to search for them.

    In regards to the kernel is not enough alone, the kernel alone is useless without the kernel drivers, some of the drivers may be compiled in, others are on system partition, some may be included in initrd (ramdisk) you may need to properly study this reading a lot of docs, I suggest you to start with UBports docs, are the most complete and very well documented.
    1
    Hello! Have you created patches based on the open source android kernel for our device?
    Indeed, I have ported android drivers from downstream/vendor kernel to linux kernel.
  • 40
    [UPDATE 08 Feb 2023]
    - I am using official linux kernel Linux-6.1.10
    - Preview images are available for download xiaomi-nabu-pmos-preview.6.1.10.tar.gz
    - The GUI user/pass are the standard PMOS ones
    1. user: user
    2. pass: 147147
    - Use the info from this thread about how to resize your internal storage and flash preview images
    1. Resize internal storage on Xiaomi Pad 5 (nabu) and install PostmarketOS Preview
    - Latest stable mainline kernel 6.1.10 for xiaomi pad 5 (nabu) patches are now available (include defconfig), check release section.
    1. Touch pad takes 80 seconds to initialize at boot time, you may need to wait for it.
    2. Battery status does not work yet, i have placed a bash app that can collect battery status from dmesg, you have a shortcut on desktop, do not keep the app open, will drain battery.
    _______________________________
    Donate a coffee to support development:
    Donate via PayPal to serdeliuk



    [UPDATE 23 Jan 2023]
    - XDA staff is pushing me to provide kernel source waving the linux kernel's GPL OpenSource license.
    I am using the latest stable linux kernel which can be found here linux-6.1.7.tar.xz
    - I am using as well some mods made by others which are put together by map220v and this kernel may be found here sm8150-mainline
    - As anyone may know kernel modules/drivers can be closed source and my kernel modules will remain as such until i decide that i am ready to make them OpenSource.

    JUST TO BE NOTED, I DIDN'T PROVIDED YET ANY ROM OR BINARY KERNEL, SO I AM NOT BOUND TO ANY GPL

    [UPDATE 20 Jan 2023]
    - Mainlined to the latest kernel 6.2-rc4
    - Created the HowTo Resize internal storage on Xiaomi Pad 5 (nabu) and install PostmarketOS Preview
    - Preparing the preview images, please check https://github.com/serdeliuk/xiaomi-nabu-postmarketos

    [UPDATE 17 Dec 2022]
    - Fixed battery charging, now battery is charging as well, on slow speed.
    Yet the battery indicator still do not work properly

    [UPDATE 22 Oct 2022]
    - finally working battery status
    1666434328506.png

    1666436173168.jpeg


    [UPDATE 11 Sep 2022]
    - mainlined to 6.0-RC4
    - GPU is finally working
    - panel and brightness is working
    - bluetooths is working

    [UPDATE 2 Jul 2022]
    - mainlined to the latest available kernel, 5.19.0-RC4
    - WiFi finally works
    nabu.wifi.ok.jpg

    Hello,

    I have successfully ported PostmarketOS to my Xiaomi Pad 5 tablet.
    pmos.working.touch.jpg

    I have fixed SPI touchscreen and currently boot from B slot, on A slot is still Android (dual boot)
    WiFI do not work yet and the network is provided via USB, as the ssh access on the tablet too.

    # here you can find the official page for this device
    PostmarketOS Xiaomi-nabu page

    I will keep you posted about the progress.

    Best regards

    M
    10
    I have a bit of success, finally working battery status as you can see on images updated on #1 post
    9
    I have created the official device page, is not ready yet, but a start
    PostmarketOS Xiaomi-nabu page
    9
    It's bluetooth, as well as the Smart Pen, but they don't work in non-stock... GSIs, for exemple
    Thanks for the info, if are bluetooth and if i will make the BT work then for sure I will find a way to make them work, will be a bit difficult to test as i do not have the keyboard or the pen and are a bit expensive....
    There is just a matter of time to make the already ported touchscreen driver from downstream to mainline to have the pen working, in regards to the keyboard that should work directly (without charging) the pogo pins probably have a hall sensor to activate the power output to charge the keyboard when connected, the same should exists on the other side for pen, but those are far away on my development scale, as right now i am trying to bring up the multi touch gestures and prepare a release, as the wifi works, even without GPU the tablet is usable as a Linux device already.
    8
    I have a bit of success here, WiFi finally works, see post #1 for a nice image.