I know there are a lot of tutorial to compile an Android Kernel but samsung is known to release buggy kernels and none of them tells how to deal with error.
Sources:
- a bunch of others kernel building tutorial on xda (like this one : http://forum.xda-developers.com/archive/index.php/t-1557045.html)
First and foremost, you MUST use a GNU/Linux (hereafter 'Linux') distribution. Don’t use OSX or Cygwin, I got a lot of problem with them.
The easiest way is to get the latest version of Ubuntu Linux. I personally, I’m using archlinux but the installation is a bit complex for this kind of use only.
Step 0: Pre-project Setup (optionnal)
This link will help you to use the main android commands into your newly linux environment: [SCRIPT] [Ubuntu] ADB, AAPT, APKTool, Android SDK/NDK, and udev rules auto-installer
I did not use them for this but it could be useful sometime in other tasks
Step 1: Setting up a build environment
First, you will need to install the required packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev g++-multilib lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev git
Some of these packages won’t work but normally dependencies will be resolved by apt the package manager.
Next, you will need a Cross-Compile Toolchain, and for our purposes we will be using this specifically CodeSourcery release (2009q3):
Untar it either in /opt (with su permission) or create of directory for it.
Code:
cd ~/
tar xvjf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
It’s very important for the P68XX kernel to use this toolchain. Otherwise, you’ll have errors while compiling it and trust me, you don’t want this type of errors (look at my mdnie.c (insérer lien) thread for example). As a matter fact, I tried all of the toolchains given by the mentor website and only this one works on my linux.
Step 2: Pulling the Kernel Source
Now, we have to download the kernel from: [url=http://opensource.samsung.com/index.jsp;jsessionid=0EFA22A80FBED4451C1D9C823E3440C4[/url]
You will have an archive unzip it and copy the kernel part into the kernel_P68XX and then untar it.
Code:
mkdir ~/kernel_P68XX
tar xvf Kernel.tar.gz -C ~/kernel_P68XX
You can remove it if you want.
Code:
rm Kernel.tar.gz
Now you have to download and extract the initrd from the samsung zImage found in the official ICS image :
For the UK P6810[url=http://www.hotfile.com/dl/165045602/118260c/P6810XXLPL_P6810OXALPL_XEU.zip.html[/url]
For the Open Austria P6800 [url=http://www.hotfile.com/dl/166221509/de0b31d/P6800XXLQ2_P6800OXALQ2_ATO.zip.html[/url]
Download the zip, unzip it, untar it and copy the zImage as followed.
Then, download also and use unpack-initramfs (both files are attached at the end of this thread).
Code:
mkdir ~/initrd
mv zImage ~/initrd
mv unpack-initramfs ~/initrd
cd ~/initrd
Sudo chmod +x unpack-initramfs
./unpack-initramfs zImage
Step 3: Build the Kernel
Finally, what you've been waiting for!
We have to export a few things first, to prepare the build environment. Open a terminal and type:
Code:
export ARCH=arm
export CROSS_COMPILE=~/arm-2009q3/bin/arm-none-linux-gnueabi-
make P8-wifi_defconfig
You’ll have this :
Code:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED
scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED
scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to
.config
#
Now edit the kernel’s configuration.
Code:
nano .config
Search for
Code:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
Change to
Code:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="../initrd"
Where initrd is the folder where you extracted the zImage initramfs.
Here, you can make substiantials changes to your kernel .This step is really important if you want to customize your kernel (ie : enabling features such as governors, add init.d, cifs, file systems etc.) (we'll see this on the next tutorial). But do it only if you know what you’re doing. Don’t forget to back up your file config (named .config).
Now you can build it.
Code:
make –jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Now, watch the output at the end carefully and you'll see the necessary files that we need:
Code:
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
AS arch/arm/boot/compressed/piggy.gzip.o
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 4 modules
CC drivers/net/wireless/ath/ath.mod.o
LD [M] drivers/net/wireless/ath/ath.ko
CC drivers/net/wireless/ath/ath6kl/ath6kl_sdio.mod.o
LD [M] drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
CC net/wireless_ath/cfg80211.mod.o
LD [M] net/wireless_ath/cfg80211.ko
Anything marked with an [M] will need to be remembered, as well as the location of the compiled kernel at /arch/arm/boot/zImage
Step 4: Dealing with Samsung's errors
Well that would be it, if Samsung had done the job properly but as far as I’m concerned I got three errors :
First one :
Code:
CC drivers/media/video/samsung/mali/common/mali_kernel_core.o
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné: No such file or directory
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné": No such file or directory
cc1: warnings being treated as errors
<command-line>:0: error: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c: In function 'mali_kernel_constructor':
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: expected expression before ')' token
make[5]: *** [drivers/media/video/samsung/mali/common/mali_kernel_core.o]
Erreur 1
make[4]: ***
[drivers/media/video/samsung/mali] Erreur 2
make[3]: ***
[drivers/media/video/samsung] Erreur 2
make[2]: ***
[drivers/media/video] Erreur 2
make[1]: *** [drivers/media]
Erreur 2
make: *** [drivers] Erreur 2
A way to fix this error is to change the SVN version Makefile in drivers/media/video/Samsung/mali/Makefile. I did not dig into it but I’m sure that one of the term return a wrong value. So I changed it to the number : 1. You can assign any value you want as far as it is not a variable.
Code:
nano drivers/media/video/samsung/mali/Makefile
Search for this chain string : SVN, you’ll find this one :
Code:
# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && sv… … …
Replace with:
Code:
SVN=REV:=1
Relaunch the make
Code:
make -jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Second one :
Code:
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné: No such file or directory
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné": No such file or directory
cc1: warnings being treated as errors
<command-line>:0: error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:
In function 'ump_initialize_module': drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:128:
error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:128:
error: expected expression before ')' token
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:
At top level:
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:472:
error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:472:
error: expected expression before ',' token
make[5]: ***
[drivers/media/video/samsung/ump/linux/ump_kernel_linux.o] Erreur 1
make[4]: ***
[drivers/media/video/samsung/ump] Erreur 2
make[3]: ***
[drivers/media/video/samsung] Erreur 2
make[2]: ***
[drivers/media/video] Erreur 2
make[1]: *** [drivers/media]
Erreur 2
make: *** [drivers] Erreur 2
Do exactly the same manipulation as said above :
Modify the Makefile in drivers/media/video/Samsung/ump/Makefile.
Code:
nano drivers/media/video/Samsung/ump/Makefile
Search for this chain string : SVN, you’ll find this one :
Code:
# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && sv… … …
Replace with:
Code:
SVN=REV:=1
Relaunch the make
Code:
make -jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Last error but not the least :
Code:
drivers/video/samsung/lcdfreq.c: In function 'level_store':
drivers/video/samsung/s3cfb.h:262:
sorry, unimplemented: inlining failed in call to 'get_fimd_global': function
body not available
drivers/video/samsung/lcdfreq.c:150:
sorry, unimplemented: called from here
drivers/video/samsung/s3cfb.h:262:
sorry, unimplemented: inlining failed in call to 'get_fimd_global': function
body not available
drivers/video/samsung/lcdfreq.c:176:
sorry, unimplemented: called from here
make[3]: ***
[drivers/video/samsung/lcdfreq.o] Erreur 1
make[2]: ***
[drivers/video/samsung] Erreur 2
make[1]: *** [drivers/video]
Erreur 2
make: *** [drivers] Erreur 2
Fix this is very simple but took me a lot of time. I found the solution in some patch explainations for the mainstream kernel. The only thing you have to do is : remove the word “inline” in this file drivers/video/Samsung/s3cfb.h
Search for this :
Code:
extern struct fb_ops s3cfb_ops;
extern inline struct s3cfb_global *get_fimd_global(int id);
Remove “inline”:
Code:
extern struct fb_ops s3cfb_ops;
extern struct s3cfb_global *get_fimd_global(int id);
Redo the make command :
Code:
make -jX{/code]
Now you’ve got your kernel built but it's not finished yet !
[COLOR="blue"][B]Final Step: Include modules to your kernel[/B][/COLOR]
At first, I was very surprised by this step but it is essential otherwise your kernel won’t work. Actually, modules included by samsung in the initrd uncompressed before are not working as if. So you have to do this :
in the initrd you made, copy the *.ko into initrd/lib/modules
[code] cp drivers/net/wireless/ath/ath.ko drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko drivers/scsi/scsi_wait_scan.ko net/wireless_ath/cfg80211.ko ../initrd/lib/modules
Overwrite them if asked.
Clean your code, use your backup config file and rebuilt the kernel :
Code:
Make distclean
Make clean
Cp your_backup_file kernel_P68XX/.config
make –jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Your final kernel is here : /arch/arm/boot/zImage
Kernel Installation
Flash via heimdall
Code:
$ adb reboot download
$ heimdall flash --kernel path/to/zImage
Maybe there's another way to do this so feel free to leave comments
Good luck !
Thanks for sharing..
Great tut, thanks a lot, will be really helpful. :good:
Thanks man.
Enviado de meu GT-P6800 usando o Tapatalk 2
Thanks guys !
Next to come : Install the kernel via cwm, Kernel optimisations and Build a custom rom for these devices.
Running my first home built kernel. :laugh:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I love android.
dedraks said:
Running my first home built kernel. :laugh:
I love android.
Click to expand...
Click to collapse
So cool you did it
Congrats !
Awesome tutorial mengpo, thanks
mengpo said:
Next to come : Install the kernel via cwm
Click to expand...
Click to collapse
Easiest to just flash via heimdall
Code:
$ adb reboot download
$ heimdall flash --kernel path/to/zImage
locerra said:
Easiest to just flash via heimdall
Code:
$ adb reboot download
$ heimdall flash --kernel path/to/zImage
Click to expand...
Click to collapse
:silly:
I did not know it was so simple !!
I'll change the tuto then !
Thanks again !
Thanks a lot !
I havent coded for ages and setting up the environment was discouraging me from even thinking about trying to play with the kernel
This is extremely useful
Alcibiade said:
Thanks a lot !
I havent coded for ages and setting up the environment was discouraging me from even thinking about trying to play with the kernel
This is extremely useful
Click to expand...
Click to collapse
You're welcome
Hi, I stumbled across this thread while trying to set up my environment to do kernel work for another device (S7562, not that it matters). The problem is that my zImage (extracted from stock Samsung ROM) does not contain any gzip archive and I can't extract the initramfs. I am asking here because I also tried using the script attached in the first post without success.
Essentially, my stock zImage does not seem to contain the hexa string "1f 8b 08" in this order. I tried with scripts and I tried it manually as well:
Code:
grep -a -b --only-matching `perl -e'print "\x1F\x8B\x08"'` zImage
That returns nothing for this kernel. Works fine for others though and I've successfully done this procedure using other ROMs from Samsung in the past. I can provide the initial boot.img and the zImage extracted from the boot.img. Let me know.
Edit - SOLVED: My image did not contain the ramdisk zipped, it was just the compiled kernel.
Thanks,
C.
COmpilation Error FOr Redmi 1S India
Plz help me to solve this error
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
mengpo said:
I know there are a lot of tutorial to compile an Android Kernel but samsung is known to release buggy kernels and none of them tells how to deal with error.
Sources:
- a bunch of others kernel building tutorial on xda (like this one : http://forum.xda-developers.com/archive/index.php/t-1557045.html)
First and foremost, you MUST use a GNU/Linux (hereafter 'Linux') distribution. Don’t use OSX or Cygwin, I got a lot of problem with them.
The easiest way is to get the latest version of Ubuntu Linux. I personally, I’m using archlinux but the installation is a bit complex for this kind of use only.
Step 0: Pre-project Setup (optionnal)
This link will help you to use the main android commands into your newly linux environment: [SCRIPT] [Ubuntu] ADB, AAPT, APKTool, Android SDK/NDK, and udev rules auto-installer
I did not use them for this but it could be useful sometime in other tasks
Step 1: Setting up a build environment
First, you will need to install the required packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev g++-multilib lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev git
Some of these packages won’t work but normally dependencies will be resolved by apt the package manager.
Next, you will need a Cross-Compile Toolchain, and for our purposes we will be using this specifically CodeSourcery release (2009q3):
Untar it either in /opt (with su permission) or create of directory for it.
Code:
cd ~/
tar xvjf arm-2009q3-68-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
It’s very important for the P68XX kernel to use this toolchain. Otherwise, you’ll have errors while compiling it and trust me, you don’t want this type of errors (look at my mdnie.c (insérer lien) thread for example). As a matter fact, I tried all of the toolchains given by the mentor website and only this one works on my linux.
Step 2: Pulling the Kernel Source
Now, we have to download the kernel from: [url=http://opensource.samsung.com/index.jsp;jsessionid=0EFA22A80FBED4451C1D9C823E3440C4[/url]
You will have an archive unzip it and copy the kernel part into the kernel_P68XX and then untar it.
Code:
mkdir ~/kernel_P68XX
tar xvf Kernel.tar.gz -C ~/kernel_P68XX
You can remove it if you want.
Code:
rm Kernel.tar.gz
Now you have to download and extract the initrd from the samsung zImage found in the official ICS image :
For the UK P6810[url=http://www.hotfile.com/dl/165045602/118260c/P6810XXLPL_P6810OXALPL_XEU.zip.html[/url]
For the Open Austria P6800 [url=http://www.hotfile.com/dl/166221509/de0b31d/P6800XXLQ2_P6800OXALQ2_ATO.zip.html[/url]
Download the zip, unzip it, untar it and copy the zImage as followed.
Then, download also and use unpack-initramfs (both files are attached at the end of this thread).
Code:
mkdir ~/initrd
mv zImage ~/initrd
mv unpack-initramfs ~/initrd
cd ~/initrd
Sudo chmod +x unpack-initramfs
./unpack-initramfs zImage
Step 3: Build the Kernel
Finally, what you've been waiting for!
We have to export a few things first, to prepare the build environment. Open a terminal and type:
Code:
export ARCH=arm
export CROSS_COMPILE=~/arm-2009q3/bin/arm-none-linux-gnueabi-
make P8-wifi_defconfig
You’ll have this :
Code:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED
scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED
scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to
.config
#
Now edit the kernel’s configuration.
Code:
nano .config
Search for
Code:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
Change to
Code:
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="../initrd"
Where initrd is the folder where you extracted the zImage initramfs.
Here, you can make substiantials changes to your kernel .This step is really important if you want to customize your kernel (ie : enabling features such as governors, add init.d, cifs, file systems etc.) (we'll see this on the next tutorial). But do it only if you know what you’re doing. Don’t forget to back up your file config (named .config).
Now you can build it.
Code:
make –jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Now, watch the output at the end carefully and you'll see the necessary files that we need:
Code:
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
AS arch/arm/boot/compressed/piggy.gzip.o
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 4 modules
CC drivers/net/wireless/ath/ath.mod.o
LD [M] drivers/net/wireless/ath/ath.ko
CC drivers/net/wireless/ath/ath6kl/ath6kl_sdio.mod.o
LD [M] drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
CC net/wireless_ath/cfg80211.mod.o
LD [M] net/wireless_ath/cfg80211.ko
Anything marked with an [M] will need to be remembered, as well as the location of the compiled kernel at /arch/arm/boot/zImage
Step 4: Dealing with Samsung's errors
Well that would be it, if Samsung had done the job properly but as far as I’m concerned I got three errors :
First one :
Code:
CC drivers/media/video/samsung/mali/common/mali_kernel_core.o
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné: No such file or directory
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné": No such file or directory
cc1: warnings being treated as errors
<command-line>:0: error: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c: In function 'mali_kernel_constructor':
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: missing terminating " character
drivers/media/video/samsung/mali/common/mali_kernel_core.c:172: error: expected expression before ')' token
make[5]: *** [drivers/media/video/samsung/mali/common/mali_kernel_core.o]
Erreur 1
make[4]: ***
[drivers/media/video/samsung/mali] Erreur 2
make[3]: ***
[drivers/media/video/samsung] Erreur 2
make[2]: ***
[drivers/media/video] Erreur 2
make[1]: *** [drivers/media]
Erreur 2
make: *** [drivers] Erreur 2
A way to fix this error is to change the SVN version Makefile in drivers/media/video/Samsung/mali/Makefile. I did not dig into it but I’m sure that one of the term return a wrong value. So I changed it to the number : 1. You can assign any value you want as far as it is not a variable.
Code:
nano drivers/media/video/samsung/mali/Makefile
Search for this chain string : SVN, you’ll find this one :
Code:
# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && sv… … …
Replace with:
Code:
SVN=REV:=1
Relaunch the make
Code:
make -jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Second one :
Code:
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné: No such file or directory
arm-none-eabi-gcc: non: No such file or directory
arm-none-eabi-gcc: versionné": No such file or directory
cc1: warnings being treated as errors
<command-line>:0: error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:
In function 'ump_initialize_module': drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:128:
error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:128:
error: expected expression before ')' token
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:
At top level:
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:472:
error: missing terminating " character
drivers/media/video/samsung/ump/linux/ump_kernel_linux.c:472:
error: expected expression before ',' token
make[5]: ***
[drivers/media/video/samsung/ump/linux/ump_kernel_linux.o] Erreur 1
make[4]: ***
[drivers/media/video/samsung/ump] Erreur 2
make[3]: ***
[drivers/media/video/samsung] Erreur 2
make[2]: ***
[drivers/media/video] Erreur 2
make[1]: *** [drivers/media]
Erreur 2
make: *** [drivers] Erreur 2
Do exactly the same manipulation as said above :
Modify the Makefile in drivers/media/video/Samsung/ump/Makefile.
Code:
nano drivers/media/video/Samsung/ump/Makefile
Search for this chain string : SVN, you’ll find this one :
Code:
# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && sv… … …
Replace with:
Code:
SVN=REV:=1
Relaunch the make
Code:
make -jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Last error but not the least :
Code:
drivers/video/samsung/lcdfreq.c: In function 'level_store':
drivers/video/samsung/s3cfb.h:262:
sorry, unimplemented: inlining failed in call to 'get_fimd_global': function
body not available
drivers/video/samsung/lcdfreq.c:150:
sorry, unimplemented: called from here
drivers/video/samsung/s3cfb.h:262:
sorry, unimplemented: inlining failed in call to 'get_fimd_global': function
body not available
drivers/video/samsung/lcdfreq.c:176:
sorry, unimplemented: called from here
make[3]: ***
[drivers/video/samsung/lcdfreq.o] Erreur 1
make[2]: ***
[drivers/video/samsung] Erreur 2
make[1]: *** [drivers/video]
Erreur 2
make: *** [drivers] Erreur 2
Fix this is very simple but took me a lot of time. I found the solution in some patch explainations for the mainstream kernel. The only thing you have to do is : remove the word “inline” in this file drivers/video/Samsung/s3cfb.h
Search for this :
Code:
extern struct fb_ops s3cfb_ops;
extern inline struct s3cfb_global *get_fimd_global(int id);
Remove “inline”:
Code:
extern struct fb_ops s3cfb_ops;
extern struct s3cfb_global *get_fimd_global(int id);
Redo the make command :
Code:
make -jX{/code]
Now you’ve got your kernel built but it's not finished yet !
[COLOR="blue"][B]Final Step: Include modules to your kernel[/B][/COLOR]
At first, I was very surprised by this step but it is essential otherwise your kernel won’t work. Actually, modules included by samsung in the initrd uncompressed before are not working as if. So you have to do this :
in the initrd you made, copy the *.ko into initrd/lib/modules
[code] cp drivers/net/wireless/ath/ath.ko drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko drivers/scsi/scsi_wait_scan.ko net/wireless_ath/cfg80211.ko ../initrd/lib/modules
Overwrite them if asked.
Clean your code, use your backup config file and rebuilt the kernel :
Code:
Make distclean
Make clean
Cp your_backup_file kernel_P68XX/.config
make –jX
Where X is the number of tasks you want to run simultaneously. As for me, I use 4 or 5.
Your final kernel is here : /arch/arm/boot/zImage
Kernel Installation
Flash via heimdall
Code:
$ adb reboot download
$ heimdall flash --kernel path/to/zImage
Maybe there's another way to do this so feel free to leave comments
Good luck !
Click to expand...
Click to collapse
@mengpo "Step 4: Dealing with Samsung's errors" is still relevent in 2016. Samsung, great work maintaining and updating your source--what committment to open source. NOT!!!
For any CM10 ROM, except new bootloader one, hackfest, and CM10.1
This tutorial shows you how to build CM10 kernel from RC and the CM team's source(it is their work), and using wkpark's ramhack patch or other patches
If you are uncomfortable in building the kernel, you use my flashable sample kernel at the end of the post, which uses 56 MB RAM hack.
Pre-requistes:
A Linux system
An internet connectionc
Some time and patience
But the time required for downloading resources, and building once everything is set up, is only a fraction of the time required for a full CM10 ROM
You can follow this guide, with or without having built CM10 following Raum1807's excellent CM10 building guide. At one of the places, the difference occurs whether you had built CM10 before or not, and I have listed it at that place
For a first time build, you need to follow all the steps, but 2nd time onwards, you can skip to the build step or RAM hack setting step
Instructions:
STEP 1: SETTING UP THE ENVIRONMENT
Install any CM10 ROM on the device (old bootloader, non-hackfest, non-CM10.1 one)
If you already have CM10 environment set up, skip to "Create an environment variable..." part
Install development support packages:
Debian based Linux distributions (like Ubuntu)
64bit systems:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386
then
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Red Hat based Linux distributions
32bit and 64bit systems:
git gnupg java-1.6.0-openjdk-devel flex bison gperf SDL-devel esound-devel wxGTK-devel zip curl ncurses-devel zlib-devel gcc-c++ glibc-devel
64bit only:
glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686
Setting up Java (thanks to Raum for the java setup guide)
You need a Java Development Kit for building CM10. Recommended is the SUN JDK 6. As of writing the most recent version is SUN JDK 6 Update 37.
1. Download the jdk-6u37-linux-i586.bin from the Oracle/Sun Java Download Area. If you are on 64-bit Ubuntu as I am, you should grab jdk-6u37-linux-x64.bin.
2. Make the bin file executable:
Code:
$ chmod +x jdk-6u37-linux-x64.bin
3. Extract the bin file:
Code:
$ ./jdk-6u37-linux-x64.bin
4. Move the extracted folder to this this location:
Code:
$ sudo mv jdk1.6.0_37 /usr/lib/jvm/./jdk-6u37-linux-x64.bin
5. Install the new Java source in system:
Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u37-linux-x64.bin/bin/jar 1
6. Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar
7. Check Java version:
Code:
$ java -version
8. Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the new Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Now,
If you have CM10 source fetched already (if you have built cm10)
If the directory name where the cm10 source exists is "cm10" (as in Raum's building guide)
Create an environment variable denoting the location of the android toolchain as follows:
Code:
export CCOMPILER=${HOME}/cm10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Or else, replace the path/name if yours is different
(If your arm-eabi version is not 4.4.3, check the folder name and change it accordingly)
If you do not have cm10 source on your pc, then you need to download the ARM EABI Toolchain separately
Download link, ready to extract
If above does not work, download from official site here
Download and extract then, create an environment variable denoting the location of the toolchain as follows:
Code:
export CCOMPILER=[extraction directory]/bin/arm-eabi-
Download Kernel Source Code:
Code:
mkdir -p ~/kernel
cd ~/kernel
Now download RC's CM10 kernel source
In terminal, do
Old bootloader:
Code:
git clone git://github.com/CyanogenMod/lge-kernel-star.git -b jellybean
New bootloader:
Here, pengus77 has made the necessary changes in his repo, so we fetch from that
Code:
git clone git://github.com/pengus77/lge-kernel-star.git
Thus, there should be a folder named "lge-kernel-star" inside /kernel folder
Then in terminal, cd to that directory "lge-kernel-star"
Code:
cd lge-kernel-star
Getting the config file
The next step is to copy the file "/kernel/lge-kernel-star/arch/arm/configs/cyanogenmod_p990_defconfig" to "/kernel/lge-kernel-star and rename it to ".config"
using the command:
Code:
cp arch/arm/configs/cyanogenmod_p990_defconfig .config
(Thanks to tonyp for the tip!)
STEP 2: CONFIGURATION
Configure the build:
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
If it happens to ask anything, just accept the defaults at every step by pressing enter.
STEP 3: APPLYING PATCHES
Applying patches like wkpark's RAM hack patch
If you skip this step, the kernel will work, but you'll have a completely stock kernel without RAM hack or other tweaks
Download wkpark's two patches from here and here, and put them in your /kernel directory
Code:
cd ~/kernel
Now to apply the patches, we use the patch command like this:
Code:
patch -Np1 -d lge-kernel-star < patchname.patch
(replace patchname with name of the patch file)
Here, -N is for ignoring patches that seem to be already applied or reversed
p<num> Strip the smallest prefix containing num(here num=1) leading slashes from each file name found in the patch file
In this case, num=1 according to the path names in wkpark's patch, and in a lot of cases, the value of 1 is common
-d is to change to the directory immediately, before doing anything else
You need to apply wkpark's two patches one by one (0001-..., then bootloader-...)
If you get errors while patching, if they are basic errors like file not found etc. then you should manage to fix it yourself.
But if you get errors like "HUNK ... failed",
try
Code:
patch -Np1 --ignore-whitespace -d lge-kernel-star < patchname.patch
A "HUNK ignored" is ok, if patch was attempted previously, since that file might have been successfully patched last time
if a HUNK still fails, then read the troubleshooting guide
Setting RAM hack size (If you skipped the above patching step, dont do this)
wkpark's patch makes it possible for you to set ramhack size in kernel command line parameter.
The cmdline parameter has to have the full boot.img command line parameters, which you can obtain from dmesg. I have done it for you, so you can save time on that
Here's how it looks for the old bootloader: (for the new one, ignore this)
Code:
<5>[70:01:01 00:00:00.000] Kernel command line: loglevel=0 muic_state=1 CRC=10203036179a93 brdrev=1.0 uniqueid=37c7006421f6097 video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:35e00:2800:800,linux:34700:1000:800,mbr:400:200:800,system:600:2bc00:800,cache:2c200:8000:800,misc:34200:400:800,userdata:38700:c0000:800 [email protected] vmalloc=128M androidboot.mode=normal androidboot.hardware=star androidboot.serialno=37c7006421f6097
Paste the line starting from loglevel=0 till the end (serialno) into .config file in lge-kernel-star folder in
CONFIG_CMDLINE="<here>"
Insert a carveout size in between vmalloc and androidboot.mode
Determing carveout size: carveout=<152 - RAM hack size>M
For example, if RAM hack size is 56, then carveout is 96M
So in that case, the cmdline is like this:
old bootloader:
Code:
CONFIG_CMDLINE="loglevel=0 muic_state=1 CRC=10203036179a93 brdrev=1.0 uniqueid=37c7006421f6097 video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:35e00:2800:800,linux:34700:1000:800,mbr:400:200:800,system:600:2bc00:800,cache:2c200:8000:800,misc:34200:400:800,userdata:38700:c0000:800 [email protected] vmalloc=128M carveout=96M androidboot.mode=normal androidboot.hardware=star androidboot.serialno=37c7006421f6097"
new bootloader:
Code:
CONFIG_CMDLINE="tegraid=20.1.4.0.0 [email protected] carveout=152M android.commchip=0 vmalloc=128M androidboot.serialno=037c7006421f6097 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,-3 androidboot.mode=normal usbcore.old_scheme_first=1 [email protected] [email protected] muic_state=0 tegraboot=sdmmc tegrapart=recovery:35e00:2800:800,boot:34700:1000:800,mbr:400:200:800,persist:600:2bc00:800,cache:2c200:7f00:800,misc:34200:400:800,userdata:38700:c0000:800,bcttable:0:600:800,bootloader:100:300:800,data/ve:f8800:1400:800,system:34c000:40000:800 "
and save the file
Dont set carveout too low, or else some gpu-intensive stuff may not work properly.
STEP 4: BUILDING THE KERNEL
In terminal,
Code:
cd ~/kernel/lge-kernel-star
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
This step may take a while, depending on your computer. Took ~5-10 mins for the first build for me, and ~1 min for the second build onwards.
If it asks in the terminal "use default config?" then say "y", if not, then ignore this
If you get some error and the building aborts within a few seconds, try the "Create environment variable part" again, and then return back directly to the build step.
After it is done, you should have a kernel stored in ~/kernel/lge-kernel-star/arch/arm/boot/zImage
Preparing the flashable zip for the kernel
Some compiled modules need to be included so that problems like wifi not switching on dont occur.
They are:
drivers/misc/bthid/bthid.ko
drivers/scsi/scsi_wait_scan.ko
drivers/net/wireless/bcm4329/wireless.ko
They will be used while preparing the flashable zip below.
Thanks to feav's compiled modules and benee's anykernel updater for star, all this is ready-made and you can simply:
Download the sample kernel zip attached below and replace /kernel/zImage and and the above modules in system/lib/modules/hw in that with yours, edit updater-script if you want.
Your flashable zip is now ready
STEP 5: FLASHING AND TESTING THE KERNEL
Put the sample kernel below as a backup in case your kernel does not boot and you need a working phone immediately.
Flash the kernel in recovery, wipe cache, dalvik cache and reboot.
If the phone goes past the LG logo screen(s) and into the bootscreen of the ROM, then it should work
Then you can check "kernel version" in settings->about phone to see your kernel information,
and you can see the new RAM size (which should be 342 MB + RAM hack size) in some app like battery dr saver, or antutu benchmark's system info.
If it doesnt work, make sure you have followed the entire guide properly and then ask queries
If you want to revert to another kernel, flash that kernel in recovery, or for stock kernel, flash your ROM.
Keeping kernel source up to date (for building again later after RC has made changes to the source):
Code:
cd ~/kernel/lge-kernel-star
git pull
This will update your source with the latest commits by RC. Then you can rebuild the kernel by doing the "create environment variable" and then skip directly to the build stage
Standard disclaimer:
I am not responsible if anything goes wrong with your phone or anything else.
Credits:
aremcee/RC and the rest of the CM team for all their work. This is their kernel you are building
wkpark for his valuable contributions, including the ramhack patches and cracking the new bootloader
benee for his Anykernel updater for star, and other tweaks
feav for his compiled wifi modules
pengus77 for the work to make it suitable for the new bootloader
Download links for sample kernels:
SAMPLE 56 MB RAMHACK KERNEL
SAMPLE 32 MB RAMHACK KERNEL
SAMPLE 24 MB RAMHACK KERNEL
Troubleshooting guide:
1. Patch failure
HUNK failed means that a particular file was not patched to some problem. In this case, a .rej file is saved in the same folder as the file to be patched, and it contains the stuff not patched.
Do not neglect "failed" hunk since it means a partially applied patch(some files patched, some files not), and may cause problems. "Ignored hunk" is ok, if the patch had been attempted before on a file and had succeeded on that file last time.
To manually patch the failed hunk, go that file where the hunk failed (has same name as .rej file without .rej extension)
For example, if .rej file is board-star.c.rej, and it contains the following sample lines (look for lines beginning with '+' and remove the + before adding, similar for -) go to board-star.c, and add the lines manually like this:
Code:
#if defined (CONFIG_STAR_REBOOT_MONITOR) || defined (CONFIG_BSSQ_REBOOT_MONITOR)
#define RAM_RESERVED_SIZE 100*1024
/* Force the reserved_buffer to be at its old (Froyo/GB) location
for reboot to work with the older bootloader */
if (strstr(saved_command_line, "brdrev=")) {
extern void *reserved_buffer;
pr_info("The older bootloader detected\n");
if (memblock_end_of_DRAM() > 0x17f80000) {
if (memblock_reserve(0x17f80000, RAM_RESERVED_SIZE)) {
pr_err("Fail to get reserved_buffer for the older bootloader\n");
} else {
pr_info("Change reserved_buffer for the older bootloader\n");
reserved_buffer = phys_to_virt(0x17f80000);
}
} else {
pr_info("Change reserved_buffer\n");
reserved_buffer = ioremap(0x17f80000, RAM_RESERVED_SIZE);
}
}
#endif
This was in the .rej file, and is to be added immediately after
Code:
#if defined(CONFIG_LGE_BROADCAST_TDMB)
star_dmb_init();
#endif /* CONFIG_LGE_BROADCAST */
in board-star.c (and before the next #if defined or closing bracket)
Similarly, the - lines to be deleted and + lines are to be added in that failed hunk file
(do this manual stuff only if hunk fails)
2. If ramhack kernel fails, but normal kernel works:
From your pc, in terminal do
adb shell dmesg > dmesg.txt
or from your phone, in android terminal emulator, do
dmesg > /sdcard/dmesg.txt
Copy it from your dmesg.txt starting from loglevel=0 till the end (serialno)
Look for a line in dmesg.txt which resembles this:
Code:
<5>[70:01:01 00:00:00.000] Kernel command line: loglevel=0 muic_state=1 CRC=10203036179a93 brdrev=1.0 uniqueid=37c7006421f6097 video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:35e00:2800:800,linux:34700:1000:800,mbr:400:200:800,system:600:2bc00:800,cache:2c200:8000:800,misc:34200:400:800,userdata:38700:c0000:800 [email protected] vmalloc=128M androidboot.mode=normal androidboot.hardware=star androidboot.serialno=37c7006421f6097
Use your own phone's parameters instead of this and then set carveout size.
3. Problem with config file:
Pulling kernel config from device:
You need to retrieve a working kernel config from the device, and unzip it.
For that, connect your phone to your pc, enable USB debugging if it was disabled, and then in terminal
Code:
adb pull /proc/config.gz ~/kernel/lge-star-kernel-jellybean/config.gz
cat config.gz | gunzip > .config
Alternatively, you can pull the .config from the newest boot.img
Code:
scripts/extract-ikconfig boot.img > .config
Changes and updates:
25/12/12:
Added changes to be made for the new bootloader (in red color)
24/12/12:
Updated the guide, added some fixes and changes
22/12/12:
Slightly modified version of wkpark's 2nd patch (bootloader one) which may possibly fix one of the errors and may remove need for manually adding some lines
Last one
rugglez.....you rock mate....
I am not sure if I will really do something as I am getting old(lolz) and if I understand enough....
but thanks mate, for keeping spirits alive for this device
rugglez,
Did you see these posts: http://forum.xda-developers.com/showpost.php?p=34600723&postcount=189
http://forum.xda-developers.com/showpost.php?p=34601277&postcount=192
Did you experienced any ploblem with USB?
SREEPRAJAY said:
rugglez.....you rock mate....
I am not sure if I will really do something as I am getting old(lolz) and if I understand enough....
but thanks mate, for keeping spirits alive for this device
Click to expand...
Click to collapse
There are always some things worth experiencing once in life, like if you are an Android user, building a ROM and a kernel. You have experienced it with your wonderful AF kernel, thats important
feav said:
rugglez,
Did you see these posts: http://forum.xda-developers.com/showpost.php?p=34600723&postcount=189
http://forum.xda-developers.com/showpost.php?p=34601277&postcount=192
Did you experienced any ploblem with USB?
Click to expand...
Click to collapse
USB works fine, both adb and mass storage
This guide may seem intimidating, but trust me, once you complete it the first time, you'll find it really simple from the next build onwards.
Uploaded a slightly modified version of wkpark's 2nd patch (bootloader one) which may possibly fix one of the errors and may remove need for manually adding some lines. Updated link in OP and attached here too.
I tried the sample kernel and my camera stops functioning and so with other apps such as contacts, they don't start at all. Im on dec 20 nightly. Could it be the ramhack size? Maybe 32mb will suffice. Just saying.
Thanks to this, will probably try this next week..
aldyu said:
I tried the sample kernel and my camera stops functioning and so with other apps such as contacts, they don't start at all. Im on dec 20 nightly. Could it be the ramhack size? Maybe 32mb will suffice. Just saying.
Thanks to this, will probably try this next week..
Click to expand...
Click to collapse
Uploaded 32 MB ram hack kernel for those having problem with camera, try it out.
Download link 32MB RH
Update:
Added 24MB version too. Here you go:
24MB RH kernel
Thanks rugglez, 32 mb rh is ok so far, cm10 is way smoother and can still play nfs most wanted. Btw, can you apply the patch for double lg logo too by wkpark?
Sent from my P990-CM10
After installing the new kernel, if some apps still don't work or there any lag, disable "force gpu rendering" and "disable hardware overlays" in developer settings.
Thank you for your work! Just flashed the 32mb version without any problem. On cm7 the 48mb ramhack was the biggest without breaking 720p recording. Maybe you should give it a try!
Uhm download a kernel zip file?
How about git clone?
Sent from my Nexus 7 using xda app-developers app
tonyp said:
Uhm download a kernel zip file?
How about git clone?
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Git clone size = ~440mb
Zip size = 120mb which extracts to that same size
Takes more time to download more for people like me with slow Internet, no other reason
Hi rugglez, got the ff. error when installing the required packages, Im on ubuntu 12.10 x64.
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
E: Unable to locate package libwxgtk2.6-dev
E: Couldn't find any package by regex 'libwxgtk2.6-dev'
How to fix? Thanks.
aldyu said:
Hi rugglez, got the ff. error when installing the required packages, Im on ubuntu 12.10 x64.
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
E: Unable to locate package libwxgtk2.6-dev
E: Couldn't find any package by regex 'libwxgtk2.6-dev'
How to fix? Thanks.
Click to expand...
Click to collapse
Can you install the dependencies from Raum's CM10 building thread here?
Follow steps 1 and 2 there.
Let me know if that works, ive updated the guide's step 1(setting up environment)
Installing the dependencies from this guide was the only thing i didnt test, since i had the CM10 environment set up already
a step is missing from this guide.
adb pull /proc/config.gz ~/kernel/lge-star-kernel-jellybean/config.gz
cat config.gz | gunzip > .config
Click to expand...
Click to collapse
then
mv config arch/arm/configs/<your_config_name>_defconfig
make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
make <your_config_name>_defconfig
make ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig
Click to expand...
Click to collapse
then continue...
if you don't make the default config the compiler throws out some errors.
ps: nice guide btw
rugglez said:
Git clone size = ~1.5gb
Zip size = 440mb which extracts to that same size
Takes forever to download more than a gig for people like me with slow Internet, no other reason
Click to expand...
Click to collapse
Hmm.. downloading it now and wondering why it's only 120mb, not 440mb as you said.
rugglez said:
Can you install the dependencies from Raum's CM10 building thread here?
Follow steps 1 and 2 there.
Let me know if that works, ive updated the guide's step 1(setting up environment)
Installing the dependencies from this guide was the only thing i didnt test, since i had the CM10 environment set up already
Click to expand...
Click to collapse
Thanks, ok now using your updated guide.
Btw, did you happen to upload a copy of the kernel zip file? Downloading from github takes forever, only 8 kb/s.
aldyu said:
Thanks, ok now using your updated guide.
Btw, did you happen to upload a copy of the kernel zip file? Downloading from github takes forever, only 8 kb/s.
Click to expand...
Click to collapse
Just use "git clone git://github.com/CyanogenMod/lge-kernel-star.git", it should give you better download speed than for the zipped archive.
I synced the whole CM10 source tree on the remote buildbox in about 5-10 minutes - so github does provide great downspeed
@rugglez: You should add to the OP that you don't have to use adb to get the kernel config, it's already there
arch/arm/configs/cyanogenmod_p990_defconfig
Please refer to the old cm7 kernel how to by pastime: http://forum.xda-developers.com/showthread.php?t=1227241
I really like the fact that more and more building guides get posted here - and that more and more people are building their own ROMs and kernels these days.
After building (which already is a great start) many people even want to learn more about android development in general. That's the true xda spirit!
Kudos!
I was following the official guide to building Lineage OS 15.1 for Oneplus 3T but when I executed "extract-files.sh" I got error with some files being missing.Ignoring that, when I ran brunch oneplus3 I got:
Code:
[1060/1060] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
ninja: error: 'vendor/oneplus/oneplus3/proprietary/vendor/firmware/a530_zap-pro.b00', needed by '/home/user/Desktop/lineage/out/target/product/oneplus3/system/vendor/firmware/a530_zap-pro.b00', missing and no known rule to make it
20:25:42 ninja failed with: exit status 1
but I have checked with Root Browser and can say for sure that "a530_zap-pro.b00" file does not exist Anyone who has compiled Lineage OS before can you please tell how did you get it to work as the files don't exist. I'm currently on Oxygen OS Open Beta 24 with Magisk 16.3.
DelicatePanda said:
I was following the official guide to building Lineage OS 15.1 for Oneplus 3T but when I executed "extract-files.sh" I got error with some files being missing.Ignoring that, when I ran brunch oneplus3 I got:
Code:
[1060/1060] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
ninja: error: 'vendor/oneplus/oneplus3/proprietary/vendor/firmware/a530_zap-pro.b00', needed by '/home/user/Desktop/lineage/out/target/product/oneplus3/system/vendor/firmware/a530_zap-pro.b00', missing and no known rule to make it
20:25:42 ninja failed with: exit status 1
but I have checked with Root Browser and can say for sure that "a530_zap-pro.b00" file does not exist Anyone who has compiled Lineage OS before can you please tell how did you get it to work as the files don't exist. I'm currently on Oxygen OS Open Beta 24 with Magisk 16.3.
Click to expand...
Click to collapse
Put this in your local_manifest/roomservice.xml file :
<project path="vendor/oneplus" name="TheMuppet/proprietary_vendor_oneplus" revision="lineage=15.1" />
Click to expand...
Click to collapse
and then do a `repo sync`. This repo wll add all mandatory files (files which are extracted by the `extract-files.sh' tool) to your build tree.
casual_kikoo said:
Put this in your local_manifest/roomservice.xml file :
and then do a `repo sync`. This repo wll add all mandatory files (files which are extracted by the `extract-files.sh' tool) to your build tree.
Click to expand...
Click to collapse
Thank you for that but I was curious about how those files were obtained. And now I'm having another error:
Code:
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
Building DTBs
make: Entering directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/user/Desktop/lineage/kernel/oneplus/msm8996 as source for kernel
CHK include/generated/utsrelease.h
CALL /home/user/Desktop/lineage/kernel/oneplus/msm8996/scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
ninja: build stopped: subcommand failed.
20:21:02 ninja failed with: exit status 1
DelicatePanda said:
Thank you for that but I was curious about how those files were obtained. And now I'm having another error:
Code:
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
Building DTBs
make: Entering directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/user/Desktop/lineage/kernel/oneplus/msm8996 as source for kernel
CHK include/generated/utsrelease.h
CALL /home/user/Desktop/lineage/kernel/oneplus/msm8996/scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
ninja: build stopped: subcommand failed.
20:21:02 ninja failed with: exit status 1
Click to expand...
Click to collapse
Your output is missing some information, there is no error in this, except
Code:
ninja: build stopped : subcommand failed
casual_kikoo said:
Your output is missing some information, there is no error in this, except
Code:
ninja: build stopped : subcommand failed
Click to expand...
Click to collapse
Sorry for the delay I am attaching the output of entire "brunch oneplus3" command to this and could you please tell me from where the files in the repo were obtained. Thanks for the help:highfive:
DelicatePanda said:
Sorry for the delay I am attaching the output of entire "brunch oneplus3" command to this and could you please tell me from where the files in the repo were obtained. Thanks for the help:highfive:
Click to expand...
Click to collapse
You have some problem with jack-server :
FAILED: setup-jack-server
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2G" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )"
Jack server already installed in "/home/user/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2G -cp /home/user/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
Click to expand...
Click to collapse
In the root of your Android build directory
Code:
prebuilts/sdk/tools/jack-admin start-server
and then, straight after starting jack-server, relaunch your build process.
Also, judging from the log, jack-server is launching with 2G of RAM, which is very low IMO. If you have a low end PC, check this XDA thread, which explains you how to use Google Cloud for free to build ROM.
If you still have issues with jack-server, check this build guide by @nathanchance : there is a part about jack-server memory's problem (Ctrl + F -> "Jack issues").
Also, check a look at this Google Groups thread, this might help you.
Concerning TheMuppets : to be honest with you, I don't know exactly where files come from, BUT looking at commit messages on their Github, you can see, among others, that fourkbomb is pushing to this organization; a quick Google Search, you find his Github profile, he's a member of LineageOS. Also, you'll find a lot of ROMs builders TheMuppet' repo, so nothing to worry about (their repos are on Github, so you can check by yourself ).