[Q] How to build kernel for I9100G? - Galaxy S II Q&A, Help & Troubleshooting

Hi, can someone guide me how to build the kernel for I9100G? I downloaded the kernel source from Samsung and extracted. The instructions in the archive are as follows:
HOW TO BUILD KERNEL 2.6.35 FOR GT-I9100G
1. How to Build
- get Toolchain
Visit http://www.codesourcery.com/, download and install Sourcery G++ Lite 2010q1 toolchain for ARM EABI.
Extract kernel source and move into the top directory.
$ toolchain\arm-2010q1
$ cd kernel/
$ make t1_defconfig
$ make
2. Output files
- Kernel : kernel/arch/arm/boot/zImage
3. How to make .tar binary for downloading into target.
- change current directory to kernel/arch/arm/boot
- type following command
$ tar cvf GT-I9100G_Kernel_Gingerbread.tar zImage
Click to expand...
Click to collapse
Looks simple enough. So I downloaded the toolchain from CodeSourcery and installed. I don't quite understand the first line in step 1
$ toolchain\arm-2010q1
Click to expand...
Click to collapse
What does that mean, exactly? Typing it out just like that gives an error.
If I skip the first line, after "make t1_defconfig", I get the error message "make: *** No rule to make target `t1_defconfig'. Stop."
Help, please?
BTW, I'm using Kubuntu 11.10.

Got it finally. Turned out my dump of the kernel source code was bad and some files were corrupted. Plus, crappy instructions, make t1_defconfig doesn't work. Instead I did
make ARCH=arm CROSS_COMPILE=~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi- t1_defconfig
make ARCH=arm CROSS_COMPILE=~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-
Compiling now. Hope for the best.
---
Doesn't work.
Got this error:
In file included from drivers/media/video/omapgfx/gfx_bc.c:17:
drivers/gpu/pvr/img_defs.h:89: error: #error ("define an OS")
In file included from drivers/media/video/omapgfx/gfx_bc.c:18:
drivers/gpu/pvr/servicesext.h:811: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVReadRegistryString'
drivers/gpu/pvr/servicesext.h:812: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVWriteRegistryString'
In file included from drivers/media/video/omapgfx/gfx_bc.c:19:
drivers/gpu/pvr/kernelbuffer.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMG_BOOL'
drivers/media/video/omapgfx/gfx_bc.c: In function 'bc_init':
drivers/media/video/omapgfx/gfx_bc.c:381: error: implicit declaration of function 'PVRGetBufferClassJTable'
make[4]: *** [drivers/media/video/omapgfx/gfx_bc.o] Error 1
make[3]: *** [drivers/media/video/omapgfx] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Click to expand...
Click to collapse
Experienced devs, anyone, help please?

Hi
I too am trying to build the kernel and I am stuck at same error. Can you please let me know how did you resolve this error?
Thanks in advance

Just in case anyone is still looking for solution:
I had the same problem. But managed to compile it successfully, under Ubuntu, using the prebuilt toolchains inside Android's NDK. Simply download, extract and start compiling.

I was able to build kernel successfully using arm linux gnueabi toolchain. Thanks for the help guys. Now I am all set to create a custom kernel
---------- Post added at 10:52 PM ---------- Previous post was at 10:50 PM ----------
The error was coming because of undefined macro for __linux__.
Can be resolved by either replacing it with LINUX or using arm linux gnueabi toolchain instead of arm eabi.

any update ?
or can u share how to build/make a custom rom so i can also try to make a custom rom
thnx!

Related

[Guide] Compiling your own kernel.

