Can Anyone Get a Kernel Working? - Samsung Epic 4G Touch

I've tried a hundred different settings, tweaking Samsung's original c1_rev05_na_spr_defconfig file.
c1_rev05_na_spr_defconfig is the .config file given by Samsung in the open source code for those of you who don't know.
When you can correctly compile the kernel with the settings in this .config file, you should be able to end up with a stock zImage that works but right now, these kernels end up in a boot-loop or boot-freeze.
I suspect it's settings in the .config file (off the c1_rev05_na_spr_defconfig) that could be at fault. I am not an expert at this (by any means) but perhaps those of you who are can recommend me any changes to the settings.
There's also an older c1_rev02_na_spr_defconfig but it doesn't compile so...

as ive stated in other threads, you wanna double check your kernels use tools to unpack the zimage.. if you dont have the initramfs in there then its not gunna boot

shabbypenguin said:
as ive stated in other threads, you wanna double check your kernels use tools to unpack the zimage.. if you dont have the initramfs in there then its not gunna boot
Click to expand...
Click to collapse
It's definitely in there, here's a copy and paste from my make menuconfig:
[ ] Namespaces support x x
x x [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support x x
x x () Initramfs source file(s) x x
x x [*] Support initial ramdisks compressed using gzip x x
x x [ ] Support initial ramdisks compressed using bzip2 x x
x x [ ] Support initial ramdisks compressed using LZMA x x
x x [ ] Support initial ramdisks compressed using LZO

Bro, it's not that simple, you have to set the initramfs path in the config to a folder on your local machine and what Shabby is saying is that nobody has unpacked the stock zImage on the phone (or found out how to) to have an initramfs to load into the zImage you are compiling.
Just find a way to pull the stock zImage and unpack the initramfs and load the correct path, or it will keep having the same problems.

bubby323 said:
Bro, it's not that simple, you have to set the initramfs path in the config to a folder on your local machine and what Shabby is saying is that nobody has unpacked the stock zImage on the phone (or found out how to) to have an initramfs to load into the zImage you are compiling.
Just find a way to pull the stock zImage and unpack the initramfs and load the correct path, or it will keep having the same problems.
Click to expand...
Click to collapse
Ok, I actaully tried unpacking initramfs from zImage but it seems like it doesn't exist....

zedomax said:
Ok, I actaully tried unpacking initramfs from zImage but it seems like it doesn't exist....
Click to expand...
Click to collapse
..and that is the problem. Without the initramfs android WILL NOT boot, since it doesn't know how, the zImage itself only houses the drivers and such. It's useless without the initramfs.

bubby323 said:
..and that is the problem. Without the initramfs android WILL NOT boot, since it doesn't know how, the zImage itself only houses the drivers and such. It's useless without the initramfs.
Click to expand...
Click to collapse
can something like this work?
http://forum.xda-developers.com/showthread.php?t=777380
---------- Post added at 05:05 PM ---------- Previous post was at 05:02 PM ----------
Here's my build output during compile, it seems like initramfs has been compiled correctly, no?
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/initramfs.o
CC arch/arm/kernel/setup.o
CC arch/arm/kernel/traps.o
CC arch/arm/kernel/machine_kexec.o
AS arch/arm/kernel/relocate_kernel.o
CC arch/arm/kernel/atags.o
CC kernel/panic.o
CC kernel/printk.o
LD init/built-in.o
CC drivers/base/cpu.o
LD arch/arm/kernel/built-in.o
CC kernel/sys.o
LD drivers/base/built-in.o
CC kernel/ksysfs.o
CC kernel/kexec.o
LD drivers/built-in.o
LD kernel/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 13 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
MODPOST 6 modules
Kernel: arch/arm/boot/Image is ready
GZIP arch/arm/boot/compressed/piggy.gzip
SHIPPED arch/arm/boot/compressed/lib1funcs.S
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/piggy.gzip.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready

It may compile correctly but your not injecting the initramfs into it...so it won't boot your phone.

bubby323 said:
It may compile correctly but your not injecting the zImage into it...so it won't boot your phone.
Click to expand...
Click to collapse
injecting the zImage to where?

zedomax said:
injecting the initramfs to where?
Click to expand...
Click to collapse
The initramfs into the zImage.

bubby323 said:
The initramfs into the zImage.
Click to expand...
Click to collapse
This is pretty frustrating, didn't have to do that on HTC open source, it shouldn't be so hard to compile a kernel, ARGHHH, I am about to give up.

Never give up, just find somebody to pull the stock zImage.

bubby323 said:
Never give up.
Click to expand...
Click to collapse
Yeah, don't give up. Good things take time
Sent from my SPH-D700 using xda premium

I can do this but I have no idea how to flash to and use odin
Sent from my sprint galaxy s2

bbedward said:
I can do this but I have no idea how to flash to and use odin
Sent from my sprint galaxy s2
Click to expand...
Click to collapse
Compile the kernel, then compress zImage it using tar:
tar cvf blahblah.tar zImage
Use Odin and select blahblah.tar under PDA then hit Start.
But don't do this as the kernel will put you in bootloop or boot freeze for now.

I get that much, but is the tar supposed to be setup with the same directory structure as the phone?

That's the .pit files job bro.

Yea this is my first samsung experience lol
Sent from my sprint galaxy s2

thanks bubby, i kept saying it again and again.. yet no one was listening
anyways only way we are gunna get it is by having root

shabbypenguin said:
thanks bubby, i kept saying it again and again.. yet no one was listening
anyways only way we are gunna get it is by having root
Click to expand...
Click to collapse
Well... Whosdaman or Korey usually releases the tars for odin on officail releases... S lets hope for that..
Sent from my SPH-D710 using XDA App

Related

Help needed compiling the kernel

So... I download the kernel source from HTC (http://developer.htc.com) and I found this blog that got me started on compiling it...
http://blog.coralic.nl/2009/10/25/how-to-compile-the-htc-hero-kernel/comment-page-1/#comment-42
Well, at first attempt, I got an error that make couldn't find the rule to make projector.o. Well, I went through the .config and changed that option to No...
Then, it gets all the way to where it looks like it's going to make vmlinux1 and it errors out with the message "arm-eabi-ld: no machine record defined .... make: *** [.tmp_vmlinux1] Error 1"
Has anybody successfully compiled the source yet?
jmanley69 said:
So... I download the kernel source from HTC (http://developer.htc.com) and I found this blog that got me started on compiling it...
http://blog.coralic.nl/2009/10/25/how-to-compile-the-htc-hero-kernel/comment-page-1/#comment-42
Well, at first attempt, I got an error that make couldn't find the rule to make projector.o. Well, I went through the .config and changed that option to No...
Then, it gets all the way to where it looks like it's going to make vmlinux1 and it errors out with the message "arm-eabi-ld: no machine record defined .... make: *** [.tmp_vmlinux1] Error 1"
Has anybody successfully compiled the source yet?
Click to expand...
Click to collapse
Try "make msm7200a_defconfig" before compiling, do not pull config.gz.
Lox_Dev said:
Try "make msm7200a_defconfig" before compiling, do not pull config.gz.
Click to expand...
Click to collapse
That was a very good starting point...
It all comes down to these two lines
On the config from my phone it says
Code:
# CONFIG_ARCH_MSM7200A is not set
CONFIG_ARCH_MSM75010A=y
on msm7200a_defconfig, it has
Code:
CONFIG_ARCH_MSM7200A=y
# CONFIG_ARCH_MSM75010A is not set
Also, msm7200a_defconfig has these two extra lines that don't exist at all in my config
Code:
CONFIG_MACH_SAPPHIRE=y
CONFIG_MACH_HERO=y
That wouldn't be too big a problem, but my config has
Code:
# CONFIG MSM_AMSS_SUPPORT_256MB_EBI1 is not set
and msm7200a_defconfig has
Code:
CONFIG_MSM_AMSS_SUPPORT_256MB_EBI1=y
and without that set, SAPPHIRE.o won't compile because an integer is long instead of unsigned....
Any idea how I can figure out the correct file to fix for the CONFIG_ARCH_MSM75010A? I looked in /arch/arm/Makefile, and it says ARCH_MSM7XXXX points to msm, and I look in /arch/arm/msm/Makefile, and don't see anything referencing either MSM7200A or MSM75010A, but 7200A has to be someplace
Standard config pulled from running 1.5 should compile just fine.
Done it countless times myself.
What version of the toolchain are you running?
packetlss said:
Standard config pulled from running 1.5 should compile just fine.
Done it countless times myself.
What version of the toolchain are you running?
Click to expand...
Click to collapse
/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
Just tried it myself with the same toolchain:
Code:
[email protected]:~/android/kernel/kernel_hero$ [B]cp config-gsm-stock .config[/B]
[email protected]:~/android/kernel/kernel_hero$ [B]CROSS_COMPILE=~/android/src/aosp/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make[/B]
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
...
<lots of muck removed>
....
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gz
AS arch/arm/boot/compressed/piggy.o
CC arch/arm/boot/compressed/misc.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Building modules, stage 2.
MODPOST 0 modules
[email protected]:~/android/kernel/kernel_hero$ [B]ls -al arch/arm/boot/zImage[/B]
-rwxr-xr-x 1 mange mange 1648748 2009-12-05 02:13 arch/arm/boot/zImage
[email protected]:~/android/kernel/kernel_hero$
The error your getting is usually due to a incomplete machine specification for the linker.
Try and checkout the prebuilt stuff again from AOSP, it's possibly corrupted.
Mine is master branch, synced yesterday.

kernel compiling

did someone could provide a minimal guide for compile kernel ? got some problem with using gcc prebuilt in samsung source. can you tell what defconfig you used ?
once used defconfig versatile_defconfig and .config saved i have got the following error:
[email protected]:~/Downloads/android-source/GalaxyS/linux-2.6.29# make ARCH=arm CROSS_C
OMPILE=/root/Downloads/android-source/opensrc/prebuilt/linux-x86/toolchain/arm-e
abi-4.2.1/bin/arm-eabi-
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
CALL scripts/checksyscalls.sh
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
CC init/main.o
In file included from init/main.c:79:
include/linux/kernel_sec_common.h:9:22: error: mach/map.h: No such file or direc
tory
include/linux/kernel_sec_common.h:10:29: error: plat/regs-clock.h: No such file
or directory
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
I tried also with s3c6400_config with the following error:
[email protected]:~/Downloads/android-source/GalaxyS/linux-2.6.29# make ARCH=arm CROSS_C
OMPILE=/root/Downloads/android-source/opensrc/prebuilt/linux-x86/toolchain/arm-e
abi-4.2.1/bin/arm-eabi-
scripts/kconfig/conf -s arch/arm/Kconfig
net/ipv6/netfilter/Kconfig:165:warning: config symbol defined without type
CHK include/linux/version.h
Generating include/asm-arm/mach-types.h
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
<stdin>:1097:2: warning: #warning syscall fadvise64 not implemented
<stdin>:1265:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1321:2: warning: #warning syscall pselect6 not implemented
<stdin>:1325:2: warning: #warning syscall ppoll not implemented
<stdin>:1365:2: warning: #warning syscall epoll_pwait not implemented
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
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/ihex2fw
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
GEN usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/arm/kernel/compat.o
CC arch/arm/kernel/elf.o
AS arch/arm/kernel/entry-armv.o
AS arch/arm/kernel/entry-common.o
CC arch/arm/kernel/irq.o
CC arch/arm/kernel/process.o
arch/arm/kernel/process.c: In function 'arm_machine_restart':
arch/arm/kernel/process.c:107: error: 'S5P_INFORM5' undeclared (first use in thi
s function)
arch/arm/kernel/process.c:107: error: (Each undeclared identifier is reported on
ly once
arch/arm/kernel/process.c:107: error: for each function it appears in.)
make[1]: *** [arch/arm/kernel/process.o] Error 1
make: *** [arch/arm/kernel] Error 2
How about pulling the config directly from the device, did you try that? (BTW I didn't get to compiling just yet, I only have SGS for two busy days now, so no direct experience yet, just asking).
Case_ said:
How about pulling the config directly from the device, did you try that? (BTW I didn't get to compiling just yet, I only have SGS for two busy days now, so no direct experience yet, just asking).
Click to expand...
Click to collapse
dont know if and where the config is stored on SGS, apparently theres no .config
I have downloaded the AOSP eclair build and am trying to compile it.
It's still compiling.
I believe(stress on believe) you have to download the Samsung firmware from wesgamer and he has a sh file that gets rid of dream and other htc code.
Also he might have a different config
I am not experienced at android rom compiling.
Please take extreme care with whatever you do.
HOLY CRAP!!! I'm so sorry. I must have missed the readme.txt
Follow neldar.
If you have the latest sourcecode from opensource.samsung.com
then you should take a look into the README.txt and build_kernel.sh.
Everything you need to know to successfully build the kernel + modules is described in these files.
husq510 said:
dont know if and where the config is stored on SGS, apparently theres no .config
Click to expand...
Click to collapse
Yeah, sorry, I thought it could be pulled from /proc/config.gz as usual and didn't verify, but as I see now with adb, apparently Samsung has this disabled in their kernel.
I've compiled the kernel as per the readme file, but after I flash it, I get a kernel panic. Are there any other steps needed that are not in the readme? The kernel I created is around 2.5mb
vibez said:
I've compiled the kernel as per the readme file, but after I flash it, I get a kernel panic. Are there any other steps needed that are not in the readme? The kernel I created is around 2.5mb
Click to expand...
Click to collapse
you need the initramfs (contains the initial / with drivers and other stuff). check out this http://forum.samdroid.net/wiki/show...amsung+Spica+i5700?highlight=zImage+initramfs it's not for the i9000 but it works like that. you just have to take the other initramfs.
hope this helps, i just got it finished here myself
edit:
* my zImage is 6051460 bytes ...
* the right initramfs is also on leshak's git. explanation is on samdroid.net
Hi there,
I 've followed the instrucions in the README.txt.
No errors, but my zImage is just 2.5 mb
I assume the .config which is in the linux-2.6.29 directory is default one.The only change I made is to enable USB_ETH for RNDIS support.
make menuconfig
then
build kernel
Am i missing something?
I recompiled serveral time the linux kernel on standard computers, this time it might need a different setup.
thanks
Found that there is this useful discussion already
http://forum.xda-developers.com/showthread.php?t=727357
gettons said:
I 've followed the instrucions in the README.txt.
No errors, but my zImage is just 2.5 mb
I assume the .config which is in the linux-2.6.29 directory is default one.The
...
Am i missing something?
Click to expand...
Click to collapse
please read before posting! you are missing initramfs as i wrote in my post above yours!
I'm getting confused with the linking of capela_defconfig
Can anyone explain in more detail please
EDIT: Ok it seems the build script is overwriting whatever I set in the .config file
EDIT 2 Ok it seems .config gets overwritten by contents of arc/arm/configs/aries_rev03_defconfig
So I added the 3 lines about initramfs to the aries_rev03_defconfig and changed the path to now point towards the source downloaded from github. Compiling now....
ups. sorry. delete plz anyone?
Ok it seems the build script is overwriting whatever I set in the .config file
Click to expand...
Click to collapse
yeah i had this too so i didn't use the build_kernel.sh script. just make ARCH=arm CROSS_COMPILE=tool-chain-path_and_prefix after make menuconfig. worked like a charm. have you tried to boot your kernel yet?
No I still get a file 2.5mb in size
Can you point me in the right direction?
Which config file are you using?
anyone has a mirror of the source code #2 posted sometime back? samsung hv removed from their site.. dont know if the current source code is the old or new code (#2)..
vibez said:
No I still get a file 2.5mb in size
Can you point me in the right direction?
Which config file are you using?
Click to expand...
Click to collapse
i did a "./build_kernel.sh Clean"
then i made "make menuconfig" and set the initramfs from leshak. you have to modify the initrd.arm.initramfs_list file to fit your file tree.
after that i did the make .... in the "linux-2.6.29" directory
edit: i did not change the .config file!
raspdeep said:
anyone has a mirror of the source code #2 posted sometime back? samsung hv removed from their site.. dont know if the current source code is the old or new code (#2)..
Click to expand...
Click to collapse
i think the currently available code is the newest one. it's slightly bigger and contains the build scripts/readme etc. additionally i had problems with uncompressing the code with the linux zip program. i suspect the archive was damaged somehow...
mine is 6MB, using the .config default and leshak initramfs and just make ARCH=arm CROSS_COMPILE=path-gcc
didnt use build_kernel.sh at all.
If you want to change the .config, then you should run once build_kernel.sh and then comment out line 75 in build_kernel.sh , like this:
Code:
#make ARCH=arm $PROJECT_NAME"_rev"$HW_BOARD_REV"_defconfig"
This will keep your .config and you could still use build_kernel.sh.
neldar said:
If you want to change the .config, then you should run once build_kernel.sh and then comment out line 75 in build_kernel.sh , like this:
Code:
#make ARCH=arm $PROJECT_NAME"_rev"$HW_BOARD_REV"_defconfig"
This will keep your .config and you could still use build_kernel.sh.
Click to expand...
Click to collapse
Thanks, I've commented out that line and it seems to be actually trying to load initramfs now
you have to modify the initrd.arm.initramfs_list file to fit your file tree.
Click to expand...
Click to collapse
Ah, I didn't realise the contents of this file needed to be edited too (I see now it's pointed to leshak's folder tree). So i've made the changes to point to my initramfs dir and recompiling now. Fingers crossed this time.....
EDIT
Success! I now have an image 6003928 bytes in size Thanks for all the help!
Right, any tips on how to patch in ext4 support?
i flashed my kernel before and it does work quite well. i am not able to root with the update.zip however. adb gives me root access to the device but i can not get root directly on the phone (#su gives me "su: uid 10085 not allowed to su"). this is quite strange because the root methods works well with the stock kernel...hm

[REF] zImage Initramfs

Very basic guide to extract the initramfs from the zImage, as well as a dump of the initramfs inside I9100XEKDB firmware.
Q: Why? This is simple!
A: Might help someone out!
Linux Bash script follows (standard initramfs extract script) :
Code:
pos=`grep -F -a -b -m 1 --only-matching $'\x1F\x8B\x08' zImage | cut -f 1 -d :`
dd status=noxfer if=zImage bs=$pos skip=1 2>/dev/null| gunzip -q > kernel.img
start=`grep -F -a -b -m 1 --only-matching '070701' kernel.img | head -1 | cut -f 1 -d :`
dd status=noxfer if=kernel.img bs=$start skip=1 > initramfs.img 2>/dev/null
mkdir initramfshere
cd initramfshere
cpio -i --no-absolute-filenames < ../initramfs.img
ls -l
I9100XEKDB initramfs: http://www.sgscompilebox.dreamhosters.com/initramfs.tar.gz
Repacking should be easy as well, but I haven't tried to boot a kernel I have repacked myself yet. Since Chainfire has a root kernel posted, it should work without issue though -- and these are standard linux kernels after all.
Grab the kernel repacker from http://www.sgscompilebox.dreamhosters.com/repacker.tar.gz
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Might need some tweaking depending on your system, but this will hopefully get you started. You can use this to create your own root kernels as Chainfire has done, or modify as you want. Refer to the Q&A above!
Hi,
You can also find Samsung unmodified Galaxy S II initramfs on github, contributions welcome for missing ones:
https://github.com/GalaxySII/initramfs-galaxysii
Its repository collections is for every developer, and is not project/people specific: https://github.com/GalaxySII/
This is what Samsung should give us directly.
Related post, with reference Kernel source repository: http://forum.xda-developers.com/showthread.php?t=1054738
RyanZA said:
Very basic guide to extract the initramfs from the zImage, as well as a dump of the initramfs inside I9100XEKDB firmware.
Q: Why? This is simple!
A: Might help someone out!
Linux Bash script follows (standard initramfs extract script) :
Code:
pos=`grep -F -a -b -m 1 --only-matching $'\x1F\x8B\x08' zImage | cut -f 1 -d :`
dd status=noxfer if=zImage bs=$pos skip=1 2>/dev/null| gunzip -q > kernel.img
start=`grep -F -a -b -m 1 --only-matching '070701' kernel.img | head -1 | cut -f 1 -d :`
dd status=noxfer if=kernel.img bs=$start skip=1 > initramfs.img 2>/dev/null
mkdir initramfshere
cd initramfshere
cpio -i --no-absolute-filenames < ../initramfs.img
ls -l
I9100XEKDB initramfs: http://www.sgscompilebox.dreamhosters.com/initramfs.tar.gz
Repacking should be easy as well, but I haven't tried to boot a kernel I have repacked myself yet. Since Chainfire has a root kernel posted, it should work without issue though -- and these are standard linux kernels after all.
Grab the kernel repacker from http://www.sgscompilebox.dreamhosters.com/repacker.tar.gz
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Might need some tweaking depending on your system, but this will hopefully get you started. You can use this to create your own root kernels as Chainfire has done, or modify as you want. Refer to the Q&A above!
Click to expand...
Click to collapse
Hi..I notice there's an embedded kernel in the packer directory, but the path is an older version than the actual one in zimage. Is third just for pearl script purposes? Thanks
Sent from my GT-I9100
Hey RyanZA,
Following your script
> cpio -i --no-absolute-filenames < ../initramfs.img
extracts initramfs but gives me the error:
cpio: ../init: Cannot symlink to 'sbin-ueventd': Operation not permitted
Can you help a linux newbie here ? Do I need to be root?
EDIT: Ah! I think I know now... FAT does not support symlinks Going to ext...
Ok got the initramfs extracted from a zImage. Used repacker to create the zImage again. Did not change anything in initramfs. Filesize 5mb vs 8mb for the original. After a closer look I see that original contains lots of zeros. Ok appended zeros to match filesize and flashed the 'new' kernel. No go. Yellow triangle and no boot. Waited a long time.
Can anyone help? Maybe the repacker does something wrong? Maybe it should not compress?
Sent from my GT-I9100 using XDA Premium App
Anybody had any luck with this?
After said tweaking to get the repacker script running I got it to build a new zImage.
But mine was even only ~2MB small.... (seeing that the extracted initramfs summs up to about 3MB it makes at least a bit of sense, but still wondering).
Also the older kernel used (.29 against .35 that's actually running on my phone) makes me ....
Well, flashed it anyway but (as expected) it didn't work, phone showed the bootlogo and that's it, not even recovery worked.
So, is it the older kernel? Or is it forking up the initramfs image creation?
Or is there another way to rebuilt the kernel image with a new initramfs image?
I'd really like to get rebuilding the zImage working so I toy around with that a bit, try to make my own root kernel and all that funstuff
HellcatDroid said:
Anybody had any luck with this?
After said tweaking to get the repacker script running I got it to build a new zImage.
But mine was even only ~2MB small.... (seeing that the extracted initramfs summs up to about 3MB it makes at least a bit of sense, but still wondering).
Also the older kernel used (.29 against .35 that's actually running on my phone) makes me ....
Well, flashed it anyway but (as expected) it didn't work, phone showed the bootlogo and that's it, not even recovery worked.
So, is it the older kernel? Or is it forking up the initramfs image creation?
Or is there another way to rebuilt the kernel image with a new initramfs image?
I'd really like to get rebuilding the zImage working so I toy around with that a bit, try to make my own root kernel and all that funstuff
Click to expand...
Click to collapse
the fist script actually works good to pull initramfs. but I don't know about the repacker...better to build new
Yeah, trying to build a new kernel from sources at the moment (make is running as I type this).
Here's an idea why the rebuilder fails:
.29 kernel (that the rebuild script brings in and uses) but the initramfs has .35 version kernel modules (as it's for/from the .35 kernel)!
Not sure how delicate this version missmatch is, but there's a chance the one or the other important kernel module erroring out upon boot due to the version missmatch....
Well, let's see if a full build from sources works (as I know my luck, it won't....)....
that's because zImage has SFX code which tied very much to data (Image.gz). So you cannot just re-pack it back to existing zImage. You have to download source code of i9100 kernel and execute final part of kernel build where Image binary gets compressed and pre-pended by sfx header.
RyanZA said:
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Click to expand...
Click to collapse
err... the repacker/kernel_repacker.sh script only takes one argument.. how is it supposed to work???
sorg said:
that's because zImage has SFX code which tied very much to data (Image.gz). So you cannot just re-pack it back to existing zImage. You have to download source code of i9100 kernel and execute final part of kernel build where Image binary gets compressed and pre-pended by sfx header.
Click to expand...
Click to collapse
Yeah, that is actually what the repacker script does!
It has precomplied objects and compiles/links them together to the final (new) zImage.
saturn_de said:
err... the repacker/kernel_repacker.sh script only takes one argument.. how is it supposed to work???
Click to expand...
Click to collapse
You only pass the newinitramfs.img.gz that's created in the lines above, just drop the "zImage" from the commandline.
// EDIT
OK, I got as far as to compile my own kernel from the sources Samsung has released
I eventually end up with a nice and fresh, built from scratch zImage \o/
When I throw my selfmade zImage at the extractor script posted above, I get the proper (stock) initramfs filestructure I intended to put in (in other words, I managed to put my (as of now untouched) own initramfs.img into the zImage).
I create a nice .tar, flash with Odin and.... nothing
I get the bootsplash with the triangle and that's it, it doesn't get any further.
Anyone got a hint for me what I did wrong?
What I did:
(this all happened on a Linux machine)
extract Samy's kernel source
installed the codesourcery toolchain
set the CROSS_COMPILE var in ./kernel/Makefile to the proper path to the toolchain
ran
make c1_rev02_defconfig (according to readme.txt)
and then
make zImage CONFIG_INITRAMFS_SOURCE="/path/to/extracted/stock/initramfs/"
padded with 0x00s to the 8MiB size, tar'ed and Odin'ed
which brings me to the dead bootscreen....
Not even recovery works.
HellcatDroid said:
Yeah, that is actually what the repacker script does!
It has precomplied objects and compiles/links them together to the final (new) zImage.
Click to expand...
Click to collapse
I guess you've got repacker from first Galaxy?
It won't work. SFX header you're trying to compile is for first galaxy. It has hardcoded addresses and they are not compatible with Galaxy S II. Toolchain is also for SGS as well (not sure if it still suitable for SGSII).
Take kernel source code and toolchain for SGSII and it will work.
Yah, well, I got the kernel to compile fresh from sources now, no need for a repacker anymore, I just go make zImage and be happycat
Someone knows how to repack it?
Maybe Chainfire or Pulser?
Agreed, Can someone explain the process in full? modyfying and repacking zImage gets 2mb+ less in size, what we are missing?
Grooby said:
Agreed, Can someone explain the process in full? modyfying and repacking zImage gets 2mb+ less in size, what we are missing?
Click to expand...
Click to collapse
Necro much?
rawat said:
necro much?
Click to expand...
Click to collapse
zombie thread wants braaaaiiiiiiinnnnnnnnnnnnzzzzzzzzzzzzzz!!!!!!
Looks like i raised death searching for answer lool
A few tried to make repackers for the I9100 - and failed.
Even less know how to actually do it - and don't share the knownledge.
The thing is, that the initramfs is linked into the zImage during compile time, so it can't simply be "snipped out" and "new one pasted in".
That's why I eventually ended up compiling the whole thing from sources.
It would certainly nice if someone like ChainFire could share how to do it.... but he's too worried about others rebuilding his rootkernel with other nametags on it.
HellcatDroid said:
A few tried to make repackers for the I9100 - and failed.
Even less know how to actually do it - and don't share the knownledge.
The thing is, that the initramfs is linked into the zImage during compile time, so it can't simply be "snipped out" and "new one pasted in".
That's why I eventually ended up compiling the whole thing from sources.
It would certainly nice if someone like ChainFire could share how to do it.... but he's too worried about others rebuilding his rootkernel with other nametags on it.
Click to expand...
Click to collapse
GitHub.com/xiaolu
Sent from my GT-I9100 using xda premium

help rebuilding/install CM10 kernel (I get a bootloop)

has anyone here rebuilt the CM10 nightly kernel before? I am trying to rebuild it and install it myself (which I've done on many other devices), but for some reason after installing my kernel I'm getting stuck in a bootloop.
I have a SGS3 AT&T, but from what I've read all US versions use a unified kernel. By digging through the Cyanogenmod github repositories, I found that this is the CM10 kernel:
https://github.com/CyanogenMod/android_kernel_samsung_d2
The kernel configuration that it ends up using is: cyanogen_d2_defconfig ... so to build the kernel I do:
Code:
make ARCH=arm clean
make ARCH=arm cyanogen_d2_defconfig
make -j2 ARCH=arm CROSS_COMPILE=arm-eabi-
Now, I need to create boot.img and pack the ramdisk. I extracted the ramdisk from one of the CM10 nightlies, and I do:
Code:
./mkbootfs ramdisk | gzip > ramdisk.gz
cp arch/arm/boot/zImage .
./mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "androidboot.hardware=qcom user_debug=31" -o boot.img --base 0x80200000 --pagesize 2048
I got the command line using unpackbootimg:
Code:
$ ../unpackbootimg -i boot.img
BOARD_KERNEL_CMDLINE androidboot.hardware=qcom user_debug=31
BOARD_KERNEL_BASE 80200000
BOARD_PAGE_SIZE 2048
Finally, I took the updater script from this kernel, replacing its boot.img with my boot.img, as well as placing my kernel modules in system/lib/modules. In the end, I have no created the following update zip file to flash in CWM. Feel free to download it and verify the updater script, however here is the updater code:
Code:
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
package_extract_dir("system", "/system");
unmount("/system");
assert(package_extract_file("boot.img", "/cache/boot.img"),
write_raw_image("/cache/boot.img", "/dev/block/mmcblk0p7"),
delete("/cache/boot.img"));
show_progress(0.100000, 0);
But like I said, whenever I go to install this kernel it just gives me a bootloop, so something doesn't seem right. I get no errors/warnings when building the kernel, I extracted the ramdisk correctly... can anyone pick out something I'm missing? maybe mkbootimg?
Thanks!
Why do you need to do this?
Sent from my SGH-I747 using xda app-developers app
because I'm creating a custom kernel, and I figured before I modified it I would just try a simple rebuild...
Look at my repo and match up everything or just use it whole and create the folders for Package and Ramdisk that it wants, then replace the toolchain/cross_compile that I use with the path of yours.
Build script:
https://github.com/ktoonsez/KT747-JB/blob/jellybean/build_d2att_aosp.sh
Alos replace your existing "mkbootfs" and "mkbootimg" files with mine.
thanks a bunch for the pointer to your scripts! I am now using your mkbootfs and mkbootimg, and I also noticed that you included the following in your mkbootimg, which I didn't:
Code:
--ramdiskaddr 0x81500000
So, I added this and now I actually boot but my screen is not working I get the Samsung logo, then the Samsung Galaxy SIII boot screen, then my screen never turns on. I am able to grab dmesg and logcat now though, so I am digging through to narrow down the problem as I continue to go through your scripts!
if I don't want to overclock with my kernel, can I skip including 00post-init.sh which runs these commands:
Code:
#Set governor items
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq;
echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $(date) END of post-init.sh
I was trying to jump on the bandwagon and build KT747 but I encounter the following errors:
Code:
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/piggy.gzip.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/lib1funcs.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/ashldi3.o: unknown CPU architecture
Anyone know why this is happening? I am using GCC 4.7 and the appropriate toolchain. More detailed log: http://pastebin.com/Kb3PWYtq
so I am still having issues where my phone goes through the entire boot process, but my screen does not re-activate after the Samsung Galaxy SIII logo. So I never end up seeing the Cyanogen animation.
Here are relevant logs:
No screen logcat: http://pastebin.com/W4v6Xk9g
No screen dmesg: http://pastebin.com/ydGtj216
With screen logcat: http://pastebin.com/DjENx2gE
With screen dmesg: http://pastebin.com/f3sAzjZa
The "with screen" cases are using the prebuilt CM10 nightlies
Rocket Nine said:
I was trying to jump on the bandwagon and build KT747 but I encounter the following errors:
Code:
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/piggy.gzip.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/lib1funcs.o: unknown CPU architecture
/home/trevor/programming/android/linaro4.7/bin/arm-eabi-ld: error: arch/arm/boot/compressed/ashldi3.o: unknown CPU architecture
Anyone know why this is happening? I am using GCC 4.7 and the appropriate toolchain. More detailed log: http://pastebin.com/Kb3PWYtq
Click to expand...
Click to collapse
where did you download your linaro 4.7 binaries from?
Components > Android > android-toolchain 4.7 (ICS, JB)
http://www.linaro.org/downloads/
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Rocket Nine said:
Components > Android > android-toolchain 4.7 (ICS, JB)
http://www.linaro.org/downloads/
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
Click to expand...
Click to collapse
thanks! So, in another thread ktoonsez said to use the :June 2012 build. That one seems to be from September. Here is the June link:
http://releases.linaro.org/12.06/co...12.06-3-2012-06-19_14-52-07-linux-x86.tar.bz2
using the June toolchain, the kernel almost builds entirely successfully until the last few links when I get these errors:
Code:
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
MODPOST 13 modules
Kernel: arch/arm/boot/Image is ready
CC arch/arm/mach-msm/dma_test.mod.o
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/mach-msm/msm-buspm-dev.mod.o
CC arch/arm/mach-msm/reset_modem.mod.o
CC crypto/ansi_cprng.mod.o
CC drivers/crypto/msm/qce40.mod.o
CC drivers/crypto/msm/qcedev.mod.o
CC drivers/crypto/msm/qcrypto.mod.o
CC drivers/input/evbug.mod.o
CC drivers/media/video/gspca/gspca_main.mod.o
CC drivers/net/wireless/bcmdhd/dhd.mod.o
CC drivers/net/wireless/btlock/btlock.mod.o
CC drivers/scsi/scsi_wait_scan.mod.o
CC drivers/spi/spidev.mod.o
LD [M] arch/arm/mach-msm/dma_test.ko
CC arch/arm/boot/compressed/misc.o
LD [M] arch/arm/mach-msm/msm-buspm-dev.ko
LD [M] arch/arm/mach-msm/reset_modem.ko
LD [M] crypto/ansi_cprng.ko
LD [M] drivers/crypto/msm/qce40.ko
LD [M] drivers/crypto/msm/qcedev.ko
LD [M] drivers/crypto/msm/qcrypto.ko
LD [M] drivers/input/evbug.ko
LD [M] drivers/media/video/gspca/gspca_main.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
CC arch/arm/boot/compressed/decompress.o
LD [M] drivers/net/wireless/btlock/btlock.ko
LD [M] drivers/scsi/scsi_wait_scan.ko
LD [M] drivers/spi/spidev.ko
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/piggy.gzip.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
LD arch/arm/boot/compressed/vmlinux
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
hedpe said:
using the June toolchain, the kernel almost builds entirely successfully until the last few links when I get these errors:
Code:
SYSMAP System.map
SYSMAP .tmp_System.map
OBJCOPY arch/arm/boot/Image
Building modules, stage 2.
MODPOST 13 modules
Kernel: arch/arm/boot/Image is ready
CC arch/arm/mach-msm/dma_test.mod.o
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/mach-msm/msm-buspm-dev.mod.o
CC arch/arm/mach-msm/reset_modem.mod.o
CC crypto/ansi_cprng.mod.o
CC drivers/crypto/msm/qce40.mod.o
CC drivers/crypto/msm/qcedev.mod.o
CC drivers/crypto/msm/qcrypto.mod.o
CC drivers/input/evbug.mod.o
CC drivers/media/video/gspca/gspca_main.mod.o
CC drivers/net/wireless/bcmdhd/dhd.mod.o
CC drivers/net/wireless/btlock/btlock.mod.o
CC drivers/scsi/scsi_wait_scan.mod.o
CC drivers/spi/spidev.mod.o
LD [M] arch/arm/mach-msm/dma_test.ko
CC arch/arm/boot/compressed/misc.o
LD [M] arch/arm/mach-msm/msm-buspm-dev.ko
LD [M] arch/arm/mach-msm/reset_modem.ko
LD [M] crypto/ansi_cprng.ko
LD [M] drivers/crypto/msm/qce40.ko
LD [M] drivers/crypto/msm/qcedev.ko
LD [M] drivers/crypto/msm/qcrypto.ko
LD [M] drivers/input/evbug.ko
LD [M] drivers/media/video/gspca/gspca_main.ko
LD [M] drivers/net/wireless/bcmdhd/dhd.ko
CC arch/arm/boot/compressed/decompress.o
LD [M] drivers/net/wireless/btlock/btlock.ko
LD [M] drivers/scsi/scsi_wait_scan.ko
LD [M] drivers/spi/spidev.ko
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/piggy.gzip.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/ashldi3.o
LD arch/arm/boot/compressed/vmlinux
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/misc.o and output
/home/owner/Documents/android-wmon/core/linaro-android-toolchain/bin/arm-eabi-ld: error: DIV usage mismatch between arch/arm/boot/compressed/lib1funcs.o and output
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
Click to expand...
Click to collapse
I am having the same errors now but this post apparently has a fix. Trying now.
Rocket Nine said:
I am having the same errors now but this post apparently has a fix. Trying now.
Click to expand...
Click to collapse
thanks! tried that fix but getting some memcpy issue despite string.h being included... still digging!
hedpe said:
thanks! tried that fix but getting some memcpy issue despite string.h being included... still digging!
Click to expand...
Click to collapse
Try replacing your arch/arm/boot/compressed/Makefile with this http://pastebin.com/J0m6ka26
It compiles successfully now :good:
Rocket Nine said:
Try replacing your arch/arm/boot/compressed/Makefile with this http://pastebin.com/J0m6ka26
It compiles successfully now :good:
Click to expand...
Click to collapse
Thanks bud! I'm having one last error, not sure if it was an issue with your paste:
Code:
/home/owner/Documents/android-wmon/core/KT747-JB/arch/arm/boot/compressed/Makefile:112: *** missing separator. Stop.
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
Here is the relevant part of the Makefile:
Code:
$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
$(call cmd,shipped) <----- this is line 112
The odd thing is that this exists in the original Makefile unmodified
----
EDIT: Sorry! I got this working now, it was an issue with tabs/spaces from copying and pasting
I believe that is caused by wrong indentation. Did you copy the code from the webpage? My browser (Chrome) copies the tabs as spaces. Try downloading the paste and flat out replace the file with it.
I copied the META-INF folder out of a KT747 zip to my build and according to TWRP it flashes successfully. Now we are on the same page with the boot loop.
Rocket Nine said:
I believe that is caused by wrong indentation. Did you copy the code from the webpage? My browser (Chrome) copies the tabs as spaces. Try downloading the paste and flat out replace the file with it.
I copied the META-INF folder out of a KT747 zip to my build and according to TWRP it flashes successfully. Now we are on the same page with the boot loop.
Click to expand...
Click to collapse
Thanks a bunch! I got it to build successfully.
I'm officially dumbfounded. I no longer get the bootloop in either one of my kernels (stock CM10 or the KT747 rebuild), but in both cases my phone boots without the display working. I have NO clue why my display doesn't work when I rebuild these kernels.
Let me help you get your bootloop fixed though first... then I'm curious if your screen will work.
I think what was causing my bootloop was a lack of this parameter when using mkbootfs:
Code:
--ramdiskaddr 0x81500000
However, if you're using ktoosez script, that should already be included. Also, make sure to clear your cache, dalvik, and fix permissions.
also, come to #cyanogenmod on irc.freenode.net, we might be able to work through this more quickly there
finalllyyyyy i have a display working! Apparently I was using too old of a version of userspace that did not match with my kernel. So my nightly was too old with the kernel rebuilds I was using. Let me know if you still have issues.

[TOOL] Honor 6 Kernel Toolbox

To make our lifes a little bit easier, i've created a "toolbox" for linux which allows you to easily brew custom kernels.
It includes kernel sources (fixed to build properly), arm-eabi-4.7 toolchain, a stock ramdisk, mkbootimg and a handy script which does the dirty job for you.
Please make sure that bash, git, repo, cpio and gzip packages are installed on your system!
How to get it?
Code:
mkdir h60
cd h60
repo init -u https://github.com/codeworkx/h60.git -b kk
repo sync
Usage:
Code:
./build.sh bootimage l04 -> creates boot.img for the specified variant.
./build.sh kernel -> builds just the zImage
./build.sh unpack boot.img -> unpacks boot/recovery images
./build.sh clean -> runs mrproper
Let it rain custom kernels!
Have fun!
Update:
fixed some problems
added colored output
added unpack function
added support for l02, l04, l12
Update:
updated to latest available B310 sources
Update:
added L04 ramdisk
Hi @codeworkx
Can you build a stock kernel for h60-l04 with add only doubletap2wake and sweep2wake ?
Many users would like this.
Thanks and sorry for my bad english!
Steve Giordano said:
Hi @codeworkx
Can you build a stock kernel for h60-l04 with add only doubletap2wake and sweep2wake ?
Many users would like this.
Thanks and sorry for my bad english!
Click to expand...
Click to collapse
Omg yes! That would be awesome to have :fingers-crossed:
Steve Giordano said:
Hi @codeworkx
Can you build a stock kernel for h60-l04 with add only doubletap2wake and sweep2wake ?
Many users would like this.
Thanks and sorry for my bad english!
Click to expand...
Click to collapse
Probably but don't have time.
Sent from my Nexus 5 using XDA Free mobile app
Hi @codeworkx i have this error:
Code:
WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function `store_config':
/home/stefano/Scrivania/h60_kernel_toolbox-master/kernel/drivers/huawei/ext_modem/viacbp82d/spi/rnic_adapter.c:102: undefined reference to `RNIC_ConfigRmnetStatus'
make: *** [vmlinux] Errore 1
~/Scrivania/h60_kernel_toolbox-master
Failed to build zImage!
[email protected]:~/Scrivania/h60_kernel_toolbox-master$
Why?
Happens when the modem driver fails to build. Did the python script fail? You have to use python2.
Sent from my Nexus 5 using XDA Free mobile app
so with this tool i can edit/create kernel for my Honor 6?
TheTigerDeveloper said:
so with this tool i can edit/create kernel for my Honor 6?
Click to expand...
Click to collapse
Sure
Sent from my Nexus 5 using XDA Free mobile app
@codeworkx I got this error while trying to compile the l02 kernel:
Code:
MODPOST vmlinux.o
WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function `store_config':
/home/chris/Desktop/h60_kernel_toolbox-master/kernel/drivers/huawei/ext_modem/viacbp82d/spi/rnic_adapter.c:102: undefined reference to `RNIC_ConfigRmnetStatus'
make: *** [vmlinux] Error 1
~/Desktop/h60_kernel_toolbox-master
Failed to build zImage!
I saw that is happens when the modem driver failed to build. But how I can solve it...? Thanks.
root-expert said:
@codeworkx I got this error while trying to compile the l02 kernel:
Code:
MODPOST vmlinux.o
WARNING: modpost: Found 6 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function `store_config':
/home/chris/Desktop/h60_kernel_toolbox-master/kernel/drivers/huawei/ext_modem/viacbp82d/spi/rnic_adapter.c:102: undefined reference to `RNIC_ConfigRmnetStatus'
make: *** [vmlinux] Error 1
~/Desktop/h60_kernel_toolbox-master
Failed to build zImage!
I saw that is happens when the modem driver failed to build. But how I can solve it...? Thanks.
Click to expand...
Click to collapse
Make sure that you're using python2.
codeworkx said:
Make sure that you're using python2.
Click to expand...
Click to collapse
I'm using python 2.7.6
root-expert said:
I'm using python 2.7.6
Click to expand...
Click to collapse
Then post the error message of modem build.
It clearly says what's going wrong.
codeworkx said:
Then post the error message of modem build.
It clearly says what's going wrong.
Click to expand...
Click to collapse
I think this is it:
Code:
drivers/built-in.o: In function `store_config':
/home/chris/Desktop/h60_kernel_toolbox-master/kernel/drivers/huawei/ext_modem/viacbp82d/spi/rnic_adapter.c:102: undefined reference to `RNIC_ConfigRmnetStatus'
root-expert said:
I think this is it:
Code:
drivers/built-in.o: In function `store_config':
/home/chris/Desktop/h60_kernel_toolbox-master/kernel/drivers/huawei/ext_modem/viacbp82d/spi/rnic_adapter.c:102: undefined reference to `RNIC_ConfigRmnetStatus'
Click to expand...
Click to collapse
No it's not. That's an error from kernel build.
And this error happens because the modem build way before the kernel build even starts has failed.
codeworkx said:
No it's not. That's an error from kernel build.
And this error happens because the modem build way before the kernel build even starts has failed.
Click to expand...
Click to collapse
And how can I find that...? I should rebuild the kernel or check the output log...?
root-expert said:
And how can I find that...? I should rebuild the kernel or check the output log...?
Click to expand...
Click to collapse
Run this:
Code:
pushd kernel/drivers/vendor/hisi/build
python obuild.py product=hi3630_udp acore-oam_ps -j${THREADS}
popd
codeworkx said:
Run this:
Code:
pushd kernel/drivers/vendor/hisi/build
python obuild.py product=hi3630_udp acore-oam_ps -j${THREADS}
popd
Click to expand...
Click to collapse
I believe it is right: http://pastebin.com/SAavAM1c

Categories

Resources