[Tutorial] Kernel building instructions for Xperia devices - Sony Cross-Device General

hello folks!
i have been working on kernels for various xperia devices since the Xperia X10... i will update this thread with information on how to build kernels for various xperia devices...
Sony (Ericsson) started off helping the developer community with information on how to build kernels:
http://developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/
do read the above post, though its slightly old (2011), its really good! Since then Sony has released various devices which use a variety of chipsets and each chipset has different ways to build bootable kernel...
the objective of this thread is to provide brief instructions for some of these chipsets across the various device generations to build bootable kernels...
this will not cover how to build working ramdisks... you can always use the stock ramdisks from kernel.sin... here is how to get stock ramdisk out from kernel.sin...
Toolchains:
I have tested various toolchains for building kernels and very few work correctly on the kernel sources to get bootable kernel.
The toolchains which worked for me are:
arm-eabi-4.4.3 - GCC 4.4.3 toolchain from CyanogenMod repo
arm-eabi-linaro-4.6.2 - GCC Linaro 4.6.2 (2011.10) toolchain
arm-linux-androideabi-4.7 - GCC 4.7 from Google repo
all of these are posted on my git repo:
https://github.com/DooMLoRD/android_prebuilt_toolchains
sometimes the kernel sources need to be modified slightly to support compiling using these toolchains. I have mentioned the necessary patches where-ever applicable.
Instructions for various generation of devices:
Xperia 2014 (H1) - msm8974ab - Xperia Z2
Xperia 2013 (H2) - msm8974 - Xperia Z1, Z Ultra, Z Ultra GPe, Z1 Compact
Xperia 2013 (H1) - apq8064 - Xperia Z, ZL, ZR, Tablet Z
Xperia 2013 (H1) - msm8960t - Xperia SP
Xperia 2012 (H2) - msm8960 - Xperia T, TX, V
Xperia 2012 (H1) - msm8660 - Xperia S, SL, Ion, Acro S
Xperia 2011 - msm8x55/msm7x30 - Xperia Arc, Play, Neo, Ray, etc

reserved for later

Instructions for MSM8x55/MSM7x30
Latest sources available at:
http://developer.sonymobile.com/dow...ves/open-source-archive-for-build-4-1-b-1-13/
Recommended toolchain:
GCC 4.6 Linaro
Fix Makefile for 4.6 Toolchain:
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror \
to:
Code:
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-unused-but-set-variable -Wno-uninitialized \
Supported boards on this platform:
zeus - Xperia Play, Xperia L
mogami - Xperia Arc, Arc S, Ray, Neo, etc
Building kernel (zImage):
for Xperia Arc (anzu):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_anzu_defconfig
for Xperia Play (zeus):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make semc_zeus_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm7x30_mogami_zeus
Sony used the standard boot.img format for this chipset devices
building boot.img
use the following command:
Code:
./mkbootimg --base 0x00200000 --kernel zImage --ramdisk ramdisk.cpio.gz -o boot.img
Special notes
Sometimes the compiled kernel will just not boot, will show blank screen. Workaround is, ramdisks needs to be filled with filler so that total size is bigger.
boot.img can be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD

Novathor?

Instructions for MSM8260/MSM8660
Latest sources available at:
Since I actively develop for a device of this platform (Xperia S) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8660/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
defconfig fix
Supported boards on this platform:
fuji- Xperia S, SL, Ion, Acro S
Building kernel (zImage):
for Xperia S (nozomi):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8660_fuji
Sony shifted to ELF format for this chipset...
They had posted instructions on there website:
http://developer.sonymobile.com/201...-archive-released-with-building-instructions/
(avoid using those files as they are for GingerBread)
building kernel.elf
use the following command (for JB):
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
the additional files required are posted at my build tools repo
Special notes
RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia S or Xperia Ion and GB/ICS/JB each have different RPMs
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD

Instructions for MSM8960
Latest sources available at:
Since I actively develop for a device of this platform (Xperia T) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960/tree/sony_sources
Recommended toolchain:
GCC 4.6 Linaro
Supported boards on this platform:
blue- Xperia T, TX, V
Building kernel (zImage):
for Xperia T (mint):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make blue_mint_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960_blue
Sony uses ELF format for this chipset...
building kernel.elf
use the following command (for JB):
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
the additional files required are posted at my build tools repo
Special notes
RPM is different for each device and also differs for OS release, so the same RPM wont work on Xperia T or Xperia V as each have different RPMs
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD

Instructions for MSM8960T
Latest sources available at:
Since I actively develop for a device of this platform (Xperia SP) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8960t/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
Supported boards on this platform:
viskan- Xperia SP
Building kernel (zImage):
for Xperia SP (huashan):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make viskan_huashan_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
incase u get errors like:
Code:
error : /scripts/gcc-wrapper.py
just correct the permissions of that file
Code:
chmod 755 ./scripts/gcc-wrapper.py
Instructions for building kernel.elf
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/tree/master/msm8960t_viskan
Sony uses ELF format for this chipset...
building kernel.elf
use the following command:
Code:
python mkelf.py -o kernel.elf [email protected] [email protected],ramdisk [email protected],rpm [email protected],cmdline
the additional files required are posted at my build tools repo
Special notes
kernel.elf CANNOT be hotbooted (fastboot boot kernel.elf)
regards,
DooMLoRD

Instructions for APQ8064
Latest sources available at:
Since I actively develop for a device of this platform (Xperia Z) latest sources can found at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_apq8064/tree/sony_sources
Recommended toolchain:
GCC 4.7
Fixes for 4.7 Toolchain:
Makefile fix
prima fix
Supported boards on this platform:
fusion3- Xperia Z, ZL, Tablet Z, ZR
Building kernel (zImage):
for Xperia Z (yuga):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make fusion3_yuga_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/arm-linux-androideabi-4.7/bin/arm-linux-androideabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/apq8064_fusion3
Sony uses slightly different boot.img format for this chipset...
building boot.img
use the following command:
Code:
./mkbootimg --base 0x80200000 --kernel zImage --ramdisk_offset 0x02000000 --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=400M androidboot.emmc=true" --ramdisk ramdisk.cpio.gz -o boot.img
corrected build tools are posted at my build tools repo
Special notes
boot.img CANNOT be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD

Instructions for MSM8974
Latest sources available at:
I will soon be getting the Xperia Z1 and actively develop for it... i will keep the latest sources at my git repo:
https://github.com/DooMLoRD/android_kernel_sony_msm8974/commits/sony_sources
Recommended toolchain:
GCC 4.6
Fixes for 4.6 Toolchain:
Makefile fix 1
Makefile fix 2
Supported boards on this platform:
rhine- Xperia Z1, Z Ultra
Building kernel (zImage):
for Xperia Z1 (honami):
import defconfig
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make rhine_honami_defconfig
build zImage
Code:
ARCH=arm CROSS_COMPILE=~/android-toolchain-eabi-linaro-4.6-2011.10/bin/arm-eabi- make -j8
Instructions for building boot.img
first get the kernel built... once kernel is built u will get zImage and copy that zImage to the folder containing the build tools...
i have posted the build tools i use here:
https://github.com/DooMLoRD/build_tools/blob/master/msm8974_rhine
Sony uses slightly different boot.img format for this chipset...
building boot.img
krabappel2548 said:
MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This binary can be found in the Cyanogen repo's or you can download a prebuild one in this thread.
Click to expand...
Click to collapse
to get the dt.img:
Code:
# path to kernel sources
KERNEL_SRC_PATH=~/android_kernel_sony_msm8974/
echo "generating device tree..."
./dtbTool -o dt.img -s 2048 -p {KERNEL_SRC_PATH}/scripts/dtc/ {KERNEL_SRC_PATH}/arch/arm/boot/
once u have the dt.img along with the zImage and ramdisk.cpio.gz use the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk ramdisk.cpio.gz --dt dt.img -o boot.img
corrected build tools are posted at my build tools repo
Special notes
boot.img CAN be hotbooted (fastboot boot boot.img)
regards,
DooMLoRD

