[Xperia S] Instructions for building kernel - Sony Xperia S, Acro S, Ion

Sony seems to be really supporting dev community...
they just released some instructions on how to create kernel for this device...
read the source link:
http://developer.sonymobile.com/wp/...-archive-released-with-building-instructions/
we can may be use this thread as a place to have a feedback/discuss the issues so that it may help other devs...

Nice, now we can get going on some custom ROM's, maybe even cyanogenmod will make a ROM

@DooMLord
Have you got your device yet ?
-----------------
I hope to see MiUi v4 working on my Xperia S , that will be a total Destruction :O

OS4. said:
@DooMLord
Have you got your device yet ?
-----------------
I hope to see MiUi v4 working on my Xperia S , that will be a total Destruction :O
Click to expand...
Click to collapse
sadly nope... the device isnt released in India yet

nice comment on their site DooM
i'm really keen to try, (read: mess about) but please excuse my ignorance - what defconfig should i be making? fuji_nozomi?
Code:
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.

And now... Let the ROMs and kernels begin...
Sent from Xperia X10 Mini Pro using CM9 by paul-xxx

Gonna jab my hands into the dirt and try building as well

sminki said:
nice comment on their site DooM
i'm really keen to try, (read: mess about) but please excuse my ignorance - what defconfig should i be making? fuji_nozomi?
Code:
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
Click to expand...
Click to collapse
cat README_Xperia
Configuration files can be found in arch/arm/configs.
Xperia NX SO-02D => fuji_nozomi_dcm_defconfig
Xperia S => fuji_nozomi_defconfig

hylu said:
cat README_Xperia
Configuration files can be found in arch/arm/configs.
Xperia NX SO-02D => fuji_nozomi_dcm_defconfig
Xperia S => fuji_nozomi_defconfig
Click to expand...
Click to collapse
Funny, I missed that completely! Lucky I guessed correctly
EDIT: I've moved on a little, if anyone can help I'd greatly appreciate it!
Code:
CC init/main.o
In file included from include/linux/kernel_stat.h:64:0,
from init/main.c:31:
include/linux/irq.h: In function 'alloc_desc_masks':
include/linux/irq.h:442:8: warning: variable 'gfp' set but not used [-Wunused-but-set-variable]
error, forbidden warning: irq.h:442
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Ignore, fixed a few posts down..

Hi all
As I said in thsi thread http://forum.xda-developers.com/showthread.php?t=1588800
I don't know what toolchain i've to use to build the .62 kernel of XS
I get the following error:
When I use the default arm-linux-gnueabi- (gcc 4.6):export CROSS_COMPILE=arm-linux-gnueabi-
>make
(a lot of line)
/tmp/cc33fOK4.s: Assembler messages:
/tmp/cc33fOK4.s:119: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:171: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:390: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:544: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [arch/arm/mach-msm/scm.o] Erreur 1
make: *** [arch/arm/mach-msm] Erreur 2
--
I try to use this toolchain https://sourcery.mentor.com/sgpp/lite/arm/portal/release2032
(arm-2011.09) export CROSS_COMPILE=/home/choco/xs/arm-2011.09/bin/arm-none-eabi-
I get this:
>make
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
scripts/kconfig/conf -s arch/arm/Kconfig
arch/arm/mach-msm/Kconfig:1509:warning: multi-line strings not supported
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
I try also the latest linaro toolchain
export CROSS_COMPILE=/home/chocobn/xs/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-
And i get the same error as previous
err what's wrong with toolchain ?
PS: I do the correct export for ARCH (arm), i'm on ubuntu 12.04, and havn't spoiler on this forum ?

