G900H kernel development need Guide please - Galaxy S 5 Q&A, Help & Troubleshooting

Because lack of support I started to learn by my self.
So today I have compiled my first kernel
I know that I need to pack my zImage to boot.img
Some body guide me how to do it please
Edit:
Tried "abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img" wont boot any ideas?

Related

[HELP]Re-create bootable blob with init.rc changes

Good evening all!!
Well after two days of hitting my head against the wall I decided to ask for help.. typical guy here!!
Problem: when using the blobtools to create a boot blob it soft bricks my transformer. No idea why.
Objective: Create a bootable boot blob with init.rc changes
Steps token to create the boot blob:
::Tools Used::
- BlobTools created by RaYmAn
- BootTools created by RaYmAn
::Blob used:: Stock kernel provided by clemsyn ( h t t p : / / w w w . megaupload.com/?d=GSIHUPJ6 ) kernelblob
1. After compiling blobtools I used "blobunpack" to unpack my blob
Code:
./blobunpack /home/mike/Android/kernelblob
Once done it produced "kernelblob.HEADER" and "kernelblob.LNX"
2. After compiling boottools I used "bootunpack" to unpack "kernelblob.LNX"
Code:
./bootunpack /home/mike/Android/kernelblob.LNX
Which produced "kernelblob.LNX-kernel.gz" and "kernelblob.LNX-ramdisk.cpio.gz"
3. Then I uncompressed "kernelblob.LNX-ramdisk.cpio.gz"
Code:
gunzip -c /home/mike/Android/kernelblob.LNX-ramdisk.cpio.gz | cpio -i
Which produced the initramfs. Made my changes to init.rc
4. Re-created ramdisk using this command
Code:
find . | cpio -o -H newc | gzip > ../newkernelblob.LNX-ramdisk.cpio.gz
5. Then re-create kernelblob.LNX (boot.img) with mkbootimg
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel kernelblob.LNX-kernel.gz --ramdisk newkernelblob.LNX-ramdisk.cpio.gz -o newkernelblob.LNX
6. re-created blob using blobpack
Code:
./blobpack kernelblob.HEADER boot_blob LNX newkernelblob.LNX
Example provided by RaYmAn
Code:
./blobpack blobname.HEADER outputfile LNX boot.img
Then I try to flash the new boot_blob but after I reboot it just gets stuck on the ASUS screen...
Thanks for taking the time to read this and help me!!!! Hope this will help others
Just to note:: Even if I do not make changes to init.rc it still does not boot which tells me it might have something to do with the way I'm repacking the blob..... Thanks again for anyones help!!!
Anyone?????
trying to keep the thread alive.... I've tried with the offical blob too. No luck!
I am running ubuntu 64-bit with jdk installed!
The problem is the fact that you pass a cmdline to the mkbootimg command.
On most tegra2 based devices, the cmdline is passed by the bootloader UNLESS the boot.img has a cmdline. Your cmdline is obviously wrong for a tegra2 device, so it never boots.

[q] how to change cwm in kernel

Hi guys...
I'm trying to figure our how to replace the pre installed cwm in my hells fusion #50 with another one. Does anyone know how?
Sent from my GT-S5360 using xda app-developers app
c.r.e.e.d said:
Hi guys...
I'm trying to figure our how to replace the pre installed cwm in my hells fusion #50 with another one. Does anyone know how?
Sent from my GT-S5360 using xda app-developers app
Click to expand...
Click to collapse
Extract ramdisk from the boot.img and put cwm. Necessary Linux.
EduardoRFS said:
Extract ramdisk from the boot.img and put cwm. Necessary Linux.
Click to expand...
Click to collapse
Any other way? Our can u do it for me?
Sent from my GT-S5360 using xda app-developers app
EduardoRFS said:
Extract ramdisk from the boot.img and put cwm. Necessary Linux.
Click to expand...
Click to collapse
how to extract boot.img
imElectronica said:
how to extract boot.img
Click to expand...
Click to collapse
Using the abootimg in ubuntu 12.04(or debian). ex:
To unpack:
Code:
abootimg -x boot.img
To repack:
Code:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
bootimg.cfg (config of boot.img)
zImage (kernel)
initrd.img (ramdisk)
to unpack initrd.img use:
Code:
gunzip -c | cpio -i
to repack initrd.img:
Code:
find . | cpio -o -H newc | gzip > ./initrd.img
EduardoRFS said:
Extract ramdisk from the boot.img and put cwm. Necessary Linux.
Click to expand...
Click to collapse
EduardoRFS said:
Using the abootimg in ubuntu 12.04(or debian). ex:
To unpack:
Code:
abootimg -x boot.img
To repack:
Code:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
bootimg.cfg (config of boot.img)
zImage (kernel)
initrd.img (ramdisk)
to unpack initrd.img use:
Code:
gunzip -c | cpio -i
to repack initrd.img:
Code:
find . | cpio -o -H newc | gzip > ./initrd.img
Click to expand...
Click to collapse
In windows
imElectronica said:
In windows
Click to expand...
Click to collapse
I don’t know. Recommend that you use a vm or use dual boot entry Windows and Linux(I use dualboot).
ps: Sorry for my bad english(Google Translator).
use A kernel kitchen or such
compile ur recovery
and in ramdisk/sbin
replace the recovery binary with youre recovery binary
also in ramdisk/res
put youre recovery output images
and keys
then compile boot img
Sent from my S500 using xda app-developers app
SpaceCaker said:
use A kernel kitchen or such
compile ur recovery
and in ramdisk/sbin
replace the recovery binary with youre recovery binary
also in ramdisk/res
put youre recovery output images
and keys
then compile boot img
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
Not. CWM does not work(i tested). Extract ramdisk and customize a shell script in recovery.
Kernel(With Ext4 and LZMA, made by me) and Ramdisk(With CWM and Root, made by me, use LZMA) in attach. FLash with Odin(Tested)
EduardoRFS said:
I don’t know. Recommend that you use a vm or use dual boot entry Windows and Linux(I use dualboot).
ps: Sorry for my bad english(Google Translator).
Click to expand...
Click to collapse
What is dual boot entry.??
imElectronica said:
What is dual boot entry.??
Click to expand...
Click to collapse
use search/google
anyway:
multi boot means installing multiple os on a device and being able to choose which one to boot

