yashsingh1/xdaforums huggingface dataset:
[Galaxy S6 General] :
Hi, I try to build a AOSP android 7.1 kernel but everytime I try to build it by typing "make" I get this error:

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

aarch64-linux-android-gcc: error trying to exec 'cc1': execvp: No such file or directory

/home/madscript/corewell-kernel/./Kbuild:35: recipe for target 'kernel/bounds.s' failed

make[1]: *** [kernel/bounds.s] Error 1

Makefile:899: recipe for target 'prepare0' failed

make: *** [prepare0] Error 2

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

The same happens to me with others AOSP's kernels, can anybody help me or tell what am I missing?

Thanks in advance

Enviado do meu SM-G925F através de Tapatalk
[Galaxy S6 General] danerrickcuba@gmail.com:
Deleted
[Galaxy S6 General] The Sickness:
You need to not use any of the scripts or ramdisk. You need to build according to the ReadMe.file that's inside the kernel source. It will tell you how to build.

You will then have to use mkboot to make your boot.img.
[Galaxy S6 General] danerrickcuba@gmail.com:
Thank you for replying,I did eventually manage to build the output folder with images/zimage , but the "image" file is too large to for /boot :

I used this to create a boot.img :

./mkbootimg —kernel ./T365/Image —dt ./T365/dt.img —ramdisk ./T365/ramdisk.gz —base 0x00000000 —kernel_offset 0x00008000 —ramdisk_offset 0x02000000 —tags_offset 0x01e00000 —pagesize 2048 -o ./T365/boot.img

If I use the "zimage" to build the flashable file,it installs, but kernel boots then black screen loop, happens!!

1.should I use the "image" or "zimage" file generated in "output" folder?

2.before generating the boot.img file,I added this command, to make ramdisk:

./mkbootfs ./T365/ramdisk(this folder from my current boot file, decompiled) | gzip > ./T365/ramdisk.gz

Structure of /T365/:

/T365/-ramdisk folder

-dt.img

-img_info

-ramdisk.gz (generated)

Then I build the boot.img with the code above.

....is this the correct way? And how can I have that "image" file to be smaller to fit into 10mb?
[Galaxy S6 General] The Sickness:
It's booting back to TWRP because you need to flash root before you reboot....
[Galaxy S6 General] :
I'm having this error after making the kernel Image, any idea in how to fix it please?
[Galaxy S6 General] The Sickness:
There is no errors...its just warnings
[Galaxy S6 General] :
But can i still run the kernel with no problems? Because it was a section mismatch and then I runned "make CONFIG_DEBUG_SECTION_MISMATCH=y" and then that appeared

Enviado do meu SM-G920F através de Tapatalk
[Galaxy S6 General] The Sickness:
You can run the kernel
[Galaxy S6 General] akshi2000:
Thanks for the awesome guide [MENTION=4921688]The Sickness[/MENTION] I compiled many kernels. It will be more useful if you add some Overclocking stuff. :fingers-crossed:
[Galaxy S6 General] FakeSmile:
Can i use this and add net hunter for g925f?
[Galaxy S6 General] The Sickness:
Adding OC/UC is for you to figure out and learn.

No clue, never have used Net Hunter
[Galaxy S6 General] :
Yes, you can, you just have to follow the tutorial on their page. I've made a nethunter port for your device in AOSP check it out ;)

Enviado do meu SM-G920F através de Tapatalk
[Galaxy S6 General] :
Pretty good tutorial, THANKS. Iwould be great to have a tutorial like this but for building/porting lineageOS/cyanogenmod roms :)
[Galaxy S6 General] danerrickcuba@gmail.com:
Good day:

I'm writing here out of desperation, and total respect to anyone who gets to read this:

1.I have a galaxy tab active 8" LTE, perfectly similar to the galaxy tab 4 (7" & 10.1") except for battery and screen size.

2.I managed to create a TWRP-3.1.1-0 using sources, no developer is supporting the tab active anywhere

3.I tried following this guide to create a kernel but not succeeding,I tried flashing superSU to the created kernel using Samsung sources, but still not winning, mostly due to no experience and poor knowledge.

4.I'm looking for anyone with time to spare, to help create a device tree for my tablet, or help creating a custom rom, or port one of the roms from the device at the top...I'll pay for the troubles and I'll test and provide logs as needed!!!!

5.please help or input constructively!!!
[Galaxy S6 General] mrpascal:
Hello sir , [MENTION=4921688]The Sickness[/MENTION] I wanted to ask that is it necessary to follow your guide to make s6 working custom kernel ??

I wanted to make kernel for G920F and if i will compile it normally without following your GUIDE will it work or boot ?

Any idea ?
[Galaxy S6 General] The Sickness:
This guide is specific to the S6
[Galaxy S6 General] The Sickness:
FYI....I have retired 100% from android development.
[Galaxy S6 General] robcore:
Please know that you've inspired and (perhaps unknowingly) mentored people from all walks of life throughout your development. I personally have gained great insight from your work over the years, and wouldn't feel right without saying thank you, that your community involvement has been much appreciated, and that I wish you all the best in whatever endeavours you take up next. Take care, my friend, hope all is well :)
[Galaxy S6 General] jaran kepang:
thank you bro for sharing the guide..

---------- Post added at 04:21 AM ---------- Previous post was at 04:20 AM ----------
[Galaxy S6 General] xdauser'17:
Could someone please tell me if it's possible to see the custom kernel boot log in case the phone stuck at boot screen? Thank you.
[Galaxy S6 General] physwizz:
Error

[MENTION=4921688]The Sickness[/MENTION]

Firstly, thanks for the easy to follow guide.

Many others are like reading an engineering text.

Could you please help me with this error?

sudo: build_kernel.sh: command not found
[Galaxy S6 General] screen:
Sounds like you got an error in your syntax. I don't exactly know what youre trying to enter but .sh scripts are run by ./script.sh (or with sudo in front if the script requires superuser). So try sudo ./build_kernel.sh from a terminal in the folder where the script is located.
[Galaxy S6 General] The Sickness:
[MENTION=502223]screen[/MENTION] gave you the correct answer.
[Galaxy S6 General] Johannesdavidsen:
Lol
[Galaxy S6 General] Morok2devil:
hi I have this problem, the kernel compiled and installed successfully, but when the screen is turned off, the phone restarts! I tried different kernel sources and toolchain, the result is the same. my device is g920f android 7.0
[Galaxy S6 General] htc_unenthusiast:
I ran into the same issue. I am not interested in a permanent solution so I took a shortcut. After a crash I opened last_kmsg and noticed kernel panics surrounding "if unlikely(in_fips_error()))" calls. The kernel prints were something like "zswap: can't allocate compressor transform". You should double check your last_kmsg log and confirm this is the same issue for you. I temporarily fixed this by removing those error records. This was commenting out lines 367 and 432 in crypto/api.c. This is not a real solution and I offer this idea with no warranty or assurances it will work for you.
[Galaxy S6 General] erpilsG:
Good day, is there for galaxy note10 lite (exynos9810-r7), for nethunter?
[Galaxy S6 General] Jackychans:
Hello

First of all, great thanks for your kernel contribution, it helps me alot.

Just one question I want to ask is about kernel version. At the moment we can retrieve kernel information either running "adb shell cat proc/version" or "adb shell uname -a".

I know that kernel information has been hardcoded at compile time . However, I want to spoof it dynamically everytime OS rebooted.

So apps will see different kernel version of a phone everytime it rebooted. Could you advise me how to do it ? I believe there gotte be a partiton that kernel can access so we can direct proc/version to load that file, which containing kernel version we can write.

I would love to donate pretty much

