Good morning. I'm trying to build the kernel for the M4 aqua, but although sony didn't include it in the guides for doing so, I can see the files inside the tulip in sony's github repository. Then, I guess that it's possible to build a kernel from sony's sources. If anyone did so, could please post and briefly describe the steps? More concretely, the line with the arguments for mkbootimg (or the necessary tool). Thanks in advance
alguien24 said:
Good morning. I'm trying to build the kernel for the M4 aqua, but although sony didn't include it in the guides for doing so, I can see the files inside the tulip in sony's github repository. Then, I guess that it's possible to build a kernel from sony's sources. If anyone did so, could please post and briefly describe the steps? More concretely, the line with the arguments for mkbootimg (or the necessary tool). Thanks in advance
Click to expand...
Click to collapse
You can use the same instruction as How to build AOSP Marshmallow for unlocked Xperia devices to download the source.
attached is the sony.xml file you can use to limit to download only tulip builds.
then you can use the follow in commands
$# cd android
android $# export CROSS_COMPILE=/android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
add the full path to the above CROSS_COMPILE=/mnt/../../../android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
android $# cd kernel/sony/msm/
android/kernel/sony/msm $# make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE aosp_kanuti_tulip_defconfig
android/kernel/sony/msm $# make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j1
if make is successful, copy the kernel from arch\arm64\boot folder and past into device/sony/common-kernel
and build your full aosp or only boot.img with android$# make -j1 bootimage
RohitBopnna said:
You can use the same instruction as How to build AOSP Marshmallow for unlocked Xperia devices to download the source.
attached is the sony.xml file you can use to limit to download only tulip builds.
then you can use the follow in commands
$# cd android
android $# export CROSS_COMPILE=/android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
add the full path to the above CROSS_COMPILE=/mnt/../../../android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
android $# cd kernel/sony/msm/
android/kernel/sony/msm $# make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE aosp_kanuti_tulip_defconfig
android/kernel/sony/msm $# make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j1
if make is successful, copy the kernel from arch\arm64\boot folder and past into device/sony/common-kernel
and build your full aosp or only boot.img with android$# make -j1 bootimage
Click to expand...
Click to collapse
Thanks a lot for the answer! Today, I had my computer setup with everything needed, with sony's guide. I've only made one modification. Inside the kanuti folder (~/android/device/sony/kanuti/rootdir) there's a file called fstab.kanuti. I changed the /data mountpoint to the second partition in the sdcard (in order to get more internal space, if I make it work someday I will post it inmediately ).Then, after carefully following the steps you gave me, I finally got the boot.img. Flashed it with fastboot flash boot boot.img, but when I powered the phone on, after half a second it shut down. Tried more than once with the same result. I flashed again the original kernel, and it came back to live with no more problems. Do you (or anyone) know where the problem could be? I also saw that the boot.img file weighs 9 MB, while the original kernel.elf extracted from the ftf takes 20 MB of space. Is this usual?
alguien24 said:
Thanks a lot for the answer! Today, I had my computer setup with everything needed, with sony's guide. I've only made one modification. Inside the kanuti folder (~/android/device/sony/kanuti/rootdir) there's a file called fstab.kanuti. I changed the /data mountpoint to the second partition in the sdcard (in order to get more internal space, if I make it work someday I will post it inmediately ).Then, after carefully following the steps you gave me, I finally got the boot.img. Flashed it with fastboot flash boot boot.img, but when I powered the phone on, after half a second it shut down. Tried more than once with the same result. I flashed again the original kernel, and it came back to live with no more problems. Do you (or anyone) know where the problem could be? I also saw that the boot.img file weighs 9 MB, while the original kernel.elf extracted from the ftf takes 20 MB of space. Is this usual?
Click to expand...
Click to collapse
the latest kernel that sony has implemented image.gz-dtb is a compressed kernel with the DTB combined, and this needs bootloader level gzip feature to unzip the kernel and load, which is not present today in our bootloaders. After building your kernel, Use the uncompressed kernel (image file and dtb) to build your boot image with old way, you may have to make changes in you boot build to indicate uncompressed kernel.
RohitBopnna said:
the latest kernel that sony has implemented image.gz-dtb is a compressed kernel with the DTB combined, and this needs bootloader level gzip feature to unzip the kernel and load, which is not present today in our bootloaders. After building your kernel, Use the uncompressed kernel (image file and dtb) to build your boot image with old way, you may have to make changes in you boot build to indicate uncompressed kernel.
Click to expand...
Click to collapse
I'm not really experienced in building kernels, I'm trying to learn a bit with this stuff I'm doing... And this phone hasn't got a lot of information yet. Could you please tell me what you mean with building it the old way?
LOL
You are in the stock rom, aren't you?
So, why would you try building an aosp kernel (which is f**ked up) in your stock rom?
You have to build from kernel-copyleft
There is also a tutorial from sony developer world
http://developer.sonymobile.com/kno...h-a-linux-kernel-from-sony-copyleft-archives/
I think you have to find the right defconfig and change arm to arm64 and aarch64 when necessary
RohitBopnna said:
the latest kernel that sony has implemented image.gz-dtb is a compressed kernel with the DTB combined, and this needs bootloader level gzip feature to unzip the kernel and load, which is not present today in our bootloaders. After building your kernel, Use the uncompressed kernel (image file and dtb) to build your boot image with old way, you may have to make changes in you boot build to indicate uncompressed kernel.
Click to expand...
Click to collapse
Now I got what you explained me. I've been looking for information, and I thought that after running make, the dtb file should be in the boot folder, but there I can only find the image file. How can I create the dtb file separately from the dts?
dani020110 said:
LOL
You are in the stock rom, aren't you?
So, why would you try building an aosp kernel (which is f**ked up) in your stock rom?
You have to build from kernel-copyleft
There is also a tutorial from sony developer world
http://developer.sonymobile.com/kno...h-a-linux-kernel-from-sony-copyleft-archives/
I think you have to find the right defconfig and change arm to arm64 and aarch64 when necessary
Click to expand...
Click to collapse
Now I'm not in stock, I've flashed the AOSP rom available in this post: http://forum.xda-developers.com/m4-aqua/development/5-0-aosgp-based-stock-t3262330. So that shouldn't be a problem, right?
aosgp?? a stock rom with aosp style dude,,base on stock not a real aosp
Sent from my E2353 using XDA-Developers mobile app
Related
Hi,
i downloaded from opensource.samsung.c_om source code of S5830 firmware, compiled the kernel and i cannot flash it to the phone, after compilig there is two different files zImage has 2,9MB and Image has 6.8MB, i use CWM and function flash kernel, but after flashing it Phone doesnt boot, what iam doing wrong?
Or what kind of source i may use for gingerbread 2.3.3??
For compiling i use: Ubuntu distribution.
Use adb for the 6MB one and use CWM Manager for the 2MB one .
Sent from my GT-S5830 using XDA App
Yes, but if i flash "2MB" kernel with CWM using function flash kernel, phone has a boot loop and never don't boot.
u need to use the zimage file.. unpack samsungs default kernel to get ramdisk, and repack the ramdisk with the zimage file. but ur kernel need to have local version matching the module in the ramdisk, or it wouldnt boot.
How i can do it? Im doing it first time
because u already successfully compiled a kernel, i assume u know linux workaround.
first read
http://forum.xda-developers.com/showthread.php?t=1173427 to unpack the samsung default kernel.
then cd into the module dir which is ramdisk/lib/modules and issue this command
Code:
strings fsr.ko | grep vermagic
and it shoud give some output eg
Code:
vermagic=2.6.35.7-perf-CL382966 preempt mod_unload ARMv6
take note of the local numbers, in my case above its "-perf-CL382966".
then u need to edit the kernel config file, which is arch/arm/configs/cooper_rev03_defconfig. search for this string
Code:
CONFIG_LOCALVERSION="-perf"
and edit it so it matched the local version of the module from the ramdisk eg
Code:
CONFIG_LOCALVERSION="-perf-CL382966"
now compile ur kernel. take the result zImage file and repack it back with the ramdisk u unpack earlier.
Oh, thanx a lot, now i compiling new kernel, but after i unpack my old boot.img and watch into ramdisk, there is no file called zImage :/
if u read carefully the link i gave u earlier, u should know that its the boot.img-kernel file. replace it with ur compiled zimage file.
I do exactly what u wrote, than i flash boot.img with odin as "PDA" but phone has in the boot loop again
File: http://www.earth-project.ic.cz/CODE.tar
what did u edit in the kernel? first u should try to compile plain default without any editing to make sure it even boot.
and u need to compile using the defconfig u edited
Code:
make cooper_rev03_defconfig
make
or just
Code:
./make_kernel_GT-S5830.sh
I did't edit anything, i compile only source what i DL from samsung source, but old bootimg have 6,1MB and my 5,9, is that problem?
size is not a problem at all. the size of my highly optimize kernel after compile is just 2.3mb, after repack with ramdisk is just 5.3mb. it boot just fine. maybe u download wrong source? use froyo kernel source for froyo rom, and gb kernel source for gb rom. dont mismatched.
I use: GT-S5830_S5570_EUR_OpenSource.zip from: https://opensource.samsung.com/
For: S5830XEKPH Firmware - Gingerbread 2.3.3.
I would really like, if you can tell me what kind of software and kernel source i may use.
see, thats the problem. ur compiling froyo kernel for gb rom.
use the GT-S5570_S5670_S5830_Opensource_GB.zip or GT-S5830_Opensource_GB.zip. both for gb. personally i use the second one. and toolchain use Sourcery G++ Lite 2011.03-42 for ARM EABI
THX!! I will test it! )
Ok, that is better but not too much, now iam stucked on the screen with text "GALAXY ACE" "GT-S58930" .... i wait for aprox. 30 minutes and nothing happen. :/
Killercek said:
Ok, that is better but not too much, now iam stucked on the screen with text "GALAXY ACE" "GT-S58930" .... i wait for aprox. 30 minutes and nothing happen. :/
Click to expand...
Click to collapse
u didnt edit anything rite? if u just compile the stock kernel source with just modifying local version in config file, it should boot.
maybe u should install qtadb and look at the logcat while it boot, and if it stuck, look for the last line in logcat.
I see only that:
20:53:55.859 exec '/system/bin/sh' failed: No such file or directory 2 2) -
Oh, iam on windows i don't have linux computer here, iam compiling on my server and i cannot connect phone on it
that error indicate that the module in ramdisk mismatch with the kernel local version. check again if the module local version matched with the kernel local version in the defconfig file.
THX it working!
INTRODUCTION
So we all know dsixda's XDA ROM Kitchen
Then how about a kitchen for Kernels ??
What started out just as my personal directory where I kept all my kernel and ramdisk tinkering scripts, has now turned into a project (which is far from finished right now )
This does NOT enable you to compile the kernel binary (aka zImage).
This enables you to edit ramdisk and change bootsplash images and helps kernel developers to deploy their compiled kernel in a usable form.
FEATURES
As of now what we can do with the Kernel Kitchen is
Fully menu driven interface (like dsixda kitchen)
Extract zImage and ramdisk from boot.img file
Create boot.img from zImage and ramdisk
Extract zImage and ramdisk from any ftf file that contains kernel.sin (Xperia 2010, 2011, 2012)
Create flashable ftf from zImage and ramdisk (Xperia 2010 only)
Create kernel.sin from zImage and Ramdisk and also split kernel.sin into zimage and ramdisk
Extract zImage, ramdisk and its contents from kernel.elf (Xperia 2012)
Create kernel.elf from ramdisk, zImage (and RPM) - for Xperia 2012
Create compressed ramdisk binary from ramdisk folder
Extract ramdisk files from ramdisk binary
Convert png image to rle format (used in android boot splash images)
Convert rle boot splash to png file (so that you can edit it)
Proposed upcoming features
Automatic script to change boot splash in a kernel with your favourite png file
STYLE CODE :
bold are supported only in linux
italics are supported in linux and windows+cygwin
underline are supported in windows native (without cygwin)
(if more than one style is used, it supports all respective platforms)
WARNING !!!!
[SIZE=+1]Please be well informed that whenever you distribute/redistribute a kernel zImage or the whole boot.img that contains the zImage or the kernel in any form in which it contains the compiled zImage, you MUST provide the option to view it's sources or else it'll be a major violation of GPL (General Public License) which governs the Linux kernel.
If you are using a compiled kernel made available by some other dev, then you are SUPPOSED TO mention it clearly and provide a link back to the original location from where you got the kernel (original thread) and also the sources of that kernel
If anyone uses this tool to unpack/repack a kernel and redistribute it publicly on xda (or any other website) then it's his responsibility to maintain proper credits and acknowledgement of works of original developers and also it's his/her responsibility to comply with the GPL[/SIZE]
A NOTE OF ADVICE
[SIZE=+1]I would like to mention here that this kitchen was made with two purposes in mind.
1. For someone who already knows how to do all this complicated ****, but wants a tool of convenience to do it automatically
2. For people who do not know much about custom kernels but want to make minor changes to ramdisk (making it insecure, or changing the bootlogo) for their PERSONAL use.
This tool is NOT meant to be used to repackage works of other developers and pass them on as your work.
In any case, if you want to redistribute a kernel created using my tool, then I suggest you to read the WARNING above once again all over, and also properly read the GPL v2 (link here) and specifically section 3 of GPL
[/SIZE]
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too
Some portions of the kitchen have support for native windows (without even cygwin)
Rest all requirements are mentioned in the readme
WHAT ARE ITS USES ?
1.The primary purpose (for which this project started out in the first place) is to provide a easy kernel deployment tool for wannabe kernel devs.
A lot of us can compile a kernel from source but that is just the zImage and cannot be used as such on the phone. We need to package it with a ramdisk ad deploy it thorough a proper method (flashtool for Xperia, ODIN for samsund, and fastboot for other phones)
2.You canedit ramdisk properties (by editing default.prop)
Changing ro.secure=1 to ro.secure=0 makes your ramdisk insecure and enables easy root access 3.The most immediate and popular use that i can see right now is changing the boot logo to your liking
the boot logo is called logo.rle or initlogo.rle and is placed in the root of ramdisk folder.
When you split kernel, you can find the rle file which you can convert into png, do necessary editing and convert back into rle and pack up the ramdisk and create a new kernel
4.Other than that, you can change the recovery system
for eg. you can include Doom's Touch recovery system inside your favourite kernel
or you can include the xRecovery inside CM7 kernel so that you can flash amend zips.
Changing the recovery is ofcourse a little more complicated for average users, and i'll write a short tuto for that soon enough DOWNLOAD AND USAGE
The sources can be found on www.github.com/championswimmer/kernel-tools
For linux (and cygwin) users I recommend the install git and run this command to get a copy of my repository
Code:
git clone https://github.com/championswimmer/kernel-tools.git
Or in general, all linux and windows users can just get a zipball of my repo here
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
All usage information can be found on this elaborate readme
In short all you have to do is cd to the appropriate folder and run this
Code:
./menu
or you can just double-click menu and click "run in terminal"
CREDITS
None of this was possible without the helps and works of DoomLord, Azuzu, bin4ry, FXP, defer, blagus, nobodyAtall, the_laser, Androxyde
These works are directly included in my project
DoomLord's kernel.sin and ftf creator (windows version)
These works are used in their modified/repackaged form
DoomLord's png and rle interconversion tool (windows version)
DoomLord's perl script to split kerel.sin
And big thanks to nobodyAtall for pointing me the appropriate linux binaries (or i would have kept pouring wine over windows exe files)
Huge thanks to Atarii and this thread of his for all info needed to manipulate kernel.elf files on Xperia 2012 line
Thanks to ImageMagick developers for the awesome tool
SOURCES USED
1. to565 and from565 source code (part of Android Open Source Project)
2. mkbootimg and mkbootfs standalone sources (part of AOSP)
3. abootimg sources (by Gilles Grandou)
Great work !!! Will try it asap ... Seems to be very very useful !
how about locked bootloaders conversion tool ?)
^^
that is in the works
(it will come when i finish my work on boot.img portion of the kitchen)
nice work going on here champ. downloading kCernel-thgo from github now. i cant wait to try your kernel tools. thanks for your work. :-D
ToledoJab said:
nice work going on here champ. downloading kCernel-thgo from github now. i cant wait to try your kernel tools. thanks for your work. :-D
Click to expand...
Click to collapse
doesnt work on windows cant unpack lol
iv read through readme's and it keeps saying the same thing,
i have also tried extracting FTF, i got a Kernel.sin and a loader.sin bit still no idea how to extract out of those.. any ideas lol
for windows needs cygwin buddy
and you need perl, python, cpio, gzip (or gunzip) installed inside cygwin
cyg win is installing now its BIG! i selected to install everything
Dual boot Linux for 'Kernel Kitchen'
wo88les said:
doesnt work on windows cant unpack lol
iv read through readme's and it keeps saying the same thing,
i have also tried extracting FTF, i got a Kernel.sin and a loader.sin bit still no idea how to extract out of those.. any ideas lol
Click to expand...
Click to collapse
REQUIREMENTS
This tool is primarily meant for linux users (preferably Uubuntu).
But it works perfectly well on windows+cygwin too
Click to expand...
Click to collapse
I have installed UBUNTU on a separate linux partition from windows xp ntfs partition. after ubuntu install i have dual boot UBUNTU/XP.
If anyone would like help SETTING-UP a dual boot machine to use Champ's 'kernel kitchen' please PM (private message) me and i will help. Please use PM to help Champ keep his thread SPAM free :-D
for dual boot tuto
see this
http://forum.xda-developers.com/showthread.php?p=24887566
and the following 10-15 posts
Sent from my X10S using xda premium
Today I had a little look at ubuntu and your guide and was able to view the various settings. I didn't change anything as I'm totally stumped where to start hehe but I'll continue through your guide again when I'm home.
Again. Great work champ and thank you
Sent from my X10S v8.2 using XDA Premium
added boot.img support in kernel
thus for us, it means we can tinker with locked bootloader kernels too now
championswimmer said:
added boot.img support in kernel
thus for us, it means we can tinker with locked bootloader kernels too now
Click to expand...
Click to collapse
That sounds really neat. Thats really impressive. So, is it possible to tinker with the kernel.sin file in an update package and get a working ftf file from it, kernel cooker? Hmm? And if so, how?
TAL333 said:
That sounds really neat. Thats really impressive. So, is it possible to tinker with the kernel.sin file in an update package and get a working ftf file from it, kernel cooker? Hmm? And if so, how?
Click to expand...
Click to collapse
thats easy
take a kernel.ftf file which was meant for unlocked bootloader.
open it wit zip/rar/7zip/bzip software (yes ftf = zip )
replace the kernel.sin inside it with the one you have.
while flashing, the version might not show correct but once flashed, you'll find your kernel running fine
Sent from my X10S using xda premium
championswimmer said:
thats easy
take a kernel.ftf file which was meant for unlocked bootloader.
open it wit zip/rar/7zip/bzip software (yes ftf = zip )
replace the kernel.sin inside it with the one you have.
while flashing, the version might not show correct but once flashed, you'll find your kernel running fine
Sent from my X10S using xda premium
Click to expand...
Click to collapse
I got impatient waiting so I tried a bundle creation through Flashtool. Since my phone isn't bricked I figure that works too. And quicker too. Not to stray off topic but since I will probably be using CM9 soon I think its time you posted an easy way to enable on screen buttons in CM9 for newbs like me on your ultimate repository of Champy goodness. Please. And make it dumbproof. Please......
tal333
updated to 0.1.1
waiting for some bug reports
(i know there must be something or other wrong here or there, i can't be PERFECT afterall )
want to get all bugs fixed before adding more features
I just remembered about your kitchen sorry champ, do you think this will fix my WiFi compiling? Cheers so far I have 25hrs of battery with my kernel but it's not really an honest result considering there is no WiFi at all
Sent from my X10S v8.2 using XDA Premium
nice tool
I have this problem S
Press [Enter] key to create ftf...
Please mention for which device you are packing kernel
For X10, enter 1
For X8, Mini or MiniPro enter 2
Type either 1 or 2 and press enter
2
read 00489B43 bytes
...................................... cp: can not stat `on 'loader_unlocked_7x27 . no ': No such file or directory
----------------ENTER KERNEL BRANDING DETAILS------------
Thanks ................
Wow Friend Very nice work......................
its really need for all android DEV
finally i build my own kernel using ezy/great tools
test this tool soon .........
BTW : its ezy for new user or not ??????
I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
mafamafa said:
I have a working Kernel - http://forum.xda-developers.com/attachment.php?attachmentid=1743802&d=1361298599
but I need prepare a new one - compilation it is no problem, but how to prepare img file for taht?.
I heard that this is a Rockchip kernel image file - so I am a looking for information how to build this kind of kernel?
Procesor is RK3066.
Click to expand...
Click to collapse
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
coolsandie said:
If that is a zImage, then you need to pack it into boot.img in order to flash.
There are many boot.img tools out there which can help you. But the thing is you will be needing your device's original boot.img (Which can be extracted from your device depending upon the partition) which contains the Ramdisk in order to be successful.
Click to expand...
Click to collapse
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
flowher said:
In fact it is a regular (no gziped) image not a zImage. The file after unpacking from RK3066 format starts with bytes d3 f0 21 (to unpack I'm using rkutils ).
But I don't understand why we need to make boot.img with this file and only after that, upload boot.img to the device. Normally it should be possible just to upload kernel.img to the partition where kernel is stored, no?
After kernel from the link above is uploaded to this partition, the device boots up without problem. But when we compile new kernel and upload it (after converting with rk-tools ) it is not even possible to boot the device.
Any idea what's going on? Is compiling a kernel, then converting to rk3066 format is enough ?
Click to expand...
Click to collapse
Ok, I just had a look at your link and yes, it contains the kernel.img file. So it should be the kernel image file which needs to be flashed. What you actually needed to do is, unpack that kernel image using the tools of your choice and you'll get the ramdisk, zImage etc when unpacking. If you have compiled kernel from Sources, then you need to replace the zImage with yours (Found in arch/arm/boot) if your compilation was successful without errors and repack it to form the kernel.img.
But that doesn't mean it should boot compulsorily, it may not boot depending upon various weird reasons. You may have to fix it by yourself. Nearest bet is using your device's config file (Found in /proc/config.gz) and use that to compile your kernel. You can find all infos regarding what I've mentioned in this thread:
http://forum.xda-developers.com/showthread.php?t=1748297
I used Cm 13 sources to build a bootimage for my device and everything compiled without any serious error, but i got a very large boot image 8 megabytes. I tried flashing it via TWRP but it constantly gave me error saying bootimage too large for the device.
I also forced flash the bootimage that resulted into a bricked any help would be great
My device is Samsung vibrant
Now im currently compiling the entire rom
try
http://k.japko.eu/boot-img-manipulation.html
or
Okay, first off, let me tell you I'm not at all familiar with your device...so, instead of specifically answering your questions (which would be dangerous/irresponsible of me to have you do something for which I cannot be sure of or vouch since I don't have experience with your device), I'll try to give you some general information (it does seem like you have a good grasp of many of the concepts for getting where you want to go, so maybe I can just fill-in some gaps ).
1. Regarding renaming initlogo.rle to initlogo.rle.old: I'm not sure that doing that will change the splash screen or break something when it goes to look for the initlogo.rle file (a special image file). As you've probably researched, these files are a bit odd and are not just simple image files we're all used to dealing with. I've never successfully been able to create a new initlogo.rle file on my previous attempts a few years back.
2. When you re-pack a bootable image file (boot.img or recovery.img), you need:
- re-pack the updated ramdisk to a new ramdisk.gz file
- rebuild the .img file using mkbootimg utility, specifying the kernel file and the updated ramdisk.gz file
- it's might also be important / necessary to specify the base boot address using the --base <address> parameters when issuing the mkbootimg command where <address> is the base boot address of your device; your bootable image split/unpacking utility should tell you what it sees that the base address is; here is the information I saw when I unpacked the boot.img file that you supplied in your first post:
[email protected] ~/boot-img-split-tools/ameen
$ ../split_boot.pl boot.img
Page size: 2048 (0x00000800)
Kernel size: 9600396 (0x00927d8c)
Ramdisk size: 1313051 (0x0014091b)
Second size: 0 (0x00000000)
Board name:
Command line: 'console=ttyS0,115200 rw init=/init loglevel=5'
Base address: (0x40000000)
Writing boot/boot.img-kernel ... complete.
Writing boot/boot.img-ramdisk.cpio.gz ... complete.
Unpacking ramdisk... complete.
[email protected] ~/boot-img-split-tools/ameen
- not having properly set the base boot address might explain why your device didn't boot
- not properly re-packing the ramdisk might explain why your device didn't boot
- not properly rebuilding the bootable image (using the mkbootimg utility)
3. I kind of understand what you were trying to do by changing the the .md5 file...I'm guessing that you calculated a new MD5 sum of the new boot.img file thinking that would help CWM restore it; that probably doesn't matter unless you've got the MD5/checksum verification enabled; asking/using CWM to restore / install your boot.img is an interesting and non-traditional way of doing that
4. Is the CWM custom recovery specifically built for your device? I did a quick search for it and couldn't find anything. You do indeed need a custom recovery that is built specifically for your device and it's hardware & partition / filesystem layouts and sizes. Just want to make sure that you were aware of that...using the "wrong" custom recovery might be "problematic" (bad).
Edit: I think I might have found which one you used? http://forum.xda-developers.com/showthread.php?t=2189640
5. If you had previously booted into custom recovery on your "broken" device, you still should be able to re-flash or re-launch the custom recovery in the same way that you originally did, yes? The boot and recovery partitions should be separate--so, if you only messed with the boot partition, then you should be okay--unless you've got an incompatible custom recovery that overwrote important things (like your recovery partition...).
I hope that helps...I know I didn't touch on all of your questions...that's probably enough for this post and for what follow-up questions you might have .
Cheers!
source
http://androidforums.com/threads/help-with-boot-img.963358/
I dont have much knowledge about building bootimage but while i was compiling the bootimage i got an error saying no rule to make busybox flash image. So i just copied those file from kernel sources to the out directoru i dont know if that was the problem. Also i had tried using omni 6 sources a few days back i got the right bootimage size but none of my bootimages would bootup my device. Everytime id flash the omni bootimages i got a buggy twrp recovery(faded colors, unreadable text and bootloops. Also regarding the recovery you mentioned there were some dev that built omni lollipop for my device i used TWRP 2.8 to flash all the bootimages
Some htc devices are having issues with touch working in recovery and recently @Captain_Throwback made a hack for that.Sir can you explain it to me or refer a post by others. Here's my scenario, I'm having nothing but my stock rom and of course a device tree and vendor blobs but No twrp due to this issue and there is no kernel source for my device so can you explain it to me sir.
Have you checked for kernel source here? https://www.htcdev.com/devcenter/downloads
tys0n said:
Have you checked for kernel source here? https://www.htcdev.com/devcenter/downloads
Click to expand...
Click to collapse
Yeah it is not available my device is htc desire 620g
I already posted instructions for you. It's not a process for a novice. It sounds like you don't even know how to unpack a boot.img, so you should start by searching (XDA, Google) for how to do that.
Captain_Throwback said:
I already posted instructions for you. It's not a process for a novice. It sounds like you don't even know how to unpack a boot.img, so you should start by searching (XDA, Google) for how to do that.
Click to expand...
Click to collapse
I do know how to unpack boot.img and I even built other recoveries from source by making a device tree for my device I don't know that enable touch in recovery thing.
M.A.P said:
I do know how to unpack boot.img and I even built other recoveries from source by making a device tree for my device I don't know that enable touch in recovery thing.
Click to expand...
Click to collapse
I gave you instructions for patching the kernel already. It's the procedure that I follow. I'm not sure what else you want.
Captain_Throwback said:
I gave you instructions for patching the kernel already. It's the procedure that I follow. I'm not sure what else you want.
Click to expand...
Click to collapse
You mean to do this sir Patch the uncompressed kernel binary for touch as indicated below:
Code:
# Replaces string 'recovery' with 'rec0very' so htc_get_bootmode() doesn't know we're in recovery
sed -i -E -e 's/recovery\x00/rec0very\x00/g' <name-of-kernel-file>
You'll then have a patched, uncompressed kernel binary. To compress it, you'll have to find some similar kernel source, and compile it, but replace the "Image" (uncompressed kernel) with your patched one (and make sure it doesn't get overwritten on change), so that you have a kernel binary that's similar in size to the one you started with. Alternatively, you can just leave the kernel uncompressed and repack it back into the image (which will be much larger since the kernel is uncompressed). If it doesn't fit on the partition due to size, you will have to find a way to compress it.
M.A.P said:
You mean to do this sir Patch the uncompressed kernel binary for touch as indicated below:
Code:
# Replaces string 'recovery' with 'rec0very' so htc_get_bootmode() doesn't know we're in recovery
sed -i -E -e 's/recovery\x00/rec0very\x00/g' <name-of-kernel-file>
You'll then have a patched, uncompressed kernel binary. To compress it, you'll have to find some similar kernel source, and compile it, but replace the "Image" (uncompressed kernel) with your patched one (and make sure it doesn't get overwritten on change), so that you have a kernel binary that's similar in size to the one you started with. Alternatively, you can just leave the kernel uncompressed and repack it back into the image (which will be much larger since the kernel is uncompressed). If it doesn't fit on the partition due to size, you will have to find a way to compress it.
Click to expand...
Click to collapse
Yes, isn't that what you're asking for? If your kernel binary is gzipped with an appended dtb, then these are the complete instructions: https://forum.xda-developers.com/ht...ery-twrp-touch-recovery-t3358139/post71574833
Captain_Throwback said:
Yes, isn't that what you're asking for? If your kernel binary is gzipped with an appended dtb, then these are the complete instructions: https://forum.xda-developers.com/ht...ery-twrp-touch-recovery-t3358139/post71574833
Click to expand...
Click to collapse
My device is mtk based sir so I don't have dt.img can you tell me how to do this on mtk devices.
M.A.P said:
My device is mtk based sir so I don't have dt.img can you tell me how to do this on mtk devices.
Click to expand...
Click to collapse
The original method I posted *may* still work. Did you even try it?
Until you try it, why do you keep asking the same question?
Try it. If it doesn't work, then I can't help you.
Captain_Throwback said:
The original method I posted *may* still work. Did you even try it?
Until you try it, why do you keep asking the same question?
Click to expand...
Click to collapse
I think I did it I applied this command to kernel or zimage in terminal thats what I'm supposed to do right? sed -i -E -e 's/recovery\x00/rec0very\x00/g' <name-of-kernel-file>.
M.A.P said:
I think I did it I applied this command to kernel or zimage in terminal thats what I'm supposed to do right? sed -i -E -e 's/recovery\x00/rec0very\x00/g' <name-of-kernel-file>.
Click to expand...
Click to collapse
After you decompress it, yes. Did you decompress it first?
Captain_Throwback said:
After you decompress it, yes. Did you decompress it first?
Click to expand...
Click to collapse
I unpacked it sir and I tried it as it is and also decompressed it with 7zip well if its not to be uncompressed with 7zip then can you suggest me any other method sir.
M.A.P said:
I unpacked it sir and I tried it as it is and also decompressed it with 7zip well if its not to be uncompressed with 7zip then can you suggest me any other method sir.
Click to expand...
Click to collapse
Again, the link I gave you describes that already...extract-vmlinux. I'm not posting back here until you actually read what I already posted for you. I don't know how/if you're kernel is compressed, so you have to figure that out.
I've given you all the tools and information I have; I'm done here.
Captain_Throwback said:
Again, the link I gave you describes that already...extract-vmlinux. I'm not posting back here until you actually read what I already posted for you. I don't know how/if you're kernel is compressed, so you have to figure that out.
I've given you all the tools and information I have; I'm done here.
Click to expand...
Click to collapse
Ok got it
Captain_Throwback said:
Again, the link I gave you describes that already...extract-vmlinux. I'm not posting back here until you actually read what I already posted for you. I don't know how/if you're kernel is compressed, so you have to figure that out.
I've given you all the tools and information I have; I'm done here.
Click to expand...
Click to collapse
Sir, I modified the kernel and now I want to compress it so I got the similar device kernel source to compile and zImage , Image and kernel.bin files are made now can you explain how to compress my kernel.
M.A.P said:
Sir, I modified the kernel and now I want to compress it so I got the similar device kernel source to compile and zImage , Image and kernel.bin files are made now can you explain how to compress my kernel.
Click to expand...
Click to collapse
Read the original instructions I gave you...I will not repeat myself. You'll have to figure the rest out on your own.