Build own kernel and stuck on LG logo

Hi,
if i try to build my own kernel for d802, i have a little problem. it should be for cm-11.0 and i tried the stock cm-11.0 kernel to test it.
i use:
./dtbTool -s 2048 -o dt.img -p cm11/scripts/dtc/ cm11/arch/arm/boot/
to get my dt.img
and:
./mkbootimg --kernel cm11/arch/arm/boot/zImage --ramdisk ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=g2 user_debug=31 msm_rtb.filter=0x0" --base 0x00000000 --offset 0x05000000 --tags-addr 0x04800000 --pagesize 2048 --dt dt.img -o boot.img
to build the boot.img (ramdisk extracted from cm11).
i put it into a loki-fied .zip to install it and the installation works, but if i try to boot it stuck on lg logo. can anyone help me? is there a problem with my lines above?
AuxXxilium said:
Hi,
if i try to build my own kernel for d802, i have a little problem. it should be for cm-11.0 and i tried the stock cm-11.0 kernel to test it.
i use:
./dtbTool -s 2048 -o dt.img -p cm11/scripts/dtc/ cm11/arch/arm/boot/
to get my dt.img
and:
./mkbootimg --kernel cm11/arch/arm/boot/zImage --ramdisk ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=g2 user_debug=31 msm_rtb.filter=0x0" --base 0x00000000 --offset 0x05000000 --tags-addr 0x04800000 --pagesize 2048 --dt dt.img -o boot.img
to build the boot.img (ramdisk extracted from cm11).
i put it into a loki-fied .zip to install it and the installation works, but if i try to boot it stuck on lg logo. can anyone help me? is there a problem with my lines above?
Click to expand...
Click to collapse
hey .. that looks correct to me. what rom are you trying to boot your boot.img with? i know if u using the latest CM11 branch it adds alot of commits that require new blobs .. unless that rom has those new blobs it won't boot.
houstonn said:
hey .. that looks correct to me. what rom are you trying to boot your boot.img with? i know if u using the latest CM11 branch it adds alot of commits that require new blobs .. unless that rom has those new blobs it won't boot.
Click to expand...
Click to collapse
i tried on a your rom but it didn't boot. i'll try it on cm11 to confirm it. thx for your help.

[Q] SM-G900F build custom boot.img

Hi
I am used to rebuild boot images with unkmbootimg/mkbootimg on my S4 mini. When I repack a G900F a working stock boot.img and flash it with Odin, the device boots into download mode. I didn't made any changes in the ramfs, the sources are binary the same, but when I repack it to the boot.img it's different to the stock.
Is my bootloader locked? Do I need a special mkbootimg to enable SEAndroid enforcing? It does not matter if I disable it in the ramfs. Do I have to modify the kernel too?
Regards
It seems, that not the boot image is the problem but the cpio initramfs.
I can use the command
Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.
I use the following command to repack my initramfs:
Code:
find . | cpio -o -H newc | gzip > ../initrd.img
cloooned said:
It seems, that not the boot image is the problem but the cpio initramfs.
I can use the command
Code:
abootimg -u boot.img -r initrd.img
to replace the ramdisk in a working boot image. This works only if a replace the current initramfs with the original initramfs. If I unpack the initramfs too and repack the exact same sources, it won't boot. The sources are binary the same, but the packed initramfs is totally different.
I use the following command to repack my initramfs:
Code:
find . | cpio -o -H newc | gzip > ../initrd.img
Click to expand...
Click to collapse
I don't know if this is still relevant to you, but I have found that so far the only tool that repacks s5 kernel properly is the Osm0sis kernel kitchen. I am working on linux and I was able to pack my compiled zimage and modified ramdisk using his tool. You can read more on his original thread here .
I hope thos help you.

How can I compile the Kernel of the Meizu Pro 5?

Hi,
I have a Meizu Pro 5 Ubuntu Edition, and I try to Compile the Meizu Pro 5 Kernel from here: github.com/meizuosc/m576 using the Compiler from here: android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
I compiled the Kernel using thr following commands:
Code:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- pro5_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android-
It did compile, and I got a arch/arm64/boot/Image
Then, I tried to replace the current kernel on my phone with the new one. I copied the partition bootimg from my Phone using dd, extracted the files zImage, bootimg.cfg and initrd.img using the command "abootimg -x bootimg.img", removed the line "bootsize" from the bootimg.cfg, and created, flashed and started a new bootimg.img using the following commands:
Code:
abootimg --create bootimg.img -f bootimg.cfg -k zImage -r initrd.img
fastboot flash recovery bootimg.img
fastboot oem reboot recovery
However, the Phone just froze on the Meizu splash screen. Am I doing something wrong?
PS: If I recreate the bootimg.img using the original Kernel, the Phone starts normally.

Categories

Resources