arc_u said:
Hi all
As I said in thsi thread http://forum.xda-developers.com/showthread.php?t=1588800
I don't know what toolchain i've to use to build the .62 kernel of XS
I get the following error:
When I use the default arm-linux-gnueabi- (gcc 4.6):export CROSS_COMPILE=arm-linux-gnueabi-
>make
(a lot of line)
/tmp/cc33fOK4.s: Assembler messages:
/tmp/cc33fOK4.s:119: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:171: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:390: Error: selected processor does not support ARM mode `smc #0'
/tmp/cc33fOK4.s:544: Error: selected processor does not support ARM mode `smc #0'
make[1]: *** [arch/arm/mach-msm/scm.o] Erreur 1
make: *** [arch/arm/mach-msm] Erreur 2
--
I try to use this toolchain https://sourcery.mentor.com/sgpp/lite/arm/portal/release2032
(arm-2011.09) export CROSS_COMPILE=/home/choco/xs/arm-2011.09/bin/arm-none-eabi-
I get this:
>make
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
scripts/kconfig/conf -s arch/arm/Kconfig
arch/arm/mach-msm/Kconfig:1509:warning: multi-line strings not supported
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
Traceback (most recent call last):
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 115, in <module>
status = run_gcc()
File "/home/chocobn/xs/6.0.A.3.62/kernel/scripts/gcc-wrapper.py", line 105, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[1]: *** [kernel/bounds.s] Erreur 1
make: *** [prepare0] Erreur 2
I try also the latest linaro toolchain
export CROSS_COMPILE=/home/chocobn/xs/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-
And i get the same error as previous
err what's wrong with toolchain ?
PS: I do the correct export for ARCH (arm), i'm on ubuntu 12.04, and havn't spoiler on this forum ?
Click to expand...
Click to collapse
try these
https://github.com/DooMLoRD/android_prebuilt_toolchains

I hope you guys know this, but you can't boot custom kernels yet..
Sony needs to release a patched bootloader first, so don't flash your own kernels yet and wait for the bootloader update from Sony

DooMLoRD said:
try these
https://github.com/DooMLoRD/android_prebuilt_toolchains
Click to expand...
Click to collapse
DooMLoRD to the rescue yet again. Thanks man, arm-eabi-4.4.3 worked a treat with the problem i had 2 weeks ago ^ back up there (i guess my post should have been more explicit)
6.0.A.3.62 and 6.0.A.5.6 just compiled no problem with that tool-chain! Yes, I know we can't use them (yet), but it was something i needed to do for my own satisfaction

i heard that the bootloader is fixed in 6.0.A.5.6 or higher.
anyone tried it???? (i mailed sony about it and they told me that it is fixed in that firmware)

nickholtus said:
i heard that the bootloader is fixed in 6.0.A.5.6 or higher.
anyone tried it???? (i mailed sony about it and they told me that it is fixed in that firmware)
Click to expand...
Click to collapse
Don't think anyone has put the 5.6 fw up yet.
Edit : most recent up is the Japanese 4.1
Sent from my LT26i using XDA

nickholtus said:
i heard that the bootloader is fixed in 6.0.A.5.6 or higher.
anyone tried it???? (i mailed sony about it and they told me that it is fixed in that firmware)
Click to expand...
Click to collapse
that FW is not for the Xperia S... its for the Japaneses variant [ Xperia™ acro HD (SO-03D) ]...

DooMLoRD said:
that FW is not for the Xperia S... its for the Japaneses variant [ Xperia™ acro HD (SO-03D) ]...
Click to expand...
Click to collapse
I don't know if it's relevant but it has the fuji_nozomi def config, I'm still new to this
Sent from my LT26i using XDA

DooMLoRD said:
that FW is not for the Xperia S... its for the Japaneses variant [ Xperia™ acro HD (SO-03D) ]...
Click to expand...
Click to collapse
My sources say we might not get the bootloader fix as a separate update...
Sent from my LT26i using XDA

K900 said:
My sources say we might not get the bootloader fix as a separate update...
Sent from my LT26i using XDA
Click to expand...
Click to collapse
This looks grim. Plus bin4ry saying he has a bricked S. Not looking good for this device is it.
Sent from my R800i using XDA

poo-tang said:
This looks grim. Plus bin4ry saying he has a bricked S. Not looking good for this device is it.
Sent from my R800i using XDA
Click to expand...
Click to collapse
When I said no separate update I meant it'll be included with ICS, which should be coming really soon, likely as soon as legal stuff gets sorted out.
Sent from my LT26i using XDA

Related

[Sprint] Kernel Development - OC

Okay I've been reading and reading and finally got all the tools to build a kernel from the source that Samsung had on their site for DJ30. Since these are very identical to the other galaxy s devices they should overclock decently. Will report with more progress later.
-------------------------
Status - Downloaded source and repo and building configuration to make kernel.
Sent from my SPH-P100 using XDA App
Interested in your development... my Sprint Tab arrives tomorrow, decided to give it a 30 day try before I try the Nook Color.
Doesn't appear to be a lot of development yet, hoping to see that change.
One question, is the Zroot method still the preferred method to rooting the device?
I used superoneclick 1.5.5
Sent from my SPH-P100 using XDA App
------------------------------------------------------------
Trying to compile a test kernel to make sure everything is going to work correctly and running into this crazy error if any of the dev's can chime in please do I already installed all the repo's and linked them.
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
seems like you're missing (a part of) the gcc compiler... the part to compile for ARM it would seem...
maxjivi05 said:
I used superoneclick 1.5.5
Sent from my SPH-P100 using XDA App
------------------------------------------------------------
Trying to compile a test kernel to make sure everything is going to work correctly and running into this crazy error if any of the dev's can chime in please do I already installed all the repo's and linked them.
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
Click to expand...
Click to collapse
Made it a bit farther, got that error fixed had to install lsb along with a few other things now I'm sitting on this error. Any and all help is greatly appreciated! We can get this working!
------------------------------------
[email protected]:~/.Tab_Kernel_sources/Kernel$ make
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
GEN include/linux/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/asm/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1562: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1982: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
HOSTCC scripts/conmakehash
CC init/main.o
In file included from init/main.c:85:
include/linux/kernel_sec_common.h:7:22: error: mach/map.h: No such file or directory
include/linux/kernel_sec_common.h:8:29: error: mach/regs-clock.h: No such file or directory
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$ make ARCH=arm CROSS_COMPILE=../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/
make: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-arm
CC kernel/bounds.s
/bin/sh: ../home/max/GalaxyTab/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
I'm not a dev, but I sure can test on my sprint tablet
I have a Linux blade at home, what are the tools necessary to compile from source, and what repo are you using for the sprint tab drivers and such?
Simple solution here is that you are missing GCC or have an incorrect version installed. I wrote a how to compile thread in the Streak section a few months bak ill dig it up and post it here.
try
apt-get install build-essential
Already installed build essential.
Sent from my SPH-P100 using XDA App
The readme file tells you where to get the compiler from, decompress it to /opt/toolchain.
And this thread has pretty good explanations on how to build the kernel http://forum.xda-developers.com/showthread.php?t=837170
A little farther int he process of getting this sucker compiled... Got this error now... *I forgot how much of a pain it was to go through setting things up perfectly! lol.. any and all help is greatly appreciated!
-------------------------------------
make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
cp: cannot stat `/home/max/.Tab_Kernel_sources/Kernel/modules.order': No such file or directory
make[1]: *** [_modinst_] Error 1
make: *** [sub-make] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$
This is the most disappointing thread ever.
maxjivi05 said:
A little farther int he process of getting this sucker compiled... Got this error now... *I forgot how much of a pain it was to go through setting things up perfectly! lol.. any and all help is greatly appreciated!
-------------------------------------
make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
cp: cannot stat `/home/max/.Tab_Kernel_sources/Kernel/modules.order': No such file or directory
make[1]: *** [_modinst_] Error 1
make: *** [sub-make] Error 2
[email protected]:~/.Tab_Kernel_sources/Kernel$
Click to expand...
Click to collapse
It's pretty obvious from that line that it can't find that particular binary in your toolchain directory...
I followed the instructions in the readme file and compiled the kernel already, it was extremely simple. You ran the build_kernel.sh file right... after editing it?
Yes I did and its been 5 years since I've done anything with Linux so its a rather learning curve to get anything done. With lack of development on tab thought it would be a good place to start. I've done normal kernel build before but nothing for a phone and it wasn't rather hard either it was just a few commands and everything was already in the right directories
Sent from my SPH-P100 using XDA App
FYI I grabbed the kernel source and cross toolchain, installed the toolchain to /opt (on my desktop Linux box) added the toolchain's bin directory to the start of $PATH, edited the (iirc - am posting from a Windows box) build.sh script and the kernel built fine first time.
I need to set the path to the raminitfs file in .config and then try again and make sure it boots ok
Anyway just a post to say that it must be your setup. I see you have installed the toolchain to /home/max/GalaxyTab/prebuilt/linux-x86/toolchain/ and in your latest post there's the following error: make[1]: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: Command not found
So there's obviously a path problem there. I also see you're using a plain "make" command without setting the ARCH env var.
I'd recommend giving the build.sh script a go (after editing the toolchain path), as it sets up all the env vars, etc., for you automatically.
okay, I was missing a file went I was doing my repo sync... which didn't make sense but i got it worked out... finally able to compile going to apply the patches and recompile and will repo, but thanks for the people who did help figure out the issue...
maxjivi05 said:
With lack of development on tab
Click to expand...
Click to collapse
HUH?
10 characters
Does anyone have an untouched sprint kernel pulled from a device? I rooted mine and it's seeminly impossible to pull the initrd out of it.
jstigall said:
Does anyone have an untouched sprint kernel pulled from a device? I rooted mine and it's seeminly impossible to pull the initrd out of it.
Click to expand...
Click to collapse
Nevermind, I got it... I have a booting Sprint kernel that works great.
Do you have a link to the patches you want to include, I may be able to get the CPU frequency adjustments you want to make built.
jstigall said:
Nevermind, I got it... I have a booting Sprint kernel that works great.
Do you have a link to the patches you want to include, I may be able to get the CPU frequency adjustments you want to make built.
Click to expand...
Click to collapse
Currently there are 2 files that tell the kernel the freq to run at, and 3 spots at the bottom of each that need changed. Located in /ARM/ARCH/OMAP something I need to get more info when I get home I'll edit this post and let you know but there is a file called cpu24xx.c and cpu34xx.c, I was going to compile a working kernel with those files edited to run 1200MHz to test and see if that would work if that didn't work there were some patches made on the other galaxy s devices I have links to thanks to SetiroN for providing, which they are a little different then the files for the galaxy source but I'll post it when I get home and have time!