XperianPro said:
Novathor?
Click to expand...
Click to collapse
Later I will add info for them too....

Hello doom,I want to ask you something.I manage to port your doomkernel v22 GB for Arc/Arc S to Neo/Neo V and I want permissions from you to share it in Neo forum.Sorry for asking here, but you don't answer me on the PM that I send you.
Sorry for my English.
Sent from my Xperia Neo V using xda app-developers app

it is possible port the kernel of 'xperia sp on xiaomi mi2a?
the two terminals have the same hardware

updated instructions for MSM8974 kernels

DooMLoRD said:
updated instructions for MSM8974 kernels
Click to expand...
Click to collapse
Please take a look at novathor devices if you have time

Hi sir can you recommend a toolchain for msm7627a (Xperia J) the ones on your github won't work.

Diego910 said:
Please take a look at novathor devices if you have time
Click to expand...
Click to collapse
You need to patch Makefile somethings to disable some flags for these toolchains
Sent from my C6902 using xda app-developers app

@OP
How can I attach my compiled zImage to CM10 build from source? I have already compiled kernel from source and now I want to use it in my CM10 build

Great TUT
Sent from my E15i using xda premium

Great tutorial! But I came across a problem:when compiling a CM kernel for Xperia TX,I need to change the command from
Code:
python mkelf.py -o kernel.elf [email protected] [email protected][COLOR="red"]4[/COLOR]00000,ramdisk [email protected],rpm [email protected],cmdline
to
Code:
python mkelf.py -o kernel.elf [email protected] [email protected][COLOR="red"]7[/COLOR]00000,ramdisk [email protected],rpm [email protected],cmdline
Otherwise the phone won't boot.Only black screen with backlight on and then reboot after pressing the power button,even no Sony/CM logo.
(Another strange case:when I use sksplit to split the official kernel,the ramdisk does lay in 0x81400000.But if I import the hayabusa_defconfig,compile the kernel from Sony source without any change and mkelf with official [email protected],the phone still refuses to boot.I have to change the 4 to 7 to make this kernel boot.Why?)

{MIRO/TIPO/J/E} Addresses
zImage --0x00208000
ramdisk --0x01400000
bootcmd --cmdline
i.e.
python mkelf.py -o boot.img [email protected] [email protected],ramdisk [email protected]

Related

Android 4.0 ICS - getting kernel source

Im looking for the source of the kernel used in ICS.
Looks like "git://android.git.kernel.org/kernel/common" is not there.
Can some one please point me for what vertion is used in ICS and where to clone it from.
Thanks
Check this:
http://source.android.com/source/downloading.html
Google switched to their own servers since the kernel.org break-in
It does not appear to be there. Which means we would have to be patient for kernel devs to get their cook on.
Found some infos here:
http://groups.google.com/group/andr.../87d2802239d46898?show_docid=87d2802239d46898
1st
Code:
git clone https://android.googlesource.com/kernel/common.git
2nd should give you an overview
Code:
git branch -r
3rd checkout a kernel
Code:
git checkout -b android-3.0 origin/android-3.0

[GUIDE] How to build AOSP kernel from source S4 Mini (i9195 & i9190)

Welcome to Kernel build guide.
WITH THIS METHOD YOU WILL GET installable zip for your kernel.
My english is not best but i think you all will understand this guide . I write this guide because i dont own S4 Mini anymore and unfortunally i cant build kernels or roms anymore for s4 mini.
this is my kernel build method. you will have everything (tools) for build a kernel for s4 mini device. if you have questions, then ask it here. this kernel method is working only aosp based kernel (not tested for tw kernel but it may also work but you need ramdisk of tw kernel)
be sure you have packages installed for build something like this, or edit or clone a github source. look at cm kernel build guides.
1. Download build-s4-mini-kernel.zip [here]
extract it to root of your user directory (my is /home/proxuser/)
2. We need toolchain 4.7.4 by Christopher83 original thread [here]
download
arm-unknown-linux-gnueabi-linaro_4.7.4-2013.07-build_2013_07_12.tar.bz2
extract arm-unknown-linux-gnueabi-linaro_4.7.4-2013.07 folder to toolchains folder (home/yourusername/toolchains) and name it linaro_4.7.4
Download Build scripts from my source here
download:
- abooteur_3g.img
- abooteur_lte.img
- build_all.sh
- build_eur_3g.sh
- build_eur_lte.sh
- build_master.sh
- mkbootfs
- mkbootimg
and put them to your kernel folder "root folder of your kernel".
if you want clone a kernel source: example CyanogenMod's cm-10.2 kernel then
open Terminal, and be in user root folder /home/yourusername (just open terminal and your there)
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_msm8930-common.git -b cm-10.2
if you want clone my Kartal kernel then
Code:
git clone https://github.com/proxuser/kartal.git -b master
it will named "if you cloned cyanogenmod kernel android_kernel_samsung_msm8930-common" if you clone my kernel then it will named "kartal"
you can rename kernel folder, its not problem.
if you want change of kernel name(example kartal), then go yourkernel/arch/arm/configs/kartal_defconfig and edit CONFIG_LOCALVERSION="-Kartal" change only "Kartal" for your kernel's name. if you want change defconfig example "kartal_defconfig" to "yourkernel_defconfig" then you need change it in build_master.sh too that it builds with your config file.
if you downloaded your kernel source and your build tools are there then lets start
Open terminal
type
Code:
cd yourkernelfolder
for build both phones i9195 & i9190
Code:
./build_all.sh
if it denies access for build_all.sh then type
Code:
chmod 777 build_all.sh
you can give all files access with this command.
for build i9195
Code:
./build_eur_lte.sh
for build i9190
Code:
./build_eur_3g.sh
finally it will start building. it will done within 4-5 min. depend your pc speed.
after it builds succesfully, your kernel will be in your /home/yourusername/Packages/ folder
IF YOU WANT add new changes from CM or other kernel to your kernel
then open Terminal
cd yourkernelfolder
git remote add CyanogenMod https://github.com/CyanogenMod/android_kernel_samsung_msm8930-common.git
git fetch CyanogenMod
this will fetch CyanogenMod kernel changes but it will not apply to your kernel. you will add changes step by step yourself. copy commits SHA from CyanogenMod kernel and
open Terminal
Code:
git cherry-pick 2108e6c3109ae126590a81876145a1f17d6771b5
if you get success on pick a commit then you will get a message like this
Code:
[email protected]:~/kernel$ git cherry-pick a41564437a0eb910d0347d274456f3f0116c3c77
[master 5dd0694] net-fixes: flow_dissector: prevent an infinite loop (CVE-2013-4348)
Author: Eric Dumazet <[email protected]>
1 file changed, 3 insertions(+), 1 deletion(-)
if you get an error like this
Code:
[email protected]:~/kernel$ git cherry-pick 63ee35463ea3ec5d4e8f2c60ad0f70abd8463733
error: could not apply 63ee354... ARM: 7809/1: perf: fix event validation for software group leaders
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
thats mean it is not applied to your files. just type "git status" to see what files are not modified.
then type: git reset --hard for go to your last commit.
this will make changes of error commit back.
Work always with git because with this way you can save a lot your changes and you can restore anything anytime.
Credits:
XDA Community
Christopher83 for toolchain
ktoonsez for build scripts
arco68 for s4 mini kernel development
cyanogenmod
I really appreciate these posts! :good:
wonderful. thank you very much :good:
Srry wrong topik..
I have built your kernel successfully, but after flashing the .zip the device is stuck on the "Samsung Galaxy S4mini" Bootscreen.
I tested it with the this two roms:
- cm-10.2-20131102-SNAPSHOT-M1-serranoltexx
- CARBON-JB-UNOFFICIAL-20131026-1327-serranoltexx
Do you have any idea why it's not working?
Edit: I used arcos source and it is working fine now
@junkyde
Can't get the stock kartal kernel to build.
What for OS are you running in your virtual box? ubuntu? 86x or 64x?
Did you install any other buildtools?
there isn't a stock kartal kernel. kartal kernel is aosp. I am using Linux Mint 15 in a 64bit version on Virtual Box.
Ps: I had also my troubles with ubuntu x86 and x64, thats why I switched.
junkyde said:
there isn't a stock kartal kernel. kartal kernel is aosp. I am using Linux Mint 15 in a 64bit version on Virtual Box.
Ps: I had also my troubles with ubuntu x86 and x64, thats why I switched.
Click to expand...
Click to collapse
Thanks for you reply!
With "stock" I meant: without changing anything....
I will try mint 15 64bit with xfce!
you can also take a look into this tutorial: http://forum.xda-developers.com/showthread.php?t=1748297
junkyde said:
you can also take a look into this tutorial: http://forum.xda-developers.com/showthread.php?t=1748297
Click to expand...
Click to collapse
Got it working under Ubuntu 12.04 64bit.
Had some troubles because mkboofs and mkbootimg could not be found.
After installing : "sudo apt-get install ia32-libs" everything was fine
Now I will try to compile the 10,1 kernel from source, lets see how that goes..
Keon91 said:
After installing : "sudo apt-get install ia32-libs" everything was fine.
Click to expand...
Click to collapse
Yes I know, that this is required, when you are working with a 64bit system. But I couldn't get this installed in Ubuntu. On Mint everything worked fine. But I am glad you made it
@junkyde
After some trial and error I've succesfully compiled the cm 10.1 kernel.
Can you give me any direction on how to compile the custom liblights?
Do I need to download the full cm 10.1 source?
I used proxusers tutorial on how to build carbon rom. Downloaded full rom, modified lights.c and compiled whole rom.
Can someone build a kernel for the i257m
It would be nice if there was some kernel mods for this. especially just a near stock one with insecure root permissions.
The source is out if anyone was wondering
opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=i257
IF YOU WANT add new changes from CM or other kernel to your kernel ...
Click to expand...
Click to collapse
What do you mean by this? Add changes that cm has done after you last downloaded them or changes you want to do to customize the kernel?
git cherry-pick 2108e6c3109ae126590a81876145a1f17d6771b5
Click to expand...
Click to collapse
What does this means and where do you get that ID? I would think that after fetching the changes from the source it will have been added to all the files you have already downloaded. Thanks for the tutorial!
---------- Post added at 05:58 PM ---------- Previous post was at 05:55 PM ----------
junkyde said:
I used proxusers tutorial on how to build carbon rom. Downloaded full rom, modified lights.c and compiled whole rom.
Click to expand...
Click to collapse
junkyde here you don't mention lights.c, aren't they needed for 10.1? http://forum.xda-developers.com/showpost.php?p=49958578&postcount=215
yes you need custom liblights for BLN, but since I have compiled them already, you can use the one from inside the .zip of my kernel.
junkyde said:
yes you need custom liblights for BLN, but since I have compiled them already, you can use the one from inside the .zip of my kernel.
Click to expand...
Click to collapse
Doesn't it matter that you compiled it for 10.2? Also, where is the source for liblights?
proxuser said:
Welcome to Kernel build guide.
WITH THIS METHOD YOU WILL GET installable zip for your kernel.
Click to expand...
Click to collapse
On ubuntu I got this message after the process took a while:
KERNEL DID NOT BUILD! no zImage exist
Click to expand...
Click to collapse
At some point in the process it printed:
[email protected]:~/Development/SGS4Mini/build-s4-mini-kernel/android_kernel_samsung_msm8930-common$ ./build_all.sh
...
...
...
rm: cannot remove `/home/rpgdev/Development/SGS4Mini/build-s4-mini-kernel/Packages/AOSP/zImage': No such file or directory
rm: cannot remove `arch/arm/boot/zImage': No such file or directory
Make the kernel
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
***
*** Can't find default configuration "arch/arm/configs/kartal_defconfig"!
***
...
...
...
Click to expand...
Click to collapse
And if I go there I indeed can't find the zImage, where can I get it?
PS: Used the characters "..." to denote abridgment of the compilation verbose printout.
Forgot to add, I'm downloaded the cyanogenmod kernel from build 10.1 since that's the cyanogenmod version I use and for the one I need to make this mod, could this be the cause of the problem? Googling it seems that the kernel version you use may need a specific toolchain version.
rpgdev said:
Doesn't it matter that you compiled it for 10.2? Also, where is the source for liblights?
Click to expand...
Click to collapse
I think it doesn't matter, I used the same for different roms and it worked. Source is as I said the lights.c file inside of the rom.
rpgdev said:
Can't find default configuration "arch/arm/configs/kartal_defconfig"!
Click to expand...
Click to collapse
This is why zImage can't be build.
junkyde said:
I think it doesn't matter, I used the same for different roms and it worked. Source is as I said the lights.c file inside of the rom.
This is why zImage can't be build.
Click to expand...
Click to collapse
I'm not using kartal but the one downloaded from cm. Thought the instructions were generic and the script took into account wether you had downloaded the kernel from cm or kartal :/, I did go inside the directory with all the defconfig files, how do I know which one should I point it to on cm-10.1 kernel?
Regarding the lights.c then I just have to include that library on the same directory you put it in your kernel AND add the changes you pointed to here http://forum.xda-developers.com/showpost.php?p=49958578&postcount=215 and I would be set?
Thanks!