I have writen this guide so that anyone whom wants to try to compile and customize their kernel can.
LINK
It took me a long time to write this guide, and its pretty through, but if you see something missing please let me know, or post it in the discussion part of the page.
Once you compile the kernel aka zImage you can use hkvc kexec, or use bawks 2ndboot (if your daring enough) With this guide, hopefully we can get others to join the effort of making their own roms, and boot.img
Disclaimer"
I am not responsible for any damages done to any equipment
Saved for Future use.
Good write up.
I am having some errors pop-up at the end of compile. Here is my output:
Code:
CC [M] drivers/media/video/omapgfx/gfx_init.o
CC [M] drivers/media/video/omapgfx/gfx_io.o
CC [M] drivers/media/video/omapgfx/gfx_bc.o
In file included from drivers/media/video/omapgfx/gfx_bc.c:17:
drivers/gpu/pvr/img_defs.h:89:7: error: #error ("define an OS")
In file included from drivers/media/video/omapgfx/gfx_bc.c:18:
drivers/gpu/pvr/servicesext.h:811: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVReadRegistryString'
drivers/gpu/pvr/servicesext.h:812: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVWriteRegistryString'
In file included from drivers/media/video/omapgfx/gfx_bc.c:19:
drivers/gpu/pvr/kernelbuffer.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMG_BOOL'
drivers/media/video/omapgfx/gfx_bc.c: In function 'bc_init':
drivers/media/video/omapgfx/gfx_bc.c:381: error: implicit declaration of function 'PVRGetBufferClassJTable'
make[4]: *** [drivers/media/video/omapgfx/gfx_bc.o] Error 1
make[3]: *** [drivers/media/video/omapgfx] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Goncezilla said:
Good write up.
I am having some errors pop-up at the end of compile. Here is my output:
Code:
CC [M] drivers/media/video/omapgfx/gfx_init.o
CC [M] drivers/media/video/omapgfx/gfx_io.o
CC [M] drivers/media/video/omapgfx/gfx_bc.o
In file included from drivers/media/video/omapgfx/gfx_bc.c:17:
drivers/gpu/pvr/img_defs.h:89:7: error: #error ("define an OS")
In file included from drivers/media/video/omapgfx/gfx_bc.c:18:
drivers/gpu/pvr/servicesext.h:811: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVReadRegistryString'
drivers/gpu/pvr/servicesext.h:812: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PVRSRVWriteRegistryString'
In file included from drivers/media/video/omapgfx/gfx_bc.c:19:
drivers/gpu/pvr/kernelbuffer.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'IMG_BOOL'
drivers/media/video/omapgfx/gfx_bc.c: In function 'bc_init':
drivers/media/video/omapgfx/gfx_bc.c:381: error: implicit declaration of function 'PVRGetBufferClassJTable'
make[4]: *** [drivers/media/video/omapgfx/gfx_bc.o] Error 1
make[3]: *** [drivers/media/video/omapgfx] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
Click to expand...
Click to collapse
Which cross-compiler are you using? I use code sourcery lite. It works.
AdamOutler said:
Which cross-compiler are you using? I use code sourcery lite. It works.
Click to expand...
Click to collapse
Hmm, was just using whatever was synced with the repo.
Is there anyway you could post or send me a generic zImage from this compile? Trying to get a internal boot.img up and running but it seems to keep crapping out at the kernel (got 2ndboot showing up and ramdisk is in good shape).
Goncezilla said:
Hmm, was just using whatever was synced with the repo.
Is there anyway you could post or send me a generic zImage from this compile? Trying to get a internal boot.img up and running but it seems to keep crapping out at the kernel (got 2ndboot showing up and ramdisk is in good shape).
Click to expand...
Click to collapse
Fixed the 4.4.0 works better.
Loglud said:
Fixed the 4.4.0 works better.
Click to expand...
Click to collapse
Awesome, Ill try that one tonight!
For anyone interested in making your boot.img run off of internal storage (flashing via CWM or other recovery) you will need this file:
http://www.mediafire.com/?zrx5gk32casx55g
Just cat it to your custom_boot.img and flash!
Code:
cat irboot.img custom_boot.img >new_boot.img
Credit for the source for this goes to Bauwks!
AdamOutler said:
Which cross-compiler are you using? I use code sourcery lite. It works.
Click to expand...
Click to collapse
You are correct Finally got something to compile using TI's 2009 codesourcery lite!
Thanks button hit!
Goncezilla said:
For anyone interested in making your boot.img run off of internal storage (flashing via CWM or other recovery) you will need this file:
http://www.mediafire.com/?zrx5gk32casx55g
Just cat it to your custom_boot.img and flash!
Code:
cat irboot.img custom_boot.img >new_boot.img
Click to expand...
Click to collapse
how did you come up with irboot.img, if it bauwks make sure you give him credit, if not would love to knwo what it is?
Loglud said:
how did you come up with irboot.img, if it bauwks make sure you give him credit, if not would love to knwo what it is?
Click to expand...
Click to collapse
It was from Bauwks source. Was excited to get something running and slipped my mind. Edited post!
Sorry for the noobish question, but anyway how can we get a 3.x kernel? What are the difficulties to get it compiled?
I am not sure if I can help. I have some Linux experience compiling software from sources and I know compiling a kernel is not a trivial thing to do, however I would be happy to contribute.
How to you edit kernel.img that is inside the zImage?
[null]

