[Q] Trouble trying to compile the DNA kernel - HTC Droid DNA

Hi guys,
I've really been having a hard time trying to compile a kernel for the Droid DNA. I've downloaded the kernel source from the HTC dev site, and within the download there is a readme which suggests to download this toolchain "git clone https://android.googlesource.com/platform/prebuilt." I have tried the toolchains included in this, but they never finish the compiling process. It's weird because it looks like it is processing nicely, and even runs for several minutes, but it just stops abrubtly and does not produce the zimage. I have also tried toolchains from the official Android NDK and even a custom one I found, with no luck. Most of the other toolchains just crap out with a bunch of errors, which looks like it is missing some library files, so I don't know what to do there.
Do you actually need to install the toolchain somehow, or can you just do an export CROSS_COMPILE=~/toolchain/bin/arm-linux-androideabi- to handle this? I would be more than greatful to get any sort of assistance with this, as it is starting to drive me nuts! lol. I also uploaded some of the errors and final output from my last compile.

stevedub40 said:
Hi guys,
I've really been having a hard time trying to compile a kernel for the Droid DNA. I've downloaded the kernel source from the HTC dev site, and within the download there is a readme which suggests to download this toolchain "git clone https://android.googlesource.com/platform/prebuilt." I have tried the toolchains included in this, but they never finish the compiling process. It's weird because it looks like it is processing nicely, and even runs for several minutes, but it just stops abrubtly and does not produce the zimage. I have also tried toolchains from the official Android NDK and even a custom one I found, with no luck. Most of the other toolchains just crap out with a bunch of errors, which looks like it is missing some library files, so I don't know what to do there.
Do you actually need to install the toolchain somehow, or can you just do an export CROSS_COMPILE=~/toolchain/bin/arm-linux-androideabi- to handle this? I would be more than greatful to get any sort of assistance with this, as it is starting to drive me nuts! lol. I also uploaded some of the errors and final output from my last compile.
Click to expand...
Click to collapse
Hmm, it doesn't look like my file uploaded. Here it is in code tags:
Code:
net/netfilter/xt_mark.c:16:37: error: linux/netfilter/xt_mark.h: No such file or directory
net/netfilter/xt_mark.c: In function 'mark_tg':
net/netfilter/xt_mark.c:32: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c:32: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c: In function 'mark_mt':
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c:41: error: dereferencing pointer to incomplete type
net/netfilter/xt_mark.c: At top level:
net/netfilter/xt_mark.c:49: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_tginfo2'
net/netfilter/xt_mark.c:58: error: invalid application of 'sizeof' to incomplete type 'struct xt_mark_mtinfo1'
make[2]: *** [net/netfilter/xt_mark.o] Error 1
make[1]: *** [net/netfilter] Error 2
make[1]: *** Waiting for unfinished jobs....
drivers/mfd/pm8921-core.c:211: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:211: error: resources_pwrkey causes a section type conflict
drivers/mfd/pm8921-core.c:165: error: adc_cell_resources causes a section type conflict
drivers/mfd/pm8921-core.c:165: error: adc_cell_resources causes a section type conflict
make[2]: *** [drivers/mfd/pm8921-core.o] Error 1
make[1]: *** [drivers/mfd] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [net] Error 2
make: *** Waiting for unfinished jobs....
CC drivers/media/video/msm/wfd/enc-subdev.o
CC drivers/media/video/msm/sensors/imx175_v4l2.o
CC drivers/media/video/msm/sensors/ov8838_v4l2.o
CC drivers/media/video/msm/sensors/s5k3h2yx_v4l2.o
CC drivers/media/video/msm/rawchip/Yushan_Platform_Specific.o
CC drivers/media/video/msm/wfd/vsg-subdev.o
CC drivers/media/video/msm/msm_gesture.o
CC drivers/media/video/msm/rawchip/Yushan_HTC_Functions.o
CC drivers/media/video/msm/sensors/ar0260_v4l2.o
CC drivers/media/video/msm/wfd/wfd-ioctl.o
CC drivers/media/video/msm/msm_axi_qos.o
CC drivers/media/video/msm/sensors/s5k3l1yx.o
CC drivers/media/video/msm/flash.o
CC drivers/media/video/msm/sensors/ov2722_v4l2.o
CC drivers/media/video/msm/wfd/wfd-util.o
CC drivers/media/video/msm/msm_io_8960.o
LD drivers/media/video/msm/sensors/built-in.o
CC drivers/media/video/msm/msm_vfe32.o
CC drivers/media/video/msm/rawchip/yushan_reg.o
LD drivers/media/video/msm/wfd/built-in.o
CC drivers/media/video/msm/msm_vpe.o
CC drivers/media/video/msm/rawchip/yushan_u_code_r2.o
CC drivers/media/video/msm/rawchip/yushan_u_code_r3.o
CC drivers/media/video/msm/rawchip/yushan_reg_s5k3h2yx.o
CC drivers/media/video/msm/rawchip/yushan_reg_imx175.o
CC drivers/media/video/msm/rawchip/yushan_reg_ov8838.o
CC drivers/media/video/msm/rawchip/yushan_reg_ar0260.o
CC drivers/media/video/msm/rawchip/yushan_reg_ov2722.o
LD drivers/media/video/msm/rawchip/built-in.o
LD drivers/media/video/msm/built-in.o
LD drivers/media/video/videodev.o
LD drivers/media/video/built-in.o
LD drivers/media/built-in.o
make: *** [drivers] Error 2
[email protected] ~/android/kernel/linux $