[guide][wip] [beginners] how to push a device tree to github

SO AS OF NOW WE HAVE GUIDES ABOUT HOW TO MAKE A KERNEL , ROM FROM SOURCE CODES..THIS GUIDE WILL TALK ABOUT PUSHING THE DEVICE TREE OR KERNEL TREE TO YOUR GITHUB ACCOUNT ...THIS IS A BEGINNER'S GUIDE IN THIS GUIDE I WILL ASSUME THAT UR BUILDING CM 11
STEP1:- CREATE A GITHUB ACCOUNT
STEP 2 :- CREATE A REPOSITORY BY CLICKING THE "+" beside ur user name and name it "android_device_samsung_i9082"
STEP 3 :- in the terminal navigate to the device folder
Code:
cd cm11/device/samsung/i9082
STEP 4 : WE ADD THE REPOSITORY TO WHICH WE HAVE TO PUSH THE FILES TO
Code:
git remote add cm https://github.com/username/android_device_samsung_i9082.git
STEP 5: we create a branch
Code:
git branch cm-11.0
Code:
git checkout cm-11.0
STEP6: WE PUSH THE THE TREE
Code:
git push -u cm cm-11.0
THIS GUIDE IS A WIP ... I WILL UPDATE IT SOON WITH PICTURES ..TO MAKE UL UNDERSTAND BETTER
CREDITS
1) @k2wl
2) help.github.com
3) @jackeagle
reserved
It would be pretty nice if you can add in on how to cherry-pick and git log --graph.Anyways,this guide is very detailed and useful overall and have an awesome say ahead [emoji1][emoji1][emoji106]
Sent from Planet Phaser
The-Grape said:
It would be pretty nice if you can add in on how to cherry-pick and git log --graph.Anyways,this guide is very detailed and useful overall and have an awesome say ahead [emoji1][emoji1][emoji106]
Sent from Planet Phaser
Click to expand...
Click to collapse
Yea sure ... As u saw .. This guide is a wip .. I will add pictures and more .. Fr users to get a better idea of how its done
rutvikrvr said:
Yea sure ... As u saw .. This guide is a wip .. I will add pictures and more .. Fr users to get a better idea of how its done
Click to expand...
Click to collapse
Thanks a lot
[GUIDE]Git Advanced Methods
Sometimes,you might be wondering how can i update the device tree without deleting my current device tree but through applying the latest changes
Well today i will teach you a new function call cherry-picking.This function is one of the most known features of git as it provides simple and easy copy-pasting job for you
First of all,add the remote first.Note:The hello is the main remote for this link
Code:
git remote add name url
eg: git remote add hello https://github.com/AOGP/android_packages_apps_Lightbulb.git
Second,fetch the remote
Code:
git fetch name
eg: git fetch hello
Thirdly,once finish fetching.Copy the commit id from github
Code:
git cherry-pick SHA-1/Commit ID
eg: git cherry-pick a7d0c5fc6df49a07855ccb36fb22fdaf321e20ba
If you faced any errors,solve them by typing and then see the red color files name in the terminal and fix them by comparing between <<<<<<<HEAD
Code:
git status
Once done solving all the errors,push the commit to github to keep the authorship of the commit as it is rude to just use their work and put yourself as author
Code:
git push [name of the remote] [your repository branch]
eg: git push origin master
guide updated in compliance with authorship of commits