[Q] Building Kernel error

Hello,
I want build the kernel of Xperia S but I hava this error :
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
Thank you !
Solved
Solved I write in the Makefile the flag --disable-werror. Nice
Edit : BUT i have a new error
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Erreur 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Erreur 2
make: *** [arch/arm/mach-msm] Erreur 2
Anything Ideas ?
c3ma138 said:
Solved I write in the Makefile the flag --disable-werror. Nice
Edit : BUT i have a new error
Code:
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/home/cemal/Bureau/Sourceicsxs/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Erreur 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Erreur 2
make: *** [arch/arm/mach-msm] Erreur 2
Anything Ideas ?
Click to expand...
Click to collapse
You shouldn't have to edit the Makefile. Are you using the tool chain recommended by Sony? Make sure your path selects them before anything else. Also I would reset locale to C before compiling ("Erreur"?!), it may play some tricks.
kuisma said:
You shouldn't have to edit the Makefile. Are you using the tool chain recommended by Sony? Make sure your path selects them before anything else. Also I would reset locale to C before compiling ("Erreur"?!), it may play some tricks.
Click to expand...
Click to collapse
I use the ndk toolchain, where can I find the Sony toolchain
Edit : arm-[...].4.6
c3ma138 said:
I use the ndk toolchain, where can I find the Sony toolchain
Edit : arm-[...].4.6
Click to expand...
Click to collapse
You find the specific instructions for the Xperia S at http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/ referring to the kernel building howto at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/ recommending you to use the tool chain at https://sourcery.mentor.com/sgpp/lite/arm/portal/[email protected]=lite
Follow those instructions before start tinkering with Makefiles, tools, build environment etc and I'm sure you'll succeed.
And reset locale to C! I.e. unset the LANG and LC_* environment variables in your shell before running the build scripts.
kuisma said:
You find the specific instructions for the Xperia S at http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/ referring to the kernel building howto at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/ recommending you to use the tool chain at https://sourcery.mentor.com/sgpp/lite/arm/portal/[email protected]=lite
Follow those instructions before start tinkering with Makefiles, tools, build environment etc and I'm sure you'll succeed.
And reset locale to C! I.e. unset the LANG and LC_* environment variables in your shell before running the build scripts.
Click to expand...
Click to collapse
thank you,
But this does not work
I download: https://sourcery.mentor.com/sgpp/lite/arm/portal/release2188
then: http://developer.sonymobile.com/wportal/devworld/downloads/download/61a0452tarbz2
I unzipped all in my Desktop and in a terminal, I wrote:
- cd source/kernel
- ARCH=arm CROSS_COMPILE=/home/cemal/Bureau/arm-2012.03/bin/arm-none-eabi- make fuji_nozomi_defconfig
- ARCH=arm CROSS_COMPILE=/home/cemal/Bureau/arm-2012.03/bin/arm-none-eabi- make
c3ma138 said:
But this does not work
Click to expand...
Click to collapse
Sorry, but I'm no mind reader. "does not work" is not sufficient information for me to reply anything helpful to.
The basic is, if you don't know what you are doing, do it by the book. Still not working? Ask for help. Sony Xperia has presented quite a verbose instruction about how to compile their kernels. Try following this before choosing your own tool chain, edit Makefiles and so. When you get problems, read the instructions more carefully and/or ask the community (hi!) for help, with somewhat more detailed information about what you did and how it failed. The more verbose information you present, the more likely you are to get a useful reply.
Best of luck.
------------------
(edit)
A curious question, why do you want to compile a new kernel? I get the impression this is not your field of expertise, and maybe you are trying to achieve something somewhat more complicated than needed.
Hello,
I encounter the same kind of issue. Does anyone could help me ?
I work in an Ubuntu PC (10.04).
I have downloaded the toolchain for Linux from sourcery.mentor.com (arm-2012.03-57-arm-none-linux-gnueabi.bin)
Then the kernel source code 6.1.A.0.452 from developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-6-1-a-0-452-6-1-a-0-453-and-6-1-a-0-454
and I execute:
cd kernel
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make fuji_nozomi_defconfig
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make
Then I have the following error:
CC arch/arm/mm/proc-syms.o
CC arch/arm/mm/alignment.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
make: *** [arch/arm/mm] Error 2
Many thanks in advance for your help
zongojim said:
Hello,
I encounter the same kind of issue. Does anyone could help me ?
I work in an Ubuntu PC (10.04).
I have downloaded the toolchain for Linux from sourcery.mentor.com (arm-2012.03-57-arm-none-linux-gnueabi.bin)
Then the kernel source code 6.1.A.0.452 from developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-6-1-a-0-452-6-1-a-0-453-and-6-1-a-0-454
and I execute:
cd kernel
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make fuji_nozomi_defconfig
ARCH=arm CROSS_COMPILE=~/Toolchain/ARM_GNU_Linux/bin/arm-none-linux-gnueabi- make
Then I have the following error:
CC arch/arm/mm/proc-syms.o
CC arch/arm/mm/alignment.o
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
make: *** [arch/arm/mm] Error 2
Many thanks in advance for your help
Click to expand...
Click to collapse
You need android-ndk-r5b to compile the Xperia kernel source. I.e. you can not use the latest NDK.
Thanks a lot for your answer
Unfortunately, I didn't find android-ndk-r5b for Linux.
Could you kindly indicate me where I can get it ?
thanks !
zongojim said:
Thanks a lot for your answer
Unfortunately, I didn't find android-ndk-r5b for Linux.
Could you kindly indicate me where I can get it ?
thanks !
Click to expand...
Click to collapse
http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2
Thanks again, I really apreciate your support !
I have downladed and extracted android-ndk-r5b to my Ubuntu station.
it seems that is is not a built version, right ?
I have tried to navigate in the documentation, but it does not look so trivial...
Would you know how to simply compile it ?
zongojim said:
Thanks again, I really apreciate your support !
I have downladed and extracted android-ndk-r5b to my Ubuntu station.
it seems that is is not a built version, right ?
I have tried to navigate in the documentation, but it does not look so trivial...
Would you know how to simply compile it ?
Click to expand...
Click to collapse
It's compiled ready to use.
Read the documentation at http://developer.sonymobile.com/wp/2011/05/06/how-to-build-a-linux-kernel/
Replace the toolchain path with e.g. "CROSS_COMPILE=/opt/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" and you are good to go.
ok nice.
Then I tried again and... I've got a different error !
Here is what I have done:
$ ARCH=arm CROSS_COMPILE=~/Toolchain/arm-2011.03-41-arm-none-linux-gnueabi/bin/arm-none-ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
#
# configuration written to .config
#
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make clean
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
make[1]: `include/generated/mach-types.h' is up to date.
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/prj/mms/smdswv/users/jmgrimaud/Xperia/6.1.A.0.452/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Error 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Error 2
make: *** [arch/arm/mach-msm] Error 2
zongojim said:
ok nice.
Then I tried again and... I've got a different error !
Here is what I have done:
$ ARCH=arm CROSS_COMPILE=~/Toolchain/arm-2011.03-41-arm-none-linux-gnueabi/bin/arm-none-ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make fuji_nozomi_defconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
#
# configuration written to .config
#
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make clean
$ ARCH=arm CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- make
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm/mach-msm/Kconfig:2107:warning: defaults for choice values not supported
arch/arm/mach-msm/Kconfig:2113:warning: defaults for choice values not supported
make[1]: `include/generated/mach-types.h' is up to date.
arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/mach-msm/qdsp6v2/audio_acdb.c: In function 'store_vocvol_cal':
/prj/mms/smdswv/users/jmgrimaud/Xperia/6.1.A.0.452/kernel/arch/arm/include/asm/atomic.h:249: error: 'asm' operand requires impossible reload
make[2]: *** [arch/arm/mach-msm/qdsp6v2/audio_acdb.o] Error 1
make[1]: *** [arch/arm/mach-msm/qdsp6v2] Error 2
make: *** [arch/arm/mach-msm] Error 2
Click to expand...
Click to collapse
Only specify ONE toolchain ...
Also, I'm note quite sure if I used 4.4.0 or 4.4.3, since both are included in the same r5b distribution. You can also try;
CROSS_COMPILE=~/Toolchain//android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
Thank you kuisma.
Sorry it was a copy/paste error, I had for sure specified only one toolchain.
So I am making a new test with CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
I'll keep you informed
---------- Post added at 11:51 AM ---------- Previous post was at 11:15 AM ----------
It built, thanks again for your support, kuisma !
Not sure it is still in the scope of this topic, but continuing to execute the instructions found in developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/, I have some questions regarding Step C, absolutly not clear for me
What should I do exactly to prepare my boot.img ? What have I to do to create a ramdisk.img file, or where can I find it ? (in fact I do not know what it the ramdisk in the picture...is it required ?)
zongojim said:
Thank you kuisma.
Sorry it was a copy/paste error, I had for sure specified only one toolchain.
So I am making a new test with CROSS_COMPILE=~/Toolchain/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi-
I'll keep you informed
---------- Post added at 11:51 AM ---------- Previous post was at 11:15 AM ----------
It built, thanks again for your support, kuisma !
Not sure it is still in the scope of this topic, but continuing to execute the instructions found in developer.sonymobile.com/2011/05/06/how-to-build-a-linux-kernel/, I have some questions regarding Step C, absolutly not clear for me
What should I do exactly to prepare my boot.img ? What have I to do to create a ramdisk.img file, or where can I find it ? (in fact I do not know what it the ramdisk in the picture...is it required ?)
Click to expand...
Click to collapse
Start with the original root filesystem from the standard boot.img you are already running.
You'll find my tool working with boot.img here: http://whiteboard.ping.se/Android/Unmkbootimg
Also, read the links on the page my signature links to, to get more information about how to build boot images, root file systems etc.
The ramdisk contains the root filesystem, and yes, it's very much needed.
Ok understood
last point: how to retrieve the boot.img from my Xperia S phone ? (that is already unlocked)
zongojim said:
Ok understood
last point: how to retrieve the boot.img from my Xperia S phone ? (that is already unlocked)
Click to expand...
Click to collapse
Last? Ok, I'll take your word for it.
http://www.youtube.com/watch?v=bB77gWRUI_A
Remember, Google is your friend.
help me somebody please
i'm trying to build custom kernel for my xperia M dual
got sources from sony's website, doing build by guide
here is an error:
Code:
In file included from drivers/usb/gadget/android.c:51:0:
drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:586:38: warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: f_qdss.c:586
make[3]: *** [drivers/usb/gadget/android.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
is it an NDK version issue?
I'm running:
Code:
make -j8 ARCH=arm CROSS_COMPILE=/home/dev/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-
thanks

[Q] Building error aosp

guys im getting this error when building any help here cause im a complete newbie.
from this guide
http://developer.sonymobile.com/kno...ld-aosp-lollipop-for-unlocked-xperia-devices/
Code:
PRODUCT_COPY_FILES device/sony/sirius/rootdir/system/etc/libnfc-nxp.conf:system/etc/libnfc-nxp.conf ignored.
No private recovery resources for TARGET_DEVICE sirius
No recovery.fstab for TARGET_DEVICE sirius
make: *** No rule to make target `–j'. Stop.
#### make failed to build some targets (38 seconds) ####
Now when i repo sync it gives me this error:
error: hardware/libhardware/: platform/hardware/libhardware checkout 628ce4aedaa03d989ac403df533448cd78e701f7
EDIT:i searched online and somehow got past the error but now im getiing this error
Code:
In file included from external/libnfc-nci/src/hal/include/nfc_hal_api.h:27:0,
from external/libnfc-nci/src/nfc/include/nfc_api.h:32,
from external/libnfc-nci/src/nfa/include/nfa_api.h:32,
from packages/apps/Nfc/nci/jni/NativeLlcpConnectionlessSocket.cpp:26:
hardware/libhardware/include/hardware/nfc.h:56:1: error: expected unqualified-id before '<<' token
<<<<<<< HEAD
^
hardware/libhardware/include/hardware/nfc.h:94:3: error: 'nfc_nci_module_t' does not name a type
} nfc_nci_module_t;
^
make: *** [out/target/product/sirius/obj/SHARED_LIBRARIES/libnfc_nci_jni_intermediates/NativeLlcpConnectionlessSocket.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from external/libnfc-nci/src/hal/include/nfc_hal_api.h:27:0,
from external/libnfc-nci/src/include/NfcAdaptation.h:24,
from packages/apps/Nfc/nci/jni/NativeLlcpServiceSocket.cpp:19:
hardware/libhardware/include/hardware/nfc.h:56:1: error: expected unqualified-id before '<<' token
<<<<<<< HEAD
^
hardware/libhardware/include/hardware/nfc.h:94:3: error: 'nfc_nci_module_t' does not name a type
} nfc_nci_module_t;
^
make: *** [out/target/product/sirius/obj/SHARED_LIBRARIES/libnfc_nci_jni_intermediates/NativeLlcpServiceSocket.o] Error 1
external/sqlite/dist/sqlite3.c: In function 'fts3SnippetFunc':
external/sqlite/dist/sqlite3.c:143651:11: warning: 'iS' may be used uninitialized in this function [-Wmaybe-uninitialized]
if( iS>iBestScore ){
^
external/sqlite/dist/sqlite3.c:143643:13: note: 'iS' was declared here
int iS;
^
#### make failed to build some targets (03:21 (mm:ss)) ####
never mind i some how got it to work and i built aosp and flashed it and it BOOTS !!.
have you concidered PMming Pabx or Krabappel2548
these two xda users may know where i do not
@Farooq95
Any news about the error?
I got the same.
Greatz WuChEn
Der-WU said:
@Farooq95
Any news about the error?
I got the same.
Greatz WuChEn
Click to expand...
Click to collapse
try in the terminal
Code:
git commit -a
if it doent work then
Code:
repo forall -vc "git reset --hard"
Doesn't work for me
Farooq95 said:
try in the terminal
Code:
git commit -a
if it doent work then
Code:
repo forall -vc "git reset --hard"
Click to expand...
Click to collapse
Hi
I am stuck at the same point. Didn't get it working even after running repo forall -vc....
Please help

[Q] Help needed with compiling an A31 kernel

EDIT3: I was sorta' right about the source package being somewhat temperamental. Managed to build the modules sans kernel, but doing both at the same time leads to the errors below. Also, renaming uImage to vmlinux and then shoving it in boot.img along with the compiled modules resulted in the tab being stuck on the boot logo.
EDIT2: I dunno if the build package was being temperamental or something, but ticking out the tvp5150 module seems to have done the trick.
EDIT: Managed to get further with building, but while I get a vmlinux image, it still ends with a mismatch error with modules. Coud this have something to do with the source tarball being stripped and not the full one?
Code:
Building modules, stage 2.
MODPOST 67 modules
WARNING: could not find drivers/input/touchscreen/.libAW5306.cmd for drivers/input/touchscreen/libAW5306
ERROR: "vfe_gpio_write" [drivers/media/video/tvp5150.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
So, I kinda' figured out on how to cobble up a kernel for the A31s, but upon attempting to build one based on the source taken from http://dl.linux-sunxi.org/SDK/A31/a31_hummbingbird_V3.3_v2_kfb_0k.tar.gz
While I managed to load up the default config and stuff, building it using the command make ARCH=arm CROSS_COMPILE=/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- results in this:
Code:
In file included from drivers/media/video/sunxi-vfe/camera_detector/camera_detector.h:4:0,
from drivers/media/video/sunxi-vfe/config.c:10:
drivers/media/video/sunxi-vfe/camera_detector/camera_includes.h:41:25: error: redefinition of typedef '__hdle'
drivers/media/video/sunxi-vfe/flash_light/../vfe_os.h:29:22: note: previous declaration of '__hdle' was here
make[4]: *** [drivers/media/video/sunxi-vfe/config.o] Error 1
make[3]: *** [drivers/media/video/sunxi-vfe] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
ANy thoughts or advice on how to make this work, let alone boot?

Cross-Compile Error When Building Kernel (Nexus9 Memory Forensics)

Cross-compile error when building kernel (nexus9 memory forensics)
I'm currently following the AndroidMemoryForensics guide (I cannot post a link) on how to extract memory from an android device using LiME. I'm using the flounder_defconfig build configuration and create the .config file using
Code:
make flounder_defconfig
. In order to be able to load the LiME module to the kernel I need to add the following lines to the .config file:
CONFIG_MODULES=y
CONFIG_MODULES_UNLOAD=y
CONFIG_MODULES_FORCE_UNLOAD=y
When I compile the kernel I set the architecture to arm64 (ARCH=arm64) and use the aarch64-linux-android-4.9 toolchain (CROSS_COMPILE=aarch64-linux-android-4.9/aarch64-linux-android-).
When running
Code:
make
I get compile errors saying that "battery_voltage_monitor_on" is undeclared (see below).
If I try to compile the kernel without making the changes to the .config file I get no compile errors.
Am I missing something here, e.g. some package, or have I done something wrong to cause this compile error?
I tried to search for a solution online but have had little success so far so I hope I have better success here
Thanks in advance!
Jonas
Output:
CC drivers/htc_debug/stability/reboot_params.o
LD drivers/htc_debug/stability/built-in.o
CC drivers/hwmon/hwmon.o
CC drivers/hwmon/battery_system_voltage_monitor.o
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/sched.h:31,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/compat.h:25,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/hwmon/battery_system_voltage_monitor.c:15:
drivers/hwmon/battery_system_voltage_monitor.c:151:19: error: 'battery_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:151:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
drivers/hwmon/battery_system_voltage_monitor.c:183:19: error: 'system_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:183:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
make[2]: *** [drivers/hwmon/battery_system_voltage_monitor.o] Error 1
make[1]: *** [drivers/hwmon] Error 2
make: *** [drivers] Error 2
I'm having same issue on my build. Fine without modules but throws linker errors when enabled.
https://github.com/binkybear/flounder/commit/06781f20ea737f6b52a4589827d5d52688d20728

Categories

Resources