I come back with some news, thanks for your post it got me interested in init.recovery.*.rc that seemed to be missing (because that’s the files that are use for correct initialization, and I linked it to your watchdog issue thanks to this).
Turns out the main problem was copying the init.recovery.usb.rc from fposos in the correct location for me, now I have a working recovery (yes so far it did not work once for me ^^’). THAT FEELS GREAT (even if it’s just the start !)
I started my own repo from scratch in order to understand how CM works and incorporate FPOpenOS 16.09’s blobs and dt.img but I’d be willing to do a pull request on @Roboe’s repo.
brunch fp2 doesn’t work for some reason (what’s bacon, anyway? Is that the task that package the ROM in a flashable zip?), but lunch cm_fp2-userdebug && mka finally worked,
Debug, debug!
Edit: Yes, bacon task is just for that (plus other fancy things): teamuscellular.com
Edit 2:
This error seems to be related somehow in fact with the lack of recovery folder (librecovery_updater_msm module) on device/qcom/common, as accurately @z3ntu commented on GitHub.
Yes, I have a flashable zip,
Didn’t tried it yet, though; it was late and I have to fetch somehow the file from @Arvil’s server to my computer yet.
I’ll update the fix to GitHub today (Edit: done) and update the wiki post. Later, I’ll try to boot the different partitions and see what works.
I compiled CM without blobs (blob-free), thus the system should spit out by ADB which blobs really need. This was on purpose: I don’t like the big list of blobs FP Open has (including libart.so (!) as a blob is just unacceptable for me), plus I aspire to make some blob-free CM zip we can distribute without any legal issue here, with some tool like the awesome B2G Intaller for any user to make it functional with a single click.
Later, we can try to submit the FP2 to be an official CM device, but that will be a long-term goal.
CyanogenMod’s (OmniROM’s, SlimROM’s, AOKP’s) official supported devices don’t had a license which allow them to redistribute their proprietary blobs either. If that where the case, you would find device blobs on official repos. And you are obviously not. They operate in a legal vacuum (there is USA), because they extract blobs from physical devices, not accepting any license.
Anyway, submitting the FP2 to be an official CM device is not something we will do soon, and we will need a method for users to add their devices’s blobs to the blob-free distribution anyway, so we can have this discussion later on, once a working CM is ready,
Can't install this package on top of incompatible data. Please try another package or run a factory reset
boot.img still incomplete, so it doesn’t boot. (Anyone knows how a zImage works?)
system image boots (with FPoOS boot.img). Then spit the below message through ADB and then reboots after some seconds:
CANNOT LINK EXECUTABLE DEPENDENCIES: library "libNimsWrap.so" not found
This was the expected behaviour, as I explained above this was a blob-free build. I’m going to push one by one the needed blobs and see what we’ve achieved,
Edit: Here is the adb logcat output after adding “libNimsWrap.so”.
(Edit: Oops, I booted without wiping data. Log could be adulterated)
Edit 2: A quick and dirty script to push blobs after flashing blob-free system.img:
IIRC the boot.img is a concatenation of the following parts :
The kernel zImage (z meaning it’s not using uBoot, else it would be uImage) which is basically the output of your kernel’s compilation
The initial ramdisk
The device tree (dt.img)
I managed to make the recovery work by using the zImage and dt.img from the FP Open OS I have on my phone by extracting them first with mkbootimg (I tried abootimg but it doesn’t support extracting the dt.img). If you want to debug your boot.img I’d advise you to try booting normally, then reboot into a working recovery and copy /proc/last_kmsg to your sd card (it’s pretty straightforward with TWRP) to analyse whatever output you get. Good job on managing to get adb logcat to work, I’m jealous ! (edit : woops read your message too fast !)
Now onto my issue, I’ve struggled since two days on a single error I seem to get whenever I’m using my manifest and repos or yours : build fails at hardware/qcom/mediadefault/mm-video-v4l2/vidc/vdec/src/omx_vdec_msm8974.cpp with these errors (I truncated the build log since it happens to be VERY big) :
Errors start at error: 'VDEC_CODECTYPE_MVC' was not declared in this scope for easy ctrl+f. Could someone help me please ? Any idea ? I already tried make clean and make clobber before doing a complete build.
Also, as a separate post to separate notifications, this adb logcat seems to indicate you lack libEGL_*.so or libGLES*.so (per this logcat), this is what I found on my phone :
I pushed the rest of the blobs to test if it would boot and it didn’t… later, I realized data wasn’t formatted, but I haven’t more available time to keep testing, so I restored my FPoOS backup and continued with my life,
I’m trying to build with proprietary files (i.e. blobs) and the audio-effects.h error appears. Removing some system/lib/*.so blobs make the build success, but maybe there are some required blobs missing on the final build (in case it boots, which is probably not, ).
On the other hand, about the boot/recovery ramdisk, I’m having troubles finding which init.*.rc files should we include, and which should CM generate. Anyone…? Or should I have to use the trial and error method?
IIRC I solved the audio-effects error quite a lot of time ago without resorting to removing blobs but as usual dimwit me I forgot to mention how I did it. I can’t vouch this is a perfect fix but it will get you past this during the compilation.
I’ve submitted a pull request on Github on this topic that you might be interested in, accept it if it feels OK.
I am still figuring it out myself. The most useful I’ve found for now are the init.*.rc and ueventd.*.rc in these repos (mainly the first one) that are used to build the OneplusOne :