(Q) First time Compiling - Optimus One, P500, V General

Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.

I don't known, maybe gcc

try checking your mount options?

Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.

SgtPropain said:
Ok, I setup my 2 build boxes. One Ubuntu 11.10x64 and one Mint 11x86. Installed required packages and downloaded multiple toolchains. I have tried compiling on both machines and on both I get the same errors.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make: *** Waiting for unfinished jobs....
CHK include/linux/version.h
I have tried make thunderc_perf_defconfig and get the same error. Copied .config from device dropped into source, same error.
Any ideas on what is going on? I'm new to this so any help would be great.
Click to expand...
Click to collapse
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.

glarepate said:
I ran a search on your error message about the missing rule to make auto.conf and found this:
https://bbs.archlinux.org/viewtopic.php?id=99089
It relates to the other poster's comment about checking your mount options. It's a short process to fix it.
And if it doesn't work maybe it will at least give you a new error message to research.
Click to expand...
Click to collapse
just as i thought. that might have happened. its worth a try though.

SgtPropain said:
Nope its not gcc; as I said I have installed all required packages including gcc + bison etc. My mount options? Is that the "export ARCH=arm" ? Where I have to set the default compiler? I'm new to the newer flavors of linux. The last distro I used was Mandrake 7.1 ;-) Now I am testing this on 2 builds; an x64 Ubuntu and a x86 Mint(Which is Ubuntu). I have to be missing something on both, but I have followed tutorials guides to the T and still get this error. I get more errors than this by the way. The compiler kicks back Kconfig saying unexpected line of code.
Click to expand...
Click to collapse
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!

I actually tried that already.... I have been at this for about three days. XDA was my last resort as I like to figure things out on my own. However I'm stuck @ a brick wall. I have edited /etc/fstab and removed the bs mount options..remounted same error. Mind you I'm doing most of this from a Virtual Environment. Starting to think this is my issue, but it doesn't explain the same error on machine #2. Maybe I'm doing it right, possibly a bad git clone?

thachtunganh said:
Wrong...
Because you don't have .config file in the source. If you are building kernel from source, you must have the kernel config. That kernel config can be shared in the source code, it depends on that kernel developer, he can shared it in arch/arm/config, access to there then find that kernel defconfig. Or you can get the kernel config of that kernel with another method, but this method just can be applied if the kernel you want to build is for our device: flash that kernel then go to terminal then type:
Code:
su
(Accept the super user)
Code:
cp /proc/config.gz /sdcard
If it show "No such file or directory found" so you should ask that kernel developer for their .config.
If it doesn't show anything, go to sdcard and find if there is a file that named config.gz, it's the kernel config. Get back to terminal then type:
cd /sdcard
gunzip config.gz
Voila!
Click to expand...
Click to collapse
Yeah that would be great if I hadn't done that already. In my post I stated I had replaced the .config from my device. I have literately tried everything but doing this from base. IE not from a VM. I appreciate the help but its a "no go".
Beginning of my .config for proof
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9-ck2
# Wed Apr 11 20:41:44 2012
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
Setting up a third independent machine Ubuntu x86 testing..

where do you get that .config from?

pull /proc/config.gz

SgtPropain said:
pull /proc/config.gz
Click to expand...
Click to collapse
What device are you using, and what kernel are you using.

for the time being you can use prebuilt kernel...no need to build kernel from source....

williamcharles said:
for the time being you can use prebuilt kernel...no need to build kernel from source....
Click to expand...
Click to collapse
He isn't building ROM from source. He is learning how to build a kernel from source.

Sorry for the delay; had 2 deaths in the family.
I setup my third box and again I get the same results. I really don't know where I'm going wrong. This kinda makes me lean to, I have bad source code. I'm no pro C programmer; however when building I get Kconfig errors. I opened said file and the comments look all messed up. The compiler I think is reading the comments as code and kicking it back giving me this error.

by the way what are you compiling and please teach me compiling i want to learn it .

I'm compiling a modified kernel for the Optimus V. I can't teach you how to compile because I don't even know if I'm doing it right.

Related

Help with Compiling error please.

