6
Haxk20
22d

So you mainlined your phone to the point where UART is working. Amazing right ?
You flash it.
You boot it up and basically nothing happens.
You recheck the adresses and GPIO pins in device tree file. No its all correct.
Then you realize it.
The phone is old and the bootloader has no clue what dts file even is so no luck there. What do you do ?
You append the dts to the kernel image.
Isnt it wonderful that you can make 1 file from 2 and use that as kernel which then takes the dts file and uses it instead of relying on bootloader to do all the shit work for him ? Yeah it is absolutely AMAZING and saves me ton shit lot of time because if it wasnt for this i would be porting U-boot at this point which i really really dont wont to do at this point. Why not ?
Its kinda simple.
When mainlining a phone that doesnt have dts support the bootloader has to set the regulators to the correct values and shit otherwise the phone would die. And the amazing thing is that if i dont specify that regulator in dts it wont be set to anything and it will be at the value bootloader set it to. So its kinda like a safebox for me at this moment.
If i replaced it with uboot (Which i will do once the phone is working on mainline kernel) then the bootloader would not have all the regulators and it will be a shit mess and the phone would most likely die.

Isnt mainlining so much fun ? It IS.

Comments
  • 1
    What's mainlining if you don't mind me asking? I couldn't search for that keyword. From your post, I gather it's about trying to boot desktop os onto phone?
  • 0
    @zerouplink mainlining is a process where you are porting latest Linux kernel to a phone. Most phones run old versions of Linux kernel and by mainlining it you can help the device a lot as you don't have to rebase your work anymore since every device that's mainlined is tested on each kernel version to see if everything works as it should.
  • 0
    Thanks for the explanation. That's interesting. I always thought android kernels are based on Linux but on a different branch. Whats the porting process like? Is it changing the kernel code or tweaking assembly to match the instruction set on the android cpu?
    Is this similar to how people are running kali net hunter on nexus phones?
    And why is the bootloader not grub?
Add Comment