[Q] P.A.C error

iates/pac_toro-target_files-eng.root.zip /root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip
unzipping target target-files...
running: unzip -o -q /root/pac/out/target/product/toro/obj/PACKAGING/target_files_intermediates/pac_toro-target_files-eng.root.zip -d /tmp/targetfiles-mX0gSB
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 884, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 836, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/root/pac/build/tools/releasetools/common.py", line 146, in LoadInfoDict
d["build.prop"] = LoadBuildProp(zip)
File "/root/pac/build/tools/releasetools/common.py", line 160, in LoadBuildProp
name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack
make: *** [/root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip] error 1
yun3195 said:
iates/pac_toro-target_files-eng.root.zip /root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip
unzipping target target-files...
running: unzip -o -q /root/pac/out/target/product/toro/obj/PACKAGING/target_files_intermediates/pac_toro-target_files-eng.root.zip -d /tmp/targetfiles-mX0gSB
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 884, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 836, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/root/pac/build/tools/releasetools/common.py", line 146, in LoadInfoDict
d["build.prop"] = LoadBuildProp(zip)
File "/root/pac/build/tools/releasetools/common.py", line 160, in LoadBuildProp
name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack
make: *** [/root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip] error 1
Click to expand...
Click to collapse
Hi!
I am getting the same error. Do you know how to fix it?
QUESTION
yun3195 said:
iates/pac_toro-target_files-eng.root.zip /root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip
unzipping target target-files...
running: unzip -o -q /root/pac/out/target/product/toro/obj/PACKAGING/target_files_intermediates/pac_toro-target_files-eng.root.zip -d /tmp/targetfiles-mX0gSB
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 884, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 836, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/root/pac/build/tools/releasetools/common.py", line 146, in LoadInfoDict
d["build.prop"] = LoadBuildProp(zip)
File "/root/pac/build/tools/releasetools/common.py", line 160, in LoadBuildProp
name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack
make: *** [/root/pac/out/target/product/toro/pac_toro-ota-eng.root.zip] error 1
Click to expand...
Click to collapse
I met that error too,did you solve that,sir?

