kernel compiling - Galaxy S I9000 Android Development

did someone could provide a minimal guide for compile kernel ? got some problem with using gcc prebuilt in samsung source. can you tell what defconfig you used ?
once used defconfig versatile_defconfig and .config saved i have got the following error:
[email protected]:~/Downloads/android-source/GalaxyS/linux-2.6.29# make ARCH=arm CROSS_C
OMPILE=/root/Downloads/android-source/opensrc/prebuilt/linux-x86/toolchain/arm-e
abi-4.2.1/bin/arm-eabi-
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
CALL scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
CC init/main.o
In file included from init/main.c:79:
include/linux/kernel_sec_common.h:9:22: error: mach/map.h: No such file or direc
tory
include/linux/kernel_sec_common.h:10:29: error: plat/regs-clock.h: No such file
or directory
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
I tried also with s3c6400_config with the following error:
[email protected]:~/Downloads/android-source/GalaxyS/linux-2.6.29# make ARCH=arm CROSS_C
OMPILE=/root/Downloads/android-source/opensrc/prebuilt/linux-x86/toolchain/arm-e
abi-4.2.1/bin/arm-eabi-
scripts/kconfig/conf -s arch/arm/Kconfig
net/ipv6/netfilter/Kconfig:165:warning: config symbol defined without type
CHK include/linux/version.h
Generating include/asm-arm/mach-types.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/ihex2fw
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/arm/kernel/compat.o
CC arch/arm/kernel/elf.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
CC arch/arm/kernel/irq.o
CC arch/arm/kernel/process.o
arch/arm/kernel/process.c: In function 'arm_machine_restart':
arch/arm/kernel/process.c:107: error: 'S5P_INFORM5' undeclared (first use in thi
s function)
arch/arm/kernel/process.c:107: error: (Each undeclared identifier is reported on
ly once
arch/arm/kernel/process.c:107: error: for each function it appears in.)
make[1]: *** [arch/arm/kernel/process.o] Error 1
make: *** [arch/arm/kernel] Error 2

How about pulling the config directly from the device, did you try that? (BTW I didn't get to compiling just yet, I only have SGS for two busy days now, so no direct experience yet, just asking).

Case_ said:
How about pulling the config directly from the device, did you try that? (BTW I didn't get to compiling just yet, I only have SGS for two busy days now, so no direct experience yet, just asking).
Click to expand...
Click to collapse
dont know if and where the config is stored on SGS, apparently theres no .config

I have downloaded the AOSP eclair build and am trying to compile it.
It's still compiling.
I believe(stress on believe) you have to download the Samsung firmware from wesgamer and he has a sh file that gets rid of dream and other htc code.
Also he might have a different config
I am not experienced at android rom compiling.
Please take extreme care with whatever you do.
HOLY CRAP!!! I'm so sorry. I must have missed the readme.txt
Follow neldar.

If you have the latest sourcecode from opensource.samsung.com
then you should take a look into the README.txt and build_kernel.sh.
Everything you need to know to successfully build the kernel + modules is described in these files.

husq510 said:
dont know if and where the config is stored on SGS, apparently theres no .config
Click to expand...
Click to collapse
Yeah, sorry, I thought it could be pulled from /proc/config.gz as usual and didn't verify, but as I see now with adb, apparently Samsung has this disabled in their kernel.

I've compiled the kernel as per the readme file, but after I flash it, I get a kernel panic. Are there any other steps needed that are not in the readme? The kernel I created is around 2.5mb

vibez said:
I've compiled the kernel as per the readme file, but after I flash it, I get a kernel panic. Are there any other steps needed that are not in the readme? The kernel I created is around 2.5mb
Click to expand...
Click to collapse
you need the initramfs (contains the initial / with drivers and other stuff). check out this http://forum.samdroid.net/wiki/show...amsung+Spica+i5700?highlight=zImage+initramfs it's not for the i9000 but it works like that. you just have to take the other initramfs.
hope this helps, i just got it finished here myself
edit:
* my zImage is 6051460 bytes ...
* the right initramfs is also on leshak's git. explanation is on samdroid.net

Hi there,
I 've followed the instrucions in the README.txt.
No errors, but my zImage is just 2.5 mb
I assume the .config which is in the linux-2.6.29 directory is default one.The only change I made is to enable USB_ETH for RNDIS support.
make menuconfig
then
build kernel
Am i missing something?
I recompiled serveral time the linux kernel on standard computers, this time it might need a different setup.
thanks
Found that there is this useful discussion already
http://forum.xda-developers.com/showthread.php?t=727357

gettons said:
I 've followed the instrucions in the README.txt.
No errors, but my zImage is just 2.5 mb
I assume the .config which is in the linux-2.6.29 directory is default one.The
...
Am i missing something?
Click to expand...
Click to collapse
please read before posting! you are missing initramfs as i wrote in my post above yours!

I'm getting confused with the linking of capela_defconfig
Can anyone explain in more detail please
EDIT: Ok it seems the build script is overwriting whatever I set in the .config file
EDIT 2 Ok it seems .config gets overwritten by contents of arc/arm/configs/aries_rev03_defconfig
So I added the 3 lines about initramfs to the aries_rev03_defconfig and changed the path to now point towards the source downloaded from github. Compiling now....

ups. sorry. delete plz anyone?

Ok it seems the build script is overwriting whatever I set in the .config file
Click to expand...
Click to collapse
yeah i had this too so i didn't use the build_kernel.sh script. just make ARCH=arm CROSS_COMPILE=tool-chain-path_and_prefix after make menuconfig. worked like a charm. have you tried to boot your kernel yet?

No I still get a file 2.5mb in size
Can you point me in the right direction?
Which config file are you using?

anyone has a mirror of the source code #2 posted sometime back? samsung hv removed from their site.. dont know if the current source code is the old or new code (#2)..

vibez said:
No I still get a file 2.5mb in size
Can you point me in the right direction?
Which config file are you using?
Click to expand...
Click to collapse
i did a "./build_kernel.sh Clean"
then i made "make menuconfig" and set the initramfs from leshak. you have to modify the initrd.arm.initramfs_list file to fit your file tree.
after that i did the make .... in the "linux-2.6.29" directory
edit: i did not change the .config file!
raspdeep said:
anyone has a mirror of the source code #2 posted sometime back? samsung hv removed from their site.. dont know if the current source code is the old or new code (#2)..
Click to expand...
Click to collapse
i think the currently available code is the newest one. it's slightly bigger and contains the build scripts/readme etc. additionally i had problems with uncompressing the code with the linux zip program. i suspect the archive was damaged somehow...

mine is 6MB, using the .config default and leshak initramfs and just make ARCH=arm CROSS_COMPILE=path-gcc
didnt use build_kernel.sh at all.

If you want to change the .config, then you should run once build_kernel.sh and then comment out line 75 in build_kernel.sh , like this:
Code:
#make ARCH=arm $PROJECT_NAME"_rev"$HW_BOARD_REV"_defconfig"
This will keep your .config and you could still use build_kernel.sh.

neldar said:
If you want to change the .config, then you should run once build_kernel.sh and then comment out line 75 in build_kernel.sh , like this:
Code:
#make ARCH=arm $PROJECT_NAME"_rev"$HW_BOARD_REV"_defconfig"
This will keep your .config and you could still use build_kernel.sh.
Click to expand...
Click to collapse
Thanks, I've commented out that line and it seems to be actually trying to load initramfs now
you have to modify the initrd.arm.initramfs_list file to fit your file tree.
Click to expand...
Click to collapse
Ah, I didn't realise the contents of this file needed to be edited too (I see now it's pointed to leshak's folder tree). So i've made the changes to point to my initramfs dir and recompiling now. Fingers crossed this time.....
EDIT
Success! I now have an image 6003928 bytes in size Thanks for all the help!
Right, any tips on how to patch in ext4 support?

i flashed my kernel before and it does work quite well. i am not able to root with the update.zip however. adb gives me root access to the device but i can not get root directly on the phone (#su gives me "su: uid 10085 not allowed to su"). this is quite strange because the root methods works well with the stock kernel...hm

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

[Sprint] Kernel Development - OC

Okay I've been reading and reading and finally got all the tools to build a kernel from the source that Samsung had on their site for DJ30. Since these are very identical to the other galaxy s devices they should overclock decently. Will report with more progress later.
-------------------------
Status - Downloaded source and repo and building configuration to make kernel.
Sent from my SPH-P100 using XDA App
Interested in your development... my Sprint Tab arrives tomorrow, decided to give it a 30 day try before I try the Nook Color.
Doesn't appear to be a lot of development yet, hoping to see that change.
One question, is the Zroot method still the preferred method to rooting the device?
I used superoneclick 1.5.5
Sent from my SPH-P100 using XDA App
------------------------------------------------------------
Trying to compile a test kernel to make sure everything is going to work correctly and running into this crazy error if any of the dev's can chime in please do I already installed all the repo's and linked them.
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/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/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
seems like you're missing (a part of) the gcc compiler... the part to compile for ARM it would seem...
maxjivi05 said:
I used superoneclick 1.5.5
Sent from my SPH-P100 using XDA App
------------------------------------------------------------
Trying to compile a test kernel to make sure everything is going to work correctly and running into this crazy error if any of the dev's can chime in please do I already installed all the repo's and linked them.
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/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/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
Click to expand...
Click to collapse
Made it a bit farther, got that error fixed had to install lsb along with a few other things now I'm sitting on this error. Any and all help is greatly appreciated! We can get this working!
------------------------------------
[email protected]:~/.Tab_Kernel_sources/Kernel$ make
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
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/conmakehash
CC init/main.o
In file included from init/main.c:85:
include/linux/kernel_sec_common.h:7:22: error: mach/map.h: No such file or directory
include/linux/kernel_sec_common.h:8:29: error: mach/regs-clock.h: No such file or directory
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/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/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
I'm not a dev, but I sure can test on my sprint tablet
I have a Linux blade at home, what are the tools necessary to compile from source, and what repo are you using for the sprint tab drivers and such?
Simple solution here is that you are missing GCC or have an incorrect version installed. I wrote a how to compile thread in the Streak section a few months bak ill dig it up and post it here.
try
apt-get install build-essential
Already installed build essential.
Sent from my SPH-P100 using XDA App
The readme file tells you where to get the compiler from, decompress it to /opt/toolchain.
And this thread has pretty good explanations on how to build the kernel http://forum.xda-developers.com/showthread.php?t=837170
A little farther int he process of getting this sucker compiled... Got this error now... *I forgot how much of a pain it was to go through setting things up perfectly! lol.. any and all help is greatly appreciated!
-------------------------------------
make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
cp: cannot stat `/home/max/.Tab_Kernel_sources/Kernel/modules.order': No such file or directory
make[1]: *** [_modinst_] Error 1
make: *** [sub-make] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$
This is the most disappointing thread ever.
maxjivi05 said:
A little farther int he process of getting this sucker compiled... Got this error now... *I forgot how much of a pain it was to go through setting things up perfectly! lol.. any and all help is greatly appreciated!
-------------------------------------
make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
cp: cannot stat `/home/max/.Tab_Kernel_sources/Kernel/modules.order': No such file or directory
make[1]: *** [_modinst_] Error 1
make: *** [sub-make] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$
Click to expand...
Click to collapse
It's pretty obvious from that line that it can't find that particular binary in your toolchain directory...
I followed the instructions in the readme file and compiled the kernel already, it was extremely simple. You ran the build_kernel.sh file right... after editing it?
Yes I did and its been 5 years since I've done anything with Linux so its a rather learning curve to get anything done. With lack of development on tab thought it would be a good place to start. I've done normal kernel build before but nothing for a phone and it wasn't rather hard either it was just a few commands and everything was already in the right directories
Sent from my SPH-P100 using XDA App
FYI I grabbed the kernel source and cross toolchain, installed the toolchain to /opt (on my desktop Linux box) added the toolchain's bin directory to the start of $PATH, edited the (iirc - am posting from a Windows box) build.sh script and the kernel built fine first time.
I need to set the path to the raminitfs file in .config and then try again and make sure it boots ok
Anyway just a post to say that it must be your setup. I see you have installed the toolchain to /home/max/GalaxyTab/prebuilt/linux-x86/toolchain/ and in your latest post there's the following error: make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
So there's obviously a path problem there. I also see you're using a plain "make" command without setting the ARCH env var.
I'd recommend giving the build.sh script a go (after editing the toolchain path), as it sets up all the env vars, etc., for you automatically.
okay, I was missing a file went I was doing my repo sync... which didn't make sense but i got it worked out... finally able to compile going to apply the patches and recompile and will repo, but thanks for the people who did help figure out the issue...
maxjivi05 said:
With lack of development on tab
Click to expand...
Click to collapse
HUH?
10 characters
Does anyone have an untouched sprint kernel pulled from a device? I rooted mine and it's seeminly impossible to pull the initrd out of it.
jstigall said:
Does anyone have an untouched sprint kernel pulled from a device? I rooted mine and it's seeminly impossible to pull the initrd out of it.
Click to expand...
Click to collapse
Nevermind, I got it... I have a booting Sprint kernel that works great.
Do you have a link to the patches you want to include, I may be able to get the CPU frequency adjustments you want to make built.
jstigall said:
Nevermind, I got it... I have a booting Sprint kernel that works great.
Do you have a link to the patches you want to include, I may be able to get the CPU frequency adjustments you want to make built.
Click to expand...
Click to collapse
Currently there are 2 files that tell the kernel the freq to run at, and 3 spots at the bottom of each that need changed. Located in /ARM/ARCH/OMAP something I need to get more info when I get home I'll edit this post and let you know but there is a file called cpu24xx.c and cpu34xx.c, I was going to compile a working kernel with those files edited to run 1200MHz to test and see if that would work if that didn't work there were some patches made on the other galaxy s devices I have links to thanks to SetiroN for providing, which they are a little different then the files for the galaxy source but I'll post it when I get home and have time!

help rebuilding/install CM10 kernel (I get a bootloop)

has anyone here rebuilt the CM10 nightly kernel before? I am trying to rebuild it and install it myself (which I've done on many other devices), but for some reason after installing my kernel I'm getting stuck in a bootloop.
I have a SGS3 AT&T, but from what I've read all US versions use a unified kernel. By digging through the Cyanogenmod github repositories, I found that this is the CM10 kernel:
https://github.com/CyanogenMod/android_kernel_samsung_d2
The kernel configuration that it ends up using is: cyanogen_d2_defconfig ... so to build the kernel I do:
Code:
make ARCH=arm clean
make ARCH=arm cyanogen_d2_defconfig
make -j2 ARCH=arm CROSS_COMPILE=arm-eabi-
Now, I need to create boot.img and pack the ramdisk. I extracted the ramdisk from one of the CM10 nightlies, and I do:
Code:
./mkbootfs ramdisk | gzip > ramdisk.gz
cp arch/arm/boot/zImage .
./mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "androidboot.hardware=qcom user_debug=31" -o boot.img --base 0x80200000 --pagesize 2048
I got the command line using unpackbootimg:
Code:
$ ../unpackbootimg -i boot.img
BOARD_KERNEL_CMDLINE androidboot.hardware=qcom user_debug=31
BOARD_KERNEL_BASE 80200000
BOARD_PAGE_SIZE 2048
Finally, I took the updater script from this kernel, replacing its boot.img with my boot.img, as well as placing my kernel modules in system/lib/modules. In the end, I have no created the following update zip file to flash in CWM. Feel free to download it and verify the updater script, however here is the updater code:
Code:
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
package_extract_dir("system", "/system");
unmount("/system");
assert(package_extract_file("boot.img", "/cache/boot.img"),
write_raw_image("/cache/boot.img", "/dev/block/mmcblk0p7"),
delete("/cache/boot.img"));
show_progress(0.100000, 0);
But like I said, whenever I go to install this kernel it just gives me a bootloop, so something doesn't seem right. I get no errors/warnings when building the kernel, I extracted the ramdisk correctly... can anyone pick out something I'm missing? maybe mkbootimg?
Thanks!
Why do you need to do this?
Sent from my SGH-I747 using xda app-developers app
because I'm creating a custom kernel, and I figured before I modified it I would just try a simple rebuild...
Look at my repo and match up everything or just use it whole and create the folders for Package and Ramdisk that it wants, then replace the toolchain/cross_compile that I use with the path of yours.
Build script:
https://github.com/ktoonsez/KT747-JB/blob/jellybean/build_d2att_aosp.sh
Alos replace your existing "mkbootfs" and "mkbootimg" files with mine.
thanks a bunch for the pointer to your scripts! I am now using your mkbootfs and mkbootimg, and I also noticed that you included the following in your mkbootimg, which I didn't:
Code:
--ramdiskaddr 0x81500000
So, I added this and now I actually boot but my screen is not working I get the Samsung logo, then the Samsung Galaxy SIII boot screen, then my screen never turns on. I am able to grab dmesg and logcat now though, so I am digging through to narrow down the problem as I continue to go through your scripts!
if I don't want to overclock with my kernel, can I skip including 00post-init.sh which runs these commands:
Code:
#Set governor items
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq;
echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $(date) END of post-init.sh
I was trying to jump on the bandwagon and build KT747 but I encounter the following errors:
Code:
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/piggy.gzip.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/lib1funcs.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/ashldi3.o: unknown CPU architecture
Anyone know why this is happening? I am using GCC 4.7 and the appropriate toolchain. More detailed log: http://pastebin.com/Kb3PWYtq
so I am still having issues where my phone goes through the entire boot process, but my screen does not re-activate after the Samsung Galaxy SIII logo. So I never end up seeing the Cyanogen animation.
Here are relevant logs:
No screen logcat: http://pastebin.com/W4v6Xk9g
No screen dmesg: http://pastebin.com/ydGtj216
With screen logcat: http://pastebin.com/DjENx2gE
With screen dmesg: http://pastebin.com/f3sAzjZa
The "with screen" cases are using the prebuilt CM10 nightlies
Rocket Nine said:
I was trying to jump on the bandwagon and build KT747 but I encounter the following errors:
Code:
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/piggy.gzip.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/lib1funcs.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/ashldi3.o: unknown CPU architecture
Anyone know why this is happening? I am using GCC 4.7 and the appropriate toolchain. More detailed log: http://pastebin.com/Kb3PWYtq
Click to expand...
Click to collapse
where did you download your linaro 4.7 binaries from?
Components > Android > android-toolchain 4.7 (ICS, JB)
http://www.linaro.org/downloads/
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Rocket Nine said:
Components > Android > android-toolchain 4.7 (ICS, JB)
http://www.linaro.org/downloads/
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
thanks! So, in another thread ktoonsez said to use the :June 2012 build. That one seems to be from September. Here is the June link:
http://releases.linaro.org/12.06/co...12.06-3-2012-06-19_14-52-07-linux-x86.tar.bz2
using the June toolchain, the kernel almost builds entirely successfully until the last few links when I get these errors:
Code:
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
MODPOST 13 modules
Kernel: arch/arm/boot/Image is ready
CC arch/arm/mach-msm/dma_test.mod.o
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/mach-msm/msm-buspm-dev.mod.o
CC arch/arm/mach-msm/reset_modem.mod.o
CC crypto/ansi_cprng.mod.o
CC drivers/crypto/msm/qce40.mod.o
CC drivers/crypto/msm/qcedev.mod.o
CC drivers/crypto/msm/qcrypto.mod.o
CC drivers/input/evbug.mod.o
CC drivers/media/video/gspca/gspca_main.mod.o
CC drivers/net/wireless/bcmdhd/dhd.mod.o
CC drivers/net/wireless/btlock/btlock.mod.o
CC drivers/scsi/scsi_wait_scan.mod.o
CC drivers/spi/spidev.mod.o
LD [M] arch/arm/mach-msm/dma_test.ko
CC arch/arm/boot/compressed/misc.o
LD [M] arch/arm/mach-msm/msm-buspm-dev.ko
LD [M] arch/arm/mach-msm/reset_modem.ko
LD [M] crypto/ansi_cprng.ko
LD [M] drivers/crypto/msm/qce40.ko
LD [M] drivers/crypto/msm/qcedev.ko
LD [M] drivers/crypto/msm/qcrypto.ko
LD [M] drivers/input/evbug.ko
LD [M] drivers/media/video/gspca/gspca_main.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
CC arch/arm/boot/compressed/decompress.o
LD [M] drivers/net/wireless/btlock/btlock.ko
LD [M] drivers/scsi/scsi_wait_scan.ko
LD [M] drivers/spi/spidev.ko
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/piggy.gzip.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
LD arch/arm/boot/compressed/vmlinux
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
hedpe said:
using the June toolchain, the kernel almost builds entirely successfully until the last few links when I get these errors:
Code:
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
MODPOST 13 modules
Kernel: arch/arm/boot/Image is ready
CC arch/arm/mach-msm/dma_test.mod.o
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/mach-msm/msm-buspm-dev.mod.o
CC arch/arm/mach-msm/reset_modem.mod.o
CC crypto/ansi_cprng.mod.o
CC drivers/crypto/msm/qce40.mod.o
CC drivers/crypto/msm/qcedev.mod.o
CC drivers/crypto/msm/qcrypto.mod.o
CC drivers/input/evbug.mod.o
CC drivers/media/video/gspca/gspca_main.mod.o
CC drivers/net/wireless/bcmdhd/dhd.mod.o
CC drivers/net/wireless/btlock/btlock.mod.o
CC drivers/scsi/scsi_wait_scan.mod.o
CC drivers/spi/spidev.mod.o
LD [M] arch/arm/mach-msm/dma_test.ko
CC arch/arm/boot/compressed/misc.o
LD [M] arch/arm/mach-msm/msm-buspm-dev.ko
LD [M] arch/arm/mach-msm/reset_modem.ko
LD [M] crypto/ansi_cprng.ko
LD [M] drivers/crypto/msm/qce40.ko
LD [M] drivers/crypto/msm/qcedev.ko
LD [M] drivers/crypto/msm/qcrypto.ko
LD [M] drivers/input/evbug.ko
LD [M] drivers/media/video/gspca/gspca_main.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
CC arch/arm/boot/compressed/decompress.o
LD [M] drivers/net/wireless/btlock/btlock.ko
LD [M] drivers/scsi/scsi_wait_scan.ko
LD [M] drivers/spi/spidev.ko
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/piggy.gzip.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
LD arch/arm/boot/compressed/vmlinux
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
Click to expand...
Click to collapse
I am having the same errors now but this post apparently has a fix. Trying now.
Rocket Nine said:
I am having the same errors now but this post apparently has a fix. Trying now.
Click to expand...
Click to collapse
thanks! tried that fix but getting some memcpy issue despite string.h being included... still digging!
hedpe said:
thanks! tried that fix but getting some memcpy issue despite string.h being included... still digging!
Click to expand...
Click to collapse
Try replacing your arch/arm/boot/compressed/Makefile with this http://pastebin.com/J0m6ka26
It compiles successfully now :good:
Rocket Nine said:
Try replacing your arch/arm/boot/compressed/Makefile with this http://pastebin.com/J0m6ka26
It compiles successfully now :good:
Click to expand...
Click to collapse
Thanks bud! I'm having one last error, not sure if it was an issue with your paste:
Code:
/home/owner/Documents/android-wmon/core/KT747-JB/arch/arm/boot/compressed/Makefile:112: *** missing separator. Stop.
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
Here is the relevant part of the Makefile:
Code:
$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
$(call cmd,shipped) <----- this is line 112
The odd thing is that this exists in the original Makefile unmodified
----
EDIT: Sorry! I got this working now, it was an issue with tabs/spaces from copying and pasting
I believe that is caused by wrong indentation. Did you copy the code from the webpage? My browser (Chrome) copies the tabs as spaces. Try downloading the paste and flat out replace the file with it.
I copied the META-INF folder out of a KT747 zip to my build and according to TWRP it flashes successfully. Now we are on the same page with the boot loop.
Rocket Nine said:
I believe that is caused by wrong indentation. Did you copy the code from the webpage? My browser (Chrome) copies the tabs as spaces. Try downloading the paste and flat out replace the file with it.
I copied the META-INF folder out of a KT747 zip to my build and according to TWRP it flashes successfully. Now we are on the same page with the boot loop.
Click to expand...
Click to collapse
Thanks a bunch! I got it to build successfully.
I'm officially dumbfounded. I no longer get the bootloop in either one of my kernels (stock CM10 or the KT747 rebuild), but in both cases my phone boots without the display working. I have NO clue why my display doesn't work when I rebuild these kernels.
Let me help you get your bootloop fixed though first... then I'm curious if your screen will work.
I think what was causing my bootloop was a lack of this parameter when using mkbootfs:
Code:
--ramdiskaddr 0x81500000
However, if you're using ktoosez script, that should already be included. Also, make sure to clear your cache, dalvik, and fix permissions.
also, come to #cyanogenmod on irc.freenode.net, we might be able to work through this more quickly there
finalllyyyyy i have a display working! Apparently I was using too old of a version of userspace that did not match with my kernel. So my nightly was too old with the kernel rebuilds I was using. Let me know if you still have issues.

Can't compile Galaxy Note 3 Kernel

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.

Categories

Resources