Compiling Custom Kernel for Samsung Galaxy S5 G900F Kernel - Galaxy S 5 Developer Discussion [Developers Only]

Hi guys,
I'm trying to compile a kernel, so far I have come upto generating the zimage, but now I'm stuck at this step.
Please help. Thanks a lot.
What do I do with the warning? and how can I repack the new zImage with the initframs extracted from the stock kernel.
{
"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"
}

Hve you tried asking @wanam and @ktoonsez they are kernel building experts

Sock12345 said:
Hve you tried asking @wanam and @ktoonsez they are kernel building experts
Click to expand...
Click to collapse
well I tried asking @wanam quite a few times, but could not get a reply
I will try speaking with @ktoonsez and @wanam

Download the file below from my github @ https://github.com/ktoonsez/KTSGS5
1. mkbootfs (place in root folder of your kernel source)
Then execute these after zImage is made
Change the text "YOUR_RAMDISK_FOLDER" and "YOUR_PACKAGE_FOLDER" to proper folders.
cp arch/arm/boot/zImage YOUR_PACKAGE_FOLDER/zImage
./mkbootfs YOUR_RAMDISK_FOLDER | gzip > YOUR_PACKAGE_FOLDER/ramdisk.gz
tools/dtbTool -o arch/arm/boot/dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
chmod a+r arch/arm/boot/dt.img
tools/mkbootimg --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --kernel YOUR_PACKAGE_FOLDER/zImage --ramdisk YOUR_PACKAGE_FOLDER/ramdisk.gz --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt arch/arm/boot/dt.img --output YOUR_PACKAGE_FOLDER/boot.img

ktoonsez said:
Download the file below from my github @ https://github.com/ktoonsez/KTSGS5
1. mkbootfs (place in root folder of your kernel source)
Then execute these after zImage is made
Change the text "YOUR_RAMDISK_FOLDER" and "YOUR_PACKAGE_FOLDER" to proper folders.
cp arch/arm/boot/zImage YOUR_PACKAGE_FOLDER/zImage
./mkbootfs YOUR_RAMDISK_FOLDER | gzip > YOUR_PACKAGE_FOLDER/ramdisk.gz
tools/dtbTool -o arch/arm/boot/dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
chmod a+r arch/arm/boot/dt.img
tools/mkbootimg --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --kernel YOUR_PACKAGE_FOLDER/zImage --ramdisk YOUR_PACKAGE_FOLDER/ramdisk.gz --base 0x00000000 --pagesize 2048 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --dt arch/arm/boot/dt.img --output YOUR_PACKAGE_FOLDER/boot.img
Click to expand...
Click to collapse
I have to say Ktoonez, I love your work, but where do you start building kernels for android?, ive been meaning to compile one for my NVidia shield for everyone to use, but I don't know where to start, also all the whole thread is dead in terms of development which is sad.

mudflap2.0 said:
I have to say Ktoonez, I love your work, but where do you start building kernels for android?, ive been meaning to compile one for my NVidia shield for everyone to use, but I don't know where to start, also all the whole thread is dead in terms of development which is sad.
Click to expand...
Click to collapse
Im already a developer for work so I already knew "C" code, all I did was search internet and follow github to see how it all worked. :good:

Related

turning cingular SX66 from english to german

hey guys...i have here a siemens sx66 from cingular.. the software is english, but i am german, and so writing sms isn't as nice as it could be.
which rom-files do you suggest me to use? i am totaly new to this, so every hint is useful.
i just ran the info-exe on my phone, this is what the txt file said:
PH20B1 B 1 WWE E XGULA001 1.20.10 1 0 1.20.115 1.02.10 02.10
I'm sure this question has been asked before, but i didn't find anything using the search... sorry if i oversaw something
thx in advance
basti
http://www.ppc-welt.info/community/showthread.php?t=64763
well, i did everything as described, but when i run the fix.bat, i get these errors:
-----------------------------------------------------------------------------
F:\ppc\flashing\rom>xda3nbftool -x ms_.nbf ms_.nba 0x20040522
WARNING: this does not look like a nbf header, possible you provided the wrong password
F:\ppc\flashing\rom>xda3nbftool -x nk.nbf nk.nba 0x20040521
WARNING: this does not look like a nbf header, possible you provided the wrong password
F:\ppc\flashing\rom>xda3nbftool -x radio_.nbf radio_.nba 0x20040523
WARNING: this does not look like a nbf header, possible you provided the wrong password
F:\ppc\flashing\rom>xda3nbftool -so XGULA001 -sl WWE ms_.nba -sd PH20B1
F:\ppc\flashing\rom>xda3nbftool -so XGULA001 -sl WWE nk.nba -sd PH20B1
F:\ppc\flashing\rom>xda3nbftool -so XGULA001 -sl WWE radio_.nba -sd PH20B1
F:\ppc\flashing\rom>xda3nbftool -c -u NK.nba
updated checksum to a52fc881
F:\ppc\flashing\rom>xda3nbftool -c -u ms_.nba
updated checksum to da3993c6
F:\ppc\flashing\rom>xda3nbftool -c -u Radio_.nba
updated checksum to 0e81b3bf
F:\ppc\flashing\rom>xda3nbftool -x ms_.nba ms_.nbf 0x20040522
F:\ppc\flashing\rom>xda3nbftool -x nk.nba nk.nbf 0x20040521
F:\ppc\flashing\rom>xda3nbftool -x radio_.nba radio_.nbf 0x20040523
F:\ppc\flashing\rom>del *.nba
-----------------------------------------------------------------------------
when i run xda3nbftool.exe before the bat, i get this:
HimaUpgradeUt v0400, v0500 use password HTC
HimaUpgradeUt v0600 uses password 921211
HimaUpgradeUt v0910 uses xor with 0x89124137, 0x25863614 or 0x12345678
HimaUpgradeUt v1000 uses xor with 0x20040304, 0x20040305 or 0x20040306
i hope somebody can help me
thx
basti
We dont have the password for that rom, its in a new format.
Try this and post if it worked
http://forum.xda-developers.com/viewtopic.php?t=15168&postdays=0&postorder=asc&start=97
it doesn't work...
in the beginning it seems to work, and i get this screen:
{
"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"
}
then the sx66 goes to "USB" mode...
after a while i get this screen:
any ideas?

[Q] Setting kernel parameters on startup (without using any app)?

I'm using LeanKernel 4.5 and i'd like to change governor, scheduler and some other minor parameters using sysfs. My linux understanding is quite basic.
I can easly check current values using adb (a list of sysfs options is here):
Code:
adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
I get "interactivex". However, why I can't change it using adb (first question)? This it's not working:
Code:
adb shell
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
And the governor remains "interactivex".
Second question is, how can I make them permanent? Should I modify init.rc script?
You need to be root to change those values. 'su' after 'adb shell'.
Second, your rom needs to support /system/etc/init.d/ scripts.
Sent from my i9250
bk201doesntexist said:
You need to be root to change those values. 'su' after 'adb shell'.
Second, your rom needs to support /system/etc/init.d/ scripts.
Sent from my i9250
Click to expand...
Click to collapse
Thank you for your help. I did :angel: but it doesn't work:
{
"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"
}
Also, I'm using the stock factory images. So you're saying that I will not able to set this values at boot? If yes, how the app SetCPU can?
Gremo said:
Thank you for your help. I did :angel: but it doesn't work:
Also, I'm using the stock factory images. So you're saying that I will not able to set this values at boot? If yes, how the app SetCPU can?
Click to expand...
Click to collapse
Add a file at /system/etc/init.d/<filename.extension>. Chmod it to 755 and add the contents below into it(the steps can be done via adb or file manager, its easier via file manager for newbies)
Code:
#!/system/bin/sh
echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
After that, reboot your phone and check whether the changes has been done or not
To enable init.d, at minimum you need to be rooted though and busybox needs to be installed
Here's a link on how to enable it(you can try whether it works or not first, if it doesn't then only try this one): http://forum.xda-developers.com/showthread.php?t=1933849

(HELP) Can't sync correctly CM9 sources

Hi, I'm trying to sync CM9 sources. I've set up my Ubuntu 11.10 from differents pages of xda, like the guide of Rom2Maru.
So, all libs are intalled, jdk6 is also installed ,etc. So, yesteray I started to start to sync, using the instructions of the PecanCM's github:
Code:
repo init -u git://github.com/PecanCM/android.git -b ics
repo sync -j16
And I don't know why but after 4 hours it stucks. I have tried 3 times and in the 3 times it stucks at the final. I've got a lot of memory left on my hard drive so I don't know why it stucks.
I have run a log and nothing special, here you have a Screenshot:
{
"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"
}
In the first terminal, here is my sync stucked. In the second one, Here is the log. So, in the thirst I did a "repo sync", but it stucks too.
So, please, can anyone help me? I'm really interested in learn about android and can compile it.
Thanks a lot
hi, try this
from root of source
Code:
cd .repo
rm -rf manifest*
rm -rf repo
cd ..
mv .repo ../.repo
cd ..
rm -rf {name of source folder}
mkdir cm9
mv .repo cm9/.repo
cd cm9
repo init -u git://github.com/PecanCM/android.git -b ics
repo sync -f
hope this works for you
Thanks for your help, but it's stucked in:
Fetching projects: 100% (258/258), done.
I don't know what can I do. Do you have another idea?
And, Which version of ubuntu are you using? Are you using wubi? And what post do you use to set up your ubuntu (jdk, libs,etc)?
Thanks
Some time it happens with me too but i fix it by repo sync -f ! try only repo sync -f I hope it will work for you
Ok, I've done what you said, I restarted to sync again, and I have some news problems:
First, It stucks agains here:
Then, It said that I have to use repo sync -f --force-broken, so I did:
But It said that can't sync, and there isn't git in bootloader.
Any one can help me please? thanks
repo sync -f should work bro !

Help with how to use FFmpeg

Hello Guys
I'm not a developer i'm just trying to do some tutorials in my website and the subject is TWRP on the Galaxy Nexus
i want to take screenshots so i did some searching and found the command adb pull /dev/graphics/fb0
which is pulling the current frame from the recovery in file called fb0 and it's size is 16mb
the next command to turn that file to a jpg pic is ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 720x1280 -i fb0 -f image2 -vcodec mjpeg fb%d.jpg
which is converting the fb0 to image .. at first it was giving me no such command because the ffmpeg file wasn't there so i did more search and got the files and put the ffmpeg.exe in the fastboot/adb folder and tried the command again but it gives 4 images 3 of them all black and the 4th one with purple color everywhere
the command result was like this
{
"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"
}
so what do i do wrong ?
I'm actually trying to figure this out right now too. Did you work it out?
I had a bit more luck with
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt bgra -s 720x1280 -i fb0 -f image2 -vcodec mjpeg fb0.jpg
and the pic looks like the color is correct, just garbled. Testing all this out in CWM. Also tried the command with png that I've seen posted elsewhere, but jpg so far looks much closer, just like the resolution is off.
Edit: bgr0 seems to work for both jpg and png, just still seems like a res issue.
Figured it out by plugging away at dewarping the resolution of the raw fb0 in irfanview.
Apparently on the GN (at least in CWM) the frames in fb0 have an extra 16px tacked on the right-hand side.
adb pull /dev/graphics/fb0 fb0
ffmpeg -loglevel panic -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt bgr0 -s 736x1280 -i fb0 -vcodec png -f image2 fb0-%d.png
mogrify -crop -16 fb0-*.png
That does the trick for me in CWM. Let me know how it goes for TWRP.
Edit: K. Unsubscribing. PM me if you have any questions.
Thanks a lot, worked for me on Razr HD with TWRP. 736 was the key!!!
Though I had a problem with the colors this made the final trick for me:
adb pull /dev/graphics/fb0
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgba -s 736x1280 -i fb0 -f image2 -vcodec mjpeg fbd.jpg
Yeah finding the correct pix_fmt for a specific device definitely seems to be the tricky part; total needle in a haystack.
Either way, for the full list you can type: ffmpeg -pix_fmts
I've just posted up a little automation batch script for the GN over in my "Odds and Ends" thread, so if someone also wants to mod that for their devices, feel free provided you credit me somewhere. :good:

Stuck when building LOS17.1, what is $(PATH_OVERRIDE_SOONG)

Hello everyone!
I am quite a newbie to build the LineageOS, earlier this week I was trying to write my own device tree files, I had prepared most of the files needed and was managed to add my device to the lunch menu.
However when I was trying to building my twrp recovery image following peter9811's tutorial(link), the compilation was always failed with
Code:
[100% 140/140] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
error: vendor/lineage/build/soong/Android.bp:30:8: module "generated_kernel_includes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
16:47:35 soong bootstrap failed with: exit status 1
1.I looked up the 'vendor/lineage/build/soong/Android.bp' and found $(PATH_OVERRIDE_SOONG) is defined somewhere else, possibly in my Android.mk.
2.I tried google the problem but got nothing except an unresolved post.
3.I tried to lunch aosp_arm-eng or aosp_arm64-eng and it gives the same error, however, lineage_arm64-userdebug works just fine.
As far as I know the aosp is switch from makefile to soong, my wild guess is this process makes some of those tutorials outdated, if that so, could somebody post some up-to-date instructions?
Could anyone please tell me what is going on there, which file should I modify to avoid this kind of problems.
Thanks for reading my post, and any possible solution will be much appreciated.
{
"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"
}
hi man!
not sure if you still interested in solving this. This occurs because the config files inside vendor/lineage isn't being included in some build/*.mk files. This is weird because you're using LOS repo, so it should already have the commit where it does this inclusion. Repo sync might help you in there.
If it doesn't, take a look at this commit. It's a lineage-18.1 commit, but you should compare it and see what still needed on your side.
Did you find any solution to this? i am facing similar issue while building cafex and still cant find any solution. M from sources is up to date.
akshatpro said:
Did you find any solution to this? i am facing similar issue while building cafex and still cant find any solution. M from sources is up to date.
Click to expand...
Click to collapse
I had the same issue and solved it by using the breakfast command before building rom. No extra editing required.
Relevant XDA post/thread
Source
eatmyriceboi69420 said:
I had the same issue and solved it by using the breakfast command before building rom. No extra editing required.
Click to expand...
Click to collapse
Ohhh how I wish that fixed it for me. Lunch, bacon, refreshmod, clobber. Nothing works
Vinnom said:
If it doesn't, take a look at this commit. It's a lineage-18.1 commit, but you should compare it and see what still needed on your side.
Click to expand...
Click to collapse
Thank you sir! These look exactly like the droids I have been looking for!
EDIT: soooo that just created new errors (vendor/lineage/build/soong/soong_config.mk doesn't exist)
Had a brain spark, deleted the entire local/working folder. (not .repo of course).
Then a simple repo sync -l and now I'm at least building.
Fingers crossed

Categories

Resources