[Q] Custom Kernel Compilation with external wifi support

I got a weird error when try to compile kernel source from samsung SGH-I747M, I use the lastest JB kernel source from samsung open source. I google it but no luck
I use a linux box (backbox lastest version). I also try it on Ubuntru 12.04 but same output. I also try the NDK and ARM-EABI still the same output. Here the error :
[email protected]:~/samsung$ make -j 4
Traceback (most recent call last):
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 110, in <module>
status = run_gcc()
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 100, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
CHK include/linux/version.h
CC scripts/mod/empty.o
HOSTCC scripts/conmakehash
Traceback (most recent call last):
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 110, in <module>
status = run_gcc()
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 100, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
Traceback (most recent call last):
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 110, in <module>
status = run_gcc()
File "/home/nannaniel/samsung/scripts/gcc-wrapper.py", line 100, in run_gcc
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2
Any Idea ?
thks
https://github.com/vmobi-gogh/andro...mmit/d871746203d240d2ca6df762c852853359f2ce2d
You will need to also run a
$ make mr proper
inside the kernel folder. I had some other weirdness working on the goghvmu kernel as well. Good luck!
---------- Post added at 10:51 AM ---------- Previous post was at 10:44 AM ----------
Also looks like I missed csh
$ sudo apt-get install csh
http://stackoverflow.com/questions/6330705/python-subprocess-throws-error-no-such-file-or-direcrory
Here is one last commit that fixed and got me a build! Still need to flash but at least it built
https://github.com/vmobi-gogh/andro...mmit/01b11606e6ea6597d5df39c1dc75ebd91d4349ec

Can't compile Galaxy Note 3 Kernel

