Related
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!
This is the thread where people trying to build LineageOS themselves communicate. Communication up until now happend inside the "[ROM+Kernel][Unofficial][Unified]LineageOS 15.0[8.0.0]" thread. Picking the important parts in all the user-talk was hard.
So here we go, lets get this **** build.
Short summary - I try to build from LineageOS sources, taking roomservice from LineageOS and - except for blobs from muppets - not using any external repos. If you try to build from akhilnarang's sources, please note that in your post.
Anyways, I wrote this:
mad-murdock said:
If you build from vanilla laos sources, with roomservice, you must "repopick -t kryo-libc" after repo sync to get rid of those soong "arch.arm64.kryo" errors. see https://review.lineageos.org/#/q/branch:lineage-15.0+topic:kryo-libc
credits go to dianlujitao who was so kind to answer my question.
also, in device/oneplus/oneplus3/lineage.mk there is a reference to vendor/cm which you must change to vendor/lineage
then another error happen
Click to expand...
Click to collapse
And got a reply here:
joshndroid said:
Are you referring to the cmsdk/api/7.txt needed by blah/blah/checkpublicapi-cm-last-timestamp is missing and no know rule to make it.
repopicking the lineagesdk-oreo-briungup topic (although it was slated as working) doesn't seem to fix that issue. i must be missing something.
Click to expand...
Click to collapse
No josh, I don't repo-pick that. The error happening for me - which I look into once this is done - is
Code:
[ 99% 1105/1108] glob vendor/qcom/opensource/interfaces/*/Android.bp
[ 99% 1106/1108] glob vendor/qcom/opensource/interfaces/camera/device/1.0/Android.bp
[ 99% 1107/1108] glob vendor/qcom/opensource/interfaces/display/config/1.0/Android.bp
ninja: error: '/opt/develop/lineage-15.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/link_type', needed by '/opt/develop/lineage-15.0/out/target/common/obj/APPS/OneplusDoze_intermediates/link_type', missing and no known rule to make it
19:31:54 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
make: Leaving directory '/opt/develop/lineage-15.0'
#### make failed to build some targets (35 seconds) ####
I built a non-booting image of LOS15 a while back, I think it was when they started tagging repositories with LOS15 branch - I still can't seem to boot it myself, so I'll ignore that for a moment.
I do have several word to say about this, for one, I had followed what Google have done to the the CPU arch of Sailfish and Marlin. Making them a generic ARMv8 (for the main arch) and ARMv7 Neon for the secondary arch. Of course, I could've merged the libc changes, but they didn't exist when I started doing the early bringup hence the reason why I stuck myself with Google's way of doing things.
As for the OneplusDoze, I simply commented it out due to the fact that Lineage themselves has yet to bring up the necessary CMHW-related changes. However, this is an experience speaking from about a month ago, I have yet to see whether they have started merging new things connected to CMHW.
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
F4uzan said:
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
Click to expand...
Click to collapse
Thanks for your input. Well, it was a month ago. I would try again. Unfortunately, my time is limited, so I have little time to spend on this. Very curious though, if the ROM boots once finished. If not, we still can try the repo's akhilnarang builds from:
akhilnarang said:
Sources
Device tree - https://github.com/akhilnarang/device_oneplus_oneplus3
Vendor - https://github.com/akhilnarang/proprietary_vendor_oneplus
Common tree - https://github.com/akhilnarang/device_oppo_common
Has my Derp kernel builtin
Click to expand...
Click to collapse
My issue is, that ROM is a week behind current development, and somehow I don't want to go back to 7.1.2 - so getting this stuff compiled myself is the best way. Guess thats motivation for most who raised their voice on the 8.0 thread
So I'm getting something like this, will experiment further.
Code:
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
[ 96% 29/30] glob frameworks/wilhelm/include/SLES/**/*.h
ninja: error: 'cm-api-stubs-docs', needed by '/Volumes/android/los/out/target/common/obj/PACKAGING/cm_public_api.txt', missing and no known rule to make it
20:00:43 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (59 seconds) ####
iMac-Micha:los magnum828$
Magnum828 said:
So I'm getting something like this, will experiment further.
Click to expand...
Click to collapse
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
inflames91 said:
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
Click to expand...
Click to collapse
How did you go past the cm-api-stubs ???
Oh man, thanks for seperating this out.
1) I repo sync'd lineage-15.0
2) breakfast oneplus3
3) cloned/checked-out akhil's 3 repo's for device/kernel/vendor replacing what I already had
3a) Dont need repo pick for kryo-libc unless you wanna change main arch in device/boardconfig back to kryo (which is really what it should be)
3b) If you use stock device tree, you may need to edit some files to point to lineage files instead of cm (look at this commit: http://tinyurl.com/y6u844ah)
~4) I might have needed to pull libgpustats from my phone or op3t or something, don't remember on that.
Pretty sure at this point it builds up to ~3-10k files before you run into failures in hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media.
5) Delete the following folders in hardware/qcom:
audio/audio-caf/display/display-caf/media/media-caf
and clone dianlujitao 3 repo's(specify branch lineage-15.0): hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media
From here I can compile up to ~35k files before i get failure generating cache.img.
I haven't had time to go back through the error but it might just be a simple "not enough space" error at which point we just need to edit boardconfig to make it think it can have a larger cache img, but im not positive thats the issue/fix. And I havent had time to do anything else from here yet either. Will update when I know more.
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Magnum828 said:
How did you go past the cm-api-stubs ???
Click to expand...
Click to collapse
I was getting errors for libgpustats.
Solved that bit. ?
arnabJ said:
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Click to expand...
Click to collapse
no that 'dependencies-only' notification has no real bearing on the issues that are being seen with building.
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
F4uzan said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
Click to expand...
Click to collapse
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
F4uzan said:
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
Click to expand...
Click to collapse
Ok. I will update with new info when I have any.
Sent from my OnePlus3 using XDA Labs
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
inflames91 said:
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
Click to expand...
Click to collapse
could possibly be kernel, i'm using akhilnarangs but haven't tried to boot it yet
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
Does this boot?
I tried the following:
Download toolchain from https://android.googlesource.com/pl....9/+/e54105c9f893a376232e0fc539c0e7c01c829b1e
Download clang-4639204
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
sudo apt-get install flex bison
sudo apt-get install libelf-dev
export CROSS_COMPILE=/home/gilius/Desktop/tool/bin/aarch64-linux-android-
export ARCH=arm64
enter the 9820 directory
sudo -i
make xynos9820-beyond2lte_defconfig
make -j10
Am getting the following errors:
Code:
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
CHK include/config/kernel.release
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make: *** [Makefile:1244: prepare-compiler-check] Error 1
make: *** Waiting for unfinished jobs....
Hi,
for me : sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5 did the trick but I am now stuck with some assembly instructions "not existing" errors when compiling arch/arm64/kernel/vdso/gettimeofday.S
did you made any progress?
Update : linking libtinfo.so.6 to libtinfo.so.5 solved it but also failed with :
scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:251:2: erreur: #error New address family defined, please update secclass_map.
251 | #error New address family defined, please update secclass_map.
| ^~~~~
make[3]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
make[2]: *** [scripts/Makefile.build:673: scripts/selinux/genheaders] Error 2
make[1]: *** [scripts/Makefile.build:673: scripts/selinux] Error 2
make: *** [Makefile:607: scripts] Error 2
I am currently trying it on archlinux and the ncurses5-compat-libs package didn't put a new library in my path I will try later on another distro see if it's just a library error.
Update 2 :
Compiled fine using rhel 8, I had to install ncurses compat libs and create a symbolic link from python2 to python in my $PATH.
Does it boot?
Does your kernel boot?
Mine, keep stuck at Samsung logo
Akugila said:
Does your kernel boot?
Mine, keep stuck at Samsung logo
Click to expand...
Click to collapse
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
try AIK
shmsh9 said:
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
Click to expand...
Click to collapse
Ahh, fool me. it's stuck at warning screen too (forgot there are another samsung logo during boot)
I use AIK [https://forum.xda-developers.com/showthread.php?t=2073775] for packing, the size is the same with original (I use "Image" file)
kernel build error: expected parameter declarator
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Linaro 4.9.4 aarch64-linux-gnu compiler tools for S10 5G kernel build
floor51 said:
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Click to expand...
Click to collapse
I found that using the Linaro 4.9.4 aarch64-linux-gnu compiler tools solved this:
https://releases.linaro.org/compone...4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz
I was previously using the toolchain that is in ianmacd's github repo here:
https://github.com/ianmacd/beyond2l...p/gcc-cfp-jopp-only/aarch64-linux-android-4.9
I changed this:
#CROSS_COMPILE ?= $(srctree)/toolchain/gcc-cfp/gcc-cfp-jopp-only/aarch64-linux-android-4.9/bin/aarch64-linux-android-
...to:
CROSS_COMPILE ?= ~/dev/projects/android/kernel/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
I also used Linaro for CLANG_TRIPLE.
And I used clang for CC:
CC = ~/dev/projects/android/kernel/clang-4639204/bin/clang
...from here:
https://android.googlesource.com/pl...archive/android-9.0.0_r1/clang-4639204.tar.gz
All that info would have helped me a lot anyway. Hope it helps someone. Not that I've tried the image on device yet.
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
JPNZ4 said:
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
Click to expand...
Click to collapse
glad to hear that you could build the kernel.
could you please elaborate which build env you used and which version?
make clean destroys my build env and i needed some patches to make it even compile in the first place.
could you run the kernel successfully on the device?
Hello, I'm new here so please excuse me if I post this in the wrong section.
I have a OnePlus 7t on Android 11 with Magisk installed.
I am trying to swap the R3 with Circle on my controller. In the keylayout file it shows that R3 is in fact Circle but doesn't work in games. ( Reverts to default controller mapping)
I have already edited and successfully changed the keylayout file for my PS4 Controller ( Vendor_054c_Product_09cc.kl ) by creating a magisk module since I'm on a stock Os and cant copy the .kl file over to system/usr/keylayouts . SEE BELOW
Code:
# Copyright (C) 2017 The Android Open Source 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.
#
# Sony Playstation(R) DualShock 4 Controller
#
# Mapping according to https://developer.android.com/training/game-controllers/controller-input.html
# Square
key 0x130 BUTTON_X
# Cross
key 0x131 BUTTON_A
# Circle
key 0x132 BUTTON_THUMBR
# Triangle
key 0x133 BUTTON_Y
key 0x134 BUTTON_L1
key 0x135 BUTTON_R1
key 0x136 BUTTON_L2
key 0x137 BUTTON_R2
# L2 axis
axis 0x03 LTRIGGER
# R2 axis
axis 0x04 RTRIGGER
# Left Analog Stick
axis 0x00 X
axis 0x01 Y
# Right Analog Stick
axis 0x02 Z
axis 0x05 RZ
# Left stick click
key 0x13a BUTTON_THUMBL
# Right stick click
key 0x13b BUTTON_B
# Hat
axis 0x10 HAT_X
axis 0x11 HAT_Y
# Mapping according to https://www.kernel.org/doc/Documentation/input/gamepad.txt
# Share
key 0x138 BUTTON_SELECT
# Options
key 0x139 BUTTON_START
# PS key
key 0x13c BUTTON_MODE
# Touchpad press
# The touchpad for this joystick will become a separate input device in future releases
# and this button will be equivalent to left mouse button
# Therefore, map it to KEYCODE_BUTTON_1 here to allow apps to still handle this on earlier versions
key 0x13d BUTTON_1
I've made sure the permissions are set correctly as well as seen in the install.sh
Code:
##########################################################################################
#
# Magisk Module Installer Script
#
##########################################################################################
##########################################################################################
#
# Instructions:
#
# 1. Place your files into system folder (delete the placeholder file)
# 2. Fill in your module's info into module.prop
# 3. Configure and implement callbacks in this file
# 4. If you need boot scripts, add them into common/post-fs-data.sh or common/service.sh
# 5. Add your additional or modified system properties into common/system.prop
#
##########################################################################################
##########################################################################################
# Config Flags
##########################################################################################
# Set to true if you do *NOT* want Magisk to mount
# any files for you. Most modules would NOT want
# to set this flag to true
SKIPMOUNT=false
# Set to true if you need to load system.prop
PROPFILE=false
# Set to true if you need post-fs-data script
POSTFSDATA=false
# Set to true if you need late_start service script
LATESTARTSERVICE=false
##########################################################################################
# Replace list
##########################################################################################
# List all directories you want to directly replace in the system
# Check the documentations for more info why you would need this
# Construct your list in the following format
# This is an example
REPLACE_EXAMPLE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"
# Construct your own list here
REPLACE="/system/usr/keylayout/Vendor_054c_Product_09cc.kl"
##########################################################################################
#
# Function Callbacks
#
# The following functions will be called by the installation framework.
# You do not have the ability to modify update-binary, the only way you can customize
# installation is through implementing these functions.
#
# When running your callbacks, the installation framework will make sure the Magisk
# internal busybox path is *PREPENDED* to PATH, so all common commands shall exist.
# Also, it will make sure /data, /system, and /vendor is properly mounted.
#
##########################################################################################
##########################################################################################
#
# The installation framework will export some variables and functions.
# You should use these variables and functions for installation.
#
# ! DO NOT use any Magisk internal paths as those are NOT public API.
# ! DO NOT use other functions in util_functions.sh as they are NOT public API.
# ! Non public APIs are not guranteed to maintain compatibility between releases.
#
# Available variables:
#
# MAGISK_VER (string): the version string of current installed Magisk
# MAGISK_VER_CODE (int): the version code of current installed Magisk
# BOOTMODE (bool): true if the module is currently installing in Magisk Manager
# MODPATH (path): the path where your module files should be installed
# TMPDIR (path): a place where you can temporarily store files
# ZIPFILE (path): your module's installation zip
# ARCH (string): the architecture of the device. Value is either arm, arm64, x86, or x64
# IS64BIT (bool): true if $ARCH is either arm64 or x64
# API (int): the API level (Android version) of the device
#
# Availible functions:
#
# ui_print <msg>
# print <msg> to console
# Avoid using 'echo' as it will not display in custom recovery's console
#
# abort <msg>
# print error message <msg> to console and terminate installation
# Avoid using 'exit' as it will skip the termination cleanup steps
#
# set_perm <target> <owner> <group> <permission> [context]
# if [context] is empty, it will default to "u:object_r:system_file:s0"
# this function is a shorthand for the following commands
# chown owner.group target
# chmod permission target
# chcon context target
#
# set_perm_recursive <directory> <owner> <group> <dirpermission> <filepermission> [context]
# if [context] is empty, it will default to "u:object_r:system_file:s0"
# for all files in <directory>, it will call:
# set_perm file owner group filepermission context
# for all directories in <directory> (including itself), it will call:
# set_perm dir owner group dirpermission context
#
##########################################################################################
##########################################################################################
# If you need boot scripts, DO NOT use general boot scripts (post-fs-data.d/service.d)
# ONLY use module scripts as it respects the module status (remove/disable) and is
# guaranteed to maintain the same behavior in future Magisk releases.
# Enable boot scripts by setting the flags in the config section above.
##########################################################################################
# Set what you want to display when installing your module
print_modname() {
ui_print "*******************************"
ui_print " Ps4 Controller Crouch Fix "
ui_print "*******************************"
}
# Copy/extract your module files into $MODPATH in on_install.
on_install() {
# The following is the default implementation: extract $ZIPFILE/system to $MODPATH
# Extend/change the logic to whatever you want
ui_print "- Extracting module files"
unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2
ui_print "- deleting package cache"
rm -rf /data/system/package_cache/*
}
# Only some special files require specific permissions
# This function will be called after on_install is done
# The default permissions should be good enough for most cases
set_permissions() {
# The following is the default rule, DO NOT remove
set_perm_recursive $MODPATH 0 0 0755 0644
set_perm $MODPATH/system/usr/keylayout/Vendor_054c_Product_09cc.kl 0 0 0744
# Here are some examples:
# set_perm_recursive $MODPATH/system/lib 0 0 0755 0644
# set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0
# set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0
# set_perm $MODPATH/system/lib/libart.so 0 0 0644
}
# You can add more functions to assist your custom script code
So basically everything seems to be correct but yet in games and gamepad tester the control functions as default ( R3 is not circle)
I've attached images showing im rooted and have the module succesfully installed and enabled, also showing the permissions of the .kl file in the keylayout folder.
Please help! and thank you in advance.