@MartijnBraam wrote:
The current issue with the droid 4 is that I have no idea how to make it boot another initfs/kernel, it seems like the safestrap bootloader can very easily swap out the system and data partition but can't find anything about boot.img
@sre: Could you please tell us how to pass a kernel and initramfs (or alternatively boot.img file which has both) to the Droid 4 with safestrap?
CC: @NotKit
Assuming, that you are using Tony's ddroid repository as a starting point, you need to modify the kexec parameters in system/etc/kexec/kexec, line 36.
This might also be of help (we use arm-sdk when building maemo-leste images):
https://github.com/parazyd/arm-sdk/blob/master/boards/droid4.sh#L109
You just need to add the initramfs and modify the params, as suggested.
Thanks for the pointers guys, that's very helpful!
Alright, so @NotKit, @MartijnBraam, @V13Axel and I were discussing the other day how to properly integrate this into postmarketOS. (They have a Droid 4, I do not, but I want to help with getting pmOS booting on it).
I think the easiest way is using safestrap (vs. kexecboot etc.), as that is what Maemo Leste is also using right now (so it's easy to switch between both for people who want to contribute/test something in both projects).
For reference:
This is how I would approach it:
pmbootstrap installpmbootstrap export to export the system image, kernel and initramfsgenerate_safestrap_zipmkinitfs script, generate the zip file (in the place where we optionally generate a boot.img file)pmbootstrap exportWhat do you think, everyone?
@V13Axel: You wrote something along the lines that you'd love to bring pmOS on your Droid 4, but you were missing the instructions - do you want to give this a shot? We'll help you wherever you get stuck!
@tmlind: I know you recommended droid4-kexecboot over in https://github.com/postmarketOS/pmbootstrap/pull/1039#issuecomment-356178416. Maybe we could support that as well once we have safestrap working, if you're interested in helping us to integrate and testing it.
As far as I can see we can both support kexecboot and safestrap at the same time, for kexecboot we only need a config file in /boot and put it on the SD card. It works mostly like the n900 boot process. The downside is that it requires some extra flashing steps to get droid4-kexecboot on the device.
I think kexecboot is neater if you want to run from SD and safestrap is neater if you want to run from internal storage as dual boot.
Good to see this merged :) Yeah as long we don't add limitations to booting mainline kernels we should support both options. And by limitations I mean there should be no need for hardcoded kernel cmdline, reading options from a VFAT partition for mounting file systems etc. But I guess that's all sorted out by now for most part by NotKit :)
@ollieparanoid: I have my hands full with mainline kernel related issues, so I doubt I can help much beyond my daily average fun tinkering quota of about 30 mins per day of carrying pine needles to the mainline kernel antpile.. But yeah droid4-kexecboot should just work the way standard Linux bootloaders work as MartijnBraam described above.
@MartijnBraam: I think I've pretty much figured out how to make droid4-kexecboot also support pivot_root to the stock kernel (and SafeStrap), we just need to start kexecboot as init process from /sbin/preinit.sh wrapper script. Need a bit more time on that one though.
For the record, I'd really like to get a safestrap image. I'm fighting with Droid 4 (not) booting for 3 days now :-(. I tried the instructions on https://wiki.postmarketos.org/wiki/Motorola_Droid_4_(motorola-maserati) but they did not work for me (and they seem pretty dangerous as they overwrite kernel image used by Cyanogen). Thanks for maemo-leste pointer; it should be useful for bootloader debugging.
@pavelmachek Did you try installing with --no-fde and connecting to device via USB network? Display won't output anything without a tool to activate framebuffer (discussed in pull request #1039).
FYI, I pushed out droid4-kexecboot image last night that now also supports booting to the stock Android distro and SafeStrap. And enables the debug UART as needed and sets default root password based on the SoC die ID.
Most helpful comment
FYI, I pushed out droid4-kexecboot image last night that now also supports booting to the stock Android distro and SafeStrap. And enables the debug UART as needed and sets default root password based on the SoC die ID.