I am compiling a custom kernel for CM using cm source and a few other minor tweaks from others, and myself, and I am getting an error having to do with the bcm4329 while compiling.
I am pretty new to c programing and compiling and am not sure how to fix this error any help is greatly appreciated.
cc1: warnings being treated as errors
drivers/net/wireless/bcm4329/wl_iw.c: In function 'wl_iw_set_ap_security.clone.0':
drivers/net/wireless/bcm4329/wl_iw.c:4881: error: 'output' may be used uninitialized in this function
make[4]: *** [drivers/net/wireless/bcm4329/wl_iw.o] Error 1
make[3]: *** [drivers/net/wireless/bcm4329] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Gr8gorilla said:
I am compiling a custom kernel for CM using cm source and a few other minor tweaks from others, and myself, and I am getting an error having to do with the bcm4329 while compiling.
I am pretty new to c programing and compiling and am not sure how to fix this error any help is greatly appreciated.
cc1: warnings being treated as errors
drivers/net/wireless/bcm4329/wl_iw.c: In function 'wl_iw_set_ap_security.clone.0':
drivers/net/wireless/bcm4329/wl_iw.c:4881: error: 'output' may be used uninitialized in this function
make[4]: *** [drivers/net/wireless/bcm4329/wl_iw.o] Error 1
make[3]: *** [drivers/net/wireless/bcm4329] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Click to expand...
Click to collapse
have you modified the wlan source at all?
if not, repull down the source fresh, and then re-merge your changes in.
havn't modified the wlan source at all, so I will repull and try again, will report back. Thanks.
Ok i got the kernel compiled and now I I want to compile the .ko for the wireless, can I get a little help with that?
Gr8gorilla said:
Ok i got the kernel compiled and now I I want to compile the .ko for the wireless, can I get a little help with that?
Click to expand...
Click to collapse
If u ran a make, it was compiled.
Pick it up in drivers/net/wireless/bcm4329
I ran the make command from the cyanogen wiki, and used make ARCH=arm command and the wireless driver is not in the file it is supposed to be in.
Gr8gorilla said:
I ran the make command from the cyanogen wiki, and used make ARCH=arm command and the wireless driver is not in the file it is supposed to be in.
Click to expand...
Click to collapse
Pass this to make:
Foldertoputmodulesin/ modules_install
Then you'll see your modules in there.
Gr8gorilla,
What did you do to get the kernel to compile? I'm getting the same error with a fresh pull.
If you check out my overclock how to, I take you step by step through making a kernel.
Gr8gorilla said:
If you check out my overclock how to, I take you step by step through making a kernel.
Click to expand...
Click to collapse
I still get the compile error after I followed the guide except I didn't use your modified files; I'm not overvolting or overclocking.
For what its worth, if I remove the bcm4329 kernel module from the config then it builds fine and is running stable on my Nexus One, albeit, without wifi.
Nevermind, apparently there was something wrong with my kernel config.
how long ago did you resync your repo? I had a compile error today that is involving some of the new changes there was a new option when doing old config, I hit yes the first time and had an error, no wifi driver, but a boot image. Second time I hit enter and it compiled fine.

[HOWTO] Build custom kernel, libraries and applications on your own

For building own custom stuff for my Gen8 Device I set up an Ubuntu 10.10 32bit Virtual Machine, so everything in here refers to it, may be different on other linux system.
[disclaimer]This is only a HowTo, if you brick your android device with some custom kernels or other stuff, don't blame me! I'm not responsible for anything you do![/disclaimer]
Notice: ** = you only have to do this step once
Prerequisites for Ubuntu 10.10 32 Bit: **
Code:
# sudo apt-get install git-core flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
Prepare environment: **
Code:
# mkdir -pv $HOME/{archos,bin}
# echo export ARCHOS=\$HOME/archos >> ~/.bashrc
# echo export PATH=\$HOME/bin:\$PATH >> ~/.bashrc
# cd $HOME/archos
# wget -Oavos_env.tgz http://archos-gen8-dvb.googlecode.com/files/avos_env_20110415.tgz
# tar xzf avos_env.tgz
# install -m755 cross $HOME/bin/
# rm -f cross avos_env.tgz
RESTART CONSOLE OR REBOOT COMPUTER!
Toolchain: **
Code:
# cd $ARCHOS
# make all
Configure kernel:
Code:
# cd $ARCHOS
# make kernel-config
Restore kernel config:
Code:
# cd $ARCHOS
# make kernel-reset
Build kernel:
Code:
# cd $ARCHOS
# make kernel-build
CrossCompile: (this is just an example for if you want to build some linux libraries or tools)
Code:
# echo $ARCHOS
# cd ..xyz../..zyx../
# cross make
I followed your instructions, and I got all the way to the end, but when I did 'make kernel-build' it ended with this:
drivers/built-in.o: In function `archos_dpm_suspend':
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/storage/archos_hdd.c:261: undefined reference to `usbsata_power'
make[3]: *** [.tmp_vmlinux1] Error 1
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
[email protected]:~/archos$
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
jbradshw said:
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
Click to expand...
Click to collapse
can you please try again without modifying kernel config?
Did that, now I get this:
CC [M] drivers/usb/musb/omap2430.o
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/musb/omap2430.c:221: warning: 'omap_phy_read' defined but not used
LD [M] drivers/usb/musb/musb_hdrc.o
LD drivers/built-in.o
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
I don't believe I changed anything besides what I mentioned earlier. Is there anyway to get back a default kernel-config?
hehe, I thought you should try with default kernel-config
I added a section for restoring kernel config in the start posting :
chulri said:
[*]Restore kernel config:
Code:
# cd $ARCHOS
# tar xzf gen8-gpl-froyo.tgz gen8-gpl-froyo/linux/linux.config
Click to expand...
Click to collapse
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Thanks.
jbradshw said:
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Click to expand...
Click to collapse
You can't remove other devices (like A32, A101 etc) from Linux kernel config because Archos made bad dependencies for different parts of the kernel and even 70S requires some USB kernel code, it's only compiled when you choose A101 - so either you clean it up manually, or you are required to leave checked other archos devices :/
Thanks for this howto, this is gonna be useful for me, should be a sticky.
OK the make kernel-build worked without errors. Now I'm just questioning the command 'cd ..xyz../..zyx../' I don't have any files or directories called that, and running that reports the same. Can I just skip that and do the make cross?
@jbradshw that's just a sample if someone wants to crosscompile something (e.g. some linux library or application like linuxtv-dvb-apps or w_scan)
you don't have to do everything mentioned in the howto. it's a HowTo not a HaveTo
Ahh OK. So I guess I'm done then. I haven't installed the SDE on my Archos yet, but what's the final 'thing' that came out of this procedure that I'll be placing on the tablet?
Also I don't have an microSD card yet, and I know there was talk of putting stuff on there - can this be done using just the internal memory (8 GB for me)?
you have to install the SDE to install a custom kernel. follow this guide: http://forum.xda-developers.com/showthread.php?p=10157349#post10157349
Yeah I saw that guide, my question is where is the zImage and initramfs.cpio.gz that I assume was part of the compiling I just did? And also if a microSD card is needed for any of this?
no microsd is needed
initramfs.cpio.gz can be extracted from current installation ( /dev/mmcblk0p1 -> init ), read this: http://forum.xda-developers.com/showthread.php?t=880321&page=5
zImage is compiled at this location: $ARCHOS/gen8-gpl-froyo/buildroot/linux/arch/arm/boot/zImage
Shouldn't it be
Code:
cross make kernel-build
?
Here I have to use cross, which makes sense to find gcc arm binaries.
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
chulri said:
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
Click to expand...
Click to collapse
If I don't use cross, here is what I get:
[email protected]:~/archos$ make kernel-build
make -C gen8-gpl-froyo/linux mrproper
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/home/ubuntu/archos/gen8-gpl-froyo/linux'
make[3]: arm-linux-gcc: Command not found
But using cross it compiled fine, though I followed carefully your directions !
Apparently I was too frightened by the error messages, since it does work in the end
Thank you very much, hope some good things come from this !
Cheers !
desiresush said:
Apparently I was too frightened by the error messages, since it does work in the end
Click to expand...
Click to collapse
Yeah it's just an annoying bug, it doesn't hurt because "mrproper" only cleans the build directory and doesn't need compiler at all
2.6.29 kernel for Froyo?
Does anybody know, why Archos releases the SDK with a 2.6.29 kernel?
Shouldn't 2.2 Froyo be a 2.6.32 kernel?

Kernel compile error