Talk to DSB9938 or Elkay, they work on kernels for our phone.

orangechoochoo said:
Talk to DSB9938 or Elkay, they work on kernels for our phone.
Click to expand...
Click to collapse
Will do. Thanks for the reply.

Alright, I have discovered my problem. It looks like I was in fact missing the xt_mark.h file. For some reason, the HTC kernel source only includes xt_MARK.h. I downloaded the kernel source for the Nexus 4 and pulled the necessary header files. I was missing a couple others, which I don't recall off hand. What has me baffled is that I seem to be the only one with this issue. I downloaded the HTC source again just to make sure, and just as I suspected it was missing some header files. Has anyone else experienced this?
EDIT: I just tested with a couple different toolchains and they all compile perfectly now. That is so strange that my problem this whole time has been missing header files from HTC.

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

[Q] Driver error while compiling kernel

So guys, I've tried to build my own kernel from johns github sources based on his kool-aid kernel. This happens with the msm8226_defconfig makefile
So I got my sources synced set up this linaro toolchain https://github.com/Christopher83/arm-cortex_a7-linux-gnueabihf-linaro_4.9, got the path set up in bashrc
Code:
#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-cortex_a7-linux-gnueabihf
export PATH=$PATH:/home/steffen/toolchain/bin"
When running
Code:
make ARCH=arm CROSS_COMPILE=arm-cortex_a7-linux-gnueabihf-
It starts compiling and everything seems fine, when it gets to this last part
Code:
CC [M] drivers/mmc/card/mmc_block_test.o
CC drivers/mmc/core/core.o
CC drivers/mmc/core/bus.o
CC drivers/mmc/core/host.o
CC drivers/mmc/core/mmc.o
drivers/mmc/core/mmc.c:1869:12: warning: initialization from incompatible pointer type
error, forbidden warning: mmc.c:1869
make[3]: *** [drivers/mmc/core/mmc.o] Error 1
make[2]: *** [drivers/mmc/core] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2
It seems to run into a problem with the drivers, tried searching up on the
Code:
drivers/mmc/core/mmc.c:1869:12: warning: initialization from incompatible pointer type
error
part, and only thing actually coming up has been some pastebins etc with the same error log as I got (almost), hoped someone could help out with this?
Also when I try using the g2m_global_com_defconfig instead, I get this at the end
Code:
AR lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `video_open':
/home/steffen/kernel_lge_msm8226_g2m/drivers/media/radio/radio-iris.c:5083: undefined reference to `hci_fm_smd_register'
drivers/built-in.o: In function `iris_remove':
/home/steffen/kernel_lge_msm8226_g2m/drivers/media/radio/radio-iris.c:5219: undefined reference to `hci_fm_smd_deregister'
make: *** [.tmp_vmlinux1] Error 1
[email protected]:~/kernel_lge_msm8226_g2m$
Help anyone?
Sorry for this post, got it fixed myself anyways
Sent from my LG-D620 using xda Forum
steffenbakke said:
Sorry for this post, got it fixed myself anyways
Sent from my LG-D620 using xda Forum
Click to expand...
Click to collapse
How you fix it????

