[WIP] Wayland, libhybris (Plasma Mobile, Mer, Sailfish OS..)

Search This thread

tmlind

Member
Sep 1, 2016
25
49
It is interesting though that utagboot does boot into kexecboot considering that it never booted anything else for me.

Ddroid never worked for me since it requires selinux (to install) which is only present in SS 3.75 but the modules don't work in SS 3.75 (segfaults during kexec).

I have to manually load the modules and run kexec from SS 3.72 to get a mainline kernel to boot.

Hmm sounds like you have some older stock distro with an earlier kernel installed? Care to update your stock distro to VRZ_XT894_9.8.2O-72_VZW-18-8_CFC and try again?

Regards,

Tony

---------- Post added at 20:49 ---------- Previous post was at 20:48 ----------

... by the way, NotKit has made good progress in porting postmarketOS to our droid4 using libhybris: https://github.com/postmarketOS/pmbootstrap/pull/1039
This will probably become usable within a couple of weeks, yeah! :cowboy:

That's great :)
 

ruleh

Senior Member
Jan 12, 2015
344
214
Hmm sounds like you have some older stock distro with an earlier kernel installed? Care to update your stock distro to VR_XT894_9.8.2O-72_VZW-18-8_CFC and try again?

Regards,

Tony

I really did have an older distro...
I was under the impression that I was on VR_XT894_9.8.2O-72_VZW-18-8_CFC already. Oh well...

Now the arrow keys work properly and kexecboot doesn't freeze at the slightest press of a key.
However selecting the mainline kernel (using enter or space or powerbutton) causes it too freeze again.
Omitting a boot.cfg causes the phone to vibrate shortly after selection and present a black screen. Doesn't do anything afterwards.

Using utagboot directly is still the same: black screen and bootloop.

Manually loading modules and kexecing from safestrap 3.72 still works.
I haven't tried 3.75 or ddroid again yet.

When manually kexecing I need to set --image-size=33554433 (or something close to that value).
Maybe something like this is needed for kexecboot as well.
Is there a way to pass the --image-size parameter?
 

tmlind

Member
Sep 1, 2016
25
49
When manually kexecing I need to set --image-size=33554433 (or something close to that value).
Maybe something like this is needed for kexecboot as well.
Is there a way to pass the --image-size parameter?

Thanks you totally got it, I had forgotten about that already :D

Using current kexec-tools and current Linux next kernel the uncompressed kernel size is in zImage. For booting legacy v3.0.8 with the legacy kexec-tools this won't work and we don't have --image-size either.. Best to try to update the legacy kexec-tools patch for more recent kexec-tools.

Meanwhile, after changing the compression ratio from 4 to 6 I was now able to boot my rom-slot1 SafeStrap installed Android image from droid4-kexecboot finally! So I pushed out 2018-01-15 droid4-kexecboot image, maybe give that a try?
 

IM_back!

Member
Jun 12, 2010
26
27
Hi,

can someone provide me with a dd image of mmcblk1p1?

I accedentaly formated mmcblk1p1 instead of mmcblk0p1, i assume this is where the bootloader is located.

Luckaly I realized before rebooting the phone. I now need a dd image of mmcblk1p1 to write back before the phone reboots for any reason.
 

mp107

Senior Member
Mar 13, 2014
160
63
Hi,

can someone provide me with a dd image of mmcblk1p1?

I accedentaly formated mmcblk1p1 instead of mmcblk0p1, i assume this is where the bootloader is located.

Luckaly I realized before rebooting the phone. I now need a dd image of mmcblk1p1 to write back before the phone reboots for any reason.
According to http://batakang.com/XT894.php it's the mbmloader partition.
Here is my mmcblk1p1 (running CM11 ROM) fetched using dd:
http://mp107.5v.pl/juri8cwd78d363d873t78vhgti7w33w864r873wftn53f4y87ve8t/mmcblk1p1.img.zip

But be aware that flashing some partitions from different devices may result in serious bricking your phone.
Use it on your own responsibility.
 
  • Like
Reactions: IM_back!

IM_back!

Member
Jun 12, 2010
26
27
According to http://batakang.com/XT894.php it's the mbmloader partition.
Here is my mmcblk1p1 (running CM11 ROM) fetched using dd:
http://mp107.5v.pl/juri8cwd78d363d873t78vhgti7w33w864r873wftn53f4y87ve8t/mmcblk1p1.img.zip

But be aware that flashing some partitions from different devices may result in serious bricking your phone.
Use it on your own responsibility.

Thank you!
I diff'ed your mmcblk1p1 against mbmloader.bin and discoverd that they are identical except a bunch of 0 at the end. So i dd'ed your mmcblk1p1.img over mine. The phone boots fine.

Close one :D
 

IM_back!

Member
Jun 12, 2010
26
27
So im trying to boot lineageOS 14.1 with kexecboot (2018-01-18) but im not haveing any luck.

I formated mmcblk1p22 ext4 and extracted the zImage and initrd.img from boot.img. device_tree.bin was taken from stock cdma_maserati_9.8.2O-72_VZW-18_1ff.

