Great news :), WOW! Thanks @Avril!
That should do it (<yoursourcedir>/.repo/local_manifests/fp2.xml
):
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Roboe/android_device_fairphone_fp2" path="device/fairphone/fp2" remote="github" revision="cm-12.1" />
<project name="Roboe/android_kernel_fairphone_fp2" path="kernel/fairphone/fp2" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" revision="cm-12.1" />
</manifest>
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.
Anyone else got news ?
#### make completed successfully ####
Ok, now we are talking, CM,
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.
Edit 3: Ups, I think that was my fault, : android_device_fairphone_FP2/BoardConfig.mk at 13b44eb6428d3555f26291dd1517dd12e074b8b6 Ā· Roboe/android_device_fairphone_FP2 Ā· GitHub (Butā¦ but I had a reason!)
Trying a build with that line commented out.
Edit 4:
Package Complete: /home/android/cyanogenmod/out/target/product/fp2/cm-12.1-20161016-UNOFFICIAL-fp2.zip
make: Leaving directory `/home/android/cyanogenmod'
#### make completed successfully (16:05 (mm:ss)) ####
Yay!
How cool is THAT! So you now have a flashable zip for FP2 :)? Did you yet try to install and boot it?
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.
I donāt think itās possible to submit FP2 as an official device because of our favourite blob licenseā¦ See [HOWTO] ā Compiling Fairphone Open OS / Rooting for exampleā¦
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,
- Trying to flash the generated
zip
via TWRP:
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 FPoOSboot.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 :
1|root@FP2:/ # find / -name libEGL*
/system/lib/libEGL.so
/system/vendor/lib/egl/libEGL_adreno.so
I can extract and provide the following libEGL*.so if you need them.
EDIT : Also for LIBGLES*.so :
1|root@FP2:/ # find / -name libGLES*
/system/lib/libGLES_trace.so
/system/lib/libGLESv1_CM.so
/system/lib/libGLESv2.so
/system/lib/libGLESv3.so
/system/vendor/lib/egl/libGLESv1_CM_adreno.so
/system/vendor/lib/egl/libGLESv2_adreno.so
blobs
folder in my repo (better called in yours as prebuilts
) have kernel
and dt.img
extracted with mkbootimg
,
Thank you for the hints and the boot.img
dissection!
Hmmmā¦ let me take a look, thatās rather odd, Iāve never faced that error myself.
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,
Let see if this afternoon I have some free time.
Hey, as a general information, Iāve moved the repo to the WeAreFairphone organization at GitHub:
We can collaborate better there (accept PR, add collaborators, etc), and I can have my own fork for my tests.
Great ! Could you add me please ? This is my account :
Added. Head to https://github.com/WeAreFairphone or check your email to accept the invitation,
Then Iāll add you to the Builders team to give you access to both CM-related repositories,
Thanks ! 20 characters
Iāve just ran into this great response on StackExchange about boot.img
unpacking and want to share it with you:
Iām currently comparing two boot.img
's ramdisk, one from FP Open and the other from my CM build, to fix CMās booting.
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 :