• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Q] [GT-P3100][Kernel] Compiled kernel does not boot!

Search This thread

cks1119

Member
Feb 6, 2013
12
0
Hi,

I'm trying to boot my galaxy tab2 7 with compiled kernel.


First, I downloaded kernel source from http://opensource.samsung.com.

I download GT-P3100_JB_Opensource_Update2.zip file and extract it.

To compile, I followed ketut.kumajaya's thread (http://forum.xda-developers.com/show....php?t=2086996)

I build only kernel, not other modules. Compile was done without problem.


And I extract boot.img from Stock ROM file downloaded from samsung-updates.com (http://samsung-updates.com/device/?id=GT-P3100).

Stock ROM version is P3100XXCLJ3 (that's my device's baseband version).

I unpacked boot.img and I got boot.img-kernel.gz and boot.img-ramdisk.cpio.gz.
(To make sure unpack/repack tool is working properly, I simply unpack stock boot.img and repack it. And the new boot.img was working properly. So I assume my unpack/repack tool have no problem).

So, I replace boot.img-kernel.gz with zImage and repack it.

But this time new boot image does not working (Device stuck in boot logo)

What did I done wrong? Any body help! I've been stuck with this for a week now...

(When stock ROM is flashed, Kernel version in device info is "3.0.31-595683"
 

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,132
Bekasi
You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
#define PVRVERSION_BUILD 2166536
to
#define PVRVERSION_BUILD 2120756
and
#define PVRVERSION_BUILD_HI 216
#define PVRVERSION_BUILD_LO 6536
to
#define PVRVERSION_BUILD_HI 212
#define PVRVERSION_BUILD_LO 0756
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!
 
  • Like
Reactions: cks1119

cks1119

Member
Feb 6, 2013
12
0
necesriverua

You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
to

and
to
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!

Many thanx.
I really appreiciate it.
I will try this right away.
 

cks1119

Member
Feb 6, 2013
12
0
You must compile pvrsrvkm kernel module as I mentioned in http://forum.xda-developers.com/showthread.php?t=1859227 and then you can use KK-Boot 0.5.x core as your flashable zip template (have PowerVR 3D driver binary inside). If you decide to keep the stock PowerVR binary, change:
to

and
to
in pvrversion.h
Do not forget to copy pvrsrvkm_sgx540_120.ko to /system/lib/modules (backup the stock modules first!)
For trouble free development, I recommend you to use GT-P3110_JB_Opensource.zip, apply all my kernel patch and use my android_espresso_omap4430_r04_blackhawk_defconfig as your kernel config file. Good luck!

Dear ketut,

Because I'm behind firewall, I cannot download pvrsrvkm kernel source.

Frankly, I have very little knowledge about android system. so I'm not sure I understand your guide correctly..

What I've done is as follows:

1. Download GT-P3110_JB_Opensource

2. Apply your patch from http://forum.xda-developers.com/showthread.php?t=1859227

3. Modify PVRVERSION_BUILD and PVRVERSION_BUILD_HI and PVRVERSION_BUILD_LOW in drivers/gpu/pvr/pvrversion.h (kernel source)

4. Apply android_espresso_omap4430_r04_blackhawk_defconfig and Build (using arm-2010q1-202..)

5. Repack zImage with ramdisk.cpio.gz (extracted from stock rom file)

6. Replace boot.img in your kkboot-0.5.2-core-p31xx.zip with repacked boot.img

7. Apply new kkboot.zip in CWM and installation failed and aborted.

Am I totally in wrong direction? What am I missing here?

I sincerely ask your help.

(I found that when build kernel after your patch, additional module files (.ko) are generated.

Should I do something with that?)
 

ketut.kumajaya

Recognized Developer
Apr 28, 2011
4,935
14,132
Bekasi
Dear ketut,

Because I'm behind firewall, I cannot download pvrsrvkm kernel source.

Frankly, I have very little knowledge about android system. so I'm not sure I understand your guide correctly..

What I've done is as follows:

1. Download GT-P3110_JB_Opensource
Correct.
Correct, all my patch from 01-07.
3. Modify PVRVERSION_BUILD and PVRVERSION_BUILD_HI and PVRVERSION_BUILD_LOW in drivers/gpu/pvr/pvrversion.h (kernel source)
Incorrect, nothing to do with pvr driver inside the kernel source, it's useless. You can download eurasia_km.tgz from http://www.mediafire.com/?m9te7t4rosp131d . Do not modify PVRVERSION if you plan to use my kkboot boot image.
4. Apply android_espresso_omap4430_r04_blackhawk_defconfig and Build (using arm-2010q1-202..)
Code:
export CROSS_COMPILE='/opt/toolchains/arm-2010q1/bin/arm-none-linux-gnueabi-'
export LDFLAGS=''
export CFLAGS=''
export SUBARCH=arm
export ARCH=arm
make mrproper
make android_espresso_omap4430_r04_blackhawk_defconfig
make -j4
5. Repack zImage with ramdisk.cpio.gz (extracted from stock rom file)
Incorrect, use kkboot ramdisk for now.
6. Replace boot.img in your kkboot-0.5.2-core-p31xx.zip with repacked boot.img
Correct.
7. Apply new kkboot.zip in CWM and installation failed and aborted.
Try to unpack and repack kkboot without modification, is it works?
Am I totally in wrong direction? What am I missing here?

I sincerely ask your help.

(I found that when build kernel after your patch, additional module files (.ko) are generated.

Should I do something with that?)
Unpack kkboot, you will see a lot of modules inside system/lib/modules ;)
 
  • Like
Reactions: cks1119

cks1119

Member
Feb 6, 2013
12
0
I downloaded your tool in http://forum.xda-developers.com/showthread.php?t=1241005

But while unpacking, it says below:

Code:
BOARD_KERNEL_CMDLINE console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M
BOARD_KERNEL_BASE 80000000
BOARD_PAGE_SIZE 00000800

gzip: ../kkboot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive

Is it require special tools to unpack kkboot image?
 

cks1119

Member
Feb 6, 2013
12
0
Forgot to mention, my ramdisk packed in lzo format :) You need lzop application to unpack it.

You mean only ramdisk?

If so, as my understanding, unpacking boot.img in kkboot-0.5.2 and repack without any change, should be working

whether your ramdisk is packed with lzo or not.

But when I did it, I still got installation fail.
(I used the unpackbootimg in blackhawk tool from http://forum.xda-developers.com/showthread.php?t=1241005)

By the way,

I've searching about lzop compressed ramdisk and found this: https://github.com/trevd/aos-tools/blob/master/scripts/unpack-ramdisk.sh

And with this method, I could unpack ramdisk file.

Code:
cat boot.img-ramdisk.gz | lzop -d | cpio -i

But, I think this is not the point.
 

cks1119

Member
Feb 6, 2013
12
0
Forgot to mention, my ramdisk packed in lzo format :) You need lzop application to unpack it.

I simply unpack and repack boot.img from kkboot-0.5.2-core-p31xx.zip

with boot.img-tools in http://forum.xda-developers.com/showthread.php?t=1241005

Then change original boot.img with repacked one and make new zip file in external SD card.

When I go to CWM recovery and try to install new zip file, then I got following message:

Code:
     -Extracting files
   set_perm : some changes failed
   E:Error in /external_sd/newfile.zip
   (Status 7)
   Installation aborted

I've been trying other tools that I could find but still does not working :crying:
 

Top Liked Posts