Help compiling Alcatel Flint (5054O) kernel - Android Q&A, Help & Troubleshooting

Hi everyone,
I just purchased this pre-paid phone for its 5.5" screen and cheap price ($50). It's from Cricket Wireless. There are also similar models for Metro PCS and T-Mobile under One Touch Fierce XL (5054N), and Pop 3 5.5" 4G (5054X, 5054S).
The phone can be rooted easily though the Alcatel App, 'System Updates', then SuperSU can be installed, followed by TWRP and Xposed. I have done this before and it's fairly easy based on posts on XDA.
I want to add USB OTG features since it is hardware supported. I looked on SourceForge for the Alcatel 5054O kernel, but only found one called 'OT_5054_20160504'. Under kernel/arch/arm/configs I only found 'pop3_defconfig' so I used this as a start .config hoping it would work.
Did make menuconfig, loaded default values, found USB settings, added support for OTG, then save.
cross-compile on Ubuntu 16.04 with arm-eabi-4.6.
I have gcc version 5.4.0
after make, I get errors related to the touchscreen:
drivers/input/touchscreen/synaptics_rmi_dev.c: In function 'rmidev_init_device':
drivers/input/touchscreen/synaptics_rmi_dev.c:582:39: error: dereferencing pointer to incomplete type
drivers/input/touchscreen/synaptics_rmi_dev.c:589:29: error: dereferencing pointer to incomplete type
drivers/input/touchscreen/synaptics_rmi_dev.c:595:4: error: dereferencing pointer to incomplete type
scripts/Makefile.build:308: recipe for target 'drivers/input/touchscreen/synaptics_rmi_dev.o' failed
make[3]: *** [drivers/input/touchscreen/synaptics_rmi_dev.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[2]: *** [drivers/input/touchscreen] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[1]: *** [drivers/input] Error 2
Makefile:832: recipe for target 'drivers' failed
make: *** [drivers] Error 2
Not sure how to proceed from here. Is this an error because I just have the wrong kernel, or wrong defconfig, or wrong gcc version? I remember seeing somewhere that the stock kernel was compiled with gcc 4.8 (I used gcc 5.4.0).
I did a factory reset on the phone, rooted, added SuperSU, TWRP (to backup) and nothing changed. I thought maybe Xposed was interfering.
Any help would be appreciated!

Related

[Q] Preempt-rt and Android

Hey guys!
I'm working on a project that includes a task to achieve a real-time Android. Did anyone of you guys already tried that?
I patched the kernel with the Preempt-rt patch and tried to compile it but I got this error:
CC kernel/user.o
CC kernel/signal.o
kernel/signal.c: In function 'complete_signal':
kernel/signal.c:1018:6: warning: 't' is used uninitialized in this function [-Wuninitialized]
error, forbidden warning: signal.c:1018
scripts/Makefile.build:307: recipe for target 'kernel/signal.o' failed
make[1]: *** [kernel/signal.o] Error 1
Makefile:949: recipe for target 'kernel' failed
make: *** [kernel] Error 2​
Can someone help me with this please? I looked for solutions but I couldn't find anything. Thanks in advance

Kernel Compiling Error

Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Any ideas?
Kernel Compilation
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
I guess you are looking on another file.
Code:
error, forbidden warning: dynamic_debug.h:75
I guess there is a problem in dynamic_debug.h in line 75. I guess you need to initialise something.
Here is dynamic_debug.h but I can't find the problem.
I will appreciate any opinion.
Try this method!
srsdani said:
Here is dynamic_debug.h but I can't find the problem.
Click to expand...
Click to collapse
I am not much used to kernel related development but I analysed your dynamic_debug.h and found the problem (maybe a problem):
Normally, a do-while loop syntax is this:
Code:
do
{
Statement1;
Statement2;
...
}while(condition);
But I don't see a semicolon in the end of those loops in your code. This maybe a syntax error.
Also analyse these codes:
Code:
#if defined(CONFIG_DYNAMIC_DEBUG)
extern int ddebug_remove_module(const char *mod_name);
extern __printf(2, 3)
int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...);
struct device;
extern __printf(3, 4)
int __dynamic_dev_dbg(struct _ddebug *descriptor, const struct device *dev,
const char *fmt, ...);
struct net_device;
extern __printf(3, 4)
int __dynamic_netdev_dbg(struct _ddebug *descriptor,
const struct net_device *dev,
const char *fmt, ...);
Every intialisation has 4 protocols but the first initialisation contain only 3.
Try the above things and tell me back if it works or not.
So, the problem was in Makefile and .config. I compared and added some flags from Mako (from franco) and it worked. I still have some warning/s, some breakpoints but at least now it's working. Anyway, this thread may be useful for all of us. Thanks a lot for help.
Now, another problem.
Code:
CC fs/proc/loadavg.o
CC fs/proc/meminfo.o
fs/proc/meminfo.c: In function ‘meminfo_proc_show’:
fs/proc/meminfo.c:175:1: internal compiler error: in optimize_sc, at modulo-sched.c:1069
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.launchpad.net/gcc-linaro> for instructions.
make[2]: *** [fs/proc/meminfo.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2
[email protected]:~/kernel2$
With linaro 4.8.3 => OK;
linaro 4.8.3 + A15 optimize=> fail, error above. meminfo.c it's exactly like the one from nexus 4.
FIX: compiler bug;
srsdani said:
Code:
CC net/netfilter/xt_qtaguid.o
CC net/netfilter/xt_quota.o
CC net/netfilter/xt_quota2.o
CC net/netfilter/xt_socket.o
In file included from include/linux/kernel.h:23:0,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from net/netfilter/xt_socket.c:13:
net/netfilter/xt_socket.c: In function 'xt_socket_get4_sk':
include/linux/dynamic_debug.h:75:21: warning: 'protocol' may be used uninitialized in this function [-Wmaybe-uninitialized]
error, forbidden warning: dynamic_debug.h:75
make[2]: *** [net/netfilter/xt_socket.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
[email protected]:~/kernel$
Original file here.
I'm using ndk gcc 4.8. This error is present also on gcc 4.7. The only way to get rid of this error is to use toolchain 4.6. I need to compile it using a newer toolchain, that's why I request your help.
Click to expand...
Click to collapse
Hey sarsdani Apologies that I'm quoting you 12 month later. I am getting an identical error in the same file/address as you had when you posted this question. Im compiling stock HTC m7 Android L kernel with Google tool chain 4.8 - android 5.1 r1
You mentioned later on that you changed the Makefile and .config to fix the [-Wmaybe-uninitialized] error. Can you please detail what those changes were or point me to an example ( if you can remember ) I could just change Wmaybe in Makefile to Wno but turning the flag off altogether seems dangerous.
@Joeisgood99 there are two ways to solve this.
1. using a "hack". So, you need to add in makefile (in root folder from kernel source) at KBUILD_CFLAGS: -Wno-maybe-uninitialized \
2. Open that file with the error and asign a value to protocol.
The first option is not dangerous. Why? Because only the toolchain say this. In gcc 4.6, the reason why you don't get this error is because it assign a value automatically to that "protocol", usualy random value but not always. In gcc 4.7/4.8/4.9(or 4.10) this is threated as warning/error.
/home/austin/cm11/kernel/lge/w3c/net/ipv4/ipconfig.c:264: undefined reference to `msecs_to_jiffies'
/home/austin/cm11/kernel/lge/w3c/Makefile:877: recipe for target '.tmp_vmlinux1' failed
make[2]: *** [.tmp_vmlinux1] Error 1
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/austin/cm11/kernel/lge/w3c'
build/core/tasks/kernel.mk:188: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
Any ideas what this could be? I'm a bit stumped i've never seen an error like this before
It's okay i retired the project as of now since trying to modify the kernel source code isn't do anything but causing more errors. I do appreciate any help when everyone has a chance

[Q] Help needed with compiling an A31 kernel

EDIT3: I was sorta' right about the source package being somewhat temperamental. Managed to build the modules sans kernel, but doing both at the same time leads to the errors below. Also, renaming uImage to vmlinux and then shoving it in boot.img along with the compiled modules resulted in the tab being stuck on the boot logo.
EDIT2: I dunno if the build package was being temperamental or something, but ticking out the tvp5150 module seems to have done the trick.
EDIT: Managed to get further with building, but while I get a vmlinux image, it still ends with a mismatch error with modules. Coud this have something to do with the source tarball being stripped and not the full one?
Code:
Building modules, stage 2.
MODPOST 67 modules
WARNING: could not find drivers/input/touchscreen/.libAW5306.cmd for drivers/input/touchscreen/libAW5306
ERROR: "vfe_gpio_write" [drivers/media/video/tvp5150.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
So, I kinda' figured out on how to cobble up a kernel for the A31s, but upon attempting to build one based on the source taken from http://dl.linux-sunxi.org/SDK/A31/a31_hummbingbird_V3.3_v2_kfb_0k.tar.gz
While I managed to load up the default config and stuff, building it using the command make ARCH=arm CROSS_COMPILE=/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- results in this:
Code:
In file included from drivers/media/video/sunxi-vfe/camera_detector/camera_detector.h:4:0,
from drivers/media/video/sunxi-vfe/config.c:10:
drivers/media/video/sunxi-vfe/camera_detector/camera_includes.h:41:25: error: redefinition of typedef '__hdle'
drivers/media/video/sunxi-vfe/flash_light/../vfe_os.h:29:22: note: previous declaration of '__hdle' was here
make[4]: *** [drivers/media/video/sunxi-vfe/config.o] Error 1
make[3]: *** [drivers/media/video/sunxi-vfe] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
ANy thoughts or advice on how to make this work, let alone boot?

[Q] Error While Compiling Kernel

Hi everyone guys,Today i tried to compile Alcatel One Touch 4033 kernel from Alcatel sources (www.sourceforge.net/projects/alcatel/files , Device OT_4033X)
i keep getting this error:
Code:
fs/file_table.c: In function 'get_empty_filp':
fs/file_table.c:36:20: error: inlining failed in call to always_inline 'fd_show_open_files': function body not available
fs/file_table.c:160:36: error: called from here
scripts/Makefile.build:307: recipe for target 'fs/file_table.o' failed
make[1]: *** [fs/file_table.o] Error 1
Makefile:967: recipe for target 'fs' failed
make: *** [fs] Error 2
i've tried various toolchains and the commands described in the README,same results.
Please i really need help ,
Thank you

[help] compiling kernel from source for zte axon 7(zte a2017u)

Hi everyone I have been wanting to try to compile the kernel for my device from source so that I can add some features to it. first time trying this..
I have fixed all errors up till now but this one has been bothering for a few days:
Code:
In file included from drivers/usb/gadget/android.c:62:0:
./drivers/usb/gadget/function/f_rndis.c: In function 'rndis_alloc_inst':
./drivers/usb/gadget/function/f_rndis.c:1115:10: error: implicit declaration of function 'usb_os_desc_prepare_interf_dir' [-Werror=implicit-function-declaration]
usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs,
^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target 'drivers/usb/gadget/android.o' failed
make[3]: *** [drivers/usb/gadget/android.o] Error 1
scripts/Makefile.build:402: recipe for target 'drivers/usb/gadget' failed
make[2]: *** [drivers/usb/gadget] Error 2
scripts/Makefile.build:402: recipe for target 'drivers/usb' failed
make[1]: *** [drivers/usb] Error 2
Makefile:945: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I'm using linaro 4.9 as crosscompiler btw.
thanks guys, i'm really at my wits ends right now

Categories

Resources