Here we go.
I'm saying that I'm not a very good developer so this information could be messy, contain unnecessary works or a bit wrong.
And also I'm not sure if this method will work with every zImage from every device.
I've tested with
I9000-JM2/JM7 : ECLAIR
JPC : FROYO
and they work like a charm.
OK, now we start.
Download this file
http://www.multiupload.com/GSVLO15WDL
It has cross-compiler in it so that it's slightly big.
------------------------------------------------------------
This is basically for devs so I won't tell you specifically. (or I can't...maybe)
1. Extract cpio'ed initramfs file from zImage.
## EDIT : In order to extract initramfs.cpio, go through from step4 to step11.
A file which starts with "30 37 30" means that this is a cpio'ed file.
So, trim the Image-Orig file from the beginning to the point just before "30" then, you've got a cpio compressed file.
You can now simply decompress it.
cat initramfs.cpio | cpio -i --no-absolute-filenames
Click to expand...
Click to collapse
2. Decompress and edit these files. Make sure you shouldn't go over the original size. (simply, I removed redbend_ua in /sbin forder)
3. Recompress to cpio. ( I've used scripts/gen_initramfs_list.sh which is in the kernel source for a safe bet)
## EDIT : What I've done is here. chdir to "zImage_repack/2.6.29" forder then
/bin/bash scripts/gen_initramfs_list.sh -o usr/initramfs_data.cpio -u 0 -g 0 /home/zero/Desktop/JPC/initramfs/i9000_initramfs_list
Click to expand...
Click to collapse
4. open the zImage with a hexeditor.
5. find "1f 8b 08".
6. cut off from the beginning to the point just before the "1f" so that this file begins with "1f 8b 08".
7. save as anyname.gz
8. in terminal >>>> gunzip anyname.gz
Now, you've got an Image file. I'll call this as an Image-Orig.
9. open the Image-Orig file with a hexeditor.
10. remember the entire size of this file. One of mine was "0xb9a5df".
11. find "30 37 30" hexademical code and "TRAILER!!!" text.
12. cut off from the first "30" to the last "!".
an example is here
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
13. open the cpio file you had recompressed with the hexeditor.
14. paste this codes to the exactly same place where the former initramfs was, in Image-Origin file. (Up to now, I feel like English is more difficult than this trick...sigh, sorry for my bad english!)
15. Almost done. We're gonna make the modified Image file's size identically to the Image-Orig. It's simple. just fill the hole with a bunch of NULLs. put your finger on "0" button and have a little sleep.
I think I need a visual assistant.
Save it as "Image".
At this point, you should have an Image file which size is the same as Image-Orig.
Now open the file you've downloaded at the first.
there is a forder called place_Image_here
yeah, place the Image there and execute the "Repack_kernel.sh" file.
In several seconds, you'll have a zImage file.
I'm so tired and I can't last this writing so, if you have any question, I'll give you a reply.
Thanks!
## PLUS : I've attached the modified JPC kernel which supports /system/etc/init.d/userscripts.sh
It's named JPC_modified_kernel.tar.zip and you should take the ".zip" off in order to use with Odin.
## PLUS2 : I've compiled gnu_parted! also attached. good luck, RyanZA!
-info : GNU parted v2.2 (original version, didn't apply bug fixes.)
disabled device-mapper and read-line while compiling, does this matter?
...Wow.
Good job, sir. Good job.
dkcldark said:
1. Extract cpio'ed initramfs file from zImage.
Click to expand...
Click to collapse
I mostly followed along through the later steps and I don't see any issues, but unfortunately the first step leaves me clueless. How would you do that?!
@dkcldark: good job. nice pictures.
Thats what i do to extract initramfs, basically the same. But i have added instructions to extract from kernels compiled by kernel devs here at xda.
(kernels with gzipped cpio)
Uncompressing the zImage:
$ grep -a -b --only-matching $'\x1f\x8b\x08\x00' < zImage
12896:�
$ dd if=zImage bs=1 skip={number from above command} | zcat - > Image
if not gzipped cpio (this one for stock-samsung-kernel):
$ grep -a -b --only-matching '070701' Image
$ dd if=Image bs=1 skip={your first matching number from line above} > initramfs.cpio
else if cpio is gzipped:
$ grep -a -b --only-matching $'\x1f\x8b\x08' < Image
84448:�
2639420:�
Only the first number is interesting, so we can fetch the initramfs:
$ dd if=Image bs=1 skip={your first number, in my case 84448} | gzip -d -c - > initramfs.cpio
Now extract initramfs.cpio:
$ mkdir somedirtoextract
$ cd somedirtoextract/
$ cpio -i --no-absolute-filenames < ../initramfs.cpio
If you want to have device nodes created, make sure you do it as root:
sudo cpio -i --no-absolute-filenames < ../initramfs.cpio
I'm stunned...
wondewring if theres a way to change this:
c002e660 T __initramfs_start
c035d949 T __initramfs_end
I've compiled a short page about extracting initramfs some time ago here: http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
(also accessible from the SGS wiki page).
Please feel free to extend this page with more instructions / scripts on how also re-pack it back.
hi dkcldark, as i sayed i try to do this with the kernel from i5800 galaxy3, but ran into first problem after saving the image-orig.gz, i get a gz filke with a file image-orig with 0 bytes size and extracting results in an error.
hope you can somehow help me. like i sayed already, i am not really used to such blackbelt stuff, just trying to get a working lagfix for the g3
FadeFx said:
hi dkcldark, as i sayed i try to do this with the kernel from i5800 galaxy3, but ran into first problem after saving the image-orig.gz, i get a gz filke with a file image-orig with 0 bytes size and extracting results in an error.
hope you can somehow help me. like i sayed already, i am not really used to such blackbelt stuff, just trying to get a working lagfix for the g3
Click to expand...
Click to collapse
hello would you give me the kernel file please?
I'll have a look and give you an instruction
here you go: http://archiv.to/GET/FILE4C99994EB1316
thanx for help...
As far I understand this method -> Could we have JPK's kernel initramfs repacked in similar manner, to include EXT2/4 support?
Hello.
dkcldark & neldar , What a great work you ´have done!
Unfortunately im lost at the point when to create the Image.
I followed neldar´s instructions to expand zImage to Image and
My files are extracted from JPK kernel and i have edit some files.
What to do?
xan said:
As far I understand this method -> Could we have JPK's kernel initramfs repacked in similar manner, to include EXT2/4 support?
Click to expand...
Click to collapse
ext2 support is (most likely) already in the kernel. the problem with adding ext4 is that we don't have a ext4 module compatible with this kernel and no source (yet) to compile one ... so we have to wait for samsung to release the source ...
@dkcldark, neldar ... awesome tutorials, thanks!
Has anyone figured out how to find the end of the ramdisk when it's compressed? I'm fooling with some Java code to try it, but the inflater class doesn't like the data that should be the start of the compressed data. No idea why yet. I can parse the gzip header, and it's right, but no decompression. From what I have read, gzip doesn't have a trailer, the only way to find the end is to decompress it.
We can decompress it and get the ramdisk contents, but knowing where to put it back in the file is the tricky part.
heh... I convinced GzipInputStream to do my bidding.
humph.. I was going to attach the java code to do it, but XDA is pissing and moaning about me using up a lot of storage space, a whole 35MB apparently. sigh. I'll try to inline it in a code block, hopefully you get the idea. I'll see about creating a little utility to pull, extract, and put back the ramdisk image, basically the hex editor part without the hex editor.
This is a prototype, change the filenames for your system. This will output the decompressed cpio image as well as give you the offsets for where to put it in a hex editor. It's a bit on the slow side, as it uses byte-at-a-time reading. Much like the dd command earlier in the thread. I'll see about buffering the I/O as well, I just wanted to get it out there to hopefully help out.
Another update. I added input buffering and it's a LOT faster. Hope it helps.
Just to make sure there's no question on it, the code is GPL2 licensed. I should have included the banner.
Code:
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.zip.GZIPInputStream;
public class FindCompressedRamdisk
{
int numRead = 0;
int totRead = 0;
public FindCompressedRamdisk()
{
try
{
File f = new File("/home/travis/kernel.img");
if (f.exists())
{
FileInputStream in = new FileInputStream(f);
byte[] rData = new byte[4096];
byte[] oData = new byte[4096];
byte[] gzipKey = { 0x1F, (byte) 0x8B, 0x08, 0x00 };
int pos = 0;
while ((numRead = in.read(rData)) != -1)
{
pos = findBytes(rData, numRead, gzipKey);
if (pos != -1)
{
int start = pos + totRead;
System.out.println("GZIP Start: " + start);
in.close();
in = new FileInputStream(f);
in.skip(start);
InputStream gin = new BufferedInputStream(new GZIPInputStream(in));
int len = 0;
OutputStream out = new BufferedOutputStream(new FileOutputStream("/home/travis/out.img"));
int b;
for ( ; (b = gin.read()) != -1; len++)
{
out.write(b);
}
System.out.println("GZIP End: " + len);
out.close();
break;
}
totRead += numRead;
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
public int findBytes(byte[] data, int dSize, byte[] search)
{
int found = -1;
for (int i = 0; i < dSize && found == -1; i++)
{
if (data[i] == search [0])
{
for (int j = 1; j < search.length; j++)
{
if (data[i + j] != search[j])
break;
if (j == search.length-1)
found = i;
}
}
}
return found;
}
/**
* @param args
*/
public static void main(String[] args)
{
FindCompressedRamdisk rd = new FindCompressedRamdisk();
}
why i could see the graphs??????
Dkcldark did you find a way for the i5800 zimage i provided?
jodue said:
ext2 support is (most likely) already in the kernel. the problem with adding ext4 is that we don't have a ext4 module compatible with this kernel and no source (yet) to compile one ... so we have to wait for samsung to release the source ...
@dkcldark, neldar ... awesome tutorials, thanks!
Click to expand...
Click to collapse
I am perfectly happy with either EXT2/4 (no comments here).
can you tell me how to unpack the factoryfs.rfs ?
I grep the '1F8B0B' and cut the bytes (between '1F8B0B' and 'another 1F8B0B') to a file,,,,a.img,,,,then gunzip it,,,but console println " gzip: a.img is encrypted -- not supported "
why?
sharetop said:
can you tell me how to unpack the factoryfs.rfs ?
I grep the '1F8B0B' and cut the bytes (between '1F8B0B' and 'another 1F8B0B') to a file,,,,a.img,,,,then gunzip it,,,but console println " gzip: a.img is encrypted -- not supported "
why?
Click to expand...
Click to collapse
That's a filesystem image for the /system partition IIRC. I have used it on my phone via a loopback mount, but you can't extract stuff from it using this method. This is for zImage files.
sharetop said:
can you tell me how to unpack the factoryfs.rfs ?
I grep the '1F8B0B' and cut the bytes (between '1F8B0B' and 'another 1F8B0B') to a file,,,,a.img,,,,then gunzip it,,,but console println " gzip: a.img is encrypted -- not supported "
why?
Click to expand...
Click to collapse
You can't. The easiest way to unpack factory.rfs (if you don't have linux) is to copy it to your phone, mount it in a directory using a loopback device, and copy everything from it to another directory on your sdcard.
thank you. If i have a linux system, can i copy the .rfs to ubuntu, then mount it as a virtual device?
Related
I write a C# app for WindowsMobile.
in order to get a nonrecursive folder size i have this routine:
Code:
static long GetDirectorySize(String path)
{
long size = 0;
String []files = Directory.GetFiles(path);
foreach (String f in files)
{
FileInfo fi = new FileInfo(f);
size += fi.Length;
}
return size;
}
now, my directory (in Storage Card) has about 1000 files that has about 4MB of data alltogether.
the GetDirectorySize takes forever to execute (60 seconds or so) and provide a horribole user expericnce.
executing this in a thread does not help either - i need the response as fast as possibole.
I was wondering if someone could help me figure out how to get folder size (nonrecursive) more rapidly.
in general, i also want to find the older file in the directory and delete it (kid of cache operation). how do i do that without waiting forever to complete?
storing an index file might not be what i'm looking for.
Thanks
I don't know about C#, but in C++ I use GetDiskFreeSpaceEx function, see HERE.
PS,
I think this goes in the Q&A forum?
dgaud007 said:
I use GetDiskFreeSpaceEx function
Click to expand...
Click to collapse
This does not help with Folder size.
My intention is to manage Cache folder and monitor its size and clear out some cached files in case the cache size of the folder is too big.
getting the disk size is not the way to deal with folder size
You can use it for individual folders, as the folder name is the 1st input parameter. I've used at least for \My Documents which is a regular folder and it works. Here is an excerpt from MSDN:
lpDirectoryName [in, optional]
A directory on the disk.
If this parameter is NULL, the function uses the root of the current disk.
If this parameter is a UNC name, it must include a trailing backslash, for example, "\\MyServer\MyShare\".
This parameter does not have to specify the root directory on a disk. The function accepts any directory on a disk.
The calling application must have FILE_LIST_DIRECTORY access rights for this directory.
Click to expand...
Click to collapse
As per MSDN, here is how you implement it in C#:
Code:
[DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
internal static extern bool GetDiskFreeSpaceEx(string drive, out long freeBytesForUser, out long totalBytes, out long freeBytes);
I tested GetDiskFreeSpaceEx.
- The coredll has to be used instead kernel32dll (for WindowsMobile).
- the TotalBytes returns the SD card size (on which the folder exists)
- the freeBytesForUser equals FreeBytes and returns the free space in the SD card
this does return the folder size.
appreciate further help.
thanks
I double checked and you're right. Looks like you'll have to recurse while adding the individual sizes. I couldn't find an easier method in a brief search in google. Sorry about the confusion!
PS,
checkout this app...
I'm not that much of a C# expert but isn't the 1000 times calling "new" slowing down? I'd try to write a traditional C++ application using simple FindFirstFile and FindNextFile functions and compare speed towards the C# application. If it's faster then you can just build a C++ DLL and PInvoke her. I'm not sure if results are better but at least it's worth a try.
solution found
I managed to resolve this and get a speedy result by replacing with this code.
all the best.
Code:
private static long GetDirectorySize(String path)
{
long size = 0;
[COLOR="DarkGreen"] /* Slow code
String []files = Directory.GetFiles(path);
foreach (String f in files)
{
FileInfo fi = new FileInfo(f);
size += fi.Length;
} */[/COLOR]
DirectoryInfo di = new DirectoryInfo(path);
FileInfo []fi = di.GetFiles();
for (int i = 0; i < fi.Length; i++)
size += fi.Length;
return size;
}
btw: get my app at http://www.logelog.com/utils
For SHW-M110s development/discussion. (Korean Anycall SGS ONLY yes for any who don't know, we are officially part of the I9000 forum.
Koe1974 suggested this thread and will I think act as a co-OP on this discussion. Look for front page updates, links, whatever from him 3 posts down, (below the lost guy from China) in the future too.
Version 4 released
Version 4.0r1 released to fix Odin flashing problem
link to kernel
with tegrak_voodoo sound (v2) module, tegrak ext4 module, root (superuser.apk) and busybox 1.17.1 optional, safe mount option overides by default, auto detect lag fixed partitions (improves upgradeability and interchageability) [/B][/size] Compatible with previously z4modded ext2 setups. All ROM versions, SK05 through TA13 tested and released (link is below).
안녕하세요 to any of the Korean developers who find this. Please update us in English about what you are doing. Your English is probably MUCH better than my korean, and I live in Korea.. There are some people in China, Iran, Philippines, etc using this device who might be helped.
-------------------------------------------------------------------------------------------------------------------------
Ext4 (tegrak modules) z4build rooted voodoo sounds kernel link
A stock z4moded kernel with added ext4 support ( presently by "stealing" tegrak kernel modules.) and many tweaks to make it actually work.
This is now working with z4control to get an easy to apply ext4 lag fix!
------------------------------------------------------------------------------------------------------------------------------------
Bug discussion here please, usage discussion (how do get the file into odin?) .. maybe the general thread is better.
For now, our rooting guide is linked from my sig also, although the above linked kernel can also be made to provide root with no effort.
This type of initramfs modification can be done by unpacking a stock kernel making customizations and then applying z4build to it. But I used a z4modded kernel and then applied customizations and repacked. I did this because I set up to repack by hand anyway before knowing I wanted to use z4mod and even then, when I thought I needed to pack into a tegrak kernel (which z4build can't do). It turned out to cause complications, but also taught me a good bit about the process and about z4mod, and probably helped me find bugs.
Some other related useful links for Reference:
kernel extraction (commented by me specifically for tegrak lzma compressed initramfs and z4build split initramfs)
http://forum.xda-developers.com/wiki/index.php?title=Extract_initramfs_from_zImage
kernel repacking
http://forum.xda-developers.com/showthread.php?t=789712
It needs the initramfs to be cpio'd already something like this:
Code:
cd $initram
find ./ | cpio -H newc -o > $repackdir/newramfs.cpio
It also needs the editor.sh script modified to point to the cross-compiler.
By default it can only pack you initramfs into an image which previously had an uncompressed initramfs. This can be modified though easily.
kernel compiling
This old thread probably isn't too useful now..
http://forum.xda-developers.com/showthread.php?t=740740&page=2
We have much better info 3 posts down by koe1974.
Kernel sources here:
http://opensource.samsung.com/
search SHW-M110S.
The first froyo update has a nice readme with a link to the compiler (I don't have the link right this moment)
Not sure if we need to figure/find .configs, or if the ones included are ok to start. Just need to compile one once and see.
I got my compiler toolchain here:
http://www.codesourcery.com/sgpp/li...1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
I thought it's the one recommended is the original froyo source from samsung, but Koe says they point to 2009 version, so I don't know now.
............
I flashed the korean voodoo sk22 kernel just to boot it into recovery. It has CW mod recovery. Might be useful. (BTW I don't recommend flashing unfamiliar kernels haphazardly, ex: this one injected a file into my ROM that interefered with z4mod until I realized it ) Mine BTW injects only one empty directory (/etc/init.d) and nothing else. Remove the kernel and all other changes dissappear. (z4control adds a tad more, but very little, most of its additions self destruct after use.)
Post reserved.
Post Removed, as requested.
Sent from my GT-I9000 using XDA App
Links:
Korea's equivalent to XDA
Lilinser's GitHub - kernel repack, deodexer, etc.
Project-Voodoo - initramfs (SK05)
Just for hobbies - Voodoo for SL28
Tegrak Kernel
SHW-M110S intramfs Requires further research.
Older M110S from someone at MIT working on the M110S potential resource
bml7 & initramfs possible resource
more initramfs
initramfs SK05 Tested .. OK
How-Tos:
Basic How-To Build Environment with built kernel test
First this diff is from a z4modded stock SL28 image to the custom kernel image. It's not against stock. So it includes tegrak files and scripts I changed. Also note the -N option. It pretends like files that don't exist do.. Any binary files that "differ" are actually added from tegrak.
Code:
diff -rbpN z4mod_sl28/initramfs/init.rc z4grak-construction-sl28/initramfs/init.rc
*** z4mod_sl28/initramfs/init.rc 2011-01-13 02:20:12.000000000 -0500
--- z4grak-construction-sl28/initramfs/init.rc 2011-01-11 07:43:34.000000000 -0500
*************** loglevel 3
*** 58,63 ****
--- 58,72 ----
mount j4fs /dev/block/stl6 /mnt/.lfs
insmod /lib/modules/param.ko
+ #ext4 modules by woo
+ insmod /tegrak/lib/modules/mbcache.ko
+ insmod /tegrak/lib/modules/jbd2.ko
+ insmod /tegrak/lib/modules/ext4.ko
+
+ # tegrak system lagfix by woo
+ #
+ insmod /tegrak/lib/modules/tegrak_module.ko
+
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sdcard
*************** service vt /system/bin/vtserver
*** 728,734 ****
#user system
#group system
-
service dumpstate /system/bin/dumpstate -s
socket dumpstate stream 0660 shell log
disabled
--- 737,742 ----
*************** service dumpstate /system/bin/dumpstate
*** 739,747 ****
# oneshot
-
# Added by z4mod
service z4postinit /init
oneshot
--- 747,761 ----
# oneshot
# Added by z4mod
service z4postinit /init
oneshot
+ #install root ingore the mount type, it doesn't matter
+ # syntax looks a little strange to me.. we'll see if it works
+ mount rfs /dev/block/stl9 /system rw remount
+ cat /sbin/su > /system/bin/su
+ chown root /system/bin/su
+ chmod 4755 /system/bin/su
+ mount rfs /dev/block/stl9 /system ro remount
\ No newline at end of file
diff -rbpN z4mod_sl28/initramfs/lpm.rc z4grak-construction-sl28/initramfs/lpm.rc
*** z4mod_sl28/initramfs/lpm.rc 2011-01-13 02:20:12.000000000 -0500
--- z4grak-construction-sl28/initramfs/lpm.rc 2011-01-11 06:37:28.000000000 -0500
*************** on init
*** 16,21 ****
--- 16,26 ----
insmod /lib/modules/param.ko
insmod /lib/modules/vibrator.ko
+ #ext4 modules by woo
+ insmod /tegrak/lib/modules/mbcache.ko
+ insmod /tegrak/lib/modules/jbd2.ko
+ insmod /tegrak/lib/modules/ext4.ko
+
mount rfs /dev/block/stl9 /system check=no
mount rfs /dev/block/mmcblk0p2 /data nosuid nodev check=no
Binary files z4mod_sl28/initramfs/sbin/sslvpn and z4grak-construction-sl28/initramfs/sbin/sslvpn differ
Binary files z4mod_sl28/initramfs/tegrak/bin/mkfs.ext4 and z4grak-construction-sl28/initramfs/tegrak/bin/mkfs.ext4 differ
Binary files z4mod_sl28/initramfs/tegrak/bin/tune2fs and z4grak-construction-sl28/initramfs/tegrak/bin/tune2fs differ
Binary files z4mod_sl28/initramfs/tegrak/lib/modules/ext4.ko and z4grak-construction-sl28/initramfs/tegrak/lib/modules/ext4.ko differ
Binary files z4mod_sl28/initramfs/tegrak/lib/modules/jbd2.ko and z4grak-construction-sl28/initramfs/tegrak/lib/modules/jbd2.ko differ
Binary files z4mod_sl28/initramfs/tegrak/lib/modules/mbcache.ko and z4grak-construction-sl28/initramfs/tegrak/lib/modules/mbcache.ko differ
Binary files z4mod_sl28/initramfs/tegrak/lib/modules/tegrak_module.ko and z4grak-construction-sl28/initramfs/tegrak/lib/modules/tegrak_module.ko differ
I'm a bit confused about sslvpn It's in my SL28 , it's not in my z4moded SL28. everything else diff as expected. Maybe I just lost it, maybe z4mod removed it. It's a small unimportant mystery.
BTW it looks like what I believe are the recovery keys have changed from SK22 to SL28, so maybe using the wrong kernel breaks something.
and my slightly modified version of the extraction script with commented lines to deal with lzma.
it's much faster (well.. why not), and it handles direcories a little better. It need a "/" somewhere in the file name though so use "./zImage".
Code:
#!/bin/bash
#MUCH faster than dd bs=1 skip=blah
#
# syntas is fastdd file skip <length_in_bytes_optional>
# skip is NOT optional and should be set to 0 read from begining.
#
fastdd () {
#dd with a skip is crazy slower cause it forces bs=1
#credit goes to somebody on the internet.
local bs=1024
local file=$1
local skip=$2
local count=$3
(
dd bs=1 skip=$skip count=0 2>/dev/null
if [[ "$count" != "" ]]; then
dd bs=$bs count=$(($count / $bs))
dd bs=$(($count % $bs)) count=1
else
dd bs=1024 2> /dev/null
fi
) < "$file"
}
zImage=$1
basedir=${1%/*}
echo working directory $basedir
mkdir $basedir/initramfs
outdir=$basedir/initramfs/
#========================================================
# find start of gziped kernel object in the zImage file:
#========================================================
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' $zImage | cut -f 1 -d :`
echo "-I- Extracting kernel image from $zImage (start = $pos)"
echo
echo "*** Start of compressed kernel image:" $pos
#========================================================================
# the cpio archive might be gzipped too, so two gunzips could be needed:
#========================================================================
fastdd $zImage $pos | gunzip > /tmp/kernel.img
pos=`grep -P -a -b -m 1 --only-matching $'\x1F\x8B\x08' /tmp/kernel.img | cut -f 1 -d :`
#
# Use next one for tegrak secuere 11 SL28
# It's an lzma header
# It's found by looking for 5D 00 in the exact same place as cpio (070701) is found in stock.
# The long string of FF's is the real give away since 5D 00 is too vague.
# pos=`grep -P -a -b -m 1 --only-matching '\x{5D}\x{00}\x..\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}\x{FF}' /tmp/kernel.img| cut -f 1 -d :`
echo
echo "*** gzip position in kernel.img :" $pos "(start of gzipped cpio)"
#===========================================================================
# find start and end of the "cpio" initramfs image inside the kernel object:
# ASCII cpio header starts with '070701'
# The end of the cpio archive is marked with an empty file named TRAILER!!!
#===========================================================================
if [ ! $pos = "" ]; then
echo "-I- Extracting compressed cpio image from kernel image (start = $pos)"
# use either one of the next two lines for gzip
# dd if=/tmp/kernel.img bs=1 skip=$pos | gunzip > /tmp/cpio.img
fastdd /tmp/kernel.img $pos |gunzip > /tmp/cpio.img
# comment above and uncomment one of next two lines for lzma, if decompressing tegrak image.
# dd if=/tmp/kernel.img bs=1 skip=$pos | unlzma > /tmp/cpio.img
# fastdd /tmp/kernel.img $pos | unlzma > /tmp/cpio.img
start=`grep -a -b -m 1 --only-matching '070701' /tmp/cpio.img | head -1 | cut -f 1 -d :`
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/cpio.img | head -1 | cut -f 1 -d :`
inputfile=/tmp/cpio.img
else
echo "-I- Already uncompressed cpio.img, not decompressing"
start=`grep -a -b -m 1 --only-matching '070701' /tmp/kernel.img | head -1 | cut -f 1 -d :`
echo start $start
end=`grep -a -b -m 1 --only-matching 'TRAILER!!!' /tmp/kernel.img | head -1 | cut -f 1 -d :`
echo end $end
inputfile=/tmp/kernel.img
fi
end=$((end + 10))
count=$((end - start))
if (($count < 0)); then
echo "-E- Couldn't match start/end of the initramfs image."
exit
fi
echo "-I- Extracting initramfs image from $inputfile (start = $start, end = $end)"
echo inputfile: $inputfile
echo start $start
echo count $count
echo outdir $outdir
# dd if=$inputfile bs=1 skip=$start count=$count > $outdir/initramfs.cpio
fastdd $inputfile $start $count > $basedir/initramfs.cpio
cd $basedir
basedir=`pwd`
cd $outdir; cpio -v -i --no-absolute-filenames < $basedir/initramfs.cpio
cp /tmp/kernel.img $basedir/
More to come.
I like the way this is going, appagom, please put [MOD] in the title.
GL on the new thread, if you hope to have Koreans stumbled upon the thread it might be good to add more phrases like:
루팅
갤럭시s
안드로이드
프로요
업그레이드
업데이트
I never really fully utilized it myself. I hope you get more done here or I'll just take the move personally. Actually, now that you guys were moving into compiling and building I thought this would come. Also, you should look to get some Soju out of this with some donate links or something, even if you aren't looking to take in any cash perhaps you could use it as a seed pot for bounties.
Most importantly, I need to know what "the lost guy from China" said...ㅋㅋㅋ
@Koe, don't waste your time on Gingerbread, get us Honeycomb
Compile a Kernel in 13 Lucky Steps
If you are not familiar with Linux, you might have a hard time following this. Just as I am writing how to do get setup to compile a kernel and compile Android apps, others have written how to setup VirtualBox, Ubuntu, AndroidSDK, etc. Please see documentation provided by Oracle, Google, Ubuntu, etc. before you ask for help about VirtualBox, Ubuntu and the SDK. Thanks.
This is written for people who have used Linux but have not compiled much. Or for the brave at heart who are looking for a nice weekend project. This will tell/guide you through getting a system setup that will not destroy your existing OS.
My host OS is Ubuntu 10.10 64-bit. I wanted had to make an Ubuntu 10.04 32-bit 64-bit system for development because I didn't want to deal with 64-bit vs. 32-bit issues but since Gingerbread requires a 64-bit compiler, I had to. Might as well just use my host system, but since we're here let's keep going!
So you're about to begin. Let's just get one thing straight. No! This will not result in a kernel you can flash. “Then why do this?, you ask. Ask yourself that!
1. Install VirtualBox and the Oracle VM VirtualBox Extension Pack (Currently 4.0.0 r69151)
http://www.virtualbox.org/wiki/Downloads
2. Download an Ubuntu ISO (I suggest Ubuntu Desktop 10.04 64-bit)
http://www.ubuntu.com/desktop/get-ubuntu/download
3. Create a new VM in VirtualBox (You may/have to modify the settings)
Operating System: Linux
Version: Ubuntu64
Extended Features: IO APIC
Processors: 2
RAM: 2048MB
Video Mem: 128MB
HDD: 32GB
Enable PAE/NX
Shared Drive: (I use a shared folder, more detail later)
Click to expand...
Click to collapse
4. Install VirtualBox Guest Additions
5. Install Ubuntu and Update Ubuntu
TIP: Mount your Shared Folder with fstab (Optional but helpful)
If you chose to use a shared folder you can auto-mount it via /etc/fstab.
NOTE: I use a shared folder named andDEV and I mount it on my desktop (~/Desktop). Below is what I add to my /etc/fstab (You may/have to change it)
Code:
andDev /home/koe/Desktop/andDev vboxsf uid=1000,gid=1000 0 0
Click to expand...
Click to collapse
6. Enable multiverse and partner "Software Sources"
7. Install additional software: NOTE: I would also recommend installing preload, but it is not required.
Code:
sudo apt-get install qt3-dev-tools texinfo git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk eclipse ia32-libs
8. Get and Setup the AndroidSDK (Everything you need to know is there or just Google for help)
http://developer.android.com/sdk/index.html
NOTE: Ubuntu 10.04 does not have Java 5 in it's repositories. Follow this link to setup to Java 5
9. Get and Setup ADT Plugin for Eclipse (Everything you need to know is there or just Google for help)
http://developer.android.com/sdk/eclipse-adt.html#installing
TIP: At this point you might want to try Google's “Hello, Android” tutorial.
Click to expand...
Click to collapse
10. Download and Install the Sourcery G++ Lite for ARM EABI Toolchain (Currently arm-2010.09)
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Look for and click the link for Recommended Release
Look for and click the link for IA32 GNU/Linux TAR
Extract the archive. You will have a folder named arm-2010.09
Make a directory in your home directory named CodeSourcery
Ex. mkdir ~/CodeSourcery
copy the entire arm-2010.09 folder into CodeSourcery
Click to expand...
Click to collapse
11. Update your $PATH
You should be familiar with this because you had to do it to setup the AndroidSDK
Append the following to your PATH in .bashrc
Code:
~/CodeSourcery/arm-2010.09/bin
12 Download and Prepare the Samsung Source Code (Currently SHW-M110S_Opensource_Froyo_update2.zip)
http://opensource.samsung.com/
Click Mobile - Mobile Phones
Look for and download SHW-M110S_Opensource_Froyo_update2.zip
Extract the archive. Inside the new folder are two more archives.
Extract SHW-M110S_Kernel.tar.gz Inside there is a new folder Kernel
You can copy this to a more convenient location. I copy it to my desktop.
In the Kernel folder is a file named Makefile. Open it with your editor of choice.
Go to line 184. You will see ...
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-
You have to change it to something like below, but see the koe? That is my username so you have to change it to your username.
CROSS_COMPILE ?= /home/koe/CodeSourcery/arm-2010.09/bin/arm-none-eabi-
Save Makefile.
Click to expand...
Click to collapse
13. Compile a Kernel
NOTES:
1. Do not try to compile the code in your Shared Folder. It will fail.
2. When issuing these commands you will see lots of output during this part, most of which is not useful to you at this point.
3. The amount of time it takes for the final make command to run will depend on your computer.
Click to expand...
Click to collapse
Open a terminal window and move into the Kernel directory. Issue the following commands.
Code:
$ make shw-m110s_defconfig
$ make menuconfig
When the config editor opens do the following:
DOWN ARROW to Userspace binary formats and press ENTER
DOWN ARROW to Kernel support for a.out and ECOFF binaries and press SPACE
RIGHT ARROW to Exit and press ENTER
RIGHT ARROW to Exit and press ENTER
Press ENTER again and it will exit back to the command line
NOTE: If you have a powerful computer and you want to speed up the build time, make can be run as, make -j# The # represents how much it will try to do at once. $ make does 1 operation, make -j3 tries to do 3. I have a 2.66 Ghz dual-core CPU and I allow the VirtualBox guest OS access to both cores, so I use make -j3 The compile finishes in about 12 minutes and allows me to still use my host OS. For now, you might just want to run make without the -j option to get a full understanding of how long it takes. Later you can test with values.
Click to expand...
Click to collapse
WARNING: Time is relative. This will take some time ... go make a sandwich or maybe even watch a movie.
Code:
$ make
When you see $ again check the last couple of lines of output. You want to see …
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Click to expand...
Click to collapse
Congratulation! You just built a kernel for the m110s!
good write up.. Glad to see you hit the same a.out snag as me. Just makes me think it's not configured right and so I have low hopes. Will be fun to see what happens when you put an initramfs in it. I'd just unpack the stock one and try that first.
As for z4control.. I'm pretty interested in getting this working as something like this was the real reason I started messing with this. It seems there may be some issue with the z4mod's init wrapper not doing things it should but anyway.. just now seeing issues. flashed one kernel where I added some debug output added.. trying to understand it (not understanding it yet). I'm optimistic that I can track it down. edit:... definitely making progress, not quite there yet but getting closer.
appagom said:
good write up.. Glad to see you hit the same a.out snag as me. Just makes me think it's not configured right and so I have low hopes. Will be fun to see what happens when you put an initramfs in it. I'd just unpack the stock one and try that first.
Click to expand...
Click to collapse
Strictly to see if it would build completely and to get more info on how to do it, I did do an initramfs & kernel test build.
used the update2 kernel source
used the initramfs linked above (SHW-M110S intramfs Requires further research.)
ran find ./ | cpio -H newc -o > ~/Desktop/newramfs.cpio
added the cpio via menuconfig with no compression
It did build successfully and I ended up with a 7mb zImage vs. a 2.5mb.
There is no way in hell I am going to flash it because I do not know which initramfs (maybe from sk05) it is or what it contains but it did complete.
Now isn't this a kick in the nuts!
Since I got the toolchain all set I decided to focus on the Android source code. Following these directions .. http://source.android.com/source/download.html I got to "Building the code"
Code:
[email protected]:~/Desktop/myAnd$ source build/envsetup.sh
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
[email protected]:~/Desktop/myAnd$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. simulator
4. full_passion-userdebug
5. full_crespo-userdebug
Which would you like? [full-eng] 1
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
[email protected]:~/Desktop/myAnd$ make
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv5te
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
Checking build tools versions...
build/core/main.mk:76: ************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:79: ************************************************************
build/core/main.mk:80: *** stop. Stop.
Well, 32-bit will do for now seeing how ::cough:: I'm not the one building gingerbread.
I guess my next how-to is going to be how to go out and buy a PC and setup a 64-bit development environment.
Well, 32-bit will do fro now see how ::cough:: I'm not the one building gingerbread.
I guess my next how-to is going to be how to go out and buy a PC and setup a 64-bit development environment.
Click to expand...
Click to collapse
Could try the gnu cross compiler I suppose maybe it's clever enough to work around it. Your computer really isn't 64 bit though? You could just install a 64 bit VM assuming it is.
koe1974 said:
added the cpio via menuconfig with no compression
Click to expand...
Click to collapse
Ok, that procedure is easier than it used to be, or than what I read it used to be. I'm not afraid to add one and flash it. Just busy with making one I like right now though.. then again.. sounds like a 10 minute interruption.. so.. we'll see... oh and I don't remember what was stopping xconfig from working, but something annoying.. it's quite a bit nicer than menuconfig. I need to learn how that works though.. cause really you should add modules from the compilation itself right.. so you cant have the initramfs already before you compile, unless make opens it and add the modules and re-cpio's it. Anyway.. I'll shoot first, ask later.
edit: just flashed.. it gave about 1 tenth of a blue bar and froze. Ok, that was fun, back to fixing and ext4 kernel up.
appagom said:
Could try the gnu cross compiler I suppose maybe it's clever enough to work around it. Your computer really isn't 64 bit though? You could just install a 64 bit VM assuming it is.
Click to expand...
Click to collapse
The VM I setup was 32bit, but it's 64bit now. I will just modify the How-To for a 64bit system.
4 bugs related z4control issues solved(ok 2 were probably the same as well as a fifth, so really 3)..
one, it's failing to create a directory it needs (/system/etc/init.d), reported, work around create by hand.
2) It's rfs formatting wrapper script which checked for voodoo, failed. Strange bug in sh actually.. workaround in script found and reported
bugs 3 and 4 details unimportant, were related to the mystery of where sslvpn went. z4build was splitting the initramfs by tacking it some of it brute force on to the end of the zImage. The init script found it again and unpacked the files before continuing. Oddly, it seems an uneeded because I fit the only big displaced file in just fine without splitting and I didn't even use heavy compression. Anyway, needed or not it caused two files to go missing, this one, and a small text file that reported the version of z4mod. this file prevented z4control from working.
I will not fix this tonight, but I mostly understand it (altough not in exact detail of precisely understanding some of the odd symptoms, but I think dealing with this will likely solve it all) My diffs could never find the version file, cuase I never unpacked it to know it even existed in the first place. Waaaah.. bug tracking is tiring. We should have this all running very shortly.
update: my first attempt at fixing the repacking bug.. resulted (I already feared this but hoped it would just go away) in a kernel that seems totaly complete, but where it seems something in the init wrapper isn't working... getting closer to finding it.
update: LAST BUG FIXED
The last bug(which I previously assumed was part of the repack bug) was actually aslo part of z4build, now documented here:
http://forum.xda-developers.com/showpost.php?p=10638535&postcount=1062
I'm pretty sure that one should really get it all going now. there are no lines of code left to break. I've tested almost every line now. I'll get a new kernel out, but will need to wait for an updated z4control. z4ziggy seems busy right now maybe (no complaint obviously).
I can fix this last bug in my roll out of the kernel. The other remaining ones can be worked around pretty easily, but not pretty for user instructions, better to wait probably.
SK05 Rebuild test (PASS)
We have doubts about if the shw-m110s_defconfig is what is used by samsung so I decided to try to make a working kernel from an initramfs and froyo_update source code.
General idea of what I did...
sk05 source code froyo_update (from samsung)
sk05 initramfs (link in post 4 "initramfs SK05 Tested .. OK")
cd initramfs_dir
find . -print0 | cpio -o0 -H newc | gzip -9 -f > some/path/initramfs.cpio.gz
cd kernel source code root directory
modify Makefile ln. 184
make aries_android_rfs_defconfig
make menuconfig
disable a.out
add path to initramfs archive
compression gzip
make
tar --format=ustar SK05rebuilt.tar zImage
Click to expand...
Click to collapse
Results in a zImage the same size (4.6mb) as samsung's, and it boots.
awesome..
I GOT IT
That was big fat B to solve. Debugging self destructing scripts that run in a startup environment with different mounts and different PATH variable is no fun and requires some imagination. I had to work around 2 more bugs in z4build but now I have user transparent workarounds to all of them.. plug and play. Unfortunately I have about 30 minutes more free time today so I probably wont post it today. I should clean up some comments and such in it first probably. We'll see.
appagom said:
awesome..
I GOT IT
Click to expand...
Click to collapse
Very nice!
Sent from my SHW-M110S using XDA App
the "awesome" comment was referring to you. Should be able to take the grak of z4grak with some compiling , but I'm happy with it in too.. doesn't matter.
Anyway.. I updated the kernel page (from the link on OP). The new kernel is there, but I pushed it out very fast. Didn't flash last repack myself yet after changing comments.. but I only changed comments. (I am running the posted copy now) It needs testing since my system has gotten a been used and non-pristine. Get z4control, you can use it to flash it if you want. the rest is all push button I hope.
Oh and default settings are less safe than Tegrak, not much if any better than ext2 actually. I think.. can't confirm right now. I recommend modifying etc/fstab to data=ordered,barrier=1 personally.. but that's what I like about z4.. you can decide for yourself.
Sent from my SHW-M110S using XDA App
The latest version:
https://github.com/xiaolu/galaxys2_kernel_repack
update for cygwin
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I hate GFW
I got a problem after repacked the new zImage.
The original size of zImage is 8MB, but the new zImage is 5MB...
Chenglu said:
Unpack:
Code:
./k-unpack zImagexwki8 initramfs-ki8
[I] Extracting gzip'd kernel image from file: zImagexwki8 (start = 16621)
[I] CPIO compression type detected = none | offset = 163840
[I] Extracting non-compressed CPIO image from kernel image (offset = 163840)
[I] Expanding CPIO archive: initramfs.cpio to initramfs-ki8.
Create newinitramfs.cpio:
Code:
./gen_initramfs.sh -o newinitramfs-ki8.cpio -u 0 -g 0 ./initramfs-ki8
or
Code:
cd initramfs-ki8
find . | cpio -o -H newc > ../newinitramfs-ki8.cpio
Edit k-repack Modified to your cross-compiler:
Code:
COMPILER=/home/xiaolu/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi
COMPILER_LIB=/home/xiaolu/CodeSourcery/Sourcery_G++_Lite/lib/gcc/arm-none-eabi/4.5.2
Rebuild kernel:
Code:
./k-repack zImagexwki8 newinitramfs-ki8.cpio
[I] ---------------------------kernel repacker for i9100---------------------------
[I] Extracting gzip'd kernel from zImagexwki8 (start = 16621)
[I] Non-compressed CPIO image from kernel image (offset = 163840)
[I] CPIO image MAX size:3044984
[I] head count:3208824
[I] Making head.img ( from 0 ~ 163840 )
[I] Making a tail.img ( from 3208824 ~ 13773971 )
[I] Current ramdsize using cat : 3045376 with required size : 3044984
[I] Current ramdsize using gzip -fc : 1888879 with required size : 3044984
[I] gzip -fc accepted!
[I] Merging [head+ramdisk] + padding + tail
[I] Now we are rebuilding the zImage
[I] Image ---> piggy.gzip
[I] piggy.gzip ---> piggy.gzip.o
[I] Compiling head.o
[I] Compiling misc.o
[I] Compiling decompress.o
[I] Compiling lib1funcs.o
[I] Create vmlinux.lds
[I] head.o + misc.o + piggy.gzip.o + decompress.o + lib1funcs.o---> vmlinux
[I] vmlinux ---> zImage
[I] Re-compiled to new_zImage
[I] Cleaning up...
[I] finished...
Resources form GT-I9100_OpenSource_Update2(https://opensource.samsung.com )
initramfs-xwki8-cwm5.0.2.6.zip is modified initramfs for xwki8 stock kernel.
Click to expand...
Click to collapse
You are my hero
Thanks for making it
rock_shen said:
I got a problem after repacked the new zImage.
The original size of zImage is 8MB, but the new zImage is 5MB...
Click to expand...
Click to collapse
No problem,CPIO image is gzipped
rock_shen said:
I got a problem after repacked the new zImage.
The original size of zImage is 8MB, but the new zImage is 5MB...
Click to expand...
Click to collapse
use command Filled to 8387840 bytes
Code:
dd if=new_zImage of=zImage bs=8387840 conv=sync
I have writed a script for easy repacking/unpacking/padding
Code:
#!/bin/sh
REUNPACK=$1
if [ $REUNPACK == repack ]; then
cd initramfs_root
find . | cpio -o -H newc > ../initramfs.cpio
cd ..
./k-repack zImage initramfs.cpio
fi;
if [ $REUNPACK == unpack ]; then
./k-unpack zImage
fi;
if [ $REUNPACK == cpio ]; then
cd initramfs_root
find . | cpio -o -H newc > ../initramfs.cpio
fi;
if [ $REUNPACK == padding ]; then
rm -rf zImage
dd if=new_zImage of=zImage bs=8387840 conv=sync
fi;
if [ $REUNPACK == clean ]; then
rm -rf zImage initramfs_root initramfs.cpio new_zImage
echo "Done!"
fi;
netchip said:
I have writed a script for easy repacking/unpacking/padding
Code:
#!/bin/sh
REUNPACK=$1
if [ $REUNPACK == repack ]; then
cd initramfs_root
find . | cpio -o -H newc > ../initramfs.cpio
cd ..
./k-repack zImage initramfs.cpio
fi;
if [ $REUNPACK == unpack ]; then
./k-unpack zImage
fi;
if [ $REUNPACK == cpio ]; then
cd initramfs_root
find . | cpio -o -H newc > ../initramfs.cpio
fi;
if [ $REUNPACK == padding ]; then
rm -rf zImage
dd if=new_zImage of=zImage bs=8387840 conv=sync
fi;
if [ $REUNPACK == clean ]; then
rm -rf zImage initramfs_root initramfs.cpio new_zImage
echo "Done!"
fi;
Click to expand...
Click to collapse
good work
Chenglu said:
I hate GFW
Click to expand...
Click to collapse
haha
me too
guaiwujia said:
haha
me too
Click to expand...
Click to collapse
hiahia
nice scripttl there. makes it easier for devs.
Sent from my GT-I9100 using xda premium
update to v3
Chenglu said:
I hate GFW
Click to expand...
Click to collapse
me too!~
thx
.......
What is GFW?
Sent from my GT-I9100
The Great Fire Wall of China
Chenglu said:
The Great Fire Wall of China
Click to expand...
Click to collapse
I dont like that too xD
black-snowflake said:
me too!~
Click to expand...
Click to collapse
Foreigners don't know what’s GWF you said here, but I think you know who I am!
I'm having a problem. Whenever I try to repack a kernel, it says the ramdisk size is too big. It also says realpath command isn't found on line 12.
Code:
[email protected]:~/Desktop/Kernel/tools# ./repack zImage newinitramfs.cpio
./repack: line 12: realpath: command not found
[I] ---------------------------kernel repacker for i9100---------------------------
[I] Extracting gzip'd kernel from zImage (start = 16621)
[I] CPIO compression type detected = gzip | offset = 163840
[I] CPIO image MAX size:2860094
[I] Head count:3023934
[I] Making head.img ( from 0 ~ 163840 )
[I] Making a tail.img ( from 3023934 ~ 10612864 )
[I] Current ramdsize using cat : 4573696 with required size : 2860094 bytes
[I] Current ramdsize using gzip -f9 : 2866888 with required size : 2860094 bytes
[E] New ramdisk is still too big. Repack failed. 2866888 > 2860094
Tried both 4.4.1 & 4.5.2 version of G++ Lite, none of them is fixes the problem.
Looks like there's something wrong with gzip..
Help?
Padding big binary files to end of the zImage files.
Example(initramfs-tools-v5 Padding sufiles to zImage files):
How to use:
Code:
busybox dd if=/dev/block/mmcblk0p5 of=/system/app/Superuser.apk skip=7026336 seek=0 bs=1 count=196640
busybox dd if=/dev/block/mmcblk0p5 of=/system/bin/su skip=7000000 seek=0 bs=1 count=26336
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I am not responsible for any damage to your phone.
Proceed with caution if you have no experience.
NB: This guide is made for Gnex Kernel for ROM 4.2.X
I want to explain how to add a bootlogo to your kernel.
All steps are designed to run on linux box.
This allows you to bypass the lack of this fantastic opportunity on our GNEX.
The base is to know linux kernel compilation and a bit of imagination.
Step 1
We create the image that will be displayed at boot time, to do this you can use a free tool such as Gimp:
- create an image in any format (for ex. png), the important thing is size (720x1280)
- goto menu/image/mode/Indexed -> select Generate Optimum Palette -> Maximum number of Color -> 224
- goto file/export -> Set Name = logo_linux_clut224.ppm -> Type = PNM Image (*.pnm) -> Click Export -> Data formatting = Ascii -> Save
Step 2
At this point, you must import your file in the specific directory of the kernel:
- cp -vr drivers/video/logo/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm.bck
- cp -vr /<your-dir>/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
Step 3
Now let's change the default configuration to compile with what you need, add this line to .config:
#
# Boot logo and Framebuffer
#
CONFIG_CMDLINE="console=ttyS0,115200 androidboot.console=ttyS0 fbcon=rotate:0 mem=1G vmalloc=768M zcache omap_wdt.timer_margin=60 no_console_suspend"
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_CMDLINE_FORCE=y
CONFIG_CMDLINE_EXTEND=y
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
# CONFIG_FONT_4x6 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
Step 4
The last step is to replace the attached file in your initramfs (make a backup of your original files):
- cp -vr /<dir-of-your-ramdisk/init /<dir-of-your-ramdisk/init.bck
- cp -vr init /<dir-of-your-ramdisk/init
Step 5
Recompile your kernel and initramfs.
Now have fun.
Everything you need and guides to compile a kernel can be found on my github linked in the signature.
.... reserved ....
.... reserved ....
.... reserved ....
.... reserved ....
Makes Gnex UX more better like SGS 1 and was waiting for this since a long time !
That's great work Anarkia, thanks :good:
Fantastic. It adds extra awesomeness to your kernel.
Sent from my Galaxy Nexus using xda premium
Well i've tried the image, the init, and the flags and I get nothing. It did pop up with a little text android and a flashing cursor at one point messing with a few other flags, but using this setup I can't seem to get it running. I'm trying to diagnose the issue but I am not sure where to start.
Sent from my Galaxy Nexus using Tapatalk 2
The focal point is init file .... Have you insert it into your ramdisk?
Do you use anykernel format?
Gnex with AK inside
anarkia1976 said:
The focal point is init file .... Have you insert it into your ramdisk?
Do you use anykernel format?
Gnex with AK inside
Click to expand...
Click to collapse
I tried with and without the init file. I have it build the boot during compile. Ill keep trying.
Sent from my Galaxy Nexus using Tapatalk 2
Ramdisk is essential point for have personal kernel bootlogo.
If you see only text log the problem is inside ramdisk! :good:
Thanks
anarkia1976 said:
Ramdisk is essential point for have personal kernel bootlogo.
If you see only text log the problem is inside ramdisk! :good:
Thanks
Click to expand...
Click to collapse
How did you modify the init? That may not be working with my kernel.
Sent from my Galaxy Nexus using Tapatalk 2
Init is a version For mr1 sgs3 ... I dont have the source ....
Gnex with AK inside
Still not getting anything to come up. I've tried with and without the init. With the settings in the op, with the settings in github, with the framebuffer patches, without the framebuffer patches. Is it something special about the image itself I'm missing? I followed the process but it started with a pretty high resolution PNG I resized.
I should also move during the actual compile force and extend cancel out. It only sends one to the compile.
Sent from my Galaxy Nexus using Tapatalk 2
Have you converted color to index 224? and save it like .pnm?
anarkia1976 said:
Have you converted color to index 224? and save it like .pnm?
Click to expand...
Click to collapse
I switched from photoshop to gimp for the sake of being as precise as possible. Everything listed was tried, so it's nothing there that could be doing it.
Sent from my Galaxy Nexus using Tapatalk 2
Ok, but you can see log by kernel at boot before bootanimation?
Hi Anarkya, This guide is only valid for the kernel AK?
Wow! Thanks anarkia1976! :good:
I'll try this later.
ak said:
I am not responsible for any damage to your phone.
Proceed with caution if you have no experience.
NB: This guide is made for Gnex Kernel for ROM 4.2.X
I want to explain how to add a bootlogo to your kernel.
All steps are designed to run on linux box.
This allows you to bypass the lack of this fantastic opportunity on our GNEX.
The base is to know linux kernel compilation and a bit of imagination.
Step 1
We create the image that will be displayed at boot time, to do this you can use a free tool such as Gimp:
- create an image in any format (for ex. png), the important thing is size (720x1280)
- goto menu/image/mode/Indexed -> select Generate Optimum Palette -> Maximum number of Color -> 224
- goto file/export -> Set Name = logo_linux_clut224.ppm -> Type = PNM Image (*.pnm) -> Click Export -> Data formatting = Ascii -> Save
Step 2
At this point, you must import your file in the specific directory of the kernel:
- cp -vr drivers/video/logo/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm.bck
- cp -vr /<your-dir>/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
Step 3
Now let's change the default configuration to compile with what you need, add this line to .config:
#
# Boot logo and Framebuffer
#
CONFIG_CMDLINE="console=ttyS0,115200 androidboot.console=ttyS0 fbcon=rotate:0 mem=1G vmalloc=768M zcache omap_wdt.timer_margin=60 no_console_suspend"
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_CMDLINE_FORCE=y
CONFIG_CMDLINE_EXTEND=y
CONFIG_VT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
# CONFIG_FONT_4x6 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
Step 4
The last step is to replace the attached file in your initramfs (make a backup of your original files):
- cp -vr /<dir-of-your-ramdisk/init /<dir-of-your-ramdisk/init.bck
- cp -vr init /<dir-of-your-ramdisk/init
Step 5
Recompile your kernel and initramfs.
Now have fun.
Everything you need and guides to compile a kernel can be found on my github linked in the signature.
Click to expand...
Click to collapse
I've tried using the same makefile instruction to build a kernel for my Alcatel OT-918D which fails to compile due to an error , can you please help me get beyond this error , I need to use fbcon for debugging purposes . :
The phone fb0 can be accessed through :
/dev/graphics/fb0
while in
cat /proc/fb
displays:
0 mtkfb
*************************************************************************************************
Compilation error
*************************************************************************************************
drivers/video/console/fbcon.c:638: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:638: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'con2fb_release_oldinfo':
drivers/video/console/fbcon.c:670: warning: passing argument 1 of 'oldinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:670: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:670: error: too few arguments to function 'oldinfo->fbops->fb_release'
drivers/video/console/fbcon.c:673: warning: passing argument 1 of 'newinfo->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:673: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:673: error: too few arguments to function 'newinfo->fbops->fb_release'
drivers/video/console/fbcon.c: In function 'fbcon_startup':
drivers/video/console/fbcon.c:868: warning: passing argument 1 of 'info->fbops->fb_open' from incompatible pointer type
drivers/video/console/fbcon.c:868: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:868: error: too few arguments to function 'info->fbops->fb_open'
drivers/video/console/fbcon.c: In function 'fbcon_exit':
drivers/video/console/fbcon.c:3388: warning: passing argument 1 of 'info->fbops->fb_release' from incompatible pointer type
drivers/video/console/fbcon.c:3388: note: expected 'struct file *' but argument is of type 'struct fb_info *'
drivers/video/console/fbcon.c:3388: error: too few arguments to function 'info->fbops->fb_release'
make[3]: *** [drivers/video/console/fbcon.o] Error 1
make[2]: *** [drivers/video/console] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
Enable Kernel Logo on Snapdragon
Hi,
I am facing the issue to display kernel logo at startup.
I followed all mentioned step of this post except one but still not working.
I am not able to find the attachment initramfs so can you please help me out/any suggestion ?
Regards,
Sunil
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step by step instructions for building AOKP 6.0 for the T-Mobile variant of the Samsung Galaxy S4
I have noticed that the build instructions on the AOKP website are a bit outdated. They date back to JellyBean. I would like to encourage other users to build more custom roms, and I thought that it would help if I show how to build one of the roms wich compiled successfully for me (Praise God!). It is my hope that these instructions are clear and easy to follow. Hey, if I can do it, anybody can do it!
<<<<< Step 1: Setup your system. >>>>>
To be honest, this can be the most daunting part, because if you do not set this up properly, it just will not work. I use Ubuntu 14.04 on a HP Compaq 6715b laptop. I know, not a very ideal compiler, but it is what I've got. Here are the suggested packages, just open a terminal and paste this in:
Code:
$ sudo apt-get install bison build-essential bzip2 curl dpkg-dev flex g++-multilib git git-review gnupg gperf lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev openjdk-7-jdk libbz2-1.0 libbz2-dev libc6-dev libghc-bzlib-dev libgl1-mesa-dev libgl1-mesa-glx:i386 libncurses5-dev libreadline6-dev libreadline6-dev:i386 libx11-dev:i386 libxml2-utils lzop maven pngcrush pngquant python-markdown schedtool squashfs-tools tofrodos x11proto-core-dev xsltproc zip zlib1g-dev zlib1g-dev:i386
This will take a while. Once it is done, do this:
Code:
$ mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
$ gedit ~/.bashrc
Now you should see gedit open up your .bashrc file, to which you should add this at the very end, and save it:
Code:
export PATH=~/bin:$PATH
Now you need to close your terminal and open a new one to get the PATH variables to stick. Actually, it wouldn't hurt to reboot your system after installing all of those programs we just installed. Your computer should now be primed and ready to go.
<<<<< Step 2: Download the source. >>>>>
Here is a very short project for you that takes the computer a long time to complete. Open a terminal and start typing:
Code:
$ cd ~
$ mkdir aokp6
$ cd aokp6
$ repo init -u https://github.com/AOKP/platform_manifest.git -b mm
$ repo sync
You can now go outside, play with the kids, phone a friend, and then go to bed. When you awake the next morning, this might be done, depending on your internet connection!
<<<<< Step 3: Adding the device, kernel, and vendor trees. >>>>>
In some cases, you can simply type the command
Code:
$ breakfast
and just choose your device, but at this time, the AOKP repository did not include a current device tree for the JFLTETMO phone, so we need to download one. I chose to test out the Dirty Unicorn JFLTETMO devices trees, by going here and choosing to download the zips. Later, perhaps we can learn about adding them as dependencies, but here are the links, be sure to choose the 6.0 branches and click the download button to download the zips:
https://github.com/DirtyUnicorns/android_device_samsung_jfltetmo
https://github.com/DirtyUnicorns/android_kernel_samsung_jf
https://github.com/DirtyUnicorns/android_device_samsung_jf-common
https://github.com/DirtyUnicorns/android_device_samsung_jflte
https://github.com/DirtyUnicorns/android_device_samsung_msm8960-common
https://github.com/DirtyUnicorns/android_device_samsung_qcom-common
https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-13.0
Once you have downloaded them, unzip each one and rename them:
android_device_samsung_jfltetmo - jfltetmo
android_device_samsung_jf-common - jf-common
android_device_samsung_jflte - jflte
android_device_samsung_msm8960-common - msm8960-common
android_device_samsung_qcom-common - qcom-common
Go to you aokp6/device folder and create a folder called "samsung". Now put the above folders into it.
Then unzip the kernel_samsung_jf folder and rename it "jf". Go to the aokp6 folder and create a folder called "kernel", go into the kernel folder and make a new folder called "samsung", enter that folder, and put your "jf" folder here. Don't worry, we are almost done.
Now go to your aokp6/vendor folder. Create a new folder called "samsung". Enter the samsung folder and copy the contents of your unzipped proprietary_vendor_samsung folder. This should be a bunch of folders like jf-gsm-common, jf-common, etc. You actually don't need all of these folders right now, but it will not hurt to have them, and there are two folders in there that you need.
Now you should probably take a break before going on to the next step!
<<<<< Step 4: Editing the device, kernel, and vendor trees. >>>>>
Now, go to the device/samsung/jfltetmo folder and rename du.mk to aokp.mk and edit it as follows:
Code:
$(call inherit-product, device/samsung/jfltetmo/full_jfltetmo.mk)
# Enhanced NFC
$(call inherit-product, vendor/aokp/configs/nfc_enhanced.mk)
# Inherit some common DU stuff.
$(call inherit-product, vendor/aokp/configs/common_full_phone.mk)
PRODUCT_BUILD_PROP_OVERRIDES += \
PRODUCT_NAME=jfltetmo \
TARGET_DEVICE=jfltetmo \
BUILD_FINGERPRINT="samsung/jfltetmo/jfltetmo:4.4.4/KTU84P/M919UVUFNK2:user/release-keys" \
PRIVATE_BUILD_DESC="jfltetmo-user 4.4.4 KTU84P M919UVUFNK2 release-keys"
PRODUCT_NAME := aokp_jfltetmo
PRODUCT_DEVICE := jfltetmo
NOTE: the original file said "vendor/du/config/*" you must change it to "configs" or there will be an error!
Then, in the jfltetmo folder, delete the cm.dependencies file. Do the same deletion in all of the device/samsung/* directories. You don't want to download CM dependencies, because you already have them here.
Note: Because repositories are constantly updated, I can only garuntee that this will work based on the files as they were the day of this writing. However, with all of this in place, if you follow this guide, it should work realatively the same as what happened for me.
You can actually just run the compiler right now, however, you will have several stop errors that we plan to address here before you do that. All of these edits are due to errors that cropped up when running the compiler.
The first error was relating to libhealthd. Android and AOKP source already has a built in libhealthd for the qcom motherboards, and it is a duplication of efforts (which causes an error) to have both the device tree libhealthd and the source libhealthd. So here is how we fix it. Now, go to the device/samsung/qcom-common/libhealthd folder, and make the following changes to the Android.mk file:
Code:
# WJH LOCAL_PATH := $(call my-dir)
# WJH include $(CLEAR_VARS)
# WJH LOCAL_SRC_FILES := healthd_board_default.cpp
# WJH LOCAL_MODULE := libhealthd.qcom
# WJH LOCAL_C_INCLUDES := system/core/healthd bootable/recovery
# WJH include $(BUILD_STATIC_LIBRARY)
Another error that will crop up if you run the compiler now, is that your multi-media video will have a problem setting the picture order, and the compiler will get confused and stop with an error. So we can fix that here before we begin. We need to edit one of the hardware files. Go to hardware/qcom/media-caf/msm8960/mm-video/vidc/venc/src, and edit the video_encoder_device.cpp file as follows (this is the last few lines of the file):
Code:
bool venc_dev::venc_set_picture_order_count_type(OMX_U32 type)
{
// WJH venc_poctype temp;
// WJH venc_ioctl_msg ioctl_msg = {&temp, NULL};
// WJH temp.poc_type = type;
// WJH DEBUG_PRINT_HIGH("Setting poc type: %d", type);
// WJH if(ioctl(m_nDriver_fd, VEN_IOCTL_SET_PIC_ORDER_CNT_TYPE, (void *)&ioctl_msg) < 0)
// WJH {
// WJH DEBUG_PRINT_ERROR("Request for setting poc type failed");
// WJH return false;
// WJH }
return true;
}
And finaly, there is an error that will pop up and stop your compiler because of a conflict over the "ambientIsAvailable" portion of this file: packages/apps/InCallUI/src/com/android/incallui/ModButtonPresenter.java at line 404. So we will just go ahead and edit it here before we begin.
Code:
final boolean showNote = isProvisioned &&
// WJH DeepLinkIntegrationManager.getInstance().ambientIsAvailable(getUi().getContext()) &&
mNoteDeepLink != null;
Now that all of the hard work is done, it is time to actually build something!
<<<<< Step 5: Start your build! >>>>>
Phew! You have invested a lot of hours into this project, now it is time to actually put those files and time to use! Open up a terminal in your aokp6 folder and start typing:
Code:
aokp6$ . build/envsetup.sh
Which will output something like this:
Code:
including vendor/aokp/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/aokp/bash_completion/git.bash
including vendor/aokp/bash_completion/repo.bash
Now type:
Code:
aokp6$ brunch jfltetmo
Which will start the long build process, it will output this:
Code:
including vendor/aokp/vendorsetup.sh
Got local manifest
Got local manifest
Checked dependency tree over :
NO_DEPS: device/*/jfltetmo
============================================
PLATFORM_VERSION_CODENAME = REL
PLATFORM_VERSION = 6.0.1
AOKP_VERSION = aokp_jfltetmo_mm_unofficial_2016-06-20_1015
TARGET_PRODUCT = aokp_jfltetmo
TARGET_BUILD_VARIANT = userdebug
TARGET_BUILD_TYPE = release
TARGET_BUILD_APPS =
TARGET_ARCH = arm
TARGET_ARCH_VARIANT = armv7-a-neon
TARGET_CPU_VARIANT = krait
TARGET_2ND_ARCH =
TARGET_2ND_ARCH_VARIANT =
TARGET_2ND_CPU_VARIANT =
HOST_ARCH = x86_64
HOST_OS = linux
HOST_OS_EXTRA = Linux-3.16.0-73-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE = release
BUILD_ID = MOB30J
OUT_DIR = /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out
============================================
And this:
Code:
.....edited for space.....
Import includes file: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/import_includes
host C: libhost <= build/libs/host/CopyFile.c
build/libs/host/CopyFile.c:86:43: warning: unused parameter 'pSrcStat' [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
^
build/libs/host/CopyFile.c:86:72: warning: unused parameter 'pDstStat' [-Wunused-parameter]
static bool isSameFile(const struct stat* pSrcStat, const struct stat* pDstStat)
^
build/libs/host/CopyFile.c:104:42: warning: unused parameter 'src' [-Wunused-parameter]
static void printNotNewerMsg(const char* src, const char* dst, unsigned int options)
^
build/libs/host/CopyFile.c:531:69: warning: unused parameter 'isCmdLine' [-Wunused-parameter]
static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, unsigned int options)
.....edited for space..... Stuff like this will scroll by .....
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_LOG.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_MASQUERADE.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_MIRROR.c
Copy: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libext4_intermediates/libipt_NETMAP.c
target StaticLib: libip4tc (/home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/obj/STATIC_LIBRARIES/libip4tc_intermediates/libip4tc.a)
target thumb C++: keystore <= system/security/keystore/keystore.cpp
target thumb C++: keystore <= system/security/keystore/keyblob_utils.cpp
target thumb C++: keystore <= system/security/keystore/operation.cpp
.....edited for space.....
Notice that there were some "warning" flags in there. Warnings are not all bad, but they can be. In this case it works out okay. Hopefully, after many hours, you should see this:
Code:
______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/'/'\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/
===========-Package complete-===========
zip: /home/alaskalinuxuser/Documents/projects/phones/compile/aokp6/out/target/product/jfltetmo/aokp_jfltetmo_mm_unofficial_2016-06-19_0149.zip
md5: 46bc18249c61988e75aba813464692a3
size: 320M
========================================
Success! Praise God! Now you can put this on your phone and test it out! Hopefully everything will be working! For future use, now you can start making changes or edits, from backgrounds to kernels! Have fun and make lots of backups. Remember, sometimes it is really hard to undo a change that you make.
Hopefully we learned how to set up our system, get the source, add devices and kernels that are not in the source, make proper edits, and run the compiler. Like I said, this works on my machine, as of this writing. You may notice, that if you make this build, it will not be identical to the one that I have posted on XDA. That is because I have made a few edits, additions, and/or subtractions here and there. That is the great thing about Android and open source! It is now up to you to make it better, to make it unique, or to make it you. Good luck with those builds, and be sure to share and help the next guy or gal with their projects too!
Linux - keep it simple.