Can't compile Galaxy Note 3 Kernel - T-Mobile Samsung Galaxy Note 3

I am kinda new to kernel development. I need to rebuild the kernel I'm using ((http://forum.xda-developers.com/showthread.php?t=2480353) Compulsion Kernel) with loadable module support. I have also tried other kernels. I also tried using the "-i" flag on make, but the errors kept getting worse, until the whole compilation output was errors...
I keep getting errors from the console output. For example:
Code:
net/bluetooth/hci_conn.c: In function 'hci_le_ltk_reply':
net/bluetooth/hci_conn.c:406:28: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
error, forbidden warning: hci_conn.c:406
make[2]: [net/bluetooth/hci_conn.o] Error 1
-Wsizeof-pointer-memaccess errors pop up very often.
There are also file not found errors:
Code:
arm-eabi-ld: error: cannot open net/bluetooth/hci_conn.o: No such file or directory
make[2]: [net/bluetooth/bluetooth.o] Error 1
LD net/bluetooth/built-in.o
arm-eabi-ld: error: cannot open net/bluetooth/bluetooth.o: No such file or directory
make[2]: [net/bluetooth/built-in.o] Error 1
CC net/bridge/br_input.o
Heres another example:
Code:
CC net/bridge/br_ioctl.o
arch/arm/mach-msm/board-8974-sec.c:569:13: warning: 'modem_power_off' defined but not used [-Wunused-function]
error, forbidden warning: board-8974-sec.c:569
make[1]: [arch/arm/mach-msm/board-8974-sec.o] Error 1
LD arch/arm/mach-msm/built-in.o
CC drivers/gpu/ion/ion_cma_heap.o
arm-eabi-ld: error: cannot open arch/arm/mach-msm/bam_dmux.o: No such file or directory
arm-eabi-ld: error: cannot open arch/arm/mach-msm/board-8974-sec.o: No such file or directory
System information:
I attached my .config file. It is the default from the Compulsion kernel.
Compile commands (in order):
Code:
export VARIANT_DEFCONFIG=msm8974_sec_defconfig ##I added this because it wont generate .config if this variable is empty...
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/julian/android-toolchain-eabi/bin/arm-eabi-
git pull
make clean
make msm8974_sec_defconfig
make -j4
Operating system: Fresh install of Linux Mint 16 (Petra)
Build-related packages I installed with apt: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb
Toolchain:
Tried linaro, the android NDK from Google's website, and various other toolchains. Same error.
Output of "echo $PATH"
Code:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julian/android-toolchain-eabi/bin:/home/julian/androidkernel/N900T_Kernel
I think thats all the needed information
Thank you!

Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".

djintrigue808 said:
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
Click to expand...
Click to collapse
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!

Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*

