Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "pmos port."
PostMarketOS port rant 2:
Ouuuuu fuck this will be fun.
Got the device to show a logo. Doesnt boot up but who fucking cares. I got logo LUL.
And on top of that. I implemented the ELF support in the PMOS code so i dont have to make my own image like crazy.
Its on review still and have to fix few things tomorrow on it but it works which is most important.
Next time i will post another one of these i will have UART adapter here (Not arduino that i cant use because i dont have the resistors needed to make 5V to 3.3V. FFFFFFFFFFFFFFF)
Then we can debug the shit to hell.2
postmarketOS port day uhmmmmmmmmmmmm 3.
Surprisingly to get a port of it you just need kernel which is hella awesome. What isnt awesome is the boot image of the 2012,2013 sony devices.
This is gonna get technical. If you dont care about it just skip it.
So sony decided that using ELF format for boot image is good idea. And TBH they were kinda right. ARM processor after all can execute ELF natively and work efficiently. Whats the issue then you might ask. Well kinda simple. Normal AOSP boot images are not ELF format. (They kinda are but arent at the same time. Lets just say they contain ELF image at some point). This is of course the google way. Overenginner everything you can.
So why is the ELF image format the issue ? Well to produce this elf image you need special script provided by sony that can make ELF format boot image that you have to compress properly afterwards. OK this sounds OK so whats the issue ? AOSP or well android sources do not support this out of the box. What we need to do is to create a custom way of creating that boot image. Which isnt hard but is just extra unneeded work.
Now when you flash the image it all works as expected.
But what happens if the format isnt right ?
Device will just show blank screen and reboot and so on forever (Or well until battery dies).
Why it cant boot other images is kinda self explanatory. Its different format. OK so it wont boot anything other then custom boot image OK.
Now what does postmarketOS (PMOS from now on) do ?
Well it creates basic AOSP bootimage with custom ramdisk. Which is all fine on most devices. Except here of course.
So that wont boot.
You may just say why dont you just convert it ? Well it isnt that easy. Each elf file has its own header. Which is for that kernel and etc. If it doesnt match eyyyy no boot. So we cant just convert it that easily.
Why not just use the script ? One could do that of course. ( i have not yet done that as its almost midnight and i have test tomorrow). Issue here could be that it still doesnt boot which would mean that something else is wrong. It will most likely work tho. (hopefully)
What i would need now is UART. (Yes phones have UART if you didnt know)
What is that ? Way to communicate and debug the kernel when something is wrong to the point where nothing works. Issue is my UART to USB converter is who knows where and the new one isnt going to be here that soon.
Thats all for now i guess. Long one i know. But well that is the behind the scenes of those kind of things. It isnt as simple as one may think sadly.
It woudlnt be my first and sadly not even last time i would get PM saying to hurry the development or some other shit like that. (Yes people are like that). And when you get issue it isnt as easy as opening duckduckgo and searching it as most likely it will return something which is far from what you are doing.
So if you are that kind of person that sends PMs to devs on XDA to hurry the development or asking when its gonna be done. STOP. Please just stop. We have real life too (I know its hard to believe but well its there) and doing this isnt the only thing we do. Its gonna be done when its gonna be done. And i hope this is gonna at least put some perspective for those people to not send those kinds of messages to us. (We read them. We just dont reply to shit)
TL;DR Sony decided to use different format of bootimage on 2012/3 devices which is pain to generate properly.2
//Before you go i knew this was you. Yes it is Haxk20
I grab 2 devices i have at home. I port postmarketOS to both of them.
One fails to boot because if their shitty fucking kernel.
Enabling virtual terminal crashes ramdisk loading as if that makes any fucking sense but oh well.
One boots up to OS fine. Small issue is touchscreen but can be fixed i guess with little bit of magic.
Anyways. Implement some crap to the ELF support for pmOS and then mainline 1 device.1