[Q] Compile rom without Recovery and kernel - Omni Q&A

Hi,
I want to compile OmniRom for Grouper (Nexus 7 2012 wifi) without recovery and kernel built-in (I'll flash prebuilt .zips of them).
I have added to BoardConfig.mk these lines
Code:
#added
TARGET_NO_RECOVERY := true
TARGET_NO_KERNEL := true
#
USE_CAMERA_STUB := true
USE_PROPRIETARY_AUDIO_EXTENSIONS := false
BOARD_HAL_STATIC_LIBRARIES := libdumpstate.grouper
TARGET_RECOVERY_UI_LIB := librecovery_ui_grouper
TARGET_RELEASETOOLS_EXTENSIONS := device/asus/grouper
...
but when I try to compile, it gives me this error
Code:
including ./vendor/omni/Android.mk ...
build/core/tasks/kernel.mk:65: ***************************************************************
build/core/tasks/kernel.mk:66: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:67: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:68: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:69: * source repository to kernel/asus/grouper
build/core/tasks/kernel.mk:70: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:71: * for more information *
build/core/tasks/kernel.mk:72: ***************************************************************
make: *** Nessuna regola per generare l'obiettivo "bacon". Arresto.
What I did is right?
Thanks for the attention.

gorneman said:
Code:
including ./vendor/omni/Android.mk ...
build/core/tasks/kernel.mk:65: ***************************************************************
build/core/tasks/kernel.mk:66: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:67: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:68: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:69: * source repository to kernel/asus/grouper
build/core/tasks/kernel.mk:70: * See http://forum.xda-developers.com/wiki/ROM/Integrated_Kernel_Build
build/core/tasks/kernel.mk:71: * for more information *
build/core/tasks/kernel.mk:72: ***************************************************************
make: *** Nessuna regola per generare l'obiettivo "bacon". Arresto.
What I did is right?
Click to expand...
Click to collapse
Do you have any more errors, or more of the log? Last I checked, that kernel.mk line 65-72 is not a showstopper, just a warning. I've never messed with lines that you've added before. As for the kernel, why don't you compile the kernel from sources you choose? And if you really don't want to do that, why don't use the precompiled kernel, and that inserted in your build?

PonsAsinorem said:
Do you have any more errors, or more of the log? Last I checked, that kernel.mk line 65-72 is not a showstopper, just a warning. I've never messed with lines that you've added before. As for the kernel, why don't you compile the kernel from sources you choose? And if you really don't want to do that, why don't use the precompiled kernel, and that inserted in your build?
Click to expand...
Click to collapse
Thanks, but no luck. I try to include prebuilt kernel, but but gives me an error about overwriting commands.

gorneman said:
Thanks, but no luck. I try to include prebuilt kernel, but but gives me an error about overwriting commands.
Click to expand...
Click to collapse
Maybe some links? I can't really see what you're doing and I'm missing parts of the puzzle.
Can you link me to your device tree? And to the kernel source? A full build log, including commands, uploaded to pastebin would be nice as well.
Also, have you tried compiling the kernel with the build? That is the preferred method. And if you insist on using a prebuilt, I'd try the method below, instead of skipping.
Here's some good reading in the meantime: http://wiki.cyanogenmod.org/w/Doc:_...Step_4._Configuring_the_fallback_to_prebuilts

http://pastebin.com/neh14Aj4 build log
http://pastebin.com/fURqBpMQ boardCommonConfig
My device is Grouper (Nexus 7 2012 Wifi) and I follow this wiki page (grouper instead of tilapia).
Thanks
If I do "brunch" in term :
Code:
[email protected] ~/Android/Omni $ brunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
Which would you like? [aosp_arm-eng]

Related

[GUIDE] Compile the stock android kernel

I have already discussed how to unpack/repack the boot.img file.
Now let's try to recompile the android kernel.
You will need some packages not included in a default Ubuntu 11.04 installation:
Code:
sudo apt-get install git unrar libncurses5-dev qt3-dev-tools
Unrar and git are the only necessary packages.
Install libncurses if you want to modify the kernel configuration with the command line menu.
Otherwise, if you want a graphical interface, go with qt3.
Please refer to the documentation of your linux distro for help on how to install additional packages.
For the purpose of this guide we are going to rebuild the official asus kernel with no modifications.
Download the latest kernel source from the ASUS site (atm 2.6.36.3)
Code:
wget http://dlcdnet.asus.com/pub/ASUS/EeePAD/TF101/Eee_PAD_TF101_Kernel_Code_8_4_4_11.rar
Now unpack it:
Code:
unrar e Eee_PAD_TF101_Kernel_Code_8_4_4_11.rar
tar xvfz kernel-3eb19ec-fix-lic.tar.gz
We need a config file for the compile process.
The config file essentially sets features ON or OFF from the final kernel (yes, I know that is much more than this...).
If your tablet is upgraded to the latest build (8.4.4.11) you can extract the config file from your running device:
Code:
adb pull /proc/config.gz ./
Or you can find it attached to this post (the forum won't allow to upload a .gz file, so i made a .zip file; use unzip instead of gunzip).
Now uncompress and move it into the kernel dir (renaming it in .config).
Code:
gunzip config.gz
cp config kernel-3eb19ec/.config
Now the not-so-fun part.
We will need a compiler for the arm platform.
The android source comes with the arm compiler. You can download it following this instructions http://source.android.com/source/downloading.html .
The only problem is that the repository is about 2.6GB...
So we are going to download only the prebuilt toolchain (1,8GB):
Code:
git clone git://android.git.kernel.org/platform/prebuilt.git
After git finishes his download, you will have a new directory called "toolchain".
We have to set some environment variables (i assume you have downloaded the toolchain in your home directory):
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
Ok, the compiler is installed and configured.
It's time to come back to the kernel source.
If you want to modify some settings in your config file (!!AT YOUR OWN RISK!!) you can edit the .config file or use a graphical interface.
Code:
cd kernel-3eb19ec
make xconfig (make menuconfig if you prefer a command-line menu)
Now we can compile the android kernel:
Code:
make -j4
Our new kernel is stored in : arch/arm/boot/zImage
We can use it for make a boot image and flash in our TF101 (use this guide http://forum.xda-developers.com/showthread.php?t=1193737)
Let me say this again: I'm not an expert in android kernel/compiler.
If you find something wrong with this guide, please tell me.
I've learned this with google and by trial and error.
If you brick something don't blame on me.
If you want to hit "thanks", you're welcome.
Have Fun!
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
gnufabio said:
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
Click to expand...
Click to collapse
Of course the kernel source has to be exactly the same version as the running kernel for this to work.
In this example, the source and running kernel were both 2.6.36.3 (build 8.4.4.11).
For use an older .config (or a newer source tree), we should run:
Code:
make oldconfig
to adapt them (...kinda).
Thanks for point this out.
I was eventually planning on making this guide, good work!
gnufabio said:
Pulling out config.gz you will get the current kernel configuration...it could not fit the stock kernel..
Click to expand...
Click to collapse
This is a possibility if anything in the config changes from the kernel you're running in the actual source Asus has posted
I've always done the following:
Code:
make tegra_defconfig
make
I haven't actually checked to see if this is up to date with a running kernel, just noticed Asus pops up a few times in there.
Actually this is the default TF101 config: tf101_defconfig
Thanks for the guides. These are really helpful -
Hashi
I'm getting this set of errors. I've built and modified many linux kernels, so I'm guessing this is in the toolchain area, and am wondering if it needs to know something else for where to look at dynamic load libraries, etc?
I created a shell script to setup / export the shell environment vars. It looks like this:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
I'm using a PC I use for work ARM cross compiles that is 64 bit Ubuntu 9.10.
Thanks --
--- make -j4 errors ---
Code:
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ make -j4
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: `include/generated/mach-types.h' is up to date.
make[1]: *** [scripts/mod] Error 2
CC kernel/bounds.s
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
In searching for the basic problem, that arm*gcc can't see libc.so.6 in the version it wants, I think it's not seeing this at all:
~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ find ../../toolchain/ -iname libc.so.6 -exec ls -al {} \;
lrwxrwxrwx 1 hashi hashi 11 2011-08-01 15:58 ../../toolchain/prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/lib/libc.so.6 -> libc-2.7.so
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
thanks. I'm not new to kernel compiling but I'm new to android
hachamacha said:
I'm getting this set of errors. I've built and modified many linux kernels, so I'm guessing this is in the toolchain area, and am wondering if it needs to know something else for where to look at dynamic load libraries, etc?
I created a shell script to setup / export the shell environment vars. It looks like this:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
I'm using a PC I use for work ARM cross compiles that is 64 bit Ubuntu 9.10.
Thanks --
--- make -j4 errors ---
Code:
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ make -j4
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: `include/generated/mach-types.h' is up to date.
make[1]: *** [scripts/mod] Error 2
CC kernel/bounds.s
arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by arm-eabi-gcc)
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
In searching for the basic problem, that arm*gcc can't see libc.so.6 in the version it wants, I think it's not seeing this at all:
~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$ find ../../toolchain/ -iname libc.so.6 -exec ls -al {} \;
lrwxrwxrwx 1 hashi hashi 11 2011-08-01 15:58 ../../toolchain/prebuilt/linux-x86/toolchain/i686-linux-glibc2.7-4.4.3/sysroot/usr/lib/libc.so.6 -> libc-2.7.so
[email protected]:~/sandbox/android-sdk-linux_x86/kernel/kernel-3eb19ec$
Click to expand...
Click to collapse
The toolchain has everything it needs for compile the kernel.
The problem seems to be your 64 bit...
The arm compiler is built against 32bit version of glibc library; I think you already have a multilib environment (you have a /lib32 dir). Maybe the 32bit verion of the glibc is not the correct version.
Try this command:
Code:
ldd ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc
And look what it says for the libc.so.6. In my system it says it is located in /lib/i386-linux-gnu/libc.so.6. So if I run it:
Code:
$ /lib/i386-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.13-0ubuntu13) stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
The first line tell the version number. If it's older than 2.11 you need to update your multilib libc.
gnufabio said:
Actually this is the default TF101 config: tf101_defconfig
Click to expand...
Click to collapse
This is for 2.6.36.3 but seems way older. It says "Fri Mar 25 19:50:17 2011".
Maybe it's from an old build?
The last ASUS config (the one attached to the first post) is "Mon Jul 11 14:47:43 2011".
Brilliant!
I had problems cloning using the git protocol because of a corporate firewall, but the HTTP method worked fine:
Code:
http://android.git.kernel.org/platform/prebuilt.git
I also found the the toolchain with the Android NDK failed to build the kernel but the one linked to in the OP worked perfectly.
SammyC said:
I also found the the toolchain with the Android NDK failed to build the kernel but the one linked to in the OP worked perfectly.
Click to expand...
Click to collapse
Yes, I have tried this also, with the same result.
Someone said that the codesourcery compiler can compile the android kernel.
I have tried, it compiles all, but when i flash on the tablet it stucks on the boot screen.
Initially I wrote the guide using this compiler (it's smaller and has a graphical installer), when i realized that it doesn't work , i switched back to the android official compiler.
If someone want to try with the codesourcery compiler here's the (unsuccessful) process I have used:
!!ATTENTION!!: ATM THIS DOESN'T WORK
An easier (and somewhat faster) way is downloading the Code Sorcery's "Code Bench" compiler (http://www.codesourcery.com/) and install it.
Code:
wget http://www.codesourcery.com/sgpp/lite/arm/portal/package8741/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi.bin
This compiler need some extra packages to work in Ubuntu:
Code:
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 valgrind
For some reason, in Ubuntu 11.04 the /bin/sh link refer to the dash shell and not bash.
The compiler's installer will comply for this, so we do as follows:
Code:
sudo dpkg-reconfigure -plow dash
and when it asks to use dash as the default shell, click on "NO"
Code:
sh arm-2011.03-41-arm-none-linux-gnueabi.bin
Leave all the default options. The installer will copy the files in your home directory.
We should set some environmet variables:
Code:
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export PATH=$PATH:~/CodeSourcery/Sourcery_G++_Lite/bin
Click to expand...
Click to collapse
Then continue with the guide from the "make xconfig".
If someone can make it work with this compiler, could be so gentle to tell us how?
rebound821 said:
The toolchain has everything it needs for compile the kernel.
The problem seems to be your 64 bit...
The arm compiler is built against 32bit version of glibc library; I think you already have a multilib environment (you have a /lib32 dir). Maybe the 32bit verion of the glibc is not the correct version.
Try this command:
Code:
ldd ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc
And look what it says for the libc.so.6. In my system it says it is located in /lib/i386-linux-gnu/libc.so.6. So if I run it:
Code:
$ /lib/i386-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.13-0ubuntu13) stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.5.2.
Compiled on a Linux 2.6.38 system on 2011-04-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
The first line tell the version number. If it's older than 2.11 you need to update your multilib libc.
Click to expand...
Click to collapse
Thanks again -- I'll try that out as soon as I'm back in TF mode.
Code:
~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib32/libc.so.6: version `GLIBC_2.11' not found (required by ~/sandbox/android-sdk-linux_x86/toolchain/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
linux-gate.so.1 => (0xf77e0000)
libc.so.6 => /lib32/libc.so.6 (0xf7677000)
/lib/ld-linux.so.2 (0xf77e1000)
^^ that was from the first command
Code:
GNU C Library (EGLIBC) stable release version 2.10.1, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.1.
Compiled on a Linux >>2.6.24-27-server<< system on 2011-01-11.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.eglibc.org/issues/>.
And ^^ from the second.
It looks like with 9.10 Ubuntu, (backporting something from 10 or 11.x notwithstanding), I can't easily get to GLIBC 2.11 from GLIBC 2.10.x. Thanks. I'll put together an 11.x VM for this task.
For 64bit machines, you might need to do the following?
apt-get install ia32-libs
raypou said:
For 64bit machines, you might need to do the following?
apt-get install ia32-libs
Click to expand...
Click to collapse
Thanks, I managed to download a ARM toolchain from their site that works fine with Ubuntu 9.10 64 bit.
Whether or not it'll run when I try to install a kernel is another question, but it builds without problem and produces ARM code.
rebound821 said:
Yes, I have tried this also, with the same result.
Someone said that the codesourcery compiler can compile the android kernel.
I have tried, it compiles all, but when i flash on the tablet it stucks on the boot screen.
Initially I wrote the guide using this compiler (it's smaller and has a graphical installer), when i realized that it doesn't work , i switched back to the android official compiler.
If someone want to try with the codesourcery compiler here's the (unsuccessful) process I have used:
!!ATTENTION!!: ATM THIS DOESN'T WORK
Then continue with the guide from the "make xconfig".
If someone can make it work with this compiler, could be so gentle to tell us how?
Click to expand...
Click to collapse
Wow can't believe I found this thread. I just want to confirm that I'm also having a horrible time with the code sourcery toolchain trying to compile the android kernel, the moto atrix kernel specifically. The zimage compiles, but flashing to the device it just hangs.
So im currently downloading the official android toolchain.
Also some learned knowledge for everybody, the correct code sourcery toolchain supposedly android equivalent is arm-none-linux-gnueabi-, NOT the arm-none-eabi- or any of the others. This info is very hard to find fyi.
However as this thread seems to prove, even using the correct one doesn't exactly work.
Hi,
I'm trying to build the stock Memo Pad smart(ME301t) stock kernel 10.6.1.29 downloaded directly from asus.
I used 4.3.3 to 4.7 toolchains with similar results(give or take some deprecated compiler arguments).
What I really want to know is why I'm getting a lot of warnings(NOT ERRORS), some of them are minor errors like "unused function" and some of them are major warnings breaking function functionality. Some of the builds don't even boot.
What toolchain should I use with this kernel?
Why a stock kernel(from asus) should produce warnings at the first place?
I'm on linux BTW.

official cm7.2 kernel source

Hello,
I need to recompile the kernel to get the serial port through the usb plug (google: android serialport api htc )
The kernel shipped with cm-7.2.0-click is 2.6.35.14 (-Arco-Kalim) and I can't find this version on git for this phone (that would take /proc/config.gz with no modification by using make menuconfig+save).
Anybody has some clue ?
Thanks
david
deyv said:
Hello,
I need to recompile the kernel to get the serial port through the usb plug (google: android serialport api htc )
The kernel shipped with cm-7.2.0-click is 2.6.35.14 (-Arco-Kalim) and I can't find this version on git for this phone (that would take /proc/config.gz with no modification by using make menuconfig+save).
Anybody has some clue ?
Thanks
david
Click to expand...
Click to collapse
If you need to make just minor tweaks, use dsxda's kitchen to extract the kernel, make changes and then repack it
Hi deyv,
kernel source for tattoo and wildfire are into arco git:
https://github.com/arco/htc-kernel-msm7225
and here's the gingerbread branch config file for tattoo:
https://github.com/arco/htc-kernel-msm7225/blob/gingerbread/arch/arm/configs/click_defconfig
bye
yen
Thanks a lot !
Thanks to both of you I managed to recompile a kernel, and repack it in the official cm7.2 using dsixda.
I have now the serial port /dev/ttyMSM2 that appeared (which I still have to test) and this is great
But I have now the touchscreen which is totally broken (touch is working but gives random places, never under the thumb). I compared the two rom-zip files, and there is absolutely no difference between them, except a new binary /system/bin/wmdsi, and of course the kernel (no difference in ramdisk.img).
Here is the .config diff.
Do you have any clue ?
edit: screen and touchpad X and Y axis are reversed, (in both landscape and portrait mode)
Code:
--- click_defconfig 2012-07-25 08:56:38.219763553 +0200
+++ click_defconfig-noheadset-serialport 2012-07-26 01:43:44.190274884 +0200
@@ -2,5 +2,5 @@
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.14
-# Wed Feb 1 07:32:28 2012
+# Thu Jul 26 01:43:22 2012
#
CONFIG_ARM=y
@@ -363,6 +363,5 @@
# CONFIG_MICROP_COMMON is not set
# CONFIG_HTC_HEADSET_MGR is not set
-CONFIG_HTC_HEADSET_V1=y
-CONFIG_HTC_AUDIOJACK_V1=y
+# CONFIG_HTC_HEADSET_V1 is not set
# CONFIG_HTC_ONMODE_CHARGING is not set
# CONFIG_BUILD_CIQ is not set
@@ -1192,5 +1191,7 @@
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_MSM is not set
+CONFIG_SERIAL_MSM=y
+# CONFIG_SERIAL_MSM_CONSOLE is not set
+# CONFIG_SERIAL_MSM_CLOCK_CONTROL is not set
# CONFIG_SERIAL_MSM_HSL is not set
CONFIG_SERIAL_MSM_HS=y
Is not the L missing here?
Code:
# CONFIG_SERIAL_MSM_HSL is not set
CONFIG_SERIAL_MSM_HS=y
CONFIG_SERIAL_MSM_HS is flagged for 2.6.39 kernel onwards here http://cateee.net/lkddb/web-lkddb/SERIAL_MSM_HS.html
Other than this i suggest to extract kernel config from a working cm7 rom to check if it match that on github (just in case of)
To compile kernel do you have used toolchain shipped with cm?
bye
yen
The /proc/config.gz extracted from the original running cm7.2 matches the second link you wrote above.
and the two following lines are in it (you can check):
Code:
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.14
# Wed Feb 1 07:32:28 2012
[...]
# CONFIG_SERIAL_MSM_HSL is not set
CONFIG_SERIAL_MSM_HS=y
Yes, I have used the toolchain shipped with cm's git repository.
I'm using the remotes/origin/gingerbread branch of arco's kernel :
Code:
$ git branch -a
* (no branch)
ics
remotes/origin/HEAD -> origin/ics
remotes/origin/gingerbread
remotes/origin/ics
$ git diff -r remotes/origin/gingerbread
$
I had also compiled the entired android (not the kernel) with the same toolchain and it worked. I am now using the original CM distribution, not the one I compiled but with the new .config I described above.
Can it be a /proc/cmdline problem ? I can't see where it is stored, it's obviously not in the rom:
Code:
# bash
localhost / # cat /proc/cmdline
board_bahamas.disable_uart3=0 board_bahamas.usb_h2w_sw=0 board_bahamas.disable_sdcard=0 diag.enabled=0 board_bahamas.debug_uart=0 smisize=0 androidboot.baseband=3.35.07.20 androidboot.cid=ORANG202 androidboot.carrier=ORANGE-French androidboot.mid=CLIC10000 androidboot.keycaps=azerty androidboot.mode=normal androidboot.serialno=SH9BGLG00083 androidboot.bootloader=0.52.0001 no_console_suspend=1 console=null
localhost / #
Should I restart the process from scratch ?
So original kernel config & source and toolchain are all good, i got no (possibly) good idea at all.
Should I restart the process from scratch ?
Click to expand...
Click to collapse
last try should perhaps be to compile kernel inline with the rom (not tested if it's possible in cm7 too like for cm9)
bye
yen

[WIP]AOSP GB (compiling)

Hi to all
I'm trying to compile AOSP GB but always fail, the first "error" was this
Code:
build/core/base_rules.mk:78: *** Module name: gps.es209ra
build/core/base_rules.mk:79: *** Makefile location: hardware/qcom/gps/loc_api/libloc_api
build/core/base_rules.mk:80: *
build/core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its
build/core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:
build/core/base_rules.mk:83: *
build/core/base_rules.mk:84: * optional, debug, eng, tests, samples
build/core/base_rules.mk:85: *
build/core/base_rules.mk:86: * If the module is expected to be in all builds
build/core/base_rules.mk:87: * of a product, then it should use the
build/core/base_rules.mk:88: * "optional" tag:
build/core/base_rules.mk:89: *
build/core/base_rules.mk:90: * Add "LOCAL_MODULE_TAGS := optional" in the
build/core/base_rules.mk:91: * Android.mk for the affected module, and add
build/core/base_rules.mk:92: * the LOCAL_MODULE value for that component
build/core/base_rules.mk:93: * into the PRODUCT_PACKAGES section of product
build/core/base_rules.mk:94: * makefile(s) where it's necessary, if
build/core/base_rules.mk:95: * appropriate.
build/core/base_rules.mk:96: *
build/core/base_rules.mk:97: * If the component should be in EVERY build of ALL
build/core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the
build/core/base_rules.mk:99: * PRODUCT_PACKAGES section of
build/core/base_rules.mk:100: * build/target/product/core.mk
build/core/base_rules.mk:101: *
build/core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules. Alto.
This is fixed but now I get this:
Code:
build/core/base_rules.mk:162: *** device/semc/es209ra/hciattach: MODULE.TARGET.EXECUTABLES.hciattach already defined by external/bluetooth/bluez/tools. Alto.
and idk how to fix it.
If anyone know how to do please help me.

Omni 4.4 error building it

Hi i am traying to build from source my omnirom but i am getting a lot of problems:
Related to kernel:
`/Volumes/android/OmniROM/out/target/product/kumquat/boot.img'
build/core/Makefile:476: warning: ignoring old commands for target `/Volumes/android/OmniROM/out/target/product/kumquat/boot.img'
build/core/tasks/kernel.mk:40: ***************************************************************
build/core/tasks/kernel.mk:41: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:42: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:43: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:44: * source repository to kernel/sony/kumquat
build/core/tasks/kernel.mk:45: * See http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
build/core/tasks/kernel.mk:46: * for more information *
build/core/tasks/kernel.mk:47: ***************************************************************
Then if i used make -j16:
ECUTABLES/dalvikvm_intermediates/import_includes
Export includes file: art/dalvikvm/Android.mk -- /Volumes/android/OmniROM/out/target/product/kumquat/obj/EXECUTABLES/dalvikvm_intermediates/export_includes
make: *** No rule to make target `vendor/sony/kumquat/proprietary/bin/dbus-daemon', needed by `/Volumes/android/OmniROM/out/target/product/kumquat/system/bin/dbus-daemon'. Stop.
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
And with make -j4 otapackage:
[HIDEhost C++: libutils <= system/core/libutils/Printer.cpp
system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter:rintLine(const char*)’:
system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope
make: *** [/Volumes/android/OmniROM/out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o] Error 1
make: *** Waiting for unfinished jobs....
[/HIDE]
werty100 said:
Hi i am traying to build from source my omnirom but i am getting a lot of problems:
Related to kernel:
`/Volumes/android/OmniROM/out/target/product/kumquat/boot.img'
build/core/Makefile:476: warning: ignoring old commands for target `/Volumes/android/OmniROM/out/target/product/kumquat/boot.img'
build/core/tasks/kernel.mk:40: ***************************************************************
build/core/tasks/kernel.mk:41: * Using prebuilt kernel binary instead of source *
build/core/tasks/kernel.mk:42: * THIS IS DEPRECATED, AND WILL BE DISCONTINUED *
build/core/tasks/kernel.mk:43: * Please configure your device to download the kernel *
build/core/tasks/kernel.mk:44: * source repository to kernel/sony/kumquat
build/core/tasks/kernel.mk:45: * See http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
build/core/tasks/kernel.mk:46: * for more information *
build/core/tasks/kernel.mk:47: ***************************************************************
Then if i used make -j16:
ECUTABLES/dalvikvm_intermediates/import_includes
Export includes file: art/dalvikvm/Android.mk -- /Volumes/android/OmniROM/out/target/product/kumquat/obj/EXECUTABLES/dalvikvm_intermediates/export_includes
make: *** No rule to make target `vendor/sony/kumquat/proprietary/bin/dbus-daemon', needed by `/Volumes/android/OmniROM/out/target/product/kumquat/system/bin/dbus-daemon'. Stop.
make: *** Waiting for unfinished jobs....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
And with make -j4 otapackage:
[HIDEhost C++: libutils <= system/core/libutils/Printer.cpp
system/core/libutils/Printer.cpp: In member function ‘virtual void android::FdPrinter:rintLine(const char*)’:
system/core/libutils/Printer.cpp:123: error: ‘dprintf’ was not declared in this scope
make: *** [/Volumes/android/OmniROM/out/host/darwin-x86/obj/STATIC_LIBRARIES/libutils_intermediates/Printer.o] Error 1
make: *** Waiting for unfinished jobs....
[/HIDE]
Click to expand...
Click to collapse
1. You did not used any kernel source for kumquat,here you can find one of them : www.github.com/munjeni/android_kernel_xperiago
2. It's obviously that you didn't appplied patch as said in www.github.com/XperiaNovathor/android_device_sony_kumquat
Also,are you using semc's hardware and XperiaNovathor's vendor ? If not,git clone them
DroidModderXtreme said:
1. You did not used any kernel source for kumquat,here you can find one of them : www.github.com/munjeni/android_kernel_xperiago
2. It's obviously that you didn't appplied patch as said in www.github.com/XperiaNovathor/android_device_sony_kumquat
Also,are you using semc's hardware and XperiaNovathor's vendor ? If not,git clone them
Click to expand...
Click to collapse
Is not this thanks @DroidModderXtreme is MAC and his stupid things is beocuse of GCC of mac osx
I send you aPM

[ROM] [Development] [Source] [Noob] [Friendly]

Introduction & Setting Up Build Environment​
Well hello everyone today I will teach you “How to build custom ROM’s for your device from source”. So, if you are interested then please continue to read. So, first of all, you must know how Linux work and few commands for that you can simply visit here
I guess you are done with commands now let's move ahead. First and for most important… You must have a high specs PC like with i7, 16gb ram, 512gb SSD. If yes then move ahead if no then look for online cloud services like GCloud/AWS.
Setting Up Environment for the build!
Woo-ho! We will set up the environment for the build now …
Now install Linux in your PC. You can install any distro but I would suggest installing Ubuntu 16.04.
Just copy paste below codes and if asked for y/n then type y and hit enter, all set!
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip openjdk-8-jdk openjdk-11-jdk && sudo apt-get upgrade
Code:
git clone https://github.com/akhilnarang/scripts.git ~/scripts
cd scripts
bash setup/android_build_env.sh
All set! As mentioned earlier allow the packages to be installed by typing “y” if asked.
Syncing Sources ​
Now look for your favorite ROM sources like for me its lineage so source are here
After you are done with your sources just clone the source but before that let's make a directory where we will store our source like for me I am using android/lineage for your ROM you can change as per your wish! Well if you still didn’t get your ROM sources then I will drop down link below of my top 5 favorite ROM sources!
Now let's make our directory
Code:
mkdir android/lineage && cd android/lineage
Now let’s initialize our ROM repo like for me its lineage, but for you change it as per your ROM. Here for your info after “-b” is your branch you will have to look for your ROM and change accordingly.
Code:
repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
Well, now you will encounter a small error to fix it up just copy below code.
Code:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Replace [email protected] & “Your Name with your GitHub account email and username respectively. After that re-initize source.
Wow, it’s for Pie hehehe but it’s not yet done. We have just initialized source we are yet let to sync it. but before that please note source size is about 60-80gb so make sure you have enough bandwidth with high speed …
Now let’s sync our source
Code:
repo sync -f –-no-tags –-no-clone-bundle
Well, now you can do only one thing that is wait ... as repo is long (60g-80gb)
Done? Then why to wait just start with syncing device related sources.
Now you must be wondering what are they and why we need those… So, device related sources are of the device tree, kernel source, vendor blobs. You can find those by searching your device codename like for me I will search k5fpr device tree, k5fpr kernel source, k5fpr vendor tree (Here k5fpr is my device codename you change as per your device.) Now I got these links
DT : https://github.com/SahilSonar/android_device_lenovo_k5fpr
Kernel Source : https://github.com/SahilSonar/android_kernel_lenovo_k5fpr
Vendor Blobs/Tree : https://github.com/SahilSonar/android_vendor_lenovo_k5fpr
Well, now you don’t use these until and unless you want to build for k5fpr. You look for your device and now let’s clone them to our working dir. Again as dir. may change please edit the code as per your ROM
Code:
git clone https://github.com/SahilSonar/android_device_lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/device /lenovo/k5fpr
git clone https://github.com/SahilSonar/android_kernel _lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/kernel /lenovo/k5fpr
git clone https://github.com/SahilSonar/android_vendor _lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/vendor /lenovo/k5fpr
Now after -b is our branch just look one there in your source, which one you want to use just change it now most of the people must have thought hey man there is another way for this … We can use manifest… yes, those are 100000% but cloning is an easy way instead of manifest but still for those who want to clone using manifest then simply follow below steps instead of above … No issue you can use anyone.
First, let’s move to the dir where we are supposed to add manifest like for me its android/lineage/.repo You will have to change as per your dir.
Code:
cd android/lineage/.repo && mkdir local_manifests && cd local_manifests && nano roomservice.xml
After pasting above code you will see a text editor in that we are supposed to paste our manifest okay I am giving manifest of k5fpr you change source as per your device.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lenovo/k5fpr" name="mohancm/android_device_lenovo_A7010a48" remote="github" revision="oreo" />
<project path="vendor/lenovo/k5fpr" name="mohancm/android_vendor_lenovo_k5fpr" remote="github" revision="oreo" />
<project path="kernel/lenovo/k5fpr" name="mohancm/android_kernel_lenovo_A7010a48" remote="github" revision="oreo" />
</manifest>
Okay, so you must be wondering what to do for my device… Well don’t worry as we have used -b here its revision so after revision what comes is our branch and after “name” it's our source link and after “path” it's our destination like we have used ~/android/lineage/device/lenovo/k5fpr. That’s all for manifest just save it and exit after that just sync sources again … Whoa man, I don’t have 60-80gb left. Well, don’t worry its just loads the repo which is downloaded also it only fetches device specific sources.
Code:
repo sync -f –-no-tags –-no-clone-bundle
Patches & Bring-up!​
Now let it finish syncing and after that, we will apply patches. Yes! Patches now most of you must be thinking what are those? Well, patches are nothing more than fixes they are located in your device tree(android/lineage/device/lenovo/k5fpr/patches) Now look there and see which patches you want to apply. If you are confused which to apply then simply apply all. Whoa man, we are new and no idea how to apply those. Well I know don’t worry I will teach you same now.
First of all copy patches from device tree to our source like for e.g I will show you how to apply bionic_libc.patch.
Code:
cp ~/android/lineage/device/lenovo/k5fpr/patches/bionic/bionic_libc.patch ~/android/lineage/bionic
Now what comes after bionic_libc.patch is our destination where we are copying our patch. For your info “cp” is nothing then copy. Now just apply it by using below codes.
Code:
cd android/lineage
git add .
git commit -m “Patch”
Now you are done with applyin bionic_libc. patch but there are many other patches left do same with those just change their dir location like we choose/bionic/bionic_lib.patch same way for other patches just changes as accordingly.
Now after you are done applying all patches lets build our ROM … Oh! Yea finally.
Well not yet before that will learn a new thing called as “bing-up” well not device is universal for every ROM but there are some changes needed to be done before you build for any ROM like for me my device tree is already on lineage but if in case I want to build aosp or rr or any other ROM I will have to do certain changes in device tree for that particular ROM. Like here we will choose AOSP.
Now move to device tree like here in my case
Code:
cd ~/android/lineage/device/lenovo/k5fpr
Now following things will require changes :
*AndroidProducts.mk
*lineage.mk (Now pretty tricky this file name is lineage if your source is for dot just consider then its dot .mk)
*vendorsetup.sh
Just these 3 needed few changes now pay careful attention or else you won't get what I am saying. Now here we are doing bring-up for aosp from lineage so first and for most, we will start with AndroidProducts.mk so I am showing before bring-up and after bring-up (These changes are done using notepad like nano AndroidProducts.mk)
Before
Code:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage.mk
After
Code:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/aosp_k5fpr.mk
Now if you can see then we have changed lineage.mk to aosp_k5fpr.mk… yes for newer oses like pie we will have to include device code name as we did so here you are supposed to change lineage to aosp_k5fpr. Well, now we will talk about lineage.mk itself as we have changed it to aosp_k5fpr there then let's change the name of the file itself for that save the change and exit notepad and copy below code to rename it.
Code:
mv lineage.mk aosp_k5fpr.mk
Here you can observe we have typed lineage.mk at first so it means we want to change this file name and to what after space we typed aosp_k5fpr.mk. This means you will have to change it as per your current makefile and to which you want. Now open aosp_k5fpr.mk by using nano aosp_k5fpr.mk
Before
Code:
#
# Copyright (C) 2015-2016 The CyanogenMod Project
# Copyright 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, $(LOCAL_PATH)/device_k5fpr.mk)
# Device display
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Device identifier
PRODUCT_BRAND := lenovo
PRODUCT_DEVICE := k5fpr
PRODUCT_MANUFACTURER := LENOVO
PRODUCT_MODEL := Lenovo K4 Note
PRODUCT_NAME := lineage_k5fpr
PRODUCT_RELEASE_NAME := k5fpr
PRODUCT_RESTRICT_VENDOR_FILES := false
After
Code:
#
# Copyright (C) 2015-2016 The CyanogenMod Project
# Copyright 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit device configuration
$(call inherit-product, $(LOCAL_PATH)/device_k5fpr.mk)
# Device display
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Device identifier
PRODUCT_BRAND := lenovo
PRODUCT_DEVICE := k5fpr
PRODUCT_MANUFACTURER := LENOVO
PRODUCT_MODEL := Lenovo K4 Note
PRODUCT_NAME := aosp_k5fpr
PRODUCT_RELEASE_NAME := k5fpr
PRODUCT_RESTRICT_VENDOR_FILES := false
Now if you observe we removed a line “
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
“ Well in aosp there is no common_full_phone.mk so we removed entire but for most of the ROM’s its common.mk So make sure you check that out. Also, path will be changed like vendor/dot/config/common.mk for dot but for aosp there is nothing so we removed. Now also we did a change to PRODUCT_NAME : aosp_k5fpr from lineage_k5fpr.mk Well that all changes needed just save it and move to last but not the least vendorsetup.sh. Just open it by nano vendorsetup.sh
Before
Code:
add_lunch_combo lineage_k5fpr-eng
add_lunch_combo lineage_k5fpr-userdebug
add_lunch_combo lineage_k5fpr-user
After
Code:
add_lunch_combo aosp_k5fpr-eng
add_lunch_combo aosp_k5fpr-userdebug
add_lunch_combo aosp_k5fpr-user
This was a simple change just aosp from the lineage that all save it and let's start building now … Wait we did bring-up just for teaching you how exactly it works but doesn’t use aosp bring-up for lineage. Also if you still see some error cannot locate makefile for your device then try changing aosp_k5fpr.mk to aosp.mk and also in AndroidProducts.mk If still not then see for common.mk file or can seek your maintainer who has made trees.
Building ROM & Basic Info regarding errors!​
Now let's start the build
Code:
. build/envsetup.sh
export USE_CCACHE=1
export LC_ALL=C
brunch aosp_k5fpr-userdebug
Now we used userdebug but I would suggest eng as debugging is on by default so as to pull logs in case ROM doesn’t boot and wont to know what went wrong. For your info “export LC_ALL=C” Enables local time as it fixes up an error which new kernel causes due to improper time. “export USE_CCACHE=1” Enables cache, now cache speed up build. If you want to know more about lunch, brunch, mka and make just read this
Now building takes a long time as of me it took ~ 5hrs but I am sure it takes around ~6 hrs.
Also some basics… Now you will see many things in screen just ignore those as you may see “warning’s” well those are normal and will see those don’t worry about those but if you see something like “error” or “failed” That means something is wrong with certain file just ask Android ROM Development Group (Telegram)about the error as I cannot help with device-related errors. Also, these errors are due to device tree issues most of the cases as your maintainer has not maintained tree properly or due to some changes required for bring-up! Additionally, your device tree may also contain build manual just have a look at it
You forgot to add build guide for Snapdragon as you said MTK and Snapdragon are different.
Good guide btw.
SkaboXD said:
You forgot to add build guide for Snapdragon as you said MTK and Snapdragon are different.
Good guide btw.
Click to expand...
Click to collapse
Added !

Categories

Resources