Any ideas?
EDIT:
Compile warnings about swp{b} although swp emulation is enabled in config. I still can't figure out how to get the zImage to work correctly on my device. I swapped the zImage out of the Saber kernel install zip boot.img and put my own in, flashed with TWRP, device doesn't boot until I go back and install the original kernel.

Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Please ignore if irrelevant or ignorant. I'm in my infancy and still grasping the basics.
My environment is quite different than yours, on a Mac and using a Sprint note 3, but I came across this thread with the same compiler error using the 4.8 tools in the NDK. If I use 4.6 gcc I make it pretty far into the compilation process before error (failing @net/netfilter/xt_TCPMSS.c). However, using 4.8 gave me the same error as you:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Here's the layout of my toolchains folder and my broken build file (looks like yours)
Code:
z:toolchains anon$ pwd
/Volumes/android/ndk/toolchains
z:toolchains anon$ ls arm-linux-androideabi-4.*/prebuilt/darwin-x86_64/arm-linux-androideabi/bin
arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
Broken Make file edit:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Change to 4.6 for new compile error:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Made is a helluva lot father in the compilation process, but still won't compile correctly.
Code:
net/netfilter/xt_TCPMSS.c:50:8: warning: 'struct xt_tcpmss_info' declared inside parameter list [enabled by default]
error, forbidden warning: xt_TCPMSS.c:50
make[2]: *** [net/netfilter/xt_TCPMSS.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
Got my NDK from here:
Code:
http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86_64.tar.bz2
I don't, yet, understand the differences between the versions. Not sure if this will be helpful, samsungs open source community page sure isn't very friendly.

Julian90090 said:
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Click to expand...
Click to collapse
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!

daxgirl said:
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
Click to expand...
Click to collapse
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.

sansari123 said:
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
Click to expand...
Click to collapse
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk

Thanks. The latest message I get is the following:
Code:
drivers/cpufreq/cpufreq_interactive.c: In function 'show_target_loads':
drivers/cpufreq/cpufreq_interactive.c:813:6: warning: operation on 'ret' may be undefined [-Wsequence-point]
error, forbidden warning: cpufreq_interactive.c:813
make[2]: *** [drivers/cpufreq/cpufreq_interactive.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
But this one is a warning also. I guess there is a flag for ignoring warning(s)? I'll wait to hear back from you.

daxgirl said:
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
@daxgirl - I like to learn how to modify the flags. Did you find out which flags to modify by reading the Makefile documentation? I would really appreciate it if you tell me how I can learn which flags to modify and do it myself vs. copy your Makefile.

Related

Help needed compiling the kernel

So... I download the kernel source from HTC (http://developer.htc.com) and I found this blog that got me started on compiling it...
http://blog.coralic.nl/2009/10/25/how-to-compile-the-htc-hero-kernel/comment-page-1/#comment-42
Well, at first attempt, I got an error that make couldn't find the rule to make projector.o. Well, I went through the .config and changed that option to No...
Then, it gets all the way to where it looks like it's going to make vmlinux1 and it errors out with the message "arm-eabi-ld: no machine record defined .... make: *** [.tmp_vmlinux1] Error 1"
Has anybody successfully compiled the source yet?
jmanley69 said:
So... I download the kernel source from HTC (http://developer.htc.com) and I found this blog that got me started on compiling it...
http://blog.coralic.nl/2009/10/25/how-to-compile-the-htc-hero-kernel/comment-page-1/#comment-42
Well, at first attempt, I got an error that make couldn't find the rule to make projector.o. Well, I went through the .config and changed that option to No...
Then, it gets all the way to where it looks like it's going to make vmlinux1 and it errors out with the message "arm-eabi-ld: no machine record defined .... make: *** [.tmp_vmlinux1] Error 1"
Has anybody successfully compiled the source yet?
Click to expand...
Click to collapse
Try "make msm7200a_defconfig" before compiling, do not pull config.gz.
Lox_Dev said:
Try "make msm7200a_defconfig" before compiling, do not pull config.gz.
Click to expand...
Click to collapse
That was a very good starting point...
It all comes down to these two lines
On the config from my phone it says
Code:
# CONFIG_ARCH_MSM7200A is not set
CONFIG_ARCH_MSM75010A=y
on msm7200a_defconfig, it has
Code:
CONFIG_ARCH_MSM7200A=y
# CONFIG_ARCH_MSM75010A is not set
Also, msm7200a_defconfig has these two extra lines that don't exist at all in my config
Code:
CONFIG_MACH_SAPPHIRE=y
CONFIG_MACH_HERO=y
That wouldn't be too big a problem, but my config has
Code:
# CONFIG MSM_AMSS_SUPPORT_256MB_EBI1 is not set
and msm7200a_defconfig has
Code:
CONFIG_MSM_AMSS_SUPPORT_256MB_EBI1=y
and without that set, SAPPHIRE.o won't compile because an integer is long instead of unsigned....
Any idea how I can figure out the correct file to fix for the CONFIG_ARCH_MSM75010A? I looked in /arch/arm/Makefile, and it says ARCH_MSM7XXXX points to msm, and I look in /arch/arm/msm/Makefile, and don't see anything referencing either MSM7200A or MSM75010A, but 7200A has to be someplace
Standard config pulled from running 1.5 should compile just fine.
Done it countless times myself.
What version of the toolchain are you running?
packetlss said:
Standard config pulled from running 1.5 should compile just fine.
Done it countless times myself.
What version of the toolchain are you running?
Click to expand...
Click to collapse
/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
Just tried it myself with the same toolchain:
Code:
[email protected]:~/android/kernel/kernel_hero$ [B]cp config-gsm-stock .config[/B]
[email protected]:~/android/kernel/kernel_hero$ [B]CROSS_COMPILE=~/android/src/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make[/B]
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
...
<lots of muck removed>
....
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gz
AS arch/arm/boot/compressed/piggy.o
CC arch/arm/boot/compressed/misc.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 0 modules
[email protected]:~/android/kernel/kernel_hero$ [B]ls -al arch/arm/boot/zImage[/B]
-rwxr-xr-x 1 mange mange 1648748 2009-12-05 02:13 arch/arm/boot/zImage
[email protected]:~/android/kernel/kernel_hero$
The error your getting is usually due to a incomplete machine specification for the linker.
Try and checkout the prebuilt stuff again from AOSP, it's possibly corrupted.
Mine is master branch, synced yesterday.

TUN.KO for the my touch 4g (here it is with links) updated 12/24/10

I have gotten every thing to work except the routing issue which is weird because I had it working fine and everything so I don't know. You need to make sure that you have root and that you have busy box installed and set up correctly install in
Install busybox in /system/xbin
openvpn install /system/xbin/openvpn
/sdcard/openvpn goes the client config files what ever they are for your cisco or watchgaurd vpn .vpn or.ovpn file
make sure the tun.ko is in /system/lib/modules
I don't have time to make a complete walk through I will answer any questions though as soon as I get a chance because its pissed me off when I was doing this when people just stopped helping me.
I want to thank satash for the help he isnt on this forum but he was a big help with seting up the devolopment envioment when this post kept getting moved around for stupid reasons.
CODE
adb pull /proc/config.gz .
gunzip config.gz
mv config .config
* Copy the config file .config file to the kernel root folder -
CODE
cp .config ~/android/glacier-2.6.32-g52a2a81/
* CD to kernel source folder -
CODE
cd ~/android/glacier-2.6.32-g52a2a81/
gedit .config
* Edit the .config file to include tun.ko as module -
CODE
# CONFIG_TUN in not included
to
CODE
CONFIG_TUN=m
* Launch adb shell from the Android SDK folder and run uname -
CODE
cd ~/android/android-sdk-linux_86/tools
sudo ./adb shell
# cat /proc/version
Linux version 2.6.32.21-g899d047 ([email protected]) (gcc version 4.4.0 (GCC) ) #1 PREEMPT Tue Oct 26 16:10:01 CST 2010
* CD to kernel source folder and edit the Makefile -
CODE
cd ~/android/glacier-2.6.32-g52a2a81/
gedit Makefile
* Modify the following line to correspond with the kernel version -
CODE
EXTRAVERSION =
to
CODE
EXTRAVERSION = .21-g899d047
* Set Environment Variables -
CODE
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/android/android-ndk-r5/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/
* Now, make sure you can run arm-eabi-gcc from your Command Line
* Perform make modules from the kernel source folder -
CODE
cd ~/android/glacier-2.6.32-g52a2a81/
make modules
* That's all, you should be able to find the tun.ko under ~/android/glacier-2.6.32-g52a2a81/drivers/net/ in theory
Zimage
http://www.megaupload.com/?d=FPGVD4I5 You dont need to flash this this is only if you want to test and see if I was able to build it in to the kernal tun.ko still has to be in the modules folder
Tun.ko
http://www.megaupload.com/?d=4HUYDY9G
Ok install Gscript
and load these scripts in to them
tunup this will load the tun.ko module
http://www.megaupload.com/?d=0NUMNWNS
Here is the routing fix well thats supposed to work that isnt right now so if anyone has an Idea on how to fix this script please let me know.
#! /bin/bash
ip rule del from all lookup gprs
ip rule del from all lookup wifi
P.S make sure your APN is internet3.voicestream.com or you will just get pissed off and never figure it out lol.
also when I do the g++ -o hello.o hello.cpp i get
dlaf[email protected]:~/Documents/Android1/glacier-2.6.32-g52a2a81$ g++ -o hello.o hello.cpp
g++: hello.cpp: No such file or directory
g++: no input files
Please post discussions in general section.
Whosdaman said:
Please post discussions in general section.
Click to expand...
Click to collapse
I could be wrong, but this is directly related to development...
slhpss said:
I could be wrong, but this is directly related to development...
Click to expand...
Click to collapse
Yes, bu there is no actually files being developed. If there was something like try this file and it fixes something, then yes it's development
Well the point of this thread is that once i get a respose and figure it out I was going put a link to the compiled tun.ko in this thread
No one??? come on I would think this would be a standard developer question
probably would be better if this was in the development section... you might get a few more responses..
Check your path.
try adding CROSS_COMPILE=/absolute_path_to_arm_compiler/bin/arm-eabi-
before your make command (i.e.)
CROSS_COMPILE=/home/me/android/ndk/bin/arm-eabi- make
Whosdaman followed XDA policy with regards to Development sections. Once you have compiled code ready to go, we can either move this thread back or you can create a new thread.
that didnt work for me and Actually i accedently ended up nukeing my ubuntu install so I am installing it again ill let you know how it goes second time around
Help
[email protected]:~/android/glacier-2.6.32-g52a2a81$ CROSS_COMPILE=~/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/ make
make: /home/dlafortune/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: /home/dlafortune/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected]:~/android/glacier-2.6.32-g52a2a81$ CROSS_COMPILE=~/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/ make modules
make: /home/dlafortune/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: /home/dlafortune/android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
[email protected]:~/android/glacier-2.6.32-g52a2a81$
Im still not getting this somthing is messed up anyone kknow whats up???
hmm
did you make sure to set all the variables?Another thing that works is rebooting the PC.
I have run in to some problems setting up the gcc enviroment if someone could help me out .
[email protected]:~$ export ARCH=arm
[email protected]:~$ export CROSS_COMPILE=arm-eabi-
[email protected]:~$ export PATH=$PATH:~/android/android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/
[email protected]:~$ cd '/home/dlafortune/android/glacier-2.6.32-g52a2a81'
[email protected]:~/android/glacier-2.6.32-g52a2a81$ make modules
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected]:~/android/glacier-2.6.32-g52a2a81$
Im starting to feel really stupid i set the environment variables and it doesnt work same error every time i dont get it. I tried to find your post but I couldnt find it Im sorry im really trying to figure this out its kicking my ass. any ideas???
I have tried to set the path as a absolute path as well.
I'm working on compiling this myself. Getting my environment setup right now.
but shouldn't it be EXTRAVERSION= .21-g899d047
(in your original compiled tun.ko)
Seems that would be the obvious point of failure based on what I know and based on the error I'm getting when I insmod your compiled tun.ko
I should know more in a couple of hours.
Question, what is this? Just curious
It is needed for using OpenVPN
rogabean said:
It is needed for using OpenVPN
Click to expand...
Click to collapse
Thanks, appreciate it
Ok may not get to test compile tonight. Taking me a little longer than I thought to get setup. I just switched to a new install of Snow leopard.
I dont think so cause I got it all working I had it working except wifi then I redid it to get wifi working and now im haveing problems with Open vpn FATAL:ifconfig faild to exicute external command. No but I had it working and I logged in to my watchgaurd vpn over lunch today I was so dam happy now I can't Get the dam thing to work I have more notes and guides and scripts you have Pm me if anyone has problems Also I recompiled both of those So ill have to repost them tomorow so ill let you know if I get it 100% tonight

Building kernels from source

Right im trying to build flykernel from source but get this error...
Code:
[email protected]:~/android/kernel/hero-2.6.29-flykernel$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
scripts/mod/empty.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
scripts/mod/empty.c:1: error: bad value (armv5t) for -march= switch
scripts/mod/empty.c:1: error: bad value (strongarm) for -mtune= switch
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
Any ideas? (Looking at you Erasmux )
bonesy said:
Any ideas?
Click to expand...
Click to collapse
Here's my kernel build script, wokrs well with flykernel sources.
You need to set variables at the beginning (CROSS_COMPILE, KERNEL_BUILD_PATH , and if needed - MAKEFLAGS),
and it will build the kernel and print how much time it took.
Code:
#!/bin/bash
MAKEFLAGS='-j4'
CROSS_COMPILE=/data/and/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
ARCH=arm
KERNEL_BUILD_PATH=/data/kernel
export KERNEL_BUILD_PATH ARCH CROSS_COMPILE MAKEFLAGS
TIME_START=`date +%s`;
echo === Building kernel ===
cd $KERNEL_BUILD_PATH
#make clean
make prepare
make zImage
if [ $? -ne 0 ]; then
echo === Kernel build FAILED! ===
exit 1;
fi
make modules
if [ $? -ne 0 ]; then
echo ===Modules build FAILED! ===
exit 1;
fi
TIME_DONE=`date +%s`;
LAPSEDM=`echo "($TIME_DONE - $TIME_START)/60" | bc`
LAPSEDS=`echo "($TIME_DONE - $TIME_START)%60" | bc`
echo ''
echo == Build complete in $LAPSEDM m $LAPSEDS s ==
bonesy said:
Right im trying to build flykernel from source but get this error...
Code:
[email protected]:~/android/kernel/hero-2.6.29-flykernel$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
scripts/mod/empty.c:1: error: unknown ABI (aapcs-linux) for -mabi= switch
scripts/mod/empty.c:1: error: bad value (armv5t) for -march= switch
scripts/mod/empty.c:1: error: bad value (strongarm) for -mtune= switch
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
Any ideas? (Looking at you Elelinux )
Click to expand...
Click to collapse
For general instructions see here:
https://github.com/erasmux/hero-2.6.29-flykernel/wiki/HOWTO:-Build-the-kernel
From your specific error I would guess maybe $CCOMPILER is not defined correctly? What does the following command return for you?
Code:
${CCOMPILER}gcc --version
Yea i think after i saw that script i figured it out
CROSS_COMPILE=/data/and/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
Click to expand...
Click to collapse
Mine says
CROSS_COMPILE=arm-eabi-
Which isn't my directory!
Sorry im pretty new to this lol
Thanks ill try again, One more thing.Does it have to be 64-bit Linux? I've seen a few errors when building that say 64bit?
bonesy said:
Yea i think after i saw that script i figured it out
Mine says
CROSS_COMPILE=arm-eabi-
Which isn't my directory!
Sorry im pretty new to this lol
Thanks ill try again, One more thing.Does it have to be 64-bit Linux? I've seen a few errors when building that say 64bit?
Click to expand...
Click to collapse
No, 64-bit linux is not required - everything works fine on 32-bit.
k0rner said:
No, 64-bit linux is not required - everything works fine on 32-bit.
Click to expand...
Click to collapse
Yeah, it's a common misconception. Compiling AOSP for Gingerbread needs x64 (why on earth...), but everything else should be fine
pulser_g2 said:
Yeah, it's a common misconception. Compiling AOSP for Gingerbread needs x64 (why on earth...), but everything else should be fine
Click to expand...
Click to collapse
Yea see i did read you need x64 for AOSP GB but i compiled using x86 and it runs fine? Why should we use 64 bit?
bonesy said:
Yea see i did read you need x64 for AOSP GB but i compiled using x86 and it runs fine? Why should we use 64 bit?
Click to expand...
Click to collapse
Not too sure but I think that 64 bit runs calculations 2 twice as fast as 32 bit. Read that a LONG time ago so I could be wrong.
I believe it is more due library differences between 32bit/64bit.
Basically you want to support as less archs, otherwise you need to test everything under both.
I guess they just made the move to 64bit and dropped 32bit compile-support.
Ah that makes sense,Building from source seems to take ages for me but i guess thats down to my 512k connection.
bonesy said:
Ah that makes sense,Building from source seems to take ages for me but i guess thats down to my 512k connection.
Click to expand...
Click to collapse
Once you got it downloaded, it's up to your CPU speed...
Are you using make -jX, where X is the number of cores in your CPU, +1?
ie. I use make -j9
It runs it 9x faster by carrying out 8 jobs at once (plus the one keeping everything in sync) iirc

[QUESTION] about kernel compilation

Trying to compile kernel from sources. I now the process, and I do it not the first time - I have kernel on my desktop linux compiled from source ...
okay. the question is ... about errors from "make" (I changed locale to EN)
[[email protected] KangBanged-7x30]$ LANG=en_GB.UTF-8 ARCH=arm CROSS_COMPILE=$CCOMPILER make -j3
File "/home/melky/KERNEL/KangBanged-7x30/scripts/gcc-wrapper.py", line 76
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
CHK include/linux/version.h
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
File "/home/melky/KERNEL/KangBanged-7x30/scripts/gcc-wrapper.py", line 76
print "error, forbidden warning:", m.group(2)
^
SyntaxError: invalid syntax
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
HOSTCC scripts/kallsyms
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
What I'm doing wrong?
About config and other ...
.config I got from phone via "adb pull /proc/config.gz".
about $CCOMPILER variable :
[[email protected] KangBanged-7x30]$ echo $CCOMPILER
/usr/bin/arm-none-eabi-
[[email protected] KangBanged-7x30]$ whereis arm-none-eabi-gcc
arm-none-eabi-gcc: /usr/bin/arm-none-eabi-gcc
Click to expand...
Click to collapse
kernel source from KangBangKreations.
LOL
LOL! In Archlinux python is linked to python3. Just linked /usr/bin/python to /usr/bin/python2.7 and everything is going fine.
P.S. Sorry for doublepost.
coloured_chalk said:
LOL! In Archlinux python is linked to python3. Just linked /usr/bin/python to /usr/bin/python2.7 and everything is going fine.
P.S. Sorry for doublepost.
Click to expand...
Click to collapse
I've been trying for HOURS to get the toolchain to work just to figure out it was ARCH LINUX. First time trying to build a kernel as well. You have saved me all the time in the world. I never would have figured this out.
Thank you,
Jake
thank you so much! i also would have never considered thinking in this direction..
but now im stuck on the correct linking command.
i tried ln -s /usr/bin/python /usr/bin/python2.7
and i tried exchanging the two paths.. none of them succeeded and im confused now.. could you pls help me?
sorry for this stupid question, i know this could not work, but i cant help myself finding the correct solution..
Inf.Lagranty said:
thank you so much! i also would have never considered thinking in this direction..
but now im stuck on the correct linking command.
i tried ln -s /usr/bin/python /usr/bin/python2.7
and i tried exchanging the two paths.. none of them succeeded and im confused now.. could you pls help me?
sorry for this stupid question, i know this could not work, but i cant help myself finding the correct solution..
Click to expand...
Click to collapse
I followed the tutorial from archwiki, works fine
Code:
mkdir ~/bin
ln -s /usr/bin/python2 ~/bin/python
ln -s /usr/bin/python2-config ~/bin/python-config
export PATH=~/bin:$PATH
Help Please how to compiling kernel from source
thejakehemmerle said:
I've been trying for HOURS to get the toolchain to work just to figure out it was ARCH LINUX. First time trying to build a kernel as well. You have saved me all the time in the world. I never would have figured this out.
Thank you,
Jake
Click to expand...
Click to collapse
i was try to compiling kernel from source but i got error where i am wrong
error log uploaded

[Q] Help with Compiling my First CM ROM

I am trying to compile my first CM rom for the m7vzw. I used http://wiki.cyanogenmod.org/w/Build_for_m7vzw as a tutorial.
My build does attempts to compile, but ends with this:
Code:
LZO
arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[4]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[3]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[2]: *** [zImage] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/*username*/android/system/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I have no idea where to start with this. I am new to building Roms and want to understand how I should go from here.
Thanks in Advance.
IamIronMan said:
I am trying to compile my first CM rom for the m7vzw. I used http://wiki.cyanogenmod.org/w/Build_for_m7vzw as a tutorial.
My build does attempts to compile, but ends with this:
Code:
LZO
arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[4]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[3]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[2]: *** [zImage] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/*username*/android/system/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I have no idea where to start with this. I am new to building Roms and want to understand how I should go from here.
Thanks in Advance.
Click to expand...
Click to collapse
I have only built kernels, but it seems you may want to try another compression type instead of lzo.
How should I go about doing that? I only have had a few tutorials. I have not been able to compile CM or PAC. I have moved my build setup to my desktop and am going to start from scratch.
I will be using the instructions from these two tutorials:
http://wiki.cyanogenmod.org/w/Build_for_m7vzw#Prepare_the_device-specific_code
http://forum.xda-developers.com/showthread.php?t=2223690
If anyone has any suggestions or tips let me know.
You need to install lzop (sudo apt-get install lzop) that should help you surpass the error.
IamIronMan said:
Here is the end snippet of my latest attempt at building CM-10.2 for m7vzw. I have no idea what I am doing wrong.
Code:
target Prebuilt: DroidSansArmenian.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansArmenian.ttf_intermediates/DroidSansArmenian.ttf)
target Prebuilt: DroidSansDevanagari-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansDevanagari-Regular.ttf_intermediates/DroidSansDevanagari-Regular.ttf)
target Prebuilt: DroidSansEthiopic-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansEthiopic-Regular.ttf_intermediates/DroidSansEthiopic-Regular.ttf)
target Prebuilt: DroidSansFallback.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansFallback.ttf_intermediates/DroidSansFallback.ttf)
make[2]: *** [arch/arm/mach-msm] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/ironman/android/cm-10.2/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
target Prebuilt: DroidSansTamil-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansTamil-Regular.ttf_intermediates/DroidSansTamil-Regular.ttf)
EDIT: Turns out it was a java memory error. Did what was recommended below. On second build, got lzop error again. Currently trying to build again with santod040's suggestion above.
http://wiki.cyanogenmod.org/w/Build_for_m7vzw#If_the_build_breaks...
Click to expand...
Click to collapse
EDITx2: I successfully compiled cm-10.2 and installed it on my phone. It works great! Thank you for all your help!
Sorry for double post
So I have been trying to compile a PAC-man Rom. However, everytime I run "./build-pac.sh" It ends with this:
Code:
system_size = (int) 2348809216
tool_extensions = (str) device/htc/m7vzw/../common
userdata_size = (int) 27380416512
using device-specific extensions in device/htc/common
unable to load device-specific module; assuming none
building image from target_files BOOT...
running: mkbootfs -f /tmp/targetfiles-3Vfxa1/META/boot_filesystem_config.txt /tmp/targetfiles-3Vfxa1/BOOT/RAMDISK
running: minigzip
running: mkbootimg --kernel /tmp/targetfiles-3Vfxa1/BOOT/kernel --cmdline console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 --base 0x80600000 --pagesize 2048 --ramdisk_offset 0x01400000 --ramdisk /tmp/tmphX9a8v --output /tmp/tmpSA9Ntd
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/ironman/android/PAC-MAN/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmp6VDlXw /home/ironman/android/PAC-MAN/out/target/product/m7vzw/pac_m7vzw-ota-bbf04d9f7d.zip
done.
Package Complete: /home/ironman/android/PAC-MAN/out/target/product/m7vzw/cm-10.2-20131112-UNOFFICIAL-m7vzw.zip
/home/ironman/android/PAC-MAN/out/target/product/m7vzw/pac_m7vzw-ota-eng.ironman.zip doesn't exist!
What is going on? I have tried to look back through and find any errors but were none.
Any ideas?

Categories

Resources