• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Hroark's Prevail Kernel Factory

hroark13

Android Expert
Recognized Developer
Jul 15, 2011
3,259
4,064
Thanks go to COOLYA, PABLOPL, AND UNFORGIVEN512, I used your sources to learn how to fix our broken source code, and used some of your files



You have to have Linux, the Android SDK and all packages required for the Android SDK
You also need Python 2.7, newer versions of Pyhton tend to have problems with the Android SDK

1. Download hpkf.tar.gz File

hpkf.tar.gz

2. Extract file to your home/user folder, you should now have a /home/user/hpkf folder

3. Open Terminal

4a. MAKE YOUR zImage (factory config)

$ cd hpkf/kernel
$ make clean
$ make mrproper
$ cp prevailconfig .config
$ make

Compile will take a little while, when it is done the zImage will be in

/home/user/hpkf/kernel/arch/arm/boot/


OR


4b. MAKE a MODIFIED zImage (custome config)

$ cd hpkf/kernel
$ make clean
$ make mrproper
$ cp prevailconfig .config
$ make menuconfig

You will now have a Menu that you can select a lot of different options.

Highlight Load an Alternate Configuration File an hit enter
Highlight OK and hit enter (it should say .config)

Go threw the Menus and make your changes

When you are done go back to the main screen and Highlight Save an Alternate Configuration File and hit enter
Highlight OK and hit enter (it should say .config)
Highlight Exit and hit enter

Backup your new config you made

$ cp .config myconfig

Compile the new zImage with your config

$ make

Compile will take a little while, when it is done the zImage will be in

/home/user/hpkf/kernel/arch/arm/boot/


5. PACK zImage with a RamDisk (BOOT or RECOVERY)

Make CM7 Beta 5 Kernel (BOOT) Flashable with ClockWorkMOD
$ cd ../pack
$ ./cwmboot.pl cmbeta5

Make Kouma 1.3 Kernel (BOOT) Flashable with Odin One Package
$ cd ../pack
$ ./odinboot.pl kouma13

Make ClockWorkMOD 5.0.2.7 (RECOVERY) Flashable with ClockWorkMOD
$ cd ../pack
$ ./cwmrecov.pl CWM5027

Make ClockWorkMOD 5.0.2.7 (RECOVERY) Flashable with Odin One Package
$ cd ../pack
$ ./odinrecov.pl CWM5027

Either a ZIP or a TAR file will be located in the /home/user/hpkf/pack folder depending on what you chose to make


IF YOU WANT TO EXTRACT THE RAMDISK AND zImage from a different boot.img or recovery.img

Copy the boot.img or recovery.img to the /home/user/hpkf/pack folder

Open Terminal

$ cd hpkf/pack
$ ./split.pl boot.img

or

$ ./split.pl recovery.img

This with make two files

boot.img-kernel or recovery.img-kernel (this is the zImage)

and

boot.img-ramdisk.gz or recovery.img-ramdisk.gz (this is the double compressed Ramdisk)

Right click on the gz file and choose extract here, you will now have a file
boot.img-ramdisk or recovery.img-ramdisk

This is a CPIO file which is the compressed Ramdisk

Right click on the CPIO file and choose extract here, you will now have a folder

boot.img-ramdisk_FILES or recovery.img-ramdisk_FILES

This is the uncompressed Ramdisk that you can now edit the files, like the the init.rc and stuff like that, I would re-name that folder to something meaningful like kouma14 or something like that.

When you are done re-pack it (see step 5 above)
Just remember that the packing process will pull the zImage from /home/user/hpkf/kernel/arch/arm/boot/ so if you have not compiled the kernel or if you want to use a different zImage you will need to copy one to that location and it has to be named zImage

If I have helped you, and you like my work, please click on the Thanks Button and give my thread a rating by clicking on the stars above.

If you would like to buy me a beer cofee, you can click on the PayPal button

 
Dear Samsung

It seems that when you were uploading your source code for the the Prevail Kernel some files did not make it threw the download, and some files seemed to have gotten corrupted.


its OK I fixed it for you

The Prevail Community now has working kernel source code for our phones

Love
Hroark13


big-smile.jpg
 
Upvote 0
Upvote 0
Does this mean you have a fully unlocked kernel, instead of the somewhat-modded stock one? Is there overclocking coming soon?

I'm gonna wear out my usb cable with all these updates lately. :D

we can only work within the confines of what the source will allow

but this is major, this is new

I am looking forward to seeing what some of these guys will be doing with this


and this is a big step in the direction of getting ICS on the phone
 
Upvote 0
Is the KoumaKernel 1.3 posted here the same as the one you posted in koumas thread?

well the one that is in this thread is not because it has internal ext4

and it is not "Official Kouma" he will be putting out something soon


it is more like me saying, hey kouma here are some mods you may want to add to your kernel
 
Upvote 0
If you dont mind me asking hroark, how did you fix the source code?

Well unforgiven512 has a working kernel source for the Admire
https://github.com/unforgiven512
the Admire is very very very similar to our phone


I used WinMerge to compare his source to the the Source code for the Prevail that Samsung provided

I deleted all files that were identical

I made a folder that contained missing files from each source, and moved them out of my working folder

I now was able to easily compare the files that both kernels had but were different

I used some files from the Prevail source and Some from the Admire source

I edited some of the files, using unforgiven512 commits as a guide


The main problem with our kernel source was the fsr drivers were missing, the dpram.c needed to edited to remove the remarked code about the fsr driver, the param drivers were not good, so I used the param and fsr drivers from unforgiven512's source


THANK YOU COOLYA, PABLOPL, AND UNFORGIVEN512
 
Upvote 0
Snap! This is just one more thing that makes this the little Android that could.
I'm really having trouble seeing myself wanting another phone

Yeah I always seemed to favor the underdog.

I'm having a issue.
I ran all this first

$ cd hpkf/kernel
$ make clean
$ make mrproper
$ cp prevailconfig .config
$ make

and it worked fine.
But then I deleted the whole hpkf folder and closed terminal,
then I re-extracted it in my /home/user and now when I do

cd prevailconfig .config

it says that this
bash: cd: prevailconfig: Not a directory

I have checked my spelling over and over, I don't know what I did different from the first time i did it and the second.
Can someone help me figure this out?
 
Upvote 0
Yeah I always seemed to favor the underdog.

I'm having a issue.
bash: cd: prevailconfig: Not a directory

I have checked my spelling over and over, I don't know what I did different from the first time i did it and the second.
Can someone help me figure this out?


cp not cd

cp is copy

cd is change directory
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones