[Q] trying to build a stock kernel from source - Android

i have been trying to teach myself about kernels and followed this thread
http://forum.xda-developers.com/showthread.php?t=817387
im not sure where to get initramfs or if i need it.
if anyone who has built a kernel before can give me some pointers that'd be great

Dani897 said:
i have been trying to teach myself about kernels and followed this thread
http://forum.xda-developers.com/showthread.php?t=817387
im not sure where to get initramfs or if i need it.
if anyone who has built a kernel before can give me some pointers that'd be great
Click to expand...
Click to collapse
Man i have no idea i would try to reach out to the kernel gurus over in the captivate forum
Sent from my SAMSUNG-SGH-I997 using XDA Premium App

i asked glitterballs who linked me to that thread by stumpzy. i really am starting from scratch though. ive never compiled a kernel for anything before. at least now i know why the instructions in the readme file that comes in the source package didnt work. just a matter of editing one line in makefile. i tried to build it after that change but get errors.

Dani897 said:
i asked glitterballs who linked me to that thread by stumpzy. i really am starting from scratch though. ive never compiled a kernel for anything before. at least now i know why the instructions in the readme file that comes in the source package didnt work. just a matter of editing one line in makefile. i tried to build it after that change but get errors.
Click to expand...
Click to collapse
what errors?

/tmp/ccgqkvQY.s: Assembler messages:
/tmp/ccgqkvQY.s:2583: Error: can't resolve `.text' {.text section} - `.LFB1126' {.ARM.extab section}
make[1]: *** [arch/arm/kernel/process.o] Error 1
make: *** [arch/arm/kernel] Error 2
this is what i got without doing anything with .config.
another time after changing .config according to stumpzy's thread it went farther but had errors related to drivers, maybe the source isn't complete. i wish i had some background in this stuff, im just trying to teach myself and informations is hard to find if you dont know what you are looking for.
the above error appears to be from using the wrong toolchain. i tried one that unhelpful posted a while back but it doesnt seem to help at all. back to the one stumpzy posted
drivers/media/video/samsung/tv20/s5p_stda_grp.c: In function 's5ptvfb_set_par':
drivers/media/video/samsung/tv20/s5p_stda_grp.c:614:12: error: lvalue required as left operand of assignment
make[5]: *** [drivers/media/video/samsung/tv20/s5p_stda_grp.o] Error 1
make[4]: *** [drivers/media/video/samsung/tv20] Error 2
make[3]: *** [drivers/media/video/samsung] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
i get these errors when i try to use stumpzy's instructions

did you use
the samsung tree of the 2.6.35 tree on open source. The full release of the code for the infuse has a readme text that says how to use the make to get the kernel.
Thanks
Jon
I am still trying to get the Ubuntu up and running so I can learn more also. We had a bad storm and lost power during the upgrade so still working on the computer.

the readme is wrong. the makefile needs to be editied to use that toolchain and i still get the errors.
just install stumpzy's vm, if you want a gui on it then apt-get fluxbox or another window manager.

cool
okay still trying to get my workspace set will let you know what happens and pls keep me in the loop also.
using these two:
http://forum.xda-developers.com/showpost.php?p=5626300&postcount=3
and
http://forum.xda-developers.com/showthread.php?t=633246
the second one may work with the modifie kitchen
Thanks
Jon

I have a good idea: let's move this to Android's Chef Central, where all the Android devs roam.

Related

Problems building openeclair for kaiser

I found these instructions from the androidspin.com website
http://androidspin.com/forum/showthread.php?t=2004
after following the steps,
I was getting this error:
build/core/product_config.mk:173: *** No matches for product "openeclair_dream_sapphire_us". Stop.
someone there posted some suggested fixes
http://androidspin.com/forum/showpost.php?p=10919&postcount=11
but I ran into problems with missing files when building.
then I found a suggestion from here
http://forum.xda-developers.com/showthread.php?t=586039
and that helped
(but it still seems that there are a lot of errors from missing ./unzip-files.sh's)
but now I cant get past this error:
Code:
as: unrecognized option `-Qy'
I know it is a simple fix, I have had this before for other builds.
but I cant figure out how I fixed it or what is actually the problem.
any ideas???
does anyone have a guide for building a kaiser eclair that is actually working?

[Q] Make error - no rule to make target for libnvdispmgr_d.so

Hey!
I'm trying to build an ICS version for my p990 from the VorkTeam's repos. I'm getting an error in the build process that I haven't been able to solve though.
I've extracted the files from my current CM7 ROM with the ./extract-files.sh script so all the files should be in place and they are located under vendor/lge/p990/proprietary/.
Could someone more knowable then me help me figure out what this error could be due to, that would be awesome. I can't really figure out what "rule to make target" could be missing. According to at least one of the members on the VorkTeam they have not seen this error and their source should build fine.
make: *** No rule to make target `out/target/product/p990/obj/lib/libnvdispmgr_d.so', needed by `out/target/product/p990/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/LINKED/libsurfaceflinger.so'. Stop.
Any help or pointers is greatly appreciated.
Thanks.

[Q] Custom kernel compile error!!

Believe me, I have searched here and googled high and low to help ...
if i've searched wrong and you know where the post i'm looking for is i will be more than
happy to read it.. point me to it!!
That being said.
Last week, i played around with getting a custom recovery built for INQ Cloud Touch..
is a nice little phone for it's price but lacks devs!
After compiling - flashing recompiling re-flashing for almost a week and on the verge of giving up ...
i realized, searched and found flash_image ... come to find out custom compile of recovery
was fine, fastboot did not like my device and wasn't flashing it properly.
So flash_image got the custom recovery working as suppose to, able to backup/restore ...
Flash roms.. however there are no roms.. best i could do was try roms from devices close to
this one, with no luck!
So i decided i would try my hand at making a 2.3.7 gingerbread rom.
of course stock is froyo 2.2.1 and before i can make the rom.. i need a kernel for gingerbread.
So i got the cm-kernel source using this guide:
http wiki DOT cyanogenmod DOT com/wiki/Building_Kernel_from_source
(sry wasn't allowed to post links)
[EDIT]
pulled my .config file using both
/proc/config.tgz
and the included script to pull it from the boot.img
[/EDIT]
Now, i been trying to get kernel compiled for the last 5 days.. and like i said, no lack of searching and reading...
Had first error, forgot what it was now, but i got it fixed and compile went on.
for the last 4 days i been facing this bad boy and can't find a fix for this to save my life.
Code:
LD .tmp_vmlinux1
arm-eabi-ld: no machine record defined
arm-eabi-ld: no machine record defined
arch/arm/mach-msm/built-in.o: In function `parse_tag_msm_partition':
/home/orgwiz/android/cm-kernel/cm-kernel/arch/arm/mach-msm/nand_partitions.c:126: undefined reference to `msm_nand_data'
drivers/built-in.o: In function `msm_i2c_recover_bus_busy':
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:276: undefined reference to `msm_set_i2c_mux'
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:314: undefined reference to `msm_set_i2c_mux'
drivers/built-in.o: In function `msm_i2c_probe':
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:492: undefined reference to `msm_set_i2c_mux'
make: *** [.tmp_vmlinux1] Error 1
I have a notepad full of things i have enabled/disabled and restored to original trying to find what is missing or shouldn't be there!
And help would be GREATLY APPRECIATED!
Well, I have very little linux knowledges, so I don't know if I will be able to help you, anyway send me a PM if you still need help with that, because it's really interesting what you are doing. There is no roms for this phone, I could not even find the original one. I have this phone, INQ cloud touch, and I made a big mistake, I removed the INQFacebook.apk and many others that were flashed in the rom, without making any buckup (I know, I'm idiot).
The thing is that I've been looking for the apks or the original rom with no luck, to restore them in my phone, as I cannot do anything from the phone, but I still have adb access so I can flash any file. On the phone obviously always pops up a messaging like "Application INQ Launcher (com.inqmobile.launcher.core) closed unspectly. Force to Close". I guess because it's trying to load some of the INQ applications I deleted, like INQFacebook.
So if you know where I could get those files to restore them in my mobile or if you know any official rom that I can flash using CWM (ClockworkMod Recovery) it would be very nice.
The list of apps I deleted are:
from SYSTEM/APP
Spotify
Vringo
Shazam
Facebook
INQFacebook...
INQFacebook...
GoodWLM...
from DATA/APP
com.spotify...
com.shazam...
com.facebook...
com.spbu.myhub...
Hi,
Well, even if was there and I wrote it I didn't realize that the whole thing was the default launcher, I just installed a new and set it as default and now the phone is ****ing perfect, and without the applications that I didn't want to have.
orgwiz said:
Believe me, I have searched here and googled high and low to help ...
if i've searched wrong and you know where the post i'm looking for is i will be more than
happy to read it.. point me to it!!
That being said.
Last week, i played around with getting a custom recovery built for INQ Cloud Touch..
is a nice little phone for it's price but lacks devs!
After compiling - flashing recompiling re-flashing for almost a week and on the verge of giving up ...
i realized, searched and found flash_image ... come to find out custom compile of recovery
was fine, fastboot did not like my device and wasn't flashing it properly.
So flash_image got the custom recovery working as suppose to, able to backup/restore ...
Flash roms.. however there are no roms.. best i could do was try roms from devices close to
this one, with no luck!
So i decided i would try my hand at making a 2.3.7 gingerbread rom.
of course stock is froyo 2.2.1 and before i can make the rom.. i need a kernel for gingerbread.
So i got the cm-kernel source using this guide:
http wiki DOT cyanogenmod DOT com/wiki/Building_Kernel_from_source
(sry wasn't allowed to post links)
[EDIT]
pulled my .config file using both
/proc/config.tgz
and the included script to pull it from the boot.img
[/EDIT]
Now, i been trying to get kernel compiled for the last 5 days.. and like i said, no lack of searching and reading...
Had first error, forgot what it was now, but i got it fixed and compile went on.
for the last 4 days i been facing this bad boy and can't find a fix for this to save my life.
Code:
LD .tmp_vmlinux1
arm-eabi-ld: no machine record defined
arm-eabi-ld: no machine record defined
arch/arm/mach-msm/built-in.o: In function `parse_tag_msm_partition':
/home/orgwiz/android/cm-kernel/cm-kernel/arch/arm/mach-msm/nand_partitions.c:126: undefined reference to `msm_nand_data'
drivers/built-in.o: In function `msm_i2c_recover_bus_busy':
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:276: undefined reference to `msm_set_i2c_mux'
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:314: undefined reference to `msm_set_i2c_mux'
drivers/built-in.o: In function `msm_i2c_probe':
/home/orgwiz/android/cm-kernel/cm-kernel/drivers/i2c/busses/i2c-msm.c:492: undefined reference to `msm_set_i2c_mux'
make: *** [.tmp_vmlinux1] Error 1
I have a notepad full of things i have enabled/disabled and restored to original trying to find what is missing or shouldn't be there!
And help would be GREATLY APPRECIATED!
Click to expand...
Click to collapse
Hi orgwiz,
Bug INQ for the kernel sources they are legally obligated to release them because of the GPL. Once you have the source then you should have correct board drivers. The way embedded development works is that INQ wrote really specific drivers stock cyanogen kernel only has stuff for supported devices. So even if you build it, it likely won't boot on your device. In terms of building a new kernel you may be able to get away using the same kernel but updated init scripts you can still have a decent port like that but your YMMV (worst case you'll have trouble with 3D drivers but I'm pretty sure most of your hardware should work fine with out changes). Try building a CM userland and seeing if you can get it to boot as a first step (its going to be difficult but its a 100% possible I was able to do it with a an Eclair kernel). At worst case you'll have to back fit changes to the Froyo kernel you can look around github and cherry pick commits. If you adventurous the other options is to forward fit all of INQ's changes to the CM kernel.
There's a backup of the stock rom available if you google for "Porting INQ Cloud Touch" on the cyanogenmod forums (I can't post links yet)
I'm also trying to do some dev on this phone but have mostly given up because I can't get anything to boot and I don't know of any way to get any form of debug messages. If anyone wants to help, let me know.
I didn't know that they were required to release the kernel sources, that will surely help so I've sent them an email.
This was my first android. It was a good little phone. But I killed it within a month. I had it rooted ( didn't make a backup ), was using a file explorer, and my thumb twitched deleting something the phone needed. The only thing I can get from it is emergency mode and adb mode when connected to the computer. I spent so much time looking for either an original Canadian rom or at least a custom one I could try to flash. I gave up eventually and moved on. I would still like to revive that droid if I could. Mainly to prove it ain't dead. lol. I'll keep checking in, good luck with your project. :good:
Error While Compiling Kernel Of REDMI 1s
Code:
[email protected]:~/android/kernel$ make zImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC drivers/input/touchscreen/ft5x06_ts.o
drivers/input/touchscreen/ft5x06_ts.c: In function 'ft5x06_get_factory_id':
drivers/input/touchscreen/ft5x06_ts.c:432:45: warning: 'ft5336_bootloader_ver' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: ft5x06_ts.c:432
make[3]: *** [drivers/input/touchscreen/ft5x06_ts.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2

I need help with this build error

Im not quite sure what it wants cause there isnt any folder there that it is calling
Code:
Notice file: system/core/netcfg/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/netcfg.txt
Import includes file: /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/pngtest_intermediates/import_includes
Export includes file: external/libpng/Android.mk -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/pngtest_intermediates/export_includes
Notice file: external/libpng/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/pngtest.txt
Import includes file: /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/radiooptions_intermediates/import_includes
Export includes file: hardware/ril/rild/Android.mk -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/radiooptions_intermediates/export_includes
Notice file: hardware/ril/rild/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/radiooptions.txt
make: *** No rule to make target `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/rild_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
any help would be appreciated
I figured it out lol this is my first time being serious building something, but yay its still building so fingers crossed:fingers-crossed:
T10NAZ said:
Im not quite sure what it wants cause there isnt any folder there that it is calling
Code:
Notice file: system/core/netcfg/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/netcfg.txt
Import includes file: /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/pngtest_intermediates/import_includes
Export includes file: external/libpng/Android.mk -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/pngtest_intermediates/export_includes
Notice file: external/libpng/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/pngtest.txt
Import includes file: /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/radiooptions_intermediates/import_includes
Export includes file: hardware/ril/rild/Android.mk -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/radiooptions_intermediates/export_includes
Notice file: hardware/ril/rild/NOTICE -- /home/joe/[ubuntuTouch]/out/target/product/jewel/obj/NOTICE_FILES/src//system/bin/radiooptions.txt
make: *** No rule to make target `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/rild_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
any help would be appreciated
Click to expand...
Click to collapse
I had same wrong . How to figure out? @T10NAZ
luzifer1984 said:
I had same wrong . How to figure out? @T10NAZ
Click to expand...
Click to collapse
You need to go to the directories that are said here that was in that error,
Code:
`/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/rild_intermediates/import_includes'.
and make the needed files. So i think i went all the way to the libril_intermediate folder then i needed to create the export_includes folder
T10NAZ said:
You need to go to the directories that are said here that was in that error,
Code:
`/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/rild_intermediates/import_includes'.
and make the needed files. So i think i went all the way to the libril_intermediate folder then i needed to create the export_includes folder
Click to expand...
Click to collapse
Thank U.
I add
Code:
$(shell mkdir -p $(OUT)/obj/SHARED_LIBRARIES/libril_intermediates)
$(shell touch $(OUT)/obj/SHARED_LIBRARIES/libril_intermediates/export_includes)
in 'BoardConfig.mk' . Compiled successfully. but don't work.
I figured it out.
WITH In BoardConfig.mk Comment out this line
> # RIL
> BOARD_PROVIDES_LIBRIL := true
ANY way . Thank u for reply
luzifer1984 said:
Thank U.
I add
Code:
$(shell mkdir -p $(OUT)/obj/SHARED_LIBRARIES/libril_intermediates)
$(shell touch $(OUT)/obj/SHARED_LIBRARIES/libril_intermediates/export_includes)
in 'BoardConfig.mk' . Compiled successfully. but don't work.
I figured it out.
WITH In BoardConfig.mk Comment out this line
> # RIL
> BOARD_PROVIDES_LIBRIL := true
ANY way . Thank u for reply
Click to expand...
Click to collapse
Sorry for digging up this old thread, but I am trying to build for the Evita and encountered this same error. Here was my error.
Just for clarification, did this allow a successful build after editing the BoardConfig.mk? Did it boot?
Black!Jack said:
Sorry for digging up this old thread, but I am trying to build for the Evita and encountered this same error. Here was my error.
Just for clarification, did this allow a successful build after editing the BoardConfig.mk? Did it boot?
Click to expand...
Click to collapse
I dont know if you already found your answer, But I have tried the boardconfig edit and it seems like its building right now it got past the RIL thing
Oh also I had to add qcom media-caf to help get past some libstagefright error too
T10NAZ said:
I dont know if you already found your answer, But I have tried the boardconfig edit and it seems like its building right now it got past the RIL thing
Oh also I had to add qcom media-caf to help get past some libstagefright error too
Click to expand...
Click to collapse
Yeah I ran into some issues with QCOM as well. I just went in, temporarily, to the directory listed in the error, and commented out the line that was stalling the build. Longest Ive been able to keep it building so far.
One other thing that I had to do was pull in the nfc-extras folder from frameworks/base... as I was constantly getting stalled there as well.
Black!Jack said:
Yeah I ran into some issues with QCOM as well. I just went in, temporarily, to the directory listed in the error, and commented out the line that was stalling the build. Longest Ive been able to keep it building so far.
One other thing that I had to do was pull in the nfc-extras folder from frameworks/base... as I was constantly getting stalled there as well.
Click to expand...
Click to collapse
That's good. One snag that I did hit was everything built just fine and flashed a ok, but it didnt boot >.< I dont know why it didnt. I am thinking its because it is having a hard time going to the data partition or something idk
T10NAZ said:
That's good. One snag that I did hit was everything built just fine and flashed a ok, but it didnt boot >.< I dont know why it didnt. I am thinking its because it is having a hard time going to the data partition or something idk
Click to expand...
Click to collapse
Did you update the kernel config file for your device? Any patches?
What device are you building for?
Another thing I am going to attempt is bringing up the phablet source to cm11, rather that cm10.1, which was 4.2.2
Black!Jack said:
Did you update the kernel config file for your device? Any patches?
What device are you building for?
Another thing I am going to attempt is bringing up the phablet source to cm11, rather that cm10.1, which was 4.2.2
Click to expand...
Click to collapse
Yea I put all the kernel configs that I didnt have in and the only thing that I did change was removing the nosuid thing from the data. I did find however that in the scripts/touch folder for the ramdisk has the partition calling and mounting script thing. I wonder if I need to edit that in order for it to boot
Black!Jack said:
Another thing I am going to attempt is bringing up the phablet source to cm11, rather that cm10.1, which was 4.2.2
Click to expand...
Click to collapse
UT moved from CM to AOSP. There is a new AOSP 4.4 based phablet tree.
Sent from my TF300T using Tapatalk
f69m said:
UT moved from CM to AOSP. There is a new AOSP 4.4 based phablet tree.
Sent from my TF300T using Tapatalk
Click to expand...
Click to collapse
Awesome news indeed! I'm on the mailing list, but honestly I haven't paid much attention to it as of late. Now I just have to do some work to the CM device tree to get it to build with AOSP.

[Q] Kernel build error for AOSP 4.4.2

Hi,
I am trying to compile a kernel for a specific device on AOSP 4.4.2 and got the following error. I understand that the variable is declared twice and need to be removed from one. Vendor folder cannot be removed since it has device specific configuration files. Looking into external/jpeg folder I am not able to decide which particular file to remove. Could some one let me know how to fix this.
HTML:
build/core/base_rules.mk:134: *** vendor/google/libs: MODULE.TARGET.SHARED_LIBRARIES.libjpeg already defined by external/jpeg. Stop.

Categories

Resources