yashsingh1/xdaforums huggingface dataset:
[Galaxy S6 General] kevintm78:
No, it's kind of funny, mine actually scales really well when using the msm hotplug but when set to mpdecision I get quite a few errors. After double checking everything I think the fact that's is working at all might be a fluke. The overclock changes are taking place in the .dtsi files which, correct me if I'm wrong, means that I should have to compile a custom dt.img, right? But I've been using the stock dt.img. Plus with a stock kernel I can look at this file path /sys/bus/cpu/devices and everything pertaining to cpufreq is in cpu0 and with my custom kernel it's in cpu0 and cpu1. I'm going to flash another custom kernel just to make sure but I don't think that should be like that. For your issue, will it obey a tuning app. For instance, changing the above_hispeed_delay or minimum sampling time. I know that's not a real fix though. Do you create a custom dt.img?
[Galaxy S6 General] The Sickness:
Whenever you modify the CPU/GPU frequency you have to set permissions for them to be allowed to stay after a reboot. Otherwise they will fall back to stock values.
[Galaxy S6 General] Matt07211:
Yea, I believe you have to create a new dt.img of you overclock etc.

I myself have not touched the dtsi files yet, so I don't see why I would then need to create a new dt.img

My kernel is more or less stock (Dirty cow patch but that's about all). It's just unable to go back down to a lower frequency. Default everything.

You able to shed some insight to my/the other person's problem's?
[Galaxy S6 General] The Sickness:
You do not have to modify the dt.img for OC. Thats all done in drivers/cpufreq/exynos7420-apollo-cpufreq.c and drivers/cpufreq/exynos7420-atlas-cpufreq.c.

Permissions are set using a .sh file and setting permissions in ramdisk/init.rc, ramdisk/init.samsungexynos7420.rc, and ramdisk/ueventd.rc.

Just look at my source https://github.com/The-Sickness/S6-MM
[Galaxy S6 General] kevintm78:
Oh yeah I see now I misread your post. As far as setting the permissions for them is that done in init.rc? The ramdisk patching is something that I need to get deeper into. I'm also curious about the ethics of using ramdisk patches and build scripts too for that matter. I feel like I'm ripping someone off if use their patches or scripts and then again I'll see some that have a copyright at the top with AOSP (which I'm guessing would be ok to use?). I mean, I think I do a pretty good job of crediting people but it doesn't quite feel right to take something verbatim.
[Galaxy S6 General] The Sickness:
You can use the patches, just give credits to the proper folks. Its all open source.

I'm not going to tell anyone "how" to OC. Thats something yall must learn on your own. I just provided the way to build the kernel. Its up to each one of you to learn and research how to modify the kernel.
[Galaxy S6 General] kevintm78:
Yeah I was just checking your source code out. The kernels for my device, that I've looked at anyway, all have the overclock set in this file " arch/arm/boot/dts/qcom/apq8084.dtsi" and It's been working well for me just not when I let SuperSU patch the kernel. That's when it disappears. But you're saying that even in the file mentioned above that the dt.img is not my problem? Like I said, it's been working with the stock dt.img so I guess I can rule that out but I was under the impression that that is what the dt.img is comprised of. I don't know, I've been reading through those source code documents all night and maybe I'm just over thinking it too much.
[Galaxy S6 General] The Sickness:
Just look at my source from the start. There is 2 ways to OC.......I used a easy method. Read the source and you will see.
[Galaxy S6 General] Matt07211:
I'm not trying to overclock at the moment, I'm merely trying to get a compiled Kernel to behave like stock and scale back down its frequenciwsvwhen the workload lightens.

But your "easy method" is not applicable in my case anyhow (cause the only place I can find stuff for my CPU that's related to it's frequency is in the dtsi files.

Just for reference: https://github.com/Matt07211/android_kernel_samsung_xcover3lte

Phones name is: xcover3, or slight variations on the ending of name, uses a Marvell SoC, specifically the pxa1908.

Setting permissions for what?

The code is open source, as long as you credit the creator then you should be fine.

A dt.img is comprised of multiple joined together .dtb files. .dtb files are generated from the .dtsi files at compile time.
[Galaxy S6 General] The Sickness:
Try this: https://github.com/The-Sickness/S6-MM/commit/5d26032bfff11a24415006587210c2bf071246c8
[Galaxy S6 General] IXgnas:
Hi, I'm working together with him, and the fix you've provided gives us this error:

drivers/cpufreq/cpufreq.c:1155:6: error: 'last_min' undeclared (first use in this function)
if (last_min > -1)
^
drivers/cpufreq/cpufreq.c:1155:6: note: each undeclared identifier is reported only once for each function it appears in
drivers/cpufreq/cpufreq.c:1158:6: error: 'last_max' undeclared (first use in this function)
if (last_max > -1)
^

Do you know anything that could help us?
[Galaxy S6 General] ShinySide:
last_min isn't declared. So you're missing a parent commit
[Galaxy S6 General] IXgnas:
What commit are you talking about?
[Galaxy S6 General] ShinySide:
Pro tip- when cherry picking commits don't just grab commits with out looking into the commit or history of the commits to the file/s. Else you're going to end up with half commits with loose ends and run like crap.

Use the history button-

P.S. look at those as I didn't even honestly look at them lol
[Galaxy S6 General] IXgnas:
Thank you, but that still points towards the change we've tried to implement. Do you know where those values are defined?
[Galaxy S6 General] ShinySide:
You sure? Because the googy commit is different than the other lol
[Galaxy S6 General] IXgnas:
Oh, that one. Thanks, will look into it.
[Galaxy S6 General] IXgnas:
Here's the problem I've ran into after applying the patch you've suggested:

drivers/cpufreq/cpufreq.c: In function '__cpufreq_remove_dev_finish':
drivers/cpufreq/cpufreq.c:1404:13: error: 'data' undeclared (first use in this function)
last_min = data->min;
^
drivers/cpufreq/cpufreq.c:1404:13: note: each undeclared identifier is reported only once for each function it appears in
[Galaxy S6 General] ShinySide:
"data undeclared"...... so again you're missing another commit or applied a commit that removed the declaration of "data". Can push you in the right direction but can't do it for you as I don't have the time to look thru commits I don't even use. Look thru the commit history and the commits
[Galaxy S6 General] Matt07211:
I did this

static int last_min = -1;
static int last_max = -1;

Cool, thanks for the tio

I've never ran into that problem, bit that being said I didn't do the second commit like you did.

I've compiled properly on the first commit but haven't tried booting cause I went and slept

I certainly wasn't asking you to do it (looking through commits). Just push me in the right direction, and the rest I can go and figure out.
[Galaxy S6 General] Matt07211:
Doesn't seem to fix the problem, got any other suggestions?
[Galaxy S6 General] kevintm78:
Have you tried this commit from the sickness kernel. That's what I was talking about the other day about setting the permissions in the ramdisk. It cleared up several cpu errors that I was getting.
[Galaxy S6 General] Matt07211:
No I haven't seen that commit, but I highly doubt that is the cause of the problem, cause I am using using​ the exact same ramdisk in booth stock and compiled Kernel, but I'll test it tomorrow anyway
[Galaxy S6 General] RandomUsername02:
By Samsung Kernel, it means like stock kernel, not Lineage or AOKP kernels or what not. Sorry if I sound stupid but I'm trying to learn
[Galaxy S6 General] ShinySide:
TouchWiz

Aosp is going to be a tad different. Honestly just found it best to compile aosp based (cm, Linage, etc) since they kernel is built in line and you have the absolute latest rom commits and can cherry pick rom commits from other roms and have your very own version
[Galaxy S6 General] RandomUsername02:
So if it's a tad different, do you exactly know what is different? Possible to link me a guide, or direct me with a google search. Would really appreciate it!
[Galaxy S6 General] RandomUsername02:
I keep getting stuck in Kernel STUCK IN BUILD!
[Galaxy S6 General] The Sickness:
Ummm....that's not telling us anything. You have a error. What is it?
[Galaxy S6 General] RandomUsername02:
http://paste.ubuntu.com/24244205/
[Galaxy S6 General] ShinySide:
Err app was being stupid and showed a double post so deleted what I thought was the double lol

Anyway you have no real errors. It's just warnings. Delete the wrapper in your makefile and stupid warnings won't kill your build

https://github.com/ShinySide/ShinyS...mmit/7c9f1f2923271334f29894b6838666541296189a
[Galaxy S6 General] RandomUsername02:
Makefile is quite different than yours. Take a look.

https://github.com/RandomUsername02/SM-G925W8-Kernel-Attempt
[Galaxy S6 General] The Sickness:
Look here......

KBUILD_CFLAGS := -Wall -Wundef

Add this. -w

So it would go like this:

-w -Wall -Wundef etc, etc
[Galaxy S6 General] RandomUsername02:
http://paste.ubuntu.com/24244798/

Still failing.

https://github.com/RandomUsername02/SM-G925W8-Kernel-Attempt
[Galaxy S6 General] The Sickness:
Use my Makefile I provided in the OP. Just edit the toolchain directory line to match yours.

And when it builds I'll tell you why.
[Galaxy S6 General] RandomUsername02:
Well, I would ask you why it built :P. Unfortunately, it did not build.

This is the log: http://paste.ubuntu.com/24248279/

And if you look at the github page I renamed Makefile to Makefile.old and put your Makefile in there and I put my toolchain directories. https://github.com/RandomUsername02/SM-G925W8-Kernel-Attempt
[Galaxy S6 General] The Sickness:
Dude, you have a error in gadgets
[Galaxy S6 General] RandomUsername02:
I don't follow
[Galaxy S6 General] spookcity138:
Your errors are all from the drivers/usb/gadgets folder.
[Galaxy S6 General] RandomUsername02:
No clue where to proceed.
[Galaxy S6 General] The Sickness:
Look at the error very carefully. The answer is right there. "Undeclared "
[Galaxy S6 General] spookcity138:
drivers/usb/gadget/f_conn_gadget.c:762:24: note: each undeclared identifier is reported only once for each function it appears in drivers/usb/gadget/f_conn_gadget.c:763:3: error: 'CONN_GADGET_IOCTL_SUPPORT_LIST' undeclared (first use in this function) CONN_GADGET_IOCTL_SUPPORT_LIST, ^ drivers/usb/gadget/f_conn_gadget.c:764:3: error: 'CONN_GADGET_IOCTL_BIND_WAIT_NOTIFY' undeclared (first use in this function) CONN_GADGET_IOCTL_BIND_WAIT_NOTIFY, ^ drivers/usb/gadget/f_conn_gadget.c:765:3: error: 'CONN_GADGET_IOCTL_BIND_GET_STATUS' undeclared (first use in this function) CONN_GADGET_IOCTL_BIND_GET_STATUS ^ drivers/usb/gadget/f_conn_gadget.c:768:24: error: 'CONN_GADGET_IOCTL_MAGIC_SIG' undeclared (first use in this function) if (_IOC_TYPE(cmd) != CONN_GADGET_IOCTL_MAGIC_SIG) { ^

That's your errors. All in fconn_gadget.c file. It says right there the line numbers and everything, so you need to check out that file.
[Galaxy S6 General] RandomUsername02:
I know it is, I just don't understand. I have looked at it for a long time and I replaced all the files in the /usb/drivers/gadgets directories with the one in your source. I know I am not learning anything this way but I just can't understand it. None of the text makes sense to me.

---------- Post added at 03:47 PM ---------- Previous post was at 03:47 PM ----------

It was able to finish successfully in the end as well.
[Galaxy S6 General] The Sickness:
So you have a successful build now?
[Galaxy S6 General] RandomUsername02:
It successfully builded, gave me a zip and tar.md5. I attempted to try and flash the zip on Alexis Rom but I was in a bootloop.

---------- Post added at 05:12 PM ---------- Previous post was at 05:08 PM ----------

Might be because the source is extremely old. On the website it says the source version is G925W8VLU3CPC5. Maybe I bootlooped because I flashed on a rom based on G925FXXU5DQA7. Before attempting to flash my built kernel I un rooted with an unSU script then flashed.
[Galaxy S6 General] spookcity138:
Did you try post #3 in this thread? Using mkboot? Because I could be wrong as I haven't read all of your posts to see exactly what you're doing,but would imagine that you need the ramdisk from your Alexis ROM. This could cause a bootloop if you don't have the right ramdisk. Just a thought.
[Galaxy S6 General] JonathanRAZ:
Ok so i am doing this again i have never got one kernel with diferrent distros this is all i get from 2 different mkboot one in utilities folder and one git cloned from guide i know ramdisk is need it but i get same files inside the ramdisk folders as OP said i am missing folders but thats all i get from the mkboots so cant get more files from it thats all it gives

The one with zImage its from utilities folder
[Galaxy S6 General] nixholas:
Do you have the ramdisk to pack with your zImage up to a flashable zip?
[Galaxy S6 General] JonathanRAZ:
I have a flashable zip wont boot

Bootloop
[Galaxy S6 General] The Sickness:
Post a link to your source.
[Galaxy S6 General] JonathanRAZ:
Old source since is the same on all the sources i upload everytime https://github.com/JonathanRAZ/N920T-Kernel-DQA2

You said i am missing stuff but thats all i get on mkboot cant get no more than all it gives and is same.in all distros
[Galaxy S6 General] Neuken69:
can this be done for other versions of Sammy phones for example N910V ?
[Galaxy S6 General] The Sickness:
Is it arm64?
[Galaxy S6 General] The Sickness:
What's in the ramdisk?
[Galaxy S6 General] JonathanRAZ:
This is all i have
[Galaxy S6 General] The Sickness:
You do not have a folder named sickness that would contain the boot.img. Look at the screen shot. The folder needs to be added here...
[Galaxy S6 General] The Sickness:
See? Add a folder named sickness here. Or name it whatever you want as long as you edit the updater-script
[Galaxy S6 General] JonathanRAZ:
In that source is not there but yestarday when i installed new evrything i have it look in this screenshot this was from compiling from 0 on another distro and still wont boot

Edit:i have not uploaded the new one because it has not booted and i dont want to until it does cause i have tryed many times from 0 and i have no mods or nothing is stock kernel i have done the guide without any luck on booting
[Galaxy S6 General] nixholas:
Do you think its viable to obtain g920f's boot img for some work on nougat?
[Galaxy S6 General] The Sickness:
If I get time tomorrow after work I will build it and you can test it.
[Galaxy S6 General] The Sickness:
If you have the firmware you can get it from the tar
[Galaxy S6 General] JonathanRAZ:
Ok thank you yes appreciate it then you can explain what was wrong so i can learn from that point
[Galaxy S6 General] Neuken69:
ummmm ... how could I tell?
[Galaxy S6 General] Demicro:
scripts/kconfig/menu.c

And sortextable warning you can found the fix in my kernel source

security/selinux/hooks.c

Maybe you should use static inline

I fixed this problem but I don't know if the files are the same
[Galaxy S6 General] Matt07211:
Run this command on the phone terminal or via ADB shell.

cat /proc/cpuinfo
[Galaxy S6 General] WILMANS2M:
How to get last kmsg debug log please. Tried to enable through defconfig but no luck. I know that under MM it should be in sys with ramoops file but even with config pstore with y in defconf, i have no logs. Any ideas ? Thanks. I remember that on note3, kmsg file had to be rewritten to reenable logs but dunno on MM (samsung MM ofc) with pstore file....

Envoyé de mon LG-H850 en utilisant Tapatalk
[Galaxy S6 General] dalincn:
:laugh::laugh:mark
[Galaxy S6 General] taron1:
Can i use this guide to build kernel for note 4 N910s.

Thanks to all contributors.
[Galaxy S6 General] The Sickness:
Yes
[Galaxy S6 General] sofir786:
[MENTION=4411650]nguyen_vh[/MENTION]
[Galaxy S6 General] nguyen_vh:
Thank you very much. I will read the thread carefully. I hope you will not mind if there is some thing I don't understand and ask for your help later.

Once again, thank you very much !
[Galaxy S6 General] sofir786:
I haven't dabbled in any of this Tbh with you but I shall try, alot more knowledgeable guys here can help.
[Galaxy S6 General] m3tatr0n84:
I am trying to build myself a custom kernel for my SM-G920W8. I downloaded Sammy's latest Android 7 source

for my device and the suggested toolchain to compile the source. I downloaded google's aarch64-linux-android-4.9 toolchain.

I just want to see if I can compile the source I got without any modification to the source.

I did a "make clean && make mrproper ". Then did "make zerofltebmc_02_defconfig" and I got:

I thought I can ignore the warning and proceeded to do "make -j64", it was humming for a while

then a few minutes, below is the last few lines I got:

Did it compile OK?
[Galaxy S6 General] ShinySide:
scripts/Makefile.fwinst:45: target '/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule

/scripts/Makefile.fwinst:45: target '/lib/firmware/abov/abov_valley.fw' given more than once in the same rule

^^^^ if you read the error it's not only telling you what's wrong but where.

The where:

scripts/Makefile.fwinst:45

45 meaning the 45th line of the file

The what:

target '/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule

target '/lib/firmware/abov/abov_valley.fw' given more than once in the same rule

I suggest actually looking at the file, starting at line 45, trying it fix it yourself, and if you fail then ask for help or search github/xda or else you're learning nothing lol
[Galaxy S6 General] m3tatr0n84:
Thanks for your time mate... I did look at the 45th line of the said file but doesn't really tell me anything since I am not a developer.

And I always search the web for possible solution. Posting on a forum site is always my last resort. I will however continue to search

for a solution.

Thanks

EDIT: I found this earlier but I found no help there.
[Galaxy S6 General] ShinySide:
;);)

https://github.com/SM-G920Pold/TeamSPR_Kernel/commit/fb208f069e77812df82e582266cb5618376c837b
[Galaxy S6 General] m3tatr0n84:
Thanks mate, we'll try that right away. BTW is searching google not enough? Do I actaully have to search within github to find

what you found?
[Galaxy S6 General] ShinySide:
Depends. Google plays games with how you ask lol. Usually seems if you're vague-ish with what you're looking for it'll find you something easier than being specific lol found that via Google just so you could see the change but found it by googling "target '/lib/firmware/tsp_stm/stm_z1.fw" but if you googled the entire error it probably wouldn't of found it as easy lol
[Galaxy S6 General] m3tatr0n84:
I did Google the entire error :) . Next time ill try diiferent variation instead of searching for the error verbatim. Anyway you've been a ton of help mate. I really appreciate you spending your time helping me out. Your a good man Charlie Brown.
[Galaxy S6 General] m3tatr0n84:
Are there any cpu governor source codes for Nougat like smartass, intelliactive, conservativex etc?
[Galaxy S6 General] ShinySide:
They're all "universal". Any governor you find you can use for any version of Android or kernel version and even grab " custom/tweaked" ones from custom kernels built for desktops if you can find the source. Of course different devices will play different with each governor. Honestly 99% you find are just "tweaked" versions of the default/stock conservative or performance with a cool name since everyone wants either an efficient device battery wise or maxed out everything for performance lol
[Galaxy S6 General] m3tatr0n84:
That's good to know. I noticed that there are a few governors in cpufreq that wasn't baked in with the default kernel like ondemand. BTW thanks for your help I was able to compile the kernel source code successfully. I just compiled it as is to see if it will work. Actually using it right now. I am using interactive right now and I noticed that if I set the big CPU freq lower using kernel adiutor, it goes back to 2100. The Sickness' version of it on MM work fine and I can set the frequency higher than 2100 or lower than 800.
[Galaxy S6 General] ShinySide:
Check Sickness' commit history. More than likely there's a commit to make frequencies and etc stick. Past Samsung devices had Samsung "features" that would over ride what the user set
[Galaxy S6 General] m3tatr0n84:
Thanks. I'll do that. I've started looking around some of his commits. I noticed that he started nougat branch on his Github.
[Galaxy S6 General] doomhammer07:
Hi, I'm trying to build a kernel for the s8 (G950FD), what all changes are needed?

Thanks in advance :)
[Galaxy S6 General] KingRaheel:
Its up to u what changes u wanna make ;) . If u r asking about simply compiling a kernel, then run the default "build_kernel.sh" present in the kernel source and u will get ur kernel. If u want the result in a much organized and customizable manner then follow the first few posts given in this thread.

Good luck
[Galaxy S6 General] robcore:
Do a little research into Samsung's dvfs/touchboost, as well as mpdecision and thermald. I've replaced them all with better solutions.

Also, governor compatibility will differ between kernel versions. ie: 3.10 is far different than 3.4. So you'll want to ensure whichever govs you use are compatible with the core api as well. As stated, though, most of the "custom" govs out there are tweaked versions of ondemand, interactive, or conservative.
[Galaxy S6 General] m3tatr0n84:
Not a dev and very new to android kernel so every suggestions and advice from kind members who are willing to impart their knowledge is very much appreciated. Thanks for the tips mate.
[Galaxy S6 General] robcore:
For sure, also I forgot to mention Sammy hides its cpu limiting in random places, /kernel/power/main.c for the sysfs, msm's cpufreq for the limiting hook, cpu_limit.c in the cpufreq folder for the main logic and (on newer devices), hooks in cpufreq.c as well
[Galaxy S6 General] m3tatr0n84:
Whew! That's probably a little too advance for me at the moment but something I will definitely take a note of. I was glad I was able to include ondemand and powersave by enabling them via menuconfig today though. I am quite familiar with Linux, as a sys/network admin but as I said before, not a dev. Closest to programming I do is shell scripting. As long as I keep on top of the servers at work and keep them humming, I have time to dabble with things like compiling android kernel lol :laugh:

---------- Post added at 07:04 AM ---------- Previous post was at 06:53 AM ----------

I did the latter first just to make sure the the source code will compile as is. Guess what? I ran into some compile errors . Luckily my for me [MENTION=5580710]ShinySide[/MENTION] threw me a bone. :) now that I was over that, I am trying to incorporate governors, maybe scheduler next.
[Galaxy S6 General] XCnathan32:
Are samsung kernels compiled from source able to get around a locked bootloader or no? I'm looking to (try to) make a modified kernel for the S7 Qualcom.
[Galaxy S6 General] The Sickness:
Not gonna happen.
[Galaxy S6 General] xdauser'17:
hey guys, if a self-compiled kernel can't boot and phone give a message "kernel is not seandroid enforcing", how to solve it, please?

and i didn't read this guide completely, because i don't have a galaxy s6, and my phone is galaxy s8.

thanks & regards :)
[Galaxy S6 General] FakeSmile:
How hard is to port nethunter kernel to s6 edge nougat?
[Galaxy S6 General] robcore:
8 hard
[Galaxy S6 General] pyrontq:
thanks for this great guide

but when i try to build kernel for j530f i got this errors

can you please help me
[Galaxy S6 General] The Sickness:
This guide is to teach you to build a kernel. It's up to each of you to learn how to fix errors.
[Galaxy S6 General] robcore:
And hack through them like crazy ?