[Sony Xperia P, U, Sola, Go] Divaksh:
Thanks man.. :) but still lil bit confused.. :D

I have found the blocks, So is this ramdisk? (Just need to hit ENTER)

http://img547.imageshack.us/img547/7374/ramdisk.png

And then I'm supposed to save it in new file and name it

ramdisk.gz

. right ?

But before it I should remove this selected block?

http://img802.imageshack.us/img802/1931/remove.png

EDIT 1:

Is

error: cannot open directory './initr'

my problem??

error: cannot open directory './initr'
44+0 records in
44+0 records out
44 bytes (44 B) copied, 0.000261765 s, 168 kB/s
99+0 records in
99+0 records out
99 bytes (99 B) copied, 0.000482324 s, 205 kB/s
309310+1 records in
309310+1 records out
4948966 bytes (4.9 MB) copied, 1.39095 s, 3.6 MB/s

EDIT 2: I figured out the things and what I found is

Ramdisk size is 1.8 MB

zImage size is 5MB

Original boot.img size is 6.8 MB

The boot.img I made size is 5 MB(after merging with ramdisk, elf3, cmdline and zImage).

initrd.gz size is 20 bytes

So its clear ramdisk is missing from my boot.img. What can be the reason master? Is the problem path related in makebootimg.sh? :banghead:

EDIT 3

my makebootimg.sh

#!/bin/bash

rm -rf /home/divaksh/android/sony/sola/cm9/tools/modules/*
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/arch/arm/boot/zImage /home/divaksh/android/sony/sola/cm9/tools/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cp -fr /home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*/*/*/*.ko /home/divaksh/android/sony/sola/cm9/tools/modules/
cd /home/divaksh/android/sony/sola/cm9
/home/divaksh/android/tools/mkbootfs ./initr | gzip > initrd.gz
cp -fr initrd.gz tools/initrd.gz
cd tools
python mkelf.py -o kernel.elf zImage@0x00008000 initrd.gz@0x01000000,ramdisk cmdline@cmdline
dd if=kernel.elf of=kernel.elf.bak bs=1 count=44
printf "\x04" >04
cat kernel.elf.bak 04 >kernel.elf.bak2
rm -rf kernel.elf.bak
dd if=kernel.elf of=kernel.elf.bak bs=1 skip=45 count=99
cat kernel.elf.bak2 kernel.elf.bak >kernel.elf.bak3
rm -rf kernel.elf.bak kernel.elf.bak2
cat kernel.elf.bak3 elf.3 >kernel.elf.bak
rm -rf kernel.elf.bak3
dd if=kernel.elf of=kernel.elf.bak2 bs=16 skip=79
cat kernel.elf.bak kernel.elf.bak2 >kernel.elf.bak3
rm -rf kernel.elf.bak kernel.elf.bak2 kernel.elf 04
mv kernel.elf.bak3 boot.img

now getting this error

divaksh@ubuntu:~$ cd ~/android/tools
divaksh@ubuntu:~/android/tools$ sh makebootimg.sh
cp: cannot stat `/home/divaksh/android/sony/sony_kernel/kernel/*.ko': No such file or directory
cp: cannot stat `/home/divaksh/android/sony/sony_kernel/kernel/*/*.ko': No such file or directory
cp: cannot stat `/home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*.ko': No such file or directory
cp: cannot stat `/home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*/*/*.ko': No such file or directory
cp: cannot stat `/home/divaksh/android/sony/sony_kernel/kernel/*/*/*/*/*/*/*/*.ko': No such file or directory
error: cannot open directory './initr'
Traceback (most recent call last):
File "mkelf.py", line 182, in <module>
main(sys.argv[1:])
File "mkelf.py", line 159, in main
size = os.path.getsize(seg.file)
File "/usr/lib/python2.7/genericpath.py", line 49, in getsize
return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: 'cmdline'
dd: opening `kernel.elf': No such file or directory
cat: kernel.elf.bak: No such file or directory
dd: opening `kernel.elf': No such file or directory
cat: kernel.elf.bak: No such file or directory
cat: elf.3: No such file or directory
dd: opening `kernel.elf': No such file or directory
cat: kernel.elf.bak2: No such file or directory
divaksh@ubuntu:~/android/tools$

My directory structure(I don't know how to tell but I know you will understand) :) :

tools >> /home/divaksh/android/tools

zImage >> /home/divaksh/android/sony/sony_kernel/kernel/arch/arm/boot

ramdisk,cmdline, elf3 >> /home/divaksh/android/sony/sola/cm9