my preinstall looks like this:
Code:
└── boot
    ├── boot.cfg
    └── slot1
        ├── device_tree.bin
        ├── initrd.img
        └── zImage

my boot.cfg looks like this:

Code:
LABEL=Android
PRIORITY=10
DTB=/boot/slot1/device_tree.bin
KERNEL=/boot/slot1/zImage
INITRD=/boot/slot1/initrd.img
CMDLINE="androidboot.safestrap.romslot=rom-slot1"
TIMEOUT=10

The phone locks up when selecting "Android" to boot from. It boots fine from slot 1 when bootet via safestrap. Am i missing something? how dose "androidboot.safestrap.romslot=rom-slot1" tell the kernel where to look for the android images?

EDIT: not very related to Wayland or libhybris. maybe Kexecboot needs its own thread.
 
Last edited:

tmlind

Member
Sep 1, 2016
25
49
my preinstall looks like this:
Code:
└── boot
    ├── boot.cfg
    └── slot1
        ├── device_tree.bin
        ├── initrd.img
        └── zImage

Hmm sounds like you're close :) You also need to copy SafeStrap atags file to boot/slot1/atags as the kexec wrapper script uses that for the legacy v3.0.8 kernels. Otherwise there is currently no way to pass non-standard options to kexec from kexecboot. I wonder what else might be missing from the documentation..

And please check you're using droid4-kexec boot 2018-01-18 images, I fixed modifying the SafeStrap config for the slot number.

Then the next hurdle is to modify initrd.img start up so it no longer relies on safestrap/active_slot and can be used on a raw partition. Or have you patched your initrd.img already to use mmcblk1p22 somehow?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    I think the pyra tree has sgx working for omap3 and omap5, including tiler for omap5 so that might be usable for some omap4 patches too?

    Regarding the droid 4 mainline kernel status, I'm still hoping to get the PMIC core support merged for v4.11. Then I have a regulator driver working and and a basic USB and UART multiplexing driver. Those need still cleaning up before posting though. The pending TI LMU patchset seems to get the LCD backlight working for the lm3532, and now I'm trying to get the LCD working for fun :laugh: I guess it should work with omapdrm and panel-dsi-cm with some modifications. Anyways, hoping to be posting more patches over next few weeks and some kernel test branch to play with.

    OK got the LCD console working last night:) That's with omapdrm with most of the kernel.org sre/linux-n900.git patches in n950-display branch. I still have some pixelclock getting miscalculated issues and need to clean up things, but then should be able to post a test branch to play with. No idea what it might take to get the rest of the accelerated graphics going but hopefully others people can take it from there.
    8
    Not very usable at least with just omapdrm.. But still a fun test :)

    OK finally posted the WIP patches I'm using against Linux next currently at droid4-wip-next-20170203:
    http://muru.com/linux/d4/patches/

    What works currently is MMC, eMMC, WLAN, keyboard, LCD and touchscreen. For UART,
    you need the custom cable and make sure VBUS is not connected.
    7
    OK got the LCD console working last night:) That's with omapdrm with most of the kernel.org sre/linux-n900.git patches in n950-display branch. I still have some pixelclock getting miscalculated issues and need to clean up things, but then should be able to post a test branch to play with. No idea what it might take to get the rest of the accelerated graphics going but hopefully others people can take it from there.

    Not very usable at least with just omapdrm.. But still a fun test :)
    d4-wayland.jpg


    ---------- Post added at 22:34 ---------- Previous post was at 22:09 ----------

    Why can I not get anything to draw on the framebuffer? No idea.
    Code:
    cat /dev/urandom > /dev/graphics/fb0
    XDG_RUNTIME_DIR=/home/phablet weston --tty=0 --backend=fbdev-backend.so --device=/dev/graphics/fb0
    And so on.
    This needs someone more qualified than me. Maybe we can collect bounties or something? I chip in with 50€ for a running wayland client. :good: :cowboy:

    My guess is that the dss kernel driver is missing LCD command mode flush based on the framedone interrupt if nothing shows up.
    Won't help with the segfault though.
    7
    FYI,

    All of the latest branches for Wayland, libhybris, etc use the DRM API for rendering. (Look at Linux kernels 3.10+). This is probably why you're seeing a segmentation fault as those nodes don't exist in our 3.0 kernel setup.

    To add to this complexity you would need new OMAP4430 PVR binaries built for DRM to match up with said newer kernel. (Our kernel GPU blobs use the framebuffer API in 3.0 kernel).

    - Hash
    5
    Yes, unfortunately the robtaylor github is based on PVR version 1.9.2166536 which is about 4 years old now. :/

    I think the pyra tree has sgx working for omap3 and omap5, including tiler for omap5 so that might be usable for some omap4 patches too?

    Regarding the droid 4 mainline kernel status, I'm still hoping to get the PMIC core support merged for v4.11. Then I have a regulator driver working and and a basic USB and UART multiplexing driver. Those need still cleaning up before posting though. The pending TI LMU patchset seems to get the LCD backlight working for the lm3532, and now I'm trying to get the LCD working for fun :laugh: I guess it should work with omapdrm and panel-dsi-cm with some modifications. Anyways, hoping to be posting more patches over next few weeks and some kernel test branch to play with.