[Q] How to switch branches with repo

As I get more into android development for the Nexus 6 I have yet to figure out how to update to the latest android build while leaving my local changes. So for example I am working on 5.0.0 and made changes. Now 5.0.2 is out I want to update to that build. The only I have found is going a repo init but to my knowledge this wipes out your changes. Is there a way to switch and merge your local changes?
Thanks in advance
http://gitref.org/
DSA said:
http://gitref.org/
Click to expand...
Click to collapse
So say I have a change in every git repo, would doing those commands through a `repo forall` be the proper way?
sorry, use this one instead:
http://jonas.nitro.dk/git/quick-reference.html
just an example:
Code:
Branches:
git checkout branch Switch working tree to branch
-b branch Create branch before switching to it
git branch List local branches
git branch -f branch rev Overwrite existing branch, start from revision
git merge branch Merge changes from branch
or this:
https://confluence.atlassian.com/display/STASH/Basic+Git+commands
another similar example:
Branches
Create a new branch and switch to it: git checkout -b <branchname>
Switch from one branch to another: git checkout <branchname>
List all the branches in your repo, and also tell you what branch you're currently in: git branch
Delete the feature branch: git branch -d <branchname>
Push the branch to your remote repository, so others can use it: git push origin <branchname>
Push all branches to your remote repository: git push --all origin
Delete a branch on your remote repository: git push origin :<branchname
Click to expand...
Click to collapse