I am kinda new to kernel development. I need to rebuild the kernel I'm using ((http://forum.xda-developers.com/showthread.php?t=2480353) Compulsion Kernel) with loadable module support. I have also tried other kernels. I also tried using the "-i" flag on make, but the errors kept getting worse, until the whole compilation output was errors...
I keep getting errors from the console output. For example:
Code:
net/bluetooth/hci_conn.c: In function 'hci_le_ltk_reply':
net/bluetooth/hci_conn.c:406:28: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
error, forbidden warning: hci_conn.c:406
make[2]: [net/bluetooth/hci_conn.o] Error 1
-Wsizeof-pointer-memaccess errors pop up very often.
There are also file not found errors:
Code:
arm-eabi-ld: error: cannot open net/bluetooth/hci_conn.o: No such file or directory
make[2]: [net/bluetooth/bluetooth.o] Error 1
LD net/bluetooth/built-in.o
arm-eabi-ld: error: cannot open net/bluetooth/bluetooth.o: No such file or directory
make[2]: [net/bluetooth/built-in.o] Error 1
CC net/bridge/br_input.o
Heres another example:
Code:
CC net/bridge/br_ioctl.o
arch/arm/mach-msm/board-8974-sec.c:569:13: warning: 'modem_power_off' defined but not used [-Wunused-function]
error, forbidden warning: board-8974-sec.c:569
make[1]: [arch/arm/mach-msm/board-8974-sec.o] Error 1
LD arch/arm/mach-msm/built-in.o
CC drivers/gpu/ion/ion_cma_heap.o
arm-eabi-ld: error: cannot open arch/arm/mach-msm/bam_dmux.o: No such file or directory
arm-eabi-ld: error: cannot open arch/arm/mach-msm/board-8974-sec.o: No such file or directory
System information:
I attached my .config file. It is the default from the Compulsion kernel.
Compile commands (in order):
Code:
export VARIANT_DEFCONFIG=msm8974_sec_defconfig ##I added this because it wont generate .config if this variable is empty...
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/julian/android-toolchain-eabi/bin/arm-eabi-
git pull
make clean
make msm8974_sec_defconfig
make -j4
Operating system: Fresh install of Linux Mint 16 (Petra)
Build-related packages I installed with apt: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb
Toolchain:
Tried linaro, the android NDK from Google's website, and various other toolchains. Same error.
Output of "echo $PATH"
Code:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julian/android-toolchain-eabi/bin:/home/julian/androidkernel/N900T_Kernel
I think thats all the needed information
Thank you!
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
djintrigue808 said:
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
Click to expand...
Click to collapse
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Any ideas?
EDIT:
Compile warnings about swp{b} although swp emulation is enabled in config. I still can't figure out how to get the zImage to work correctly on my device. I swapped the zImage out of the Saber kernel install zip boot.img and put my own in, flashed with TWRP, device doesn't boot until I go back and install the original kernel.
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Please ignore if irrelevant or ignorant. I'm in my infancy and still grasping the basics.
My environment is quite different than yours, on a Mac and using a Sprint note 3, but I came across this thread with the same compiler error using the 4.8 tools in the NDK. If I use 4.6 gcc I make it pretty far into the compilation process before error (failing @net/netfilter/xt_TCPMSS.c). However, using 4.8 gave me the same error as you:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Here's the layout of my toolchains folder and my broken build file (looks like yours)
Code:
z:toolchains anon$ pwd
/Volumes/android/ndk/toolchains
z:toolchains anon$ ls arm-linux-androideabi-4.*/prebuilt/darwin-x86_64/arm-linux-androideabi/bin
arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
Broken Make file edit:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Change to 4.6 for new compile error:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Made is a helluva lot father in the compilation process, but still won't compile correctly.
Code:
net/netfilter/xt_TCPMSS.c:50:8: warning: 'struct xt_tcpmss_info' declared inside parameter list [enabled by default]
error, forbidden warning: xt_TCPMSS.c:50
make[2]: *** [net/netfilter/xt_TCPMSS.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
Got my NDK from here:
Code:
http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86_64.tar.bz2
I don't, yet, understand the differences between the versions. Not sure if this will be helpful, samsungs open source community page sure isn't very friendly.
Julian90090 said:
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Click to expand...
Click to collapse
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
daxgirl said:
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
Click to expand...
Click to collapse
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
sansari123 said:
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
Click to expand...
Click to collapse
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Thanks. The latest message I get is the following:
Code:
drivers/cpufreq/cpufreq_interactive.c: In function 'show_target_loads':
drivers/cpufreq/cpufreq_interactive.c:813:6: warning: operation on 'ret' may be undefined [-Wsequence-point]
error, forbidden warning: cpufreq_interactive.c:813
make[2]: *** [drivers/cpufreq/cpufreq_interactive.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
But this one is a warning also. I guess there is a flag for ignoring warning(s)? I'll wait to hear back from you.
daxgirl said:
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
@daxgirl - I like to learn how to modify the flags. Did you find out which flags to modify by reading the Makefile documentation? I would really appreciate it if you tell me how I can learn which flags to modify and do it myself vs. copy your Makefile.

Help building ROMs for Nexus 5X

I tried building CM and ResurrectionRemix for Nexus 5X and got the same error:
Code:
using prebuilt boot.img from BOOTABLE_IMAGES...
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 53, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 49, in main
common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img)
File "/home/gururoop/android/cm13/build/tools/releasetools/common.py", line 1443, in MakeRecoveryPatch
_, _, patch = d.ComputePatch()
File "/home/gururoop/android/cm13/build/tools/releasetools/common.py", line 1131, in ComputePatch
p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/home/gururoop/android/cm13/build/tools/releasetools/common.py", line 87, in Run
return subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [/home/gururoop/android/cm13/out/target/product/bullhead/system/bin/install-recovery.sh] Error 1
make: Leaving directory `/home/gururoop/android/cm13'
I tried downloading the repo afresh, but got the same error. Any help would be highly appreciated.

Categories

Resources