Tasssadar / multirom

MultiROM for Nexus 7 and LG Optimus One
http://forum.xda-developers.com/showthread.php?t=2011403
GNU General Public License v3.0
413 stars 273 forks source link

Make multirom_zip error #99

Open pavledev opened 8 years ago

pavledev commented 8 years ago

I am trying to compile multirom but I have error: system/extras/multirom/lib/framebuffer.c:1094:17: error: member reference base type 'atomic_int' (aka '_Atomic(int)') is not a structure or union expected.__val = 1; // might be reseted by atomic_compare_exchange_strong

z3ntu commented 8 years ago

Duplicate of #84

sndnvaps commented 8 years ago

i think you should add some kernel head .. to port out the ATOMIC_INT struct

pavledev commented 8 years ago

How to do that?

sndnvaps commented 8 years ago

use grep to grap,, whic kernel head file define ATOMIC_INIT,, then put it to the file..

pavledev commented 8 years ago

Do you mean to define Atomic_int inside makefile of kernel?

sndnvaps commented 8 years ago

include the head file ,which define it .. such as

define XXXX atomic_int

in xxxx.h than include it ..

include

chautruongthinh commented 8 years ago

@Pavlex4, you must remove below line in boardconfig.mk to fix this problem

USE_CLANG_PLATFORM_BUILD := true

pavledev commented 8 years ago

I don't have that line :USE_CLANG_PLATFORM_BUILD := true inside boardconfig.mk!!!!!!

chautruongthinh commented 8 years ago

I got this error with CM13 and i removed it to fix your issue! You can use Omnirom6.0 to compile multirom without any problem

pavledev commented 8 years ago

I have this errors with omni: http://pastebin.com/WctXu75Z

z3ntu commented 8 years ago

Maybe there is something wrong with the MR_QCOM_OVERLAY thing (BoardConfig.mk)

pavledev commented 8 years ago

I have this included inside boardconfig.mk http://pastebin.com/Y90rsaBG

chautruongthinh commented 8 years ago

@Pavlex4 I can't connect to pastebin.com. Can you post your error to https://paste.omnirom.org/??

pavledev commented 8 years ago

MR_USE_QCOM_OVERLAY := true MR_QCOM_OVERLAY_HEADER := "device/samsung/s3ve3g/headers//msm_mdp.h" MR_QCOM_OVERLAY_HEADER2 := "hardware/qcom/msm8x26/kernel-headers/linux/msm_ion.h" MR_QCOM_OVERLAY_CUSTOM_PIXEL_FORMAT := MDP_RGBX_8888

chautruongthinh commented 8 years ago

You can config like my device tree. https://github.com/chautruongthinh/android_device_pantech_ef63s/tree/omnirom6.0

pavledev commented 8 years ago

I don't have this path: MR_QCOM_OVERLAY_HEADER := device/pantech/ef63s/multirom/mr_qcom_overlay.h

chautruongthinh commented 8 years ago

Please creat it and try to compile again. You can copy my mr_qcom_overlay.h

pavledev commented 8 years ago

But I don't have this file inside my device folder: mr_qcom_overlay.h

chautruongthinh commented 8 years ago

Do you have source kernel??

pavledev commented 8 years ago

Yes

chautruongthinh commented 8 years ago

Ok. Now you creat a new folder with name to be "multirom" in your device tree, you must copy msm_ion.h, msm_mdp.h, ion.h in "include/linux" in your kernel to multirom folder. And then copy my mr_qcom_overlay.h to multirom folder

pavledev commented 8 years ago

I configured boardconfig like this:

Multirom

HAVE_SELINUX := true MR_INPUT_TYPE := type_b MR_INIT_DEVICES := device/samsung/s3ve3g/mr_init_devices.c MR_DPI := hdpi MR_DPI_FONT := 216 MR_FSTAB := $(LOCAL_PATH)/recovery/twrp.fstab

End of first RAM region is 0x083fffff, so we set it to for example 0x06500000

MR_KEXEC_MEM_MIN := 0x06500000 MR_KEXEC_DTB := true MR_USE_QCOM_OVERLAY := true MR_QCOM_OVERLAY_HEADER := "device/samsung/s3ve3g/multirom/mr_qcom_overlay.h MR_QCOM_OVERLAY_CUSTOM_PIXEL_FORMAT := MDP_RGBX_8888

MR_INFOS := d$(LOCAL_PATH)/mrom_infos

pavledev commented 8 years ago

But now I have this problem; uild/core/tasks/kernel.mk:271: warning: overriding recipe for target '/home/toor/Desktop/twrp-6.0/out/target/product/s3ve3g/kernel' build/core/Makefile:72: warning: ignoring old recipe for target '/home/toor/Desktop/twrp-6.0/out/target/product/s3ve3g/kernel' target thumb C: libmultirom_static <= system/extras/multirom/lib/framebuffer_qcom_overlay.c /bin/bash: -c: line 0: unexpected EOF while looking for matching `"' /bin/bash: -c: line 1: syntax error: unexpected end of file build/core/binary.mk:801: recipe for target '/home/toor/Desktop/twrp-6.0/out/target/product/s3ve3g/obj/STATIC_LIBRARIES/libmultirom_static_intermediates/framebuffer_qcom_overlay.o' failed make: *\ [/home/toor/Desktop/twrp-6.0/out/target/product/s3ve3g/obj/STATIC_LIBRARIES/libmultirom_static_intermediates/framebuffer_qcom_overlay.o] Error 1

make failed to build some targets (31 seconds)

chautruongthinh commented 8 years ago

Can you send me your full boarconfig?? Do you make clean??

pavledev commented 8 years ago

https://github.com/TeamWin/android_device_samsung_s3ve3g/compare/android-5.1...Pavlex4:patch-1

chautruongthinh commented 8 years ago

why i don't see you multirom folder?? Please push full your device to github

pavledev commented 8 years ago

+MR_QCOM_OVERLAY_HEADER := "device/samsung/s3ve3g/multirom/mr_qcom_overlay.h

chautruongthinh commented 8 years ago

Please push full your device to github

pavledev commented 8 years ago

How to push device to github?

chautruongthinh commented 8 years ago

screenshot from 2016-07-06 22 04 37

pavledev commented 8 years ago

I am using this device tree: https://github.com/LovelyRaccoon/android_device_samsung_s3ve3g-twrp?files=1 and I added multirom folder witg msm_mdp.h and msm_ion.h and mr_qcom_overlay.h

z3ntu commented 8 years ago

@chautruongthinh I have a problem at the qcom overlay stuff: I have copied your mr_qcom_overlay.h file and msm_mdp.h, msm_ion.h and ion.h from my kernel/include/linux directory and put them into my root device folder (I also set the stuff in the BoardConfig), but now I get the following compilation error (with make -j10 multirom_zip):

target thumb C: libmultirom_static <= system/extras/multirom/lib/framebuffer_qcom_overlay.c
target thumb C: trampoline <= system/extras/multirom/trampoline/../../../../device/fairphone_devices/FP2/mr_init_devices.c
In file included from system/extras/multirom/lib/../../../../device/fairphone_devices/FP2/mr_qcom_overlay.h:4:0,
                 from system/extras/multirom/lib/framebuffer_qcom_overlay.c:36:
system/extras/multirom/lib/../../../../device/fairphone_devices/FP2/msm_ion.h:8:2: error: redeclaration of enumerator 'ION_HEAP_TYPE_DMA'
  ION_HEAP_TYPE_DMA = ION_HEAP_TYPE_MSM_START,
  ^
In file included from system/extras/multirom/lib/../../../../device/fairphone_devices/FP2/msm_ion.h:4:0,
                 from system/extras/multirom/lib/../../../../device/fairphone_devices/FP2/mr_qcom_overlay.h:4,
                 from system/extras/multirom/lib/framebuffer_qcom_overlay.c:36:
bionic/libc/kernel/uapi/linux/ion.h:31:2: note: previous definition of 'ION_HEAP_TYPE_DMA' was here
  ION_HEAP_TYPE_DMA,
  ^
make: *** [out/target/product/FP2/obj/STATIC_LIBRARIES/libmultirom_static_intermediates/framebuffer_qcom_overlay.o] Error 1
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (01:13 (mm:ss)) ####

EDIT: I managed to compile it now. I had to change the line #include <linux/ion.h> to #include "ion.h" in msm_ion.h to take the local header (in the device tree) file and had to patch out something different (see #101) EDIT 2: And still not booting...

chautruongthinh commented 8 years ago

@z3ntu You can try to compile with my header kernel. It will fix your problem!!

https://github.com/chautruongthinh/android_device_pantech_ef63s/tree/omnirom6.0/multirom

Note: If your kernel is 5.x, you must delete msm_mdp.h and then rename msm_mdp.h.coloros to msm_mdp.h. Because msm_mdp.h is header of 4.4.2 kernel

z3ntu commented 8 years ago

@chautruongthinh Did you write this message with my edits in consideration? I don't think now the header files are the problem. See #98 for more info.

chautruongthinh commented 8 years ago

Yeh, header files are not the problem!! But you must edit them to compile succes!

z3ntu commented 8 years ago

The compilation succeeds (after patching a bit).

chautruongthinh commented 8 years ago

You don't must pacthing anything!! just replace header kernel files

z3ntu commented 8 years ago

As I said before, the compilation worked now so there is no problem with compiling anymore. Multirom just doesn't start (it never did successfully before).