Hi!
i will try to put here everything i found important for dev in this tread.
This is gonna be a work in progress...
First we can change many value in kernel with sysctl.conf in system/etc folder when you have init.d folder support.
This View attachment tunable.txt is a list of thing you can play with.
Magic number you need for View attachment mkbootimg.zip to recompile a new boot.img
This is for P930 and SU640
Code:
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M,console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41a00000 -o newboot.img
This is for LU6200
Code:
./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
many more to come with more detail for sure....
Hi,i tried to customize the boot.img without success. as a test i just unpack and repack it without any changes to the content but it didn't boot. can you give me some advice? Thanks
---------- Post added at 02:48 AM ---------- Previous post was at 02:40 AM ----------
I've been trying to build a kernel from p930's source following tutorial written for other devices. but the generic method seems not working with LG kernel build. can you tell how you've built your kernel, as i see you've already compiled a overclocked kernel for lu6200.
freefall12 said:
Hi,i tried to customize the boot.img without success. as a test i just unpack and repack it without any changes to the content but it didn't boot. can you give me some advice? Thanks
---------- Post added at 02:48 AM ---------- Previous post was at 02:40 AM ----------
I've been trying to build a kernel from p930's source following tutorial written for other devices. but the generic method seems not working with LG kernel build. can you tell how you've built your kernel, as i see you've already compiled a overclocked kernel for lu6200.
Click to expand...
Click to collapse
LU6200 use a special ramdisk address
Will post later at home
Sent from my LG-P930 using xda premium
Just add a bit more in first post
HO!NO! said:
Just add a bit more in first post
Click to expand...
Click to collapse
Hi, i tried your mkbootimg but it can't be executed as a binary.
[email protected]:~/cm-930/141$ export PATH=~/cm-930/141/:$PATH
[email protected]:~/cm-930/141$ ls -alh
total 25M
drwxrwxr-x 3 dell dell 4.0K Apr 6 09:19 .
drwx------ 12 dell dell 4.0K Apr 4 12:40 ..
-rw-r--r-- 1 dell dell 10M Apr 3 21:25 141boot.img
-rw-rw-r-- 1 dell dell 8.5M Apr 4 21:06 141ramdisk.cpio.gz
-rw-rw-r-- 1 dell dell 216 Apr 4 21:10 6200bootimg.cfg
-rw-rw-r-- 1 dell dell 2.1M Apr 4 21:10 initrd.img
-rwxrwxrwx 1 dell dell 18K Mar 20 09:20 mkbootimg
-rw-rw-r-- 1 dell dell 0 Apr 4 21:10 new141boot.img
drwxrwxr-x 10 dell dell 4.0K Apr 4 21:08 ramdisk
-rw-rw-r-- 1 dell dell 4.4M Apr 4 21:10 zImage
[email protected]:~/cm-930/141$ mkbootimg --kernel zImage --ramdisk 141ramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
bash: /home/dell/cm-930/141/mkbootimg: cannot execute binary file
[email protected]:~/cm-930/141$ ./mkbootimg --kernel zImage --ramdisk newramdisk.cpio.gz --cmdline "vmalloc=450M, console=ttyDCC0,115200,n8 androidboot.hardware=qcom" --base 0x40200000 --pagesize 2048 --ramdiskaddr 0x41300000 -o newboot.img
bash: ./mkbootimg: cannot execute binary file
Those commands are most likely intended to be run on a linux box.
Malnilion said:
Those commands are most likely intended to be run on a linux box.
Click to expand...
Click to collapse
sure!i tried this on ubuntu 12.04
@freefall12,
LOL, I'm a dumbass, for some reason I thought you were trying to run that from a Windows prompt. You might just need to make it an executable file:
Code:
chmod +x mkbootimg
Malnilion said:
@freefall12,
LOL, I'm a dumbass, for some reason I thought you were trying to run that from a Windows prompt. You might just need to make it an executable file:
Code:
chmod +x mkbootimg
Click to expand...
Click to collapse
yes,i did gave execution permission to it but it didn't work. other version of mkbootimg run fine except that they failed to produce bootable boot.img.that's why i want to try this one !
What about sh mkbootimg?
I try to UNPACK and REPACK, and success. Link...
http://bbs.fengbao.com/thread-914738-1-2.html
---------- Post added at 09:44 AM ---------- Previous post was at 09:30 AM ----------
How to compile CM9 source and the kernel project?
I try to git from https://github.com/CyanogenMod/lge-kernel-iproj.
but make failed.
As follows:
1、make distclean
2、export ARCH=MSM8X60
3、export TARGET_PRODUCT=msm8660-perf
4、make msm8660-perf_defconfig
5、make -j4
HONO!Two problems:
1、how to compile cm9 kernel?
2、how to get the CM9 for P930 source project ?
THANKS!!!
HONO!Thanks for your reply.
to ensure the compiler success, i tried from P930 source project
\Kernel\lge\debug\dummy.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_input .C
\kernel\lge\lge_board\i_atnt\platform_i_atnt_mmc.C
Copied to the corresponding directory, but i have a error.
CC drivers/gpu/MSM/kgsl_iommu
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_unmap' :
Drivers/gpu/MSM/kgsl_iommu. C: 241: error: the implicit declaration of function 'iommu_unmap_range'
Drivers/gpu/MSM/kgsl_iommu. C: In function 'kgsl_iommu_map' :
Drivers/gpu/MSM/kgsl_iommu. C: 264: error: the implicit declaration of function 'iommu_map_range'
Make [3] : * * * [drivers/gpu/MSM/kgsl_iommu. O]
Compile statements as follows:
Make cyanogenmod_iprj_defconfig ARCH = arm
Make ARCH = arm CROSS_COMPILE = ~/Android/source/prebuilt/Linux-x86/ toolchain/arm-eabi-4.4.3/bin/arm-eabi-
kernel has compiled success, but compiled cm9 file system failure, may be lost vendor part of the file.
ramdisk has compile successfully, but full build got some errors.
i guess maybe lacking some vendor files.
HO!NO!, can you reply with instructions on how to make a ROM? I've been trying for years but can never get complete instructions. The closest i've gotten is getting the development environment setup on my linux install and downloading all of the Cyanogenmod files, but i couldnt find those files, and i didnt know what was what, and couldnt find that information anywhere! I really want to start from stock and completely make my own with custom graphics and all because im good at photoshop, but i just cant find the information!
PMad said:
HO!NO!, can you reply with instructions on how to make a ROM? I've been trying for years but can never get complete instructions. The closest i've gotten is getting the development environment setup on my linux install and downloading all of the Cyanogenmod files, but i couldnt find those files, and i didnt know what was what, and couldnt find that information anywhere! I really want to start from stock and completely make my own with custom graphics and all because im good at photoshop, but i just cant find the information!
Click to expand...
Click to collapse
So you want to compile your how cm9?
I need more info on where you are now and what is not working.
I will not do a complete guide on this since so many are all ready there Google it.
Sent from my LG-P930 using xda premium
HO!NO!,
Do you know any method to decompile .kdz files?
I tried to do this with the method and decompile tools for LG P540, but it didn't work.
Machzelet said:
HO!NO!,
Do you know any method to decompile .kdz files?
I tried to do this with the method and decompile tools for LG P540, but it didn't work.
Click to expand...
Click to collapse
Right now there is no tool to unpack kdz for p930,p935,p936,su640,lu6200.
All end at .tot file
Sent from my LG-P930 using xda premium
Just to clarify, you can unpack the KDZ file by using LGExtract tool here: http://forum.xda-developers.com/showthread.php?t=1566532 . This will leave you with a few miscellaneous files, with the main one being the WDB file. You can extract that with the LGExtract tool as well. However, that just leaves you with a TOT file which, as HO!NO! explained, there doesn't seem to be a method to extract yet.
Related
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
Very basic guide to extract the initramfs from the zImage, as well as a dump of the initramfs inside I9100XEKDB firmware.
Q: Why? This is simple!
A: Might help someone out!
Linux Bash script follows (standard initramfs extract script) :
Code:
pos=`grep -F -a -b -m 1 --only-matching $'\x1F\x8B\x08' zImage | cut -f 1 -d :`
dd status=noxfer if=zImage bs=$pos skip=1 2>/dev/null| gunzip -q > kernel.img
start=`grep -F -a -b -m 1 --only-matching '070701' kernel.img | head -1 | cut -f 1 -d :`
dd status=noxfer if=kernel.img bs=$start skip=1 > initramfs.img 2>/dev/null
mkdir initramfshere
cd initramfshere
cpio -i --no-absolute-filenames < ../initramfs.img
ls -l
I9100XEKDB initramfs: http://www.sgscompilebox.dreamhosters.com/initramfs.tar.gz
Repacking should be easy as well, but I haven't tried to boot a kernel I have repacked myself yet. Since Chainfire has a root kernel posted, it should work without issue though -- and these are standard linux kernels after all.
Grab the kernel repacker from http://www.sgscompilebox.dreamhosters.com/repacker.tar.gz
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Might need some tweaking depending on your system, but this will hopefully get you started. You can use this to create your own root kernels as Chainfire has done, or modify as you want. Refer to the Q&A above!
Hi,
You can also find Samsung unmodified Galaxy S II initramfs on github, contributions welcome for missing ones:
https://github.com/GalaxySII/initramfs-galaxysii
Its repository collections is for every developer, and is not project/people specific: https://github.com/GalaxySII/
This is what Samsung should give us directly.
Related post, with reference Kernel source repository: http://forum.xda-developers.com/showthread.php?t=1054738
RyanZA said:
Very basic guide to extract the initramfs from the zImage, as well as a dump of the initramfs inside I9100XEKDB firmware.
Q: Why? This is simple!
A: Might help someone out!
Linux Bash script follows (standard initramfs extract script) :
Code:
pos=`grep -F -a -b -m 1 --only-matching $'\x1F\x8B\x08' zImage | cut -f 1 -d :`
dd status=noxfer if=zImage bs=$pos skip=1 2>/dev/null| gunzip -q > kernel.img
start=`grep -F -a -b -m 1 --only-matching '070701' kernel.img | head -1 | cut -f 1 -d :`
dd status=noxfer if=kernel.img bs=$start skip=1 > initramfs.img 2>/dev/null
mkdir initramfshere
cd initramfshere
cpio -i --no-absolute-filenames < ../initramfs.img
ls -l
I9100XEKDB initramfs: http://www.sgscompilebox.dreamhosters.com/initramfs.tar.gz
Repacking should be easy as well, but I haven't tried to boot a kernel I have repacked myself yet. Since Chainfire has a root kernel posted, it should work without issue though -- and these are standard linux kernels after all.
Grab the kernel repacker from http://www.sgscompilebox.dreamhosters.com/repacker.tar.gz
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Might need some tweaking depending on your system, but this will hopefully get you started. You can use this to create your own root kernels as Chainfire has done, or modify as you want. Refer to the Q&A above!
Click to expand...
Click to collapse
Hi..I notice there's an embedded kernel in the packer directory, but the path is an older version than the actual one in zimage. Is third just for pearl script purposes? Thanks
Sent from my GT-I9100
Hey RyanZA,
Following your script
> cpio -i --no-absolute-filenames < ../initramfs.img
extracts initramfs but gives me the error:
cpio: ../init: Cannot symlink to 'sbin-ueventd': Operation not permitted
Can you help a linux newbie here ? Do I need to be root?
EDIT: Ah! I think I know now... FAT does not support symlinks Going to ext...
Ok got the initramfs extracted from a zImage. Used repacker to create the zImage again. Did not change anything in initramfs. Filesize 5mb vs 8mb for the original. After a closer look I see that original contains lots of zeros. Ok appended zeros to match filesize and flashed the 'new' kernel. No go. Yellow triangle and no boot. Waited a long time.
Can anyone help? Maybe the repacker does something wrong? Maybe it should not compress?
Sent from my GT-I9100 using XDA Premium App
Anybody had any luck with this?
After said tweaking to get the repacker script running I got it to build a new zImage.
But mine was even only ~2MB small.... (seeing that the extracted initramfs summs up to about 3MB it makes at least a bit of sense, but still wondering).
Also the older kernel used (.29 against .35 that's actually running on my phone) makes me ....
Well, flashed it anyway but (as expected) it didn't work, phone showed the bootlogo and that's it, not even recovery worked.
So, is it the older kernel? Or is it forking up the initramfs image creation?
Or is there another way to rebuilt the kernel image with a new initramfs image?
I'd really like to get rebuilding the zImage working so I toy around with that a bit, try to make my own root kernel and all that funstuff
HellcatDroid said:
Anybody had any luck with this?
After said tweaking to get the repacker script running I got it to build a new zImage.
But mine was even only ~2MB small.... (seeing that the extracted initramfs summs up to about 3MB it makes at least a bit of sense, but still wondering).
Also the older kernel used (.29 against .35 that's actually running on my phone) makes me ....
Well, flashed it anyway but (as expected) it didn't work, phone showed the bootlogo and that's it, not even recovery worked.
So, is it the older kernel? Or is it forking up the initramfs image creation?
Or is there another way to rebuilt the kernel image with a new initramfs image?
I'd really like to get rebuilding the zImage working so I toy around with that a bit, try to make my own root kernel and all that funstuff
Click to expand...
Click to collapse
the fist script actually works good to pull initramfs. but I don't know about the repacker...better to build new
Yeah, trying to build a new kernel from sources at the moment (make is running as I type this).
Here's an idea why the rebuilder fails:
.29 kernel (that the rebuild script brings in and uses) but the initramfs has .35 version kernel modules (as it's for/from the .35 kernel)!
Not sure how delicate this version missmatch is, but there's a chance the one or the other important kernel module erroring out upon boot due to the version missmatch....
Well, let's see if a full build from sources works (as I know my luck, it won't....)....
that's because zImage has SFX code which tied very much to data (Image.gz). So you cannot just re-pack it back to existing zImage. You have to download source code of i9100 kernel and execute final part of kernel build where Image binary gets compressed and pre-pended by sfx header.
RyanZA said:
Following bash script to use it:
Code:
end=`repacker/findcpio.pl kernel.img | cut -f 2`
(cd initramfshere/; find . | cpio --quiet -R 0:0 -H newc -o > ../newinitramfs.img)
gzip -f9c newinitramfs.img > newinitramfs.img.gz
repacker/kernel_repacker.sh zImage newinitramfs.img.gz
Click to expand...
Click to collapse
err... the repacker/kernel_repacker.sh script only takes one argument.. how is it supposed to work???
sorg said:
that's because zImage has SFX code which tied very much to data (Image.gz). So you cannot just re-pack it back to existing zImage. You have to download source code of i9100 kernel and execute final part of kernel build where Image binary gets compressed and pre-pended by sfx header.
Click to expand...
Click to collapse
Yeah, that is actually what the repacker script does!
It has precomplied objects and compiles/links them together to the final (new) zImage.
saturn_de said:
err... the repacker/kernel_repacker.sh script only takes one argument.. how is it supposed to work???
Click to expand...
Click to collapse
You only pass the newinitramfs.img.gz that's created in the lines above, just drop the "zImage" from the commandline.
// EDIT
OK, I got as far as to compile my own kernel from the sources Samsung has released
I eventually end up with a nice and fresh, built from scratch zImage \o/
When I throw my selfmade zImage at the extractor script posted above, I get the proper (stock) initramfs filestructure I intended to put in (in other words, I managed to put my (as of now untouched) own initramfs.img into the zImage).
I create a nice .tar, flash with Odin and.... nothing
I get the bootsplash with the triangle and that's it, it doesn't get any further.
Anyone got a hint for me what I did wrong?
What I did:
(this all happened on a Linux machine)
extract Samy's kernel source
installed the codesourcery toolchain
set the CROSS_COMPILE var in ./kernel/Makefile to the proper path to the toolchain
ran
make c1_rev02_defconfig (according to readme.txt)
and then
make zImage CONFIG_INITRAMFS_SOURCE="/path/to/extracted/stock/initramfs/"
padded with 0x00s to the 8MiB size, tar'ed and Odin'ed
which brings me to the dead bootscreen....
Not even recovery works.
HellcatDroid said:
Yeah, that is actually what the repacker script does!
It has precomplied objects and compiles/links them together to the final (new) zImage.
Click to expand...
Click to collapse
I guess you've got repacker from first Galaxy?
It won't work. SFX header you're trying to compile is for first galaxy. It has hardcoded addresses and they are not compatible with Galaxy S II. Toolchain is also for SGS as well (not sure if it still suitable for SGSII).
Take kernel source code and toolchain for SGSII and it will work.
Yah, well, I got the kernel to compile fresh from sources now, no need for a repacker anymore, I just go make zImage and be happycat
Someone knows how to repack it?
Maybe Chainfire or Pulser?
Agreed, Can someone explain the process in full? modyfying and repacking zImage gets 2mb+ less in size, what we are missing?
Grooby said:
Agreed, Can someone explain the process in full? modyfying and repacking zImage gets 2mb+ less in size, what we are missing?
Click to expand...
Click to collapse
Necro much?
rawat said:
necro much?
Click to expand...
Click to collapse
zombie thread wants braaaaiiiiiiinnnnnnnnnnnnzzzzzzzzzzzzzz!!!!!!
Looks like i raised death searching for answer lool
A few tried to make repackers for the I9100 - and failed.
Even less know how to actually do it - and don't share the knownledge.
The thing is, that the initramfs is linked into the zImage during compile time, so it can't simply be "snipped out" and "new one pasted in".
That's why I eventually ended up compiling the whole thing from sources.
It would certainly nice if someone like ChainFire could share how to do it.... but he's too worried about others rebuilding his rootkernel with other nametags on it.
HellcatDroid said:
A few tried to make repackers for the I9100 - and failed.
Even less know how to actually do it - and don't share the knownledge.
The thing is, that the initramfs is linked into the zImage during compile time, so it can't simply be "snipped out" and "new one pasted in".
That's why I eventually ended up compiling the whole thing from sources.
It would certainly nice if someone like ChainFire could share how to do it.... but he's too worried about others rebuilding his rootkernel with other nametags on it.
Click to expand...
Click to collapse
GitHub.com/xiaolu
Sent from my GT-I9100 using xda premium
I'm just starting to learn the kernel compile
The help of many friends, I made great progress soon. For example AndreiLux, etc.
I can compilethe kernel from Samsung official source code by meself, compile my own kernel for Samsung N7108
But now the two issues can not be resolved. Therefore, I hope more friends to help me and guide me.
The first problem
Compiled kernel does not support exfat format storage card.
In AndreiLux help, I added the code. if (! strncmp ("exfat_", mod-> name, 6)) return 1;
But exfat problem persists. When the the insert the exfat storage card will cause the phone to constantly reboot.
I saw http://forum.xda-developers.com/showthread.php?t=2154703 seems to have explained,
But please forgive my ignorance and ignorance. I'm a beginner. I don't understand it.
The second problem
The Wifi switch settings inside, unable to open. So. WIFI unavailable
Hope you can help me solve these two problems.
any one can help me ?
Try in development section this is generally for generic problems.
Sent from my GT-N7100
wctliu said:
The second problem
The Wifi switch settings inside, unable to open. So. WIFI unavailable
Hope you can help me solve these two problems.
Click to expand...
Click to collapse
Dont forget to copy your wifi modules to your ramdisk
I used boot.img from Samsung official rom
'perl split_bootimg.pl boot.img" extracted 2 files: boot.img-kernel and boot.img-ramdisk.gz.
If I directly use the compiled zImage packaged, such as:used "mkbootimg --base 0x00200000 --kernel /home/wctliu/android/kernel/sumsang-kernel/arch/arm/boot/zImage --ramdisk boot.img-ramdisk.gz -o new_boot.img" .
the new_boot.img can be able to activate the phone. But no WiFI
If i do that:
mkdir ramdisk
cd ramdisk
gzip -dc ../boot.img-ramdisk.gz | cpio -i
Copy compiled module drive replacement adding: system / lib / modules
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
mkbootimg --base 0x00200000 --kernel /home/wctliu/android/kernel/sumsang-kernel/arch/arm/boot/zImage --ramdisk newramdisk.cpio.gz -o new1_boot.img
the new1_boot.img cann‘t be able to activate the phone
I where operating errors?Please tell me what's wrong?
any one can help me ?
Did you placed the modules in the right path in your initramfs? /lib/modules/ ... Try looking at the logs or try manual insmod...
Nazar78 said:
Did you placed the modules in the right path in your initramfs? /lib/modules/ ... Try looking at the logs or try manual insmod...
Click to expand...
Click to collapse
You mean my operation is not error ?
I mean take a look at the log what cause the operation to fail when you tried to activate wifi. If the module doesn't load, try insmod manually see if it works...
This should be how to operation? I completely understand.Advice about it?
Sorry mate, I don't really get you. When you compile from the source, I believe wifi module should be already turned on in the defconfig. Look at the kernel log or logcat to see what's wrong with your wifi. As for the extfat, take a look at the kernel source from many great developers here on xda. They really helped me a lot compiling my own builds...:good:
Hello,
He seems to have kind of the same problem that I have...
I'm trying to re-compile the boeffla-Kernel for my Galaxy S3 i9300 in order to implement the "aufs"-filesystem.
I've split the boot.img into zImage and ramdisk.gz, opened ramdisk.gz via
Code:
gunzip -c ../ramdisk.gz | cpio -i
and deleted the old zImage.
I patched the boeffla-kernel-source to use "aufs". Then I compiled the Kernel using boeffla_defconfig,
copied the modules into the ramdisk (/lib/modules), repacked it again and I copied the newly compiled zImage
to the same folder.
Finally I did a
Code:
./mkbootimg --kernel ./zImage --ramdisk ./ramdisk.gz --board smdk4x12 --base 0x10000000 --pagesize 2048 -o boot.img
and tarred the resulting boot.img with
Code:
tar cvf kernel.tar.md5 boot.img
.
After I flash it with MobileOdin, the Image boots, "aufs" seems to work but I can not turn on the wifi switch.
Insmod doesn't work and the various suggested workarounds I found through web-search didn't help.
Does anyone have an idea?
greetings
P.S.: Perhaps it would have been better to post this in the dev-section but as I haven't posted the necessary 10 posts I'm not allowed to write to it.
I don't Solved the problems about Wifi.
wctliu said:
I don't Solved the problems about Wifi.
Click to expand...
Click to collapse
Try using different cross-compiler.
So, wctliu, did you solve your problem?
Hello All,
I've been having multiple requests in PM lately about how to pack/unpack Sony kernels and initramfs, so I guess a little guide would help. It works for Xperia S/AcroS/Ion roms, it doesn't for XZ and later.
This is the method I use, there are others but it works quite well for me.
0) Pre-requisite
- A Linux PC or virtual machine. I presume it could be done with cygwin or other linux over windows method, but I never tried and don't recommend even trying . If you're running Windows, you can use vmware or virtualbox, you'll have much less suffering... I also strongly recommend 64 bits Linux, it helps.
- A bit of Linux knowledge, I won't go in details in how to use shell, navigate between directory, etc...
- A bit of Android knowledge, I won't explain how rom are structured.
- Sony mkelf.py script.
- my sin2raw tool: source code is here, compile it with gcc sin2raw.c -o sin2raw and put it somewhere in your PATH.
- my sksplit tool: source code is here, compile it with gcc split_sony_kernel.c -o sksplit and put it somewhere in your PATH.
- Run everything as root.
1) Stock firmware unpack
First, unpack the ftf with 7z:
Code:
7z x LT26i_6.2.B.1.96_World.ftf.
You will end up with a bunch of sin files:
Code:
amss_fs_1.sin
amss_fs_2.sin
amss_fsg.sin
system.sin
userdata.sin
cache.sin
apps_log.sin
fotakernel.sin
kernel.sin
loader.sin
partition-image.sin
sin2raw will unpack properly any of these sin. We are mostly interested in system.sin and kernel.sin in this how-to though.
2) Accessing system partition
To access system partition files,
Extract system.ext4 from system.sin
Code:
sin2raw system.sin system.ext4
mount the ext4
Code:
mkdir system
mount -o loop system.ext4 system
Files are now available in the system directory on your computer, don't forget to umount it when you're done.
3) Kernel and initramfs extract
This is probably the most interesting part for many, sksplit is doing better than many method I saw.
First, convert sin to elf:
Code:
sin2raw kernel.sin kernel.elf
Then, just run sksplit on it:
Code:
sksplit kernel.elf
It will create 3 (or 4 files for Sony kernel):
Code:
sec0-0x40208000.bin
sec1-0x41300000.bin
sec2-0x00020000.bin
sec3-0x00000000.bin
Notice the hexadecimal value, we'll use them later to rebuild the kernel.elf
4) Ramdisk/Initramfs unpack
Be careful, this has to be done as root:
Code:
mkdir cpio
cd cpio
cat ../sec1-0x41300000.bin | gzip -d | cpio -i --make-directories
Note: replace 0x41300000 with the proper value if it differs for your kernel...
If you see this in the cpio directory:
Code:
lrwxrwxrwx 1 tama tama 12 Aug 24 21:22 init -> sbin/init.sh
-rw-r--r-- 1 tama tama 280128 Aug 24 21:22 logo.rle
drwxr-x--- 2 tama tama 4096 Aug 24 21:22 sbin
with this in sbin:
Code:
-rwxr-x--- 1 tama tama 495 Aug 24 21:22 bootrec-device
-rwxr-x--- 1 tama tama 657700 Aug 24 21:22 busybox
-rwxr-x--- 1 tama tama 67020 Aug 24 21:22 extract_elf_ramdisk
-rwxr-x--- 1 tama tama 1832 Aug 24 21:22 init.sh
-rwxr-x--- 1 tama tama 589824 Aug 24 21:22 ramdisk.cpio
-rwxr-x--- 1 tama tama 2895360 Aug 24 21:22 ramdisk-recovery.cpio
The initramfs is using the new way of handling recovery used in Cyanogen and many roms. You'd need these extra steps to extract android ramdisk:
Code:
cd ..
mkdir cpio_native
cd cpio_native
cat ../cpio/sbin/ramdisk.cpio | cpio -i --make-directories
Now, you can edit/replace files in the ramdisk.
5) initramfs repack
If you are dealing with a Cyanogen like ramdisk, first do this, if not, go to next step.
Code:
find . | cpio -o -H newc > ../cpio/sbin/ramdisk.cpio
cd ../cpio
Next step is :
Code:
find . | cpio -o -H newc | gzip -c > ../initramfs.new.gz
cd ..
6) elf re-assembly
This is the easy part
You have to re-assemble all the parts together with mkelf.py.
mkelf.py -o new_kernel.elf ./[email protected]0x40208000 [email protected]0x41300000,ramdisk [email protected]0x20000,rpm
Notes:
Replace the values in red with the one sksplit gave you
If you want to change kernel (zImage), just replace ./sec0-xxx.bin with your kernel filename in the mkelf command
Don't try to add the Sony signature (sec3-xxxx), it won't work
That's it! Let me know if you need more details, I'll add them here.
* last one *
Should be a sticky in development
Thanks a lot, you have my dollar! :3
EDIT: Can you post that sksplit thingy? Or do I really need to download everything and compile it? D:
EDIT2: And do you realize us mortals only have 8 thanks per day?
Also, I tried extracting the kernel with 7zip, then unpack the '1' file with gunzip, then unpacked the /sbin/ramcisk.cpio with your method. Packaged it all up with your method and I'll edit my post to tell you if it's working
someone755 said:
Should be a sticky in development
Thanks a lot, you have my dollar! :3
EDIT: Can you post that sksplit thingy? Or do I really need to download everything and compile it? D:
Click to expand...
Click to collapse
Yes, download the source code, it's one file only, and compile it. It avoids troubles with 32/64 bits runtimes:
type this:
Code:
wget https://gitorious.org/sony-tools/sony-tools/blobs/raw/master/split_sony_kernel.c
gcc split_sony_kernel.c -o sksplit
it will download and generate directly sksplit.
if you need sin2raw, just type this:
Code:
wget https://gitorious.org/sony-tools/sony-tools/blobs/raw/master/sin2raw.c
gcc sin2raw.c -o sin2raw
Nah, I'm using 7zip. Don't have the patience for downloads and compiles on my slow internet/PC combo
someone755 said:
Nah, I'm using 7zip. Don't have the patience for downloads and compiles on my slow internet/PC combo
Click to expand...
Click to collapse
Bad idea!
Source is less than 10 KB and takes like 10 seconds to compile. With it, you're absolutely sure that extracted sizes are exact up to the byte, and sksplit will give you the right mkelf offsets, the matching rpm.bin, etc... 7z extract could fail to extract the complete file and could not work depending on compression scheme.
letama said:
Bad idea!
Source is less than 10 KB and takes like 10 seconds to compile. With it, you're absolutely sure that extracted sizes are exact up to the byte, and sksplit will give you the right mkelf offsets, the matching rpm.bin, etc... 7z extract could fail to extract the complete file and could not work depending on compression scheme.
Click to expand...
Click to collapse
Yep, managed to compile and make a flashable zip of 39 baseband just using friend's PC Linux distro with my phone. Ssh owns Compilation process didn't take more than quarter of a second, same with sin2raw repacking.
Powered by GSR with Android 4.1.2 on the board.
Okay, did that. Hope the Sense kernel works now
EDIT: Also tried doing this with my own kernel, but it won't boot. Now could this be because I added -03 to the wrong places or because of your method...?
someone755 said:
Okay, did that. Hope the Sense kernel works now
EDIT: Also tried doing this with my own kernel, but it won't boot. Now could this be because I added -03 to the wrong places or because of your method...?
Click to expand...
Click to collapse
Difficult to say, there are so many cause for not booting...
I'd suggest to try something simple at first to make sure your process is ok, like for instance modifying CM initramfs and check if it still runs after repack You can simply add a comment to init.rc for instance and check that it's there after boot.
letama said:
4) Ramdisk/Initramfs unpack
If you see this in the cpio directory:
Code:
lrwxrwxrwx 1 tama tama 12 Aug 24 21:22 init -> sbin/init.sh
-rw-r--r-- 1 tama tama 280128 Aug 24 21:22 logo.rle
drwxr-x--- 2 tama tama 4096 Aug 24 21:22 sbin
with this in sbin:
Code:
-rwxr-x--- 1 tama tama 495 Aug 24 21:22 bootrec-device
-rwxr-x--- 1 tama tama 657700 Aug 24 21:22 busybox
-rwxr-x--- 1 tama tama 67020 Aug 24 21:22 extract_elf_ramdisk
-rwxr-x--- 1 tama tama 1832 Aug 24 21:22 init.sh
-rwxr-x--- 1 tama tama 589824 Aug 24 21:22 ramdisk.cpio
-rwxr-x--- 1 tama tama 2895360 Aug 24 21:22 ramdisk-recovery.cpio
Click to expand...
Click to collapse
I don't have those directiories, I have
Code:
Data (empty)
Dev (empty)
Proc (empty)
res (has charging graphic)
sbin (has none of mentioned above files, no ramdisk)
sys (empty)
system (empty)
and bunch of standalone files
what now? I want to replace zImage with mine, compiled from source.
I tried to decode other bin files but program failed.
Oh, I see it's if I want to edit ramdisk.
I don't want to edit ramdisk, I just want to add kernel I compiled from source.
So I should exe command like this?:
Code:
mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
Those were my outputs:
Code:
... dumping sec0-0x00208000.bin
... dumping sec1-0x01400000.bin
... dumping sec2-0x00000000.bin
... dumping sec3-0x00000000.bin
I run that command and now I have new_kernel.elf file ( 5,8 MB ) but I am afraind of flashing it into my device. Is it safe if everything went without errors?
lozohcum said:
I don't have those directiories, I have
Code:
Data (empty)
Dev (empty)
Proc (empty)
res (has charging graphic)
sbin (has none of mentioned above files, no ramdisk)
sys (empty)
system (empty)
and bunch of standalone files
So basically you directly have initramfs content, recovery is not embedded and you can stop there if you wanted to modify initramfs. As you don't, forget about this...
So I should exe command like this?:
Code:
mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],rpm
Those were my outputs:
Code:
... dumping sec0-0x00208000.bin
... dumping sec1-0x01400000.bin
... dumping sec2-0x00000000.bin
... dumping sec3-0x00000000.bin
I run that command and now I have new_kernel.elf file ( 5,8 MB ) but I am afraind of flashing it into my device. Is it safe if everything went without errors?
Click to expand...
Click to collapse
What device is that ?
Basically, what you're trying to do is almost good, but I'm pretty sure sec2 or sec3 are not rpm.
Can you give me the sizes of each sec-xxx file, the size of the elf, and the size of your zImage ?
Regarding your last question, no, it's not safe for something else than XS/AcroS/Ion...
letama said:
Can you give me the sizes of each sec-xxx file, the size of the elf, and the size of your zImage ?
Click to expand...
Click to collapse
And one last thing, can you tell me what displays sksplit when you unpack the elf ?
@letama
It's Xperia J. Kernel is compiled from official source given by sony developers.
Here are sizes:
{
"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"
}
And split log:
Code:
ELF magic found
Entry point : 0x00208000
Program Header start : 0x34
Program Header size : 32
Program Header count : 4
-> PH[0], type=1, offset=00001000, virtual=00208000, phy=00208000, size=4310432
-> PH[1], type=1, offset=0041D5A0, virtual=01400000, phy=01400000, size=1313163
-> PH[2], type=4, offset=0055DF2B, virtual=00000000, phy=00000000, size=512
-> PH[3], type=558778707, offset=000000B4, virtual=00000000, phy=00000000, size=1072
... dumping sec0-0x00208000.bin
... dumping sec1-0x01400000.bin
... dumping sec2-0x00000000.bin
... dumping sec3-0x00000000.bin
So how other people compile kernel for this device? FXP has their own CM10 kernel, Rachit Rawat made his kernel based on open source given by sony developers too.
And this is my repo:
https://github.com/lozohcum/Kernel-JLO-JB
lozohcum said:
So how other people compile kernel for this device? FXP has their own CM10 kernel, Rachit Rawat made his kernel based on open source given by sony developers too.
Click to expand...
Click to collapse
Ok, Xperia J is different SOC, it doesn't have rpm.bin
cat you do a cat sec2-0x00000000.bin ?
I suspect it's kernel command line.
If I'm right, you should try this first:
Code:
mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],cmdline
And try to flash it. It will be the same kernel, but at least we can be sure the extraction and rebuild is working.
If everything is ok, you can do this:
Code:
mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],cmdline
This time it will be your kernel...
*edit*
I found this regarding your device, a bit more complicated than working with sin and elf like here, but it kind of confirms what I said, basically he does manually what sksplit does.
Are you asking if I can do this?
Code:
[email protected]:/home/lozohcum/android/buildpackage/dir# cat ../sec2-0x00000000.bin | gzip -d | cpio -i --make-directories
gzip: stdin: not in gzip format
cpio: unexpected end of archive
as you see I can't, same with all other bin files. I can cat only the one you mentioned in tutorial.
I'm going to try what you said, I hope it won't birck my phone.
The tutorial you found is freaking me out...
After I exed
Code:
mkelf.py -o new_kernel.elf [email protected] [email protected],ramdisk [email protected],cmdline
There is a new_kernel.elf which is 0.2MB lighter than the first one...
I'm like
omgomgomg
I flashed that kernel and it works pretty well.
Now I am going to use kernel I compiled and if it works I will add some governors and OC
lozohcum said:
Are you asking if I can do this?
[email protected]:/home/lozohcum/android/buildpackage/dir# cat ../sec2-0x00000000.bin | gzip -d | cpio -i --make-directories
Click to expand...
Click to collapse
No, simply
Code:
cat ../sec2-0x00000000.bin
This is probably text file.
The tutorial you found is freaking me out...
Click to expand...
Click to collapse
I know, it's a bit complicated, but that's because he doesn't have sksplit and sin2raw. He does that manually, by dumping flashed kernel first then finding the right location.
There is a new_kernel.elf which is 0.2MB lighter than the first one...
Click to expand...
Click to collapse
That's ok, you don't have Sony signature, and you shouldn't have it.
I flashed that kernel and it works pretty well.
Click to expand...
Click to collapse
Good! Method is working then, let me know if your own kernel works.
Operation successfull! Kernel I've compiled works.
Thank you very much for help, you restored my faith in people on this forum
Carrying on, here is an issue. After installing it, my phone is laggy, even very laggy. On the previous kernel my phone was very fast and smooth.
Do you have maybe any advice?
what about patch from this thread? Where can I read about removing rubbish from kernel and etc?
lozohcum said:
Operation successfull! Kernel I've compiled works.
Thank you very much for help, you restored my faith in people on this forum
Carrying on, here is an issue. After installing it, my phone is laggy, even very laggy. On the previous kernel my phone was very fast and smooth.
Do you have maybe any advice?
what about patch from this thread? Where can I read about removing rubbish from kernel and etc?
Click to expand...
Click to collapse
Nice!
Ok, so now you have the method. Regarding kernel, well, I don't know why yours is laggy. Maybe a toolchain issue, what are you using to compile it ? I usually use Google toolchains. Depending on kernel version, I use gcc 4.3.3 or 4.6.0. You should check dmesg on stock kernel to see what version Sony used (third line or so in dmesg will show you kernel version and toochain used).
I think the time has come to share the info about kernel development we've been keeping for ourselves until now. just be sure to ready the complete thread and not just execute everything without thinking. I won't be responsible for any bricks etc.
Warnings!!
- Only start with a kernel if you are a developer with knowledge about kernel developping.
- Always use the specific dt.img build for your kernel!!!!! Very important!
- Don't complain if it doesn't work when you do something wrong!
== Information ==
Let's start with some info first.
MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This bin4ry can be found in the Cyanogen repo's or you can download a prebuild one in this thread.
== Compiling a kernel ==
I'll skip this part for now, every kernel dev should know this part maybe I'll add it later.
== Generating a dt.img ==
Basically you will only need your kernel sources and the dtbTool binary, then you need to generate it using a command like this:
Code:
./dtbTool -o ~/dt_files/dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
This seems very simple but it's quite important when building a kernel for MSM8974, or other S800 boards.
After this step has been completed you will find your dt.img in a folder callled dt_files, this folder should be in your home of linux now.
== Making the actual boot.img ==
After making the zImage and dt.img you need to have your ramdisk and an mkbootimg adapted for the dt.img to make a booting/working kernel for our rhine board.
be sure the naming of your files is correct:
- zImage
- dt.img
- intrd.img for your ramdisk
You can generate it by using the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk initrd.img --dt dt.img -o boot.img
Let's get kernel development started for everyone!
== Extra ==
If you like my work consider donating me a beer
binary files attached
krabappel2548 said:
binary files attached
Click to expand...
Click to collapse
Awesome! Thanks! Will tinker around with it tonight!
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Pwng3 said:
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Click to expand...
Click to collapse
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
If you want to compil kernel, but with a full automation, you can use this script
"scriptZ1" : http://forum.xda-developers.com/attachment.php?attachmentid=2346163&stc=1&d=1382568778
With this script you have an automatic download/configuration (Toolchain, dtbTool, etc...)
You must go to $HOME, and "mkdir kernel"
cd kernel
unzip file (only 1 script) => scriptZ1
chmod 777 scriptZ1
./scriptZ1
Follow instructions
that's all
DooMLoRD said:
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
Click to expand...
Click to collapse
That resolved the issue. Thanks
Update :
I was getting this error :
Code:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
So I went on to make the build with make CONFIG_DEBUG_SECTION_MISMATCH=y.
After which, when I tried generating the dt.img, I'm stuck up on this error that says :
Code:
Generating master DTB... error writing output file, please rerun: size mismatch 530432 vs -566
Could someone help please?
@krabappel2548
Hey,after repacking whole kernel I'm getting this error when I try to boot it:
Code:
fastboot boot boot.img
downloading 'boot.img'...
OKAY [ 0.319s]
booting...
FAILED (remote: dtb not found)
How do I create a dt.img? I always get Found 0 Unique dtbs.
Shoaib05 said:
How do I create a dt.img? I always get Found 0 Unique dtbs.
Click to expand...
Click to collapse
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Red-code said:
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Click to expand...
Click to collapse
Managed to get past it but now it is giving a size-mismatch error. :/
Shoaib05 said:
Managed to get past it but now it is giving a size-mismatch error. :/
Click to expand...
Click to collapse
Does this work? binary is x86_64
dt_dir is arch/arm/boot/ on 3.4 - arch/arm/boot/dts on 3.10
Code:
mkqcdtbootimg --kernel arch/arm/boot/zImage --ramdisk ramdisk.bz2 --base 0x00000000 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --dt_dir arch/arm/boot/ -o boot-.img