how to build AOSP sources?

I tried to compile a AOSP based rom, but after
source build/envsetup.sh
like I do with Cm based roms
brunch is not available.
is brunch CM specific and if so what other command do I need with aosp sources?
DavidXanatos said:
I tried to compile a AOSP based rom, but after
source build/envsetup.sh
like I do with Cm based roms
brunch is not available.
is brunch CM specific and if so what other command do I need with aosp sources?
Click to expand...
Click to collapse
What is the AOSP-based ROM that you're trying to build?
Sent from my GT-S7580 using Tapatalk
it was this rom: http://forum.xda-developers.com/optimus-4x-hd/orig-development/dev-aosp-lollipop-5-0-2-t2995695
and thats the set of cammands with which it builds under bbq linux
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r29
#add local manifest
repo sync
# apply cm 12.1 fixes ld 43 and timeconst
cd /devices/lge/p880/patches
bash ./install.sh
cd ../../../..
source build/envsetup.sh
lunch
#selech p880
# to prevent api error:
make update-api
make -j8
make -j8 otapackage
DavidXanatos said:
it was this rom: http://forum.xda-developers.com/optimus-4x-hd/orig-development/dev-aosp-lollipop-5-0-2-t2995695
and thats the set of cammands with which it builds under bbq linux
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r29
#add local manifest
repo sync
# apply cm 12.1 fixes ld 43 and timeconst
cd /devices/lge/p880/patches
bash ./install.sh
cd ../../../..
source build/envsetup.sh
lunch
#selech p880
# to prevent api error:
make update-api
make -j8
make -j8 otapackage
Click to expand...
Click to collapse
Then use
Code:
lunch p880
make -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) otapackage
instead of
Code:
brunch p880
Sent from my GT-S7580 using Tapatalk

Categories

Resources