[Q] Developers: Trouble Compiling CM11 Kernel

So I've done some work on boot images before, but not much, and I wanted to try building a kernel for AOSP KitKat on the EVO 4G LTE. (Why not Lollipop? Data and roaming issues.) But I'm hitting camera-related errors when I try to compile it. Here's the relevant output in the make process:
Code:
CC arch/arm/mach-msm/board-8064-gpiomux.o
CC arch/arm/mach-msm/board-8064-camera.o
In file included from arch/arm/mach-msm/include/mach/camera.h:26:0,
from arch/arm/mach-msm/board-8064-camera.c:19:
include/media/msm_camera.h:1543:6: warning: "CONFIG_HTC_CAMERA_HAL_VERSION" is not defined [-Wundef]
error, forbidden warning: msm_camera.h:1543
make[1]: *** [arch/arm/mach-msm/board-8064-camera.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
I tried to fix it by adding the HTC_CAMERA_HAL_VERSION config to Kconfig, but then I get this error instead:
Code:
CC arch/arm/mach-msm/board-8064-gpiomux.o
CC arch/arm/mach-msm/board-8064-camera.o
In file included from arch/arm/mach-msm/board-8064-camera.c:19:0:
arch/arm/mach-msm/include/mach/camera.h:682:33: warning: 'struct msm_camera_csi_params' declared inside parameter list
error, forbidden warning: camera.h:682
make[1]: *** [arch/arm/mach-msm/board-8064-camera.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Any ideas?

Samsung Galaxy Young 2 (SM-G130HN): update Kernel

Hello guys!
I have a bit specific problem with my Young 2s running Android 4.4.2. I intend to use a couple of those for a project which involves constant USB communication with a custom circuit board through a FTDI chip. I've already made an Android app which opens a USB Accessory, then sends and receives data constantly. It works, but only for a couple of hours, then the connection breaks down. After that, the only things that help are either rebooting the phone (even that doesn't always work) or re-plugging the USB cable. Anyways, after days of googling, I managed to trace the problem down to a bug that has been fixed "recently" (March 06, 2017):
issuetracker.google.com/issues/36981924
android-review.googlesource.com/#/c/256441/
"Awesome!" I said to myself, and downloaded the most recent ROM (May 01, 17) from updato , flashed the phone with Odin, only to find out that the Kernel version is from November 2016. I didn't let that ruin my day, so I downloaded the latest open source Kernel from Samsung, not really knowing what I'm doing (I started using Ubuntu 4-5 months ago):
opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=g130HN
I checked the f_accessory file to make sure the fix for the bug from earlier was inside, followed the simple readme and ended up with a zImage. There was an error while compiling though, I'll post the output at the end of the post. I took the boot.img from the ROM I downloaded earlier, unpacked it with Android Image Kitchen v2.8, replaced the boot.img-zImage file with my zImage and renamed it accordingly, repacked it, flashed it with TWRP, but sadly the phone hangs at the splash screen, even before the animated Samsung screen shows. I'm kinda at the end of my wits here, since there is so much I could have gotten wrong, so I don't know where to start.
So I'm hoping some of you guys could help me out with some advice.
Thanks in advance!
P.S. The compile output:
Code:
....
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/hyp-stub.S
AS arch/arm/boot/compressed/hyp-stub.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/ashldi3.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready <----------------------------------- zImage!
Building modules, stage 2.
MODPOST 8 modules
CC arch/arm/oprofile/oprofile.mod.o
LD [M] arch/arm/oprofile/oprofile.ko
CC crypto/ansi_cprng.mod.o
LD [M] crypto/ansi_cprng.ko
CC drivers/media/platform/soc_camera/soc_camera.mod.o
LD [M] drivers/media/platform/soc_camera/soc_camera.ko
CC drivers/media/platform/soc_camera/soc_camera_platform.mod.o
LD [M] drivers/media/platform/soc_camera/soc_camera_platform.ko
CC drivers/media/platform/soc_camera/soc_mediabus.mod.o
LD [M] drivers/media/platform/soc_camera/soc_mediabus.ko
CC drivers/media/v4l2-core/videobuf2-core.mod.o
LD [M] drivers/media/v4l2-core/videobuf2-core.ko
CC drivers/mmc/card/mmc_test.mod.o
LD [M] drivers/mmc/card/mmc_test.ko
CC drivers/w1/wire.mod.o
LD [M] drivers/w1/wire.ko
make[1]: Leaving directory '/home/vladich/G130HN/Kernel/common'
[2017-07-25 10:22:40] kernel [young2nfc3g-native_hw03_defconfig] done
[2017-07-25 10:43:30] making mali...
make[1]: Entering directory '/home/vladich/G130HN/Kernel/mali'
Makefile:83: ../kernel/.config: No such file or directory
Makefile:111: CONFIG_TRACEPOINTS required for profiling
make[1]: *** No rule to make target '../kernel/.config'. Stop.
make[1]: Leaving directory '/home/vladich/G130HN/Kernel/mali'
Makefile:27: recipe for target 'mali' failed
make: *** [mali] Error 2
P.P.S. Since I'm a newbie at xda, I'm currently not allowed to post full links, so you need to add a https prefix before every link, and I'm only allowed to post into Q&A, I'm not sure this thread belongs here :laugh:

[HELP] Compiling Kernel : Makefile errors

Hi,
I'm trying to compile the kernel source from @flar2
I didn't find a specific build instructions so followed the usual method
After pointing to toolchain folder
Kernel source: https://github.com/korom42/ocean
My working setup:
Information about my OS:
Virtualization: oracle
OS: Ubuntu 16.04 Fedora 28 (Workstation Edition)
Kernel: Linux 4.17.17-200.fc28.x86_64
CPU: Intel Core i5-7200u @ 2x 2.7GHz [50.0°C]
GPU: intel
RAM: 2048MiB
Prepare :
Code:
export CROSS_COMPILE=/home/korom42/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
export USE_CCACHE=1
make elementalx_defconfig
make /or make O=out
Compile issue:
http://prntscr.com/kl1gyi
lib/Makefile:17: *** recipe commences before first target. Stop.
Makefile:1213: recipe for target '_clean_lib' failed
make: *** [_clean_lib] Error 2
Update: I changed my building environment to Fedora 28 and that problem is fixed now. But, I am getting another error I guess it is related to the source code , I found a similar issue here
Code:
[...]
CC drivers/base/module.o
CC drivers/base/soc.o
CC drivers/base/pinctrl.o
CC drivers/base/platform-msi.o
LD drivers/base/built-in.o
CC drivers/block/brd.o
CC drivers/block/loop.o
CC drivers/block/zram/zcomp_lzo.o
CC drivers/block/zram/zcomp.o
CC drivers/block/zram/zram_drv.o
CC drivers/block/zram/zcomp_lz4.o
LD drivers/block/zram/zram.o
LD drivers/block/zram/built-in.o
LD drivers/block/built-in.o
CC drivers/bluetooth/bluetooth-power.o
CC drivers/bluetooth/btfm_slim.o
drivers/bluetooth/btfm_slim.c:26:23: fatal error: btfm_slim.h: No such file or directory
#include <btfm_slim.h>
^
compilation terminated.
make[2]: *** [scripts/Makefile.build:264: drivers/bluetooth/btfm_slim.o] Error 1
make[1]: *** [scripts/Makefile.build:408: drivers/bluetooth] Error 2
make: *** [Makefile:966: drivers] Error 2
I also tried
Code:
make O=out clean
And got the same error
Update:
Possibly similar issue here
I guess it is source code related ? Any ideas how to fix that

Categories

Resources