Thanks a lot
[Galaxy S6 General] tomiga:
Very neat guide! I'm really happy guides like these are popping up, gives me hope for the development of the S6.
[Galaxy S6 General] mrthomson:
Thank for guide
[Galaxy S6 General] ambasadii:
[MENTION=4921688]The Sickness[/MENTION] mate Just wow and respekt. I'm start studding this s***it
[Galaxy S6 General] pawo99:
I was following this guide and did everything from scratch two times but kernel was in bootloop. :( I have 920F. Can it be because of ramdisk from 920T?

"Now we need to get a couple more files. (Non T-Mobile users see post #3)"

Will you upload any files for other models?
[Galaxy S6 General] The Sickness:
Tonight I will show you how to get your ramdisk for your device....

I forgot about the files being T-mobile.

EDIT: See post #3 now......I explained it better
[Galaxy S6 General] The Sickness:
Ok folks...my guide is complete. Any questions or issues please post it.
[Galaxy S6 General] INinja_Grinding:
I make a little differently kernel.... why did not you explain

./configuration, overclocking and many things ....what is general purpose of making this kernel....
[Galaxy S6 General] pawo99:
When I did cherry pick "Linux 3.10.61 to Linux 3.10.96" (dd8a0e8b5c3076db4481db87a2f50c106610e0eb) I got error like on this screenshot:[IMG="screenshot"]https://img.xda-cdn.com/6DcR4H_NmCp-JzFglkwxfmP-1Jc=/http%3A%2F%2Fi872.photobucket.com%2Falbums%2Fab282%2Falloycowboy69%2FScreenshot_2016-07-31_20-55-46_zps9ulmj0xd.png[/IMG]

After 'git status' I got this:

"Untracked files:

(use "git add <file>..." to include in what will be committed)

.config

.config.old

.missing-syscalls.d

.tmp_System.map

.tmp_kallsyms1.o

.tmp_kallsyms2.o

.tmp_versions/

.tmp_vmlinux1

.tmp_vmlinux2

.version

.vmlinux.cmd

Module.symvers

System.map

arch/arm64/boot/.Image.cmd

arch/arm64/crypto/.aes-ce-blk.o.cmd

arch/arm64/crypto/.aes-ce-cipher.o.cmd

arch/arm64/crypto/.aes-ce.o.cmd

arch/arm64/crypto/.aes-glue-ce.o.cmd

arch/arm64/crypto/.built-in.o.cmd

..."

It's not that simple HEAD issue, so I wrote in terminal: git add --all. Is it OK? :o
[Galaxy S6 General] The Sickness:
You did not clean your source before you rebuilt.

In your source open a terminal and type: sudo make clean....then password.

Then sudo make mrproper
[Galaxy S6 General] The Sickness:
I will address this when I get to my pc...unbelievable
[Galaxy S6 General] The Sickness:
This guide is to show you how to build a "stock" kernel. This guide is "not" about overclocking and such. Thats up to YOU

to read about or figure out for yourself. Plus, OC is different on all devices.

You can make a guide for OC, I will not.
[Galaxy S6 General] pawo99:
Hi, where can I download Sabermod 5.3 toolchains? (sabermod.com seems to be offline).
[Galaxy S6 General] The Sickness:
https://www.androidfilehost.com/?fid=24651442761499078
[Galaxy S6 General] pawo99:
thanks :) :good:

I have two issues with my kernel: 1. wi-fi takes too long to connect. :eek:

2. f.lux not working however kernel is permissive (commit). Is necessary also change default.prop in ramdisk? On other kernels is working good... :o
[Galaxy S6 General] The Sickness:
You can edit the default.prop for wifi...

Have you tried that?
[Galaxy S6 General] pawo99:
Not yet. Will be enough add this line in default.prop: "wlan.wfd.hdcp=disable" ? :confused:
[Galaxy S6 General] The Sickness:
That's for screen cast..

This will make it to where your password is saved each reboot...

ro.securestorage.support=false
[Galaxy S6 General] pawo99:
I have copied stuff from your default.prop and now wifi connect much faster. 1-2 sec after pressing toggle :good:;)
[Galaxy S6 General] The Sickness:
Lol....well keep on building bro
[Galaxy S6 General] LuanTeles:
Please can someone update hacker kernel " to support NOTE 7 port
[Galaxy S6 General] The Sickness:
Why not just build a Note 7 kernel yourself? This is the reason for this guide.
[Galaxy S6 General] LuanTeles:
but how to mix them?
[Galaxy S6 General] The Sickness:
What do you mean?
[Galaxy S6 General] LuanTeles:
the N7 rom needs a kernel with mixed ramdisk from n7 and s6
[Galaxy S6 General] The Sickness:
Hmmm....never heard of that b4.

Do you mean the default.prop needs N7 entries?
[Galaxy S6 General] LuanTeles:
YEAP. all ported roms need both parts the base and the device
[Galaxy S6 General] Jimmy Mossiba Floyd:
have anyone managed to build a g920f kernel? if yes, please show us how to get it to be like TheSickness' one.
[Galaxy S6 General] Mikekelso421:
I personally dual boot windows 10 and ubuntu on both my laptop and desktop. Best of both worlds. But i suggest not doing this unless you have a big hard drive. No less that 1tb. Since source code can be huge if you decide to compile aosp

---------- Post added at 02:21 PM ---------- Previous post was at 02:14 PM ----------

Is it safe to assume this guide will work for building kernels for the note series?
[Galaxy S6 General] The Sickness:
Any Samsung device kernel can be built with this guide. Just make sure to follow post #3 about getting your ramdisk, etc
[Galaxy S6 General] Mikekelso421:
Thanks [MENTION=4921688]The Sickness[/MENTION]. Im gonna give this guide a whirl this weekend. Do you know of any material i can read to learn how to tweak the kernel settings before compiling?
[Galaxy S6 General] javitolopez69:
That is interesting. kernel tweacks post
[Galaxy S6 General] The Sickness:
Now guide or info I'm aware of. You can look at my source for the S6.

https://github.com/The-Sickness/S6-MM
[Galaxy S6 General] zack.molony:
Hey I need some help I have the g925w8
[Galaxy S6 General] zack.molony:
Same

Same error with ubertc 5.3 and 6.0 right near the end everytime thats not normal right? :P Ive even tried bbqlinux i tried stock makefile and the one you posted as well. I also noticed "nothing to be done with dtbs"
[Galaxy S6 General] The Sickness:
Dtbs is a commit you would have to get. It's for the T-mobile S6...

I use Xubuntu....

Re-download your source.

6.0 requires a additional file....

Stick with 5.3.
[Galaxy S6 General] bay12:
Hi guys,

i need some help with the kernel sources.

I've changed my s6 battery (25550 mah) with a battery from an s7 edge ( 3660 mah) but the kernel does not recognize it and i have battery calibration issues.

Can someone please point me to the kernel source code that is managing the battery capacity? i've tried to look in the /power section but there's a lot of stuff.

thanks in advance
[Galaxy S6 General] zack.molony:
Ok so i have got it to compile using the USB and HOST folder from the sickness git and it compile nice with just an error at the end about a file being referenced twice but I get the Image and have put one together using the stock dt.img and modified the ramdisk but now i have bootloops on samsung splash it does not even start to load the kernel the reason i know this is becasue i have enabled "early printk" and "fbcon" my command line is "fbcon=font:8x16 console=tty0" also I set selinux to 0 on boot disabled tima and knox.
[Galaxy S6 General] The Sickness:
How did you make a boot.img?

Need your steps to help you
[Galaxy S6 General] zack.molony:
Ive made it the same way your script does with stock dt.img and mkbootimg also I have tried abootimg!

Made with stock dt.img and stock ramdisk.

./tool/mkbootimg --kernel Image --dt dt.img --ramdisk ramdisk.gz --base 0x10000000 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --pagesize 2048 -o boot.img

everytime I compile kernel it is only 18mb and I have disabled selinux, tima and knox it doesn't even freeze on boot its just an instant loop also supersu.zip cannot modify ramdisk I have zipped that the same way you scrip suggests as well to be honest with you I think the 6.0.1 kernel might be impossible to boot unless i need to remove the fingerprint driver. Thanks for your help. I also tried 6.0 got the compiler-gcc6.0.h and put it in the respective folder.
[Galaxy S6 General] The Sickness:
Are you building the G920T?

How many folders do you have in your ramdisk?

I have built the S6 and N5 with 6.0....that's not your issue
[Galaxy S6 General] zack.molony:
Im building for the G925W8

---------- Post added at 12:29 AM ---------- Previous post was at 12:24 AM ----------

I used a rooted boot.img from my twrp backup the folders are | data, dev, lib, oem, proc, sbin, su, sys and system
[Galaxy S6 General] The Sickness:
That's your issue. You can't use that ramdisk. You would have to patch it for su....

Use the stock ramdisk and it will boot
[Galaxy S6 General] zack.molony:
ok thanks i guess i shall download the stock firmware

---------- Post added at 12:50 AM ---------- Previous post was at 12:45 AM ----------

another thing dtbtool does nothing in kernel source is that normal
[Galaxy S6 General] The Sickness:
Yes, that's normal...
[Galaxy S6 General] zack.molony:
Well tried the stock boot.img and did not change anything I let the supersu do the changes still no boot. I attached the stock bootimg for you to mabye have a look at in your spare time I think there is a different security flag somewhere. http://uppit.com/jevsqlxh7isx
[Galaxy S6 General] ShinySide:
Thats not going to be simple. Just FYI. Highly doubt anyone is going to be able to just say "oh yeah change this file" Especially since they are fixed batteries, different mah sizes and also voltage and charging voltage I believe. Its not going to be as simple as finding a line that says "2550mah" and changing it to "3660mah". And since they are fixed batteries youre probably missing everything that detects a change in battery size like on a device that is expected to have the battery swapped out to a possibly higher capacity. You're most likely need to track those down, attempt to integrate them in your source, get them working with the pre-existing files and also use and/or modify your files to resemble items from the s7 edge., then just pray to god, if it even compiles, that it even detects theres a battery at all. Good luck to you tho.
[Galaxy S6 General] bay12:
Thanks for the answer.

Well i was hoping that some kernel dev could give me a tip where to start from...i don't have any idea :)
[Galaxy S6 General] The Sickness:
Send me a link to your source
[Galaxy S6 General] zack.molony:
What's this about need an engineering mode sboot.bin to flash the G925xx series? im downgrading from 6.0.1 to 5.1.1 to try compiling the 5.1.1 kernel and boot it instead of the 6.0.1

---------- Post added at 05:47 PM ---------- Previous post was at 05:37 PM ----------

http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=g925w8 the source ive been using is the top one for marshmallow it has graphic drivers already in it.

---------- Post added at 05:48 PM ---------- Previous post was at 05:47 PM ----------

http://opensource.samsung.com/recept...chValue=g925w8 the source ive been using is the top one for marshmallow it has graphic drivers already in it.
[Galaxy S6 General] umuturunc:
Thank you so much for this guide.

I want to ask some questions before starting steps.

You said that you don't support VM Box. Can you clarify the reasons? Is vmbox causing issues? Will we get errors while building sammy kernel in vmbox?

Thanks

GT-I9190 cihazımdan Tapatalk kullanılarak gönderildi
[Galaxy S6 General] zack.molony:
I have cracked (PIE) if anyone wants the linker file the only reason Im compiling a kernel is to get hacking tools working :P If I can get it to boot I may try to migrate a native Linux kernel for booting Linux from sdcard using a case that supports microsd

---------- Post added at 06:29 PM ---------- Previous post was at 06:09 PM ----------

If you dissasemble linker Its as easy as changing "cmp R2, #3" to "cmp R2, R2" it bypasses pie enforcment.
[Galaxy S6 General] ShinySide:
It's possible but then you have to go thru the whole set up process of vm, loading OS, linking folders, slow compiling etc etc. Which would be another entire guide.

If you want to use vm you can. This site is pretty cool, ton of different distros images for vms

http://www.osboxes.org/
[Galaxy S6 General] The Sickness:
No, not the stock source...your source you uploaded to github
[Galaxy S6 General] pawo99:
I have downloaded sources for G920F and if I want build kernel for G925F do I need to change only ramdisk or is it necessary download separately kernel sources for G925F?
[Galaxy S6 General] The Sickness:
Both devices can be built from the same source. To be sure look here in your source...

arch/arm64/configs

There should be 2 configs. One for Flat and one for Edge.
[Galaxy S6 General] pawo99:
look at this
[Galaxy S6 General] Jimmy Mossiba Floyd:
Thanks a lot! Downloading... Will test and report :)
[Galaxy S6 General] zack.molony:
Is it possible that i just can't compile because i have an i5 processor? What version of Linux are you guys using? please answer with distro and version!
[Galaxy S6 General] The Sickness:
Xubuntu 16.04
[Galaxy S6 General] zack.molony:
Ok thanks I have tried ubuntu 16.04, 15.10, 14.04 12.04 BBQLINUX & xubuntu 16.04 I have also tried linaro, ubertc and stock toolchain's and have tried many sources including the stock source your source and Arter97 source non of them will build this is the reason I think it might be my processor should I try vm?
[Galaxy S6 General] The Sickness:
Lol...no clue bro. Try VM and see.
[Galaxy S6 General] spookcity138:
I compile on arch Linux with an i5. So that's not your problem I don't think.
[Galaxy S6 General] ShinySide:
Your processor has nothing to do with it. And a VM wouldn't make a difference even if it did because....a vm doesn't ship with hardware. So it'd still be using your processor.

1. You're missing something in your build environment. Dependency, etc.

2. It's whatever edits you are making.

Simple way to figure this out:

build a known working source with no edits of your own. If it boots, it's your edits.

If it doesn't, you're missing something.

+1 processor won't make a difference.
[Galaxy S6 General] zack.molony:
Ok It does not boot I got it to compile but during the "make defconfig" I am getting a jump error and 1 other error but this is the stock kernel no edits then I have tried to add what I wanted to add which was the fbcon driver so I can boot verbose.

---------- Post added at 09:15 PM ---------- Previous post was at 09:11 PM ----------

Ithink GCC 5 is to blame for this but mabye samsung decided not to put some files in the kernel like an antileach :P

error #1

In file included from scripts/kconfig/zconf.tab.c:2503:0:

scripts/kconfig/menu.c: In function ‘get_symbol_str’:

scripts/kconfig/menu.c:567:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]

jump->offset = r->len - 1;

^

scripts/kconfig/menu.c:528:19: note: ‘jump’ was declared here

struct jump_key *jump;

^

HOSTLD scripts/kconfig/conf

error #2

In file included from scripts/sortextable.c:166:0:

scripts/sortextable.c: In function ‘main’:

scripts/sortextable.h:158:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]

memset(relocs, 0, relocs_size);

^

scripts/sortextable.h:104:6: note: ‘relocs_size’ was declared here

int relocs_size;

^

In file included from scripts/sortextable.c:164:0:

scripts/sortextable.h:158:3: warning: ‘relocs_size’ may be used uninitialized in this function [-Wmaybe-uninitialized]

memset(relocs, 0, relocs_size);

^

scripts/sortextable.h:104:6: note: ‘relocs_size’ was declared here

int relocs_size;

---------- Post added at 09:42 PM ---------- Previous post was at 09:15 PM ----------

Same errors on sickness source I think Im missing a dependency or something.

---------- Post added at 10:14 PM ---------- Previous post was at 09:42 PM ----------

downgraded gcc to 4.8 no errors