Hello everyone. I have just started taking interest in the android world and have started to learn how to compile kernels.
I own a SAMSUNG GALAXY S2 I9100G.
I have downloaded the aosp kernel source for my mobile from the cyanogenmod's github.
And followed guides to compile.
(i was able to compile a stock kernel but am having problems in compilling an aosp kernel )
I follow these commands:-
1. Make cyanogenmod_i9100g_defconfig
2. Make menuconfig
3. Make -j4
And this is the error i get
Code:
/home/incarnation95/Downloads/arm-2011.03/bin/arm-none-eabi-ld: cannot open linker script file /arch/arm/mach-omap2/sec_omap.lds: No such file or directory
make[1]: *** [arch/arm/mach-omap2/mailbox_mach.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Can anyone help mr figure out where the problem might be?
I did search 4-5 times before posting here but didnt find any solution.
Thanks in advance
Was chatting with incarnation95 offline, on resolving this issue, so here's for the benefit of others facing this same problem .
Go and open up the Makefile.sec , for my case the absolute path was :
/home/currway/kernelmod/fuss132/arch/arm/mach-omap2# vi Makefile.sec
In the content , find this line below and edit it to have the absolute path instead , so that sec_omap.lds can be references correctly:
dflags-$(CONFIG_MACH_OMAP4_SAMSUNG) += \
-T /home/currway/kernelmod/fuss132/arch/arm/mach-omap2/sec_omap.lds

[GUIDE] How to build a kernel for the Galaxy Player

After numerous requests I've received from users concerning how-to build kernels, this guide will mostly answer your need to do so.
This guide will be separated in 3 distinct parts: Downloading sources, Building the actual kernel and making a working boot image and or zImage. So let's begin!!
Requirements: A linux computer
Part 1: Downloading sources
Before bulding any kernels, you must have it's source code. Every Android device manufacturers have the OBLIGATION to post them in order to comply with the GPL (GNU General Public License). You can mostly find them in their developpers specified site. You have two ways of download the required source in order to build a kernel: The manufacturer website or git.
1.1: Downloading using the manufacturer's website
You can download your Galaxy Player kernel source using mostly this website: opensource.samsung.com
When you're in it, you can go to the MP3 players section and take the source according to your device. To get the kernel source, unzip the xxxopensource.zip and you should see 2 separate files. Unzip the one with the mention KERNEL in it, it is your kernel.
1.2: Using git
Some of you may know it, some others not. For those who don't know what git is, here's a little explication from it's website
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Click to expand...
Click to collapse
A lot of developpers from around the world do use git because of it ease of use. There are several websites that uses the git protocol. The two most known are github and gitbucket. In order to download your kernel source, you must have found someone who uploaded it into these websites. For this example we will use the Cyanogenmod github's profile. You can download the source with 2 ways:
First way
1. Go into a existing kernel source repository (for example this one: https://github.com/CyanogenMod/android_kernel_samsung_aries)
2. Click the Download zip button situated at the mid-right
3. Unzip the zip and you should find your kernel source.
Note: When using this method, you must be sure of the branch choosen. Problems can happen if the wrong branch is used.
Second way
Note: You must have the git dependencies for linux. To download them for Debian, Ubuntu, please run this command: sudo apt-get install 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
1. Go into a existing kernel source repository (https://github.com/CyanogenMod/android_kernel_samsung_aries)
2. We're going to "clone" the repository, to do so you will so this particular command:
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_aries.git aries
(the second aries word will be the name of the actual folder)
If you want to download another branch (because the one downloaded is the one shown in the website)
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_aries.git -b jellybean aries
(where's the -b means branch)
You should have your kernel source named aries output in the folder you specified.
Second part will cover mostly how to build a kernel.
Part 2 Building an actual kernel
In order to build a kernel, you must use an arm toolchain.
The GNU toolchain is a blanket term for a collection of programming tools produced by the GNU Project.
Click to expand...
Click to collapse
Here's a zip containing the arm-eabi-4.4.3 and arm-androideabi-4.6 toolchains
Toolchains Download
2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
In order to build a kernel, you MUST use a config file which defines the device's components. The easiest way of doing so is to take the manufacturer's stock configuration file (generaly it's a defconfig file found in arch/arm/configs). To create one, you use the make menuconfig command while in your kernel root directory. If you use a different source than your manufacturer one, You have to either ask the developper or to search for this file. (I can't say really much about it ).
2.3 Building the kernel
Once you've your config file and toolchain set up, you can begin the build. To do so you execute these command:
Code:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
make -jx (x is the number of jobs your computer can do a the same time. The recommended way to know how many to use is to take the number of cores in your CPU +1
Depending on the number of threads (jobs) used, it will be either long or not to compile your kernel. (Generally it takes between 5-15 minutes to compile a single kernel).
Once your kernel have been built, you will have it into the form of a file named zImage situated in arch/arm/boot. This kernel is usable for some devices, however it is not usable for ours. DO NOT EVER EVER FLASH THIS BINARY. I'M NOT RESPONSIBLE FOR ANY BRICKS!!
The third part will help you getting a bootable kernel for your device.
Part 3: Making a bootable kernel
Note: This is a in-progress part so it may be unclear to some people. I will try to do it as much as understandable for everybody.
The kernel binary obtained at the second post is mostly not bootable due to the the fact that the initramfs isn't inclued. The initramfs is the actual ramdisk of your device. To find one... well you must find it (I can't really do anything for you). If you do have one initramfs in a folder, you must specify it in the config file with this current line:
Code:
CONFIG_INITRAMFS_SOURCE=""
Once this has been applied, you can make build this kernel and it should boot
Note that this applies mostly to the model of the 4.0 and 5.0 (and for GB as well). 3.6 and 4.2 uses a different method of using a boot image
One last time...
thanks!! really gonna try this sometimes!!! (once you get part two and three out of the tutorial XD )
If someone is interested in the config file for the Galaxy Player 3.6, he can find it on my GitHub: http://www.github.com/team-hurricane-xda.
How to set it up:
0. Download the config file
1. Rename the config file to aalto-deconfig
2. Copy the file to <kernelsource>/arch/arm/config
3. cd ~/path/to/kernel
4. make aalto-deconfig
5. make
MrBrubble
Sent from my YP-GS1 using xda app-developers app
Build_Error
I've searched and haven't found a straight answer, i get the same build error on every kernel i try to build. Even on this one. Any help is appreciated.
Code:
make: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: Command not found
CHK include/linux/version.h
UPD include/linux/version.h
CC scripts/mod/empty.o
/bin/sh: 1: /home/alex/home/alexandroid_toolchains/arm-eabi-linaro-4.6.2gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs..
This is in: file system/usr/include/linux>version.h
#define LINUX_VERSION_CODE 197895
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
Anything in particular that should be here?
Also I have tried to use the linaro toolchains and the one included in the ndk.
2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
Can you please explain where I need to put the folders/files to make this cmd work. I am using windows7 if that helps. I currently have them in the C:\ thanks. I am hung up here and would greatly appreciate some extra guidance.
po8pimp said:
2.1 Exporting the toolchain path
Once you've downloaded a toolchain and are ready to build the kernel source into a kernel binary, enter to the directory of that said kernel, (cd aries in this case). You must export the location of your toolchain so the kernel source can know from where it has to build. To do so:
For arm-eabi-4.4.3
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
"export ARCH=arm"
For arm-linux-androideabi-4.6
Code:
"export CROSS_COMPILE=~/home/yourusername/toolchains/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-"
"export ARCH=arm"
2.2 Using a config file
Can you please explain where I need to put the folders/files to make this cmd work. I am using windows7 if that helps. I currently have them in the C:\ thanks. I am hung up here and would greatly appreciate some extra guidance.
Click to expand...
Click to collapse
zaclimon said:
...
Requirements: A linux computer
...
Click to expand...
Click to collapse
It's in the OP
seriously I must have totally missed that, I read it over again just to make sure. I will try it again in Ubuntu. Thanks for such a quick reply and apologize for my ignorance. Most things are compiled using Linux, however some I have been doing with windows lately so my assumptions got the best of me it seems. Thanx again
Ok so I am at the point where I need to make the Kernel. I am at this point:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
My question is which .defconfig do I use and how can I find the current one running on my device? I am assuming the best to fit all different platforms would be to chose the "android_hugo_r03_eng_defcongfig". Is this correct. I currently own the USA model if that helps. However I want to be able to help out all models without building 3 different kernels. Thank you in advance.
Here are the options available:
android_hugop2p_r01_eng_defcongfig
android_hugop2p_r01_user_defcongfig
android_hugop2p_r02_eng_defcongfig
android_hugop2p_r02_user_defcongfig
android_hugop2p_r03_eng_defcongfig
android_hugop2p_r03_user_defcongfig
android_hugo_r01_eng_defcongfig
android_hugo_r01_user_defcongfig
android_hugo_r02_eng_defcongfig
android_hugo_r02_user_defcongfig
android_hugo_r03_eng_defcongfig
android_hugo_r03_user_defcongfig
android_hugo_r03_eng_EUR_defcongfig
android_hugo_r03_user_EUR_defcongfig
android_hugo_r03_eng_KOR_defcongfig
android_hugo_r03_user_KOR_defcongfig
android_hugo_r03_eng_USA_defcongfig
android_hugo_r03_user_USA_defcongfig
po8pimp said:
Ok so I am at the point where I need to make the Kernel. I am at this point:
make cyanogenmod_galaxys_defconfig (This is just as a example, replace it by whatever your defconfig is)
My question is which .defconfig do I use and how can I find the current one running on my device? I am assuming the best to fit all different platforms would be to chose the "android_hugo_r03_eng_defcongfig". Is this correct. I currently own the USA model if that helps. However I want to be able to help out all models without building 3 different kernels. Thank you in advance.
Here are the options available:
android_hugop2p_r01_eng_defcongfig
android_hugop2p_r01_user_defcongfig
android_hugop2p_r02_eng_defcongfig
android_hugop2p_r02_user_defcongfig
android_hugop2p_r03_eng_defcongfig
android_hugop2p_r03_user_defcongfig
android_hugo_r01_eng_defcongfig
android_hugo_r01_user_defcongfig
android_hugo_r02_eng_defcongfig
android_hugo_r02_user_defcongfig
android_hugo_r03_eng_defcongfig
android_hugo_r03_user_defcongfig
android_hugo_r03_eng_EUR_defcongfig
android_hugo_r03_user_EUR_defcongfig
android_hugo_r03_eng_KOR_defcongfig
android_hugo_r03_user_KOR_defcongfig
android_hugo_r03_eng_USA_defcongfig
android_hugo_r03_user_USA_defcongfig
Click to expand...
Click to collapse
In your case, it is more than just using different configs, sometimes there are more than one config because the different variants of the device uses drivers for other components. If you want to make 1 kernel for all the device, you need to modify it's source so that you can include all the variants drivers. Things like this requires a bit of comparing and programming skills.
I have the zImage created, now I need to make it bootable, can someone please fill me in on what is the next step. I have a bootable kernel to use as a shell if need be. Thank you in advance. This is for the 4.2 by the way.
EDIT: Figured it out I think. I am now running off a new kernel. How do I tell what the actual Kernel Version is? I used the toolchain provided here arm-eabi-4.4.3 to build it. Is there a way to know what the kernel version is from the toolchain?
---------- Post added at 11:04 AM ---------- Previous post was at 10:22 AM ----------
Looking at the readme in the folder for the toolchain, it says this is for ICS. If that is correct, then it is a step in the right direction. Here is the download link to the recovery/kernel
EDIT: removed link to kernel as it does not have wifi working.
po8pimp said:
I have the zImage created, now I need to make it bootable, can someone please fill me in on what is the next step. I have a bootable kernel to use as a shell if need be. Thank you in advance. This is for the 4.2 by the way.
EDIT: Figured it out I think. I am now running off a new kernel. How do I tell what the actual Kernel Version is? I used the toolchain provided here arm-eabi-4.4.3 to build it. Is there a way to know what the kernel version is from the toolchain?
---------- Post added at 11:04 AM ---------- Previous post was at 10:22 AM ----------
Looking at the readme in the folder for the toolchain, it says this is for ICS. If that is correct, then it is a step in the right direction.
Click to expand...
Click to collapse
Code:
cat /proc/version
Meticulus said:
Code:
cat /proc/version
Click to expand...
Click to collapse
thanks I will try that
EDIT: Linux version 2.6.35.7 (gcc version 4.4.3 (GCC))

Makefile error: *** multiple target patterns. Stop.

I am currently trying to build an Ubuntu Touch-compatible kernel for use with the Xperia Z5 Compact. I have been following the How to build and flash a Linux kernel for AOSP supported devices guide and am at the point at which I have created an Ubuntu-compatible .config file but am having issues finally building the kernel (Step 7) using the .config file as I receive the following error:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 14
Makefile:791: *** multiple target patterns. Stop.
I know that this error is related to the call of link-vmlinux.sh which is referenced as follows on line 791 of the Makefile:
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
Any suggestions for debugging this problem would be greatly appreciated.
blackstar1744 said:
I am currently trying to build an Ubuntu Touch-compatible kernel for use with the Xperia Z5 Compact. I have been following the How to build and flash a Linux kernel for AOSP supported devices guide and am at the point at which I have created an Ubuntu-compatible .config file but am having issues finally building the kernel (Step 7) using the .config file as I receive the following error:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 14
Makefile:791: *** multiple target patterns. Stop.
I know that this error is related to the call of link-vmlinux.sh which is referenced as follows on line 791 of the Makefile:
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
Any suggestions for debugging this problem would be greatly appreciated.
Click to expand...
Click to collapse
Yah, I'm facing the same problem. Only with 64-bit targets (G4 and G4 Stylus), this doesn't happen with any 32bit targets. It doesn't matter if I swap out the toolchain, it doesn't matter which tree I'm working -- Omni, Bliss, CM13 -- all can't get past that error.
So it doesn't seem like it's in the build tree, but maybe my system. I'm using Arch, so I'm used to Android building snafus, but still I cannot figure this out. I've gone through every chain leading to the error and I can't seem to pin it down. It's really harshing my build.
Lil' help, y'all?
UPDATE: Nevermind, just had to set USE_HOST_LEX. Goddammit, I though I already tried that.
Any explanation for why you need to set USE_HOST_LEX? Is this an OS- or compiler-related modification? I'm compiling with UBERTC 4.9 on Ubuntu 14.04 LTS. I currently don't have USE_HOST_LEX in my .config file.
culot said:
Yah, I'm facing the same problem. Only with 64-bit targets (G4 and G4 Stylus), this doesn't happen with any 32bit targets. It doesn't matter if I swap out the toolchain, it doesn't matter which tree I'm working -- Omni, Bliss, CM13 -- all can't get past that error.
So it doesn't seem like it's in the build tree, but maybe my system. I'm using Arch, so I'm used to Android building snafus, but still I cannot figure this out. I've gone through every chain leading to the error and I can't seem to pin it down. It's really harshing my build.
Lil' help, y'all?
UPDATE: Nevermind, just had to set USE_HOST_LEX. Goddammit, I though I already tried that.
Click to expand...
Click to collapse
blackstar1744 said:
Any explanation for why you need to set USE_HOST_LEX? Is this an OS- or compiler-related modification? I'm compiling with UBERTC 4.9 on Ubuntu 14.04 LTS. I currently don't have USE_HOST_LEX in my .config file.
Click to expand...
Click to collapse
USE_HOST_LEX set the build to use host's Flex instead of the one in-tree. See build/core/config.mk:
Code:
ifeq ($(USE_HOST_LEX),yes)
LEX := flex
else
LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
endif
I don't know about elsewhere, but this has been a problem on Arch for a while. Lately this has not longer been a problem for me, so I assumed it was not an issue. Apparently still a problem for 64bit build, but not 32bit. Hmm.
Another workaround was to preface your make with LC_ALL=C, but I tried that without setting 'USE_HOST_LEX=yes' and it didn't help.
EDIT: I don't think it's compiler-related, as I did try different toolchains and different toolchain versions -- none made a difference. I tried 3 different Make versions, no help. USE_HOST_LEX? That fixed it. Compiling as we speak.
I added export USE_HOST_LEX=yes to my .bashrc and went back to the GCC compiler...new problem to debug. Any suggestions on debugging control groups would be greatly appreciated
Code:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 1
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
<stdin>:1226:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
<stdin>:1229:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC kernel/cgroup.o
kernel/cgroup.c: In function 'subsys_cgroup_allow_attach':
kernel/cgroup.c:2138:59: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
if (current != task && cred->euid != tcred->uid &&
^
kernel/cgroup.c:2139:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
cred->euid != tcred->suid)
^
make[1]: *** [kernel/cgroup.o] Error 1
make: *** [kernel] Error 2
Random side rant: The way Google shows search results is going wayyy downhill.

Categories

Resources