Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make multirom_zip error #99

Open
pavledev opened this issue Jun 26, 2016 · 38 comments
Open

Make multirom_zip error #99

pavledev opened this issue Jun 26, 2016 · 38 comments

Comments

@pavledev
Copy link

pavledev commented Jun 26, 2016

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
Copy link

z3ntu commented Jun 27, 2016

Duplicate of #84

@sndnvaps
Copy link

sndnvaps commented Jul 2, 2016

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

@pavledev
Copy link
Author

pavledev commented Jul 2, 2016

How to do that?

@sndnvaps
Copy link

sndnvaps commented Jul 2, 2016

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

@pavledev
Copy link
Author

pavledev commented Jul 2, 2016

Do you mean to define Atomic_int inside makefile of kernel?

@sndnvaps
Copy link

sndnvaps commented Jul 3, 2016

include the head file ,which define it ..
such as
#define XXXX atomic_int
in xxxx.h
than include it ..
#include <xxxx.h>

@chautruongthinh
Copy link

chautruongthinh commented Jul 6, 2016

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

USE_CLANG_PLATFORM_BUILD := true

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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

@chautruongthinh
Copy link

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
Copy link
Author

pavledev commented Jul 6, 2016

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

@z3ntu
Copy link

z3ntu commented Jul 6, 2016

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

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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

@chautruongthinh
Copy link

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

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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
Copy link

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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

@chautruongthinh
Copy link

chautruongthinh commented Jul 6, 2016

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

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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

@chautruongthinh
Copy link

Do you have source kernel??

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

Yes

@chautruongthinh
Copy link

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
Copy link
Author

pavledev commented Jul 6, 2016

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
Copy link
Author

pavledev commented Jul 6, 2016

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
Copy link

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

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

@chautruongthinh
Copy link

chautruongthinh commented Jul 6, 2016

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

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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

@chautruongthinh
Copy link

Please push full your device to github

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

How to push device to github?

@chautruongthinh
Copy link

screenshot from 2016-07-06 22 04 37

@pavledev
Copy link
Author

pavledev commented Jul 6, 2016

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
Copy link

z3ntu commented Jul 12, 2016

@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
Copy link

chautruongthinh commented Jul 13, 2016

@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
Copy link

z3ntu commented Jul 13, 2016

@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
Copy link

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

@z3ntu
Copy link

z3ntu commented Jul 13, 2016

The compilation succeeds (after patching a bit).

@chautruongthinh
Copy link

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

@z3ntu
Copy link

z3ntu commented Jul 13, 2016

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants