yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Star] psych.half:
Uhh I was never in front. owO

I compile my own toolchain :|

Either way, tc shouldnt matter. Something's must be wrong with code.

Can you post your build logs somewhere?

You mean build.sh? Its in your repo. You have added some build stuffs in your .gitignore, but it doesnt look like necessary.
[Samsung Galaxy Star] corphish:
My build script :

ZIMAGE="/home/corphish/android/kernel/mint/mint/arch/arm/boot/zImage"
IMAGE="/home/corphish/android/kernel/mint/mint/arch/arm/boot/Image"
KERNEL_DIR="/home/corphish/android/kernel/mint/zd/"
BUILD_START=$(date +"%s")
cd $KERNEL_DIR
export ARCH=arm
export SUBARCH=arm
export KBUILD_BUILD_USER="corphish"
export KBUILD_BUILD_HOST="Damned-PC"
export CROSS_COMPILE="/home/corphish/android/system/cm10.1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-"
if [ -a $KERNEL_DIR/arch/arm/boot/Image ];
then
rm $ZIMAGE
rm $IMAGE
fi
make mint-zapdos_defconfig
make Image

Build logs, maybe next time when I compile a build.

And its fine for me, and I know another guy who uses ZD source to build CM, its fine for him as well.

LOL
[Samsung Galaxy Star] psych.half:
Yeah, that script is in your zapdos_mint repo.

He might be using the 4.4.3 toolchain too. Its strange that this happens on other tc's.

Alright, I'm gonna do some digging and maybe fix some compiler warnings. Theres freaking 1000 of them. Gonna be a tough ride up ahead.

LOL Lots Of Luv to you too.
[Samsung Galaxy Star] corphish:
Default toolchain in CM10.1 is GCC 4.6, in CM10.2/CM11 : GCC 4.7

Fun Fact : Kernels compiled with GCC 4.7 does not boot at all, what so ever.

Looking forward to your kernel, and Merry Christmas :)
[Samsung Galaxy Star] psych.half:
Okay so I flashed CM10.1 to see if the kernel was actually being built with 4.6. and it was..

And after a lot of fixing around I finally got it to work with..

5.2.1, now that it's booted, time to break it.. I mean add more features.

Hmm, most features are already in Zapdos. I dont know what to add..

Adding stuffs is a pita anyway.. :|
[Samsung Galaxy Star] corphish:
gcc 5.2.1, woah

Yeah most of them are added, but the list never ends...

Can you work with selinux, and make it boot CM11? We have failed on our side.

Well, SELinux Kernels do boot CM10.1 and CWM 6.0.5.1 and TWRP 2.8.1.0 (which have full SELinux support, and hence can flash CM11, which is why CM11 is possible).

Or atleast, can you get audit to work? So that we can get the sepolicy denials?

Anyway, offtopic, wanna see radio logs?
[Samsung Galaxy Star] psych.half:
Hmm, I will have a look at the cpu frequency, there must be some big derp made by the sam/sprd guys there.

Just set selinux to permissive. Its not worth investing time to get it to work in enforcing.. iirc, kitkat works with even selinux disabled.

Let me first get mykernel out and I will chime in CM11 after. I took a peek at the CM11 thread and you guys are doing progress. About the Camera showing opppsite colors, try changing the pixel format and just a thought bur maybe the mic needs VoiceSolution.ko
[Samsung Galaxy Star] corphish:
Sam did nothing I guess, sprd derped it http://git.mozilla.org/?p=external/sprd-aosp/kernel/common.git;a=blob;f=arch/arm/mach-sc8810/cpufreq-sc8810.c;h=ccdddd3b80a44c196c9e249546deef17994cd8d4;hb=refs/heads/sprdlinux3.0

As for camera, the thing lies in the following code snippet : https://github.com/corphish/android_device_samsung_mint/blob/cm-10.1/camera/sc8810/SprdCameraHardwareInterface.cpp#L3464-L3468

Any one of the following values will be needed : https://github.com/corphish/android_device_samsung_mint/blob/cm-10.1/camera/sc8810/SprdCameraHardwareInterface.cpp#L101-L115

VoiceSolution.ko loads, microphone starts but records nothing ;_;
[Samsung Galaxy Star] BatDroid:
pleased to see u two joined.

keep up.
[Samsung Galaxy Star] psych.half:
Oh thats where you got the HAL sources from. Too bad FirefoxOS is dead now.. I'll see if I can port some stuffs from there.

Speaking of derp, you made one too. Your .gitignore file has '*.S' which ignores all of the assembly files.. :0

And how did you upgrade the kernel version?
[Samsung Galaxy Star] corphish:
Yup, the amount of sources they house, we can easily get rid of most of the blobs.

But I would have preferred some ril related stuff too :o

I believe that repo holds mint sources as well, which can be found in git history (coz they were removed eventually). I found them on github tho.

And kernel was upgraded using patches from kernel.org (you thought modified makefile, didn't you? [emoji14])

About RIL, most sad thing is, even RIL works in galaxy star pro, which uses very similar hadware as we do, with basically no custom ril classes and blob hacks, and we are still stuck where we always have been.
[Samsung Galaxy Star] psych.half:
Sorry I didnt word that correctly.

I mean so how did you update the kernel..

Your .gitignore file has '*.S' and '*.lds' . So any changes to assembly and linker script files will not get picked by git.. i.e the applied patches are not in your github repo.

They are in only in your local repo. So use my .gitignore, clean your tree and then push the changes.

Also don't add global '*.x" files in toplevel .gitignore.

Always run 'make mrproper' then 'git status', review your changes before commiting.

https://github.com/phalf/unnamed_kernel_for_samsung_star/blob/noname/.gitignore
[Samsung Galaxy Star] corphish:
Umm, when I had patched it locally, then to increase space, I had to format my partitions. So they are gone.

Anyway, i patched by sub-minor version, that is, from 3.0.8-3.0.9, and so on until 3.0.15

And i am sure those patches weren't applied to any linker scripts
[Samsung Galaxy Star] psych.half:
Ughh.. the kernel tree is in a really messed up state... I'm gonna have to start from scratch.

Can you tell me which base did you use and changes needed for booting on any rom?
[Samsung Galaxy Star] corphish:
for ZD, I had started with the samsung kernel source.

But later found out that Teamregular had the kernel source up with fixes for booting

https://github.com/TeamRegular/android_kernel_samsung_mint?files=1
[Samsung Galaxy Star] psych.half:
Which one did you download from Samsung..theres three of them...

Oh so the fix is in the defconfig?
[Samsung Galaxy Star] corphish:
SEA I think, its almost a year ago.

And yeah, the fix lies in the defconfig.
[Samsung Galaxy Star] psych.half:
I downloaded all three, to see if there were any differences between them.

SEA and MEA are same. But SWA is a bit different. Ignoring the deleted configs, theres addition of gpu driver code. https://github.com/phalf/android_ke...mmit/3836f4513e51900e8282ada73966073b36cfd463

There might be differences in GT-S5280 code and the GT-S5283 too. But it's a lot of work. Took me a day already to set up the three GT-5282 ones...
[Samsung Galaxy Star] corphish:
GT-S5283, IIRC, was based on qcom board, so source might be different.

Btw, [MENTION=5925208]psych.half[/MENTION], could you look at this mfserial thing, what it does....

It is disabled by samsung, but sprd guys did enable it in init.sp8810.rc, and when I do the same, I get com.android.phone FC everytime. What could be it?

And that repo holds mint's sources too, at that point of git history.
[Samsung Galaxy Star] psych.half:
Ah GT-S5283 is qcom, I just saw it in download when searching opensource.samsung.

mfserial looks like code for AT/UART for baseband.

Samsung has it disabled cause it wrote their own mfserial.

Yup I checked the RIL implementation in stock. I havent had time to fully reverse eng the stuffs. But heres what I found.

Check the last blocks of code in stock 'init.sp8810.rc' , you see the #datarouter. Thats where the RIL is.

The DR,SMD,DTT,BCS,mobex daemon are responsible for parsing the raw UART, setting up CSC and sending data to framework.

So first try adding those and see.

And if that doesnt work they are using broadcasts to these apps, so you might need to hack on these.

com.sec.app.RilErrorNotifier

com.android.samsungtest.RilDTTCommand
[Samsung Galaxy Star] psych.half:
[MENTION=5822936]corphish[/MENTION]

The changes between stock-SEA-duo and stock-SWA-duo aren that much, just a build info for gpu.. athk isnt related to our board.. https://github.com/phalf/android_ke...mmit/084a9a5a42b848a768757a47338a866ad8a83878

But the changes from stock-SEA-duo to stock-uni are... the wifi driver has been updated, and there changes to battery and LCD.. https://github.com/phalf/android_ke...mmit/c988653b762f7c0211068ef5edb49f39bd1892ac

Maybe this is the casue for battery glitch and brightness bug.

I'm gonna be working on th kernel, so your on your on the RIL for now.. you might need to patch RIL.java with stock functions.. or maybe you'll find something new.. Anyways good luck..

Sidenote: Can anyone please mirror GT-S5280_MEA_JB_Opensource.zip from opensource samsung. I'm having connection issues right now and the download keeps failing. Thanks.
[Samsung Galaxy Star] corphish:
I have downloaded the source, will be pushing to git tomorrow.

Btw, found sources for bluetooth libs too in platform.

And can you put up a kernel build based on stock uni? I will test that for battery and LCD.

And I had made a 'AnyKernel' zip for mint2g, which will flash the kernel only, without modifying ramdisk, hence it can be flashed on all available ROMs (stock, CM10.1, CM11), do you need it?
[Samsung Galaxy Star] psych.half:
Alright, so stock-MEA-uni is just stock-uni without the battert stuffs..

Heres a test build kernel image of stock-uni, with no modifications...

Uhh.. youre unpacking and repacking boot.img on the fly while flashing zip? I guess I could use that... This device uses a cheap eMMC and not a MTD nand, dont have to worry about bad blocks while flash read/write .
[Samsung Galaxy Star] corphish:
Sources pushed - https://github.com/corphish/android_kernel_samsung_mint/tree/5280-mea

Btw the kernel won't boot on CM11, let's see if it does on stock.
[Samsung Galaxy Star] psych.half:
Lack of SELinux maybe, I'll enable selinux on next build. Alsp if youre gonna test on stock.. Can you check if /sys/devices/platform/modem_interface/state exsists?

So I was looking through the source and saw 'vbpipe' thingy . so I searched what it was .

http://xptsoftware.com/index.php?option=com_content&view=article&id=108&Itemid=516

The important part to notice is.. with a new client RIL by enabling remote procedure calls to the radio (through API’s) from Android side.

And there goes the last few hopes for RIL..
[Samsung Galaxy Star] corphish:
Umm, it did not boot in stock either.

o.O
[Samsung Galaxy Star] psych.half:
i had used zd defonfig... here's one with stock defconfig. .

also see if you can at least get adb..
[Samsung Galaxy Star] corphish:
The problem is not with defconfig, had it been that (with the kernel booting of course), then the kernel would get past boot logo, but would then be a soft-brick kinda situation.

But the problem is, it does not get past boot logo :/

Anyway, I am sorry, due to my bad health, I haven't been able to test your latest kernel. I can hardly sit on PC.

Btw, I finally broke ril in stock (well, anybody can do that by removing either of ril libs), but I did by removing Samsung specific permission files.

And Happy New Year :)
[Samsung Galaxy Star] psych.half:
The kernel did not boot with stock-duo, stock-uni, teambutter cm11. branch... with stock, cm defconfigs and config pulled straight from device

But then I thought of trying my old zapdos build.. and it booted. what the hell did you change in zapdos kernel.. o.O

Now I remember this stuck on param.lfs/bootloader logo is the very problem this device didnt have custom kernels.. actually its not stuck.. its looping but since the logo is static it appears stuck.. I knew the cause of it.. it's because the kernel cannot load modules in /system/lib/modules.. you can get adb and see surfaceflinger crashing due to no gpu driver.. this is why the very first cm10.1 had only software rendering and broken wifi..

If I can't find the actual fix for this.. I'm gonna have to use zapdos as base again.. As I dont have a PC anymore to get kernel logs.. Im compiling on a server.. So have some soup and get well soon...

RIL was dirty patched by Samsung from their chinese phone which also uses SC8810, GT-I8258 ... See the stock image for it.. it has the mfserial enabled and uses standard ril.. I could get the ril to load . but it errored out on, 'before open vbpipe4'. maybe they changed baseband too.... Still want to take a shot at RIL?
[Samsung Galaxy Star] corphish:
Got pretty well now though.

And TBH, I was a smaaaall kid when I compiled my first ever kernel.

I did not know how to use github back then, never ever used linux before that. It was all for android.

Luckily I am decent with C/C++, so I could fix those syntax errors I got while compiling.

Then did some research, on which binary to use, how to pack it to boot.img, and finally flashed it to see my kernel give a soft brick (black screen after bootlogo).

All thanks to Unjust for getting me through this, and viola, got my kernel booting.

And then, progressed.

Anyway, I would like to go for RIL...

Like, could we flash their modem image? They cannot tamper with hardware, even spreadtrum knows that their sc8810 board uses BCM bluetooth, FM and WiFi.

But anyway, an important fact, mint and sc8810 boards are slightly different, they are different boards themselves.

Key differences are, sc8810 supports 3g, mint doesn't

sc8810 supports akmd8975 (compass), mint doesn't. (I even tried to enable that on mint, I had every necessary things to do so, like I had sensors HAL source, akmd8975 binary itself an all, so I first enabled it in kernel, but could not get input in proc/bus/input/devices, which means its really absent from hardware)

I don't know about RIL, looking at how they (spreadtrum) get stuff done, ril implementation is same. IDK what Sammy did. But if we are lucky, that might work.
[Samsung Galaxy Star] psych.half:
So the even zapdos stock version doesnt boot at least with newer gcc's. Got the 3.0.15 to boot.. now I dont even wanna know where the problem is... I'm going to work on top of it..

Theres some failed patches in the source.. Gonna have to fix that.. and do some cleaning first..

I cracked open the device and the PCB has "GTS5282 REV04". the pcb is it shape of the device.. looks like its made by Sammy.. I couldnt see the SoC its all locked up.. not even a single IC on sight..

There is VLX stuff on GT-I8258 kernel.. though the board is different.. "amazing" .. plus the modem image is 12mb.. Tho I havent changed the init.rc files.. or look at the implementation closley..
[Samsung Galaxy Star] corphish:
Yup, there is also a board called 'amazing'.

Btw, those eng binaries (engappclient, engmodemclient etc), does play a role in AT commands.

Edit: [MENTION=5925208]psych.half[/MENTION]

That engmodemclient, source is here, coould you look at it and say what it does?

I saw many familiar AT commands their, like AT+SGMR
[Samsung Galaxy Star] drewbar:
[MENTION=2553665]corpish[/MENTION] Thank you very much for your Kernel it's working great on my Galaxy Star. Got 9269 on Antutu Benchmark :)
[Samsung Galaxy Star] psych.half:
eng binaries are what they say they are.. engineering mode.. it tests AT commands .. i think Sammy uses their own Factory Test.apk for that..

And uhh. did i get the commits right.. ? https://github.com/phalf/zapdos_mint/commits/zapdos_cleaning-wip
[Samsung Galaxy Star] corphish:
Looks fine to me.

Update about RIL [MENTION=5925208]psych.half[/MENTION]

As we had suspected, a specific AT command was crashing the modem, viz. AT+SGMR=0,0,2, which is actually the command to get IMEISV in our case, I haxed the RIL.java, and prevented any RIL request (and hence AT command execution) whenever getIMEISV function was invoked (meaning that IMEISV was requested).

I did get success in preventing the execution of that AT command, but later found out that modem still crashes.

So, AT commands don't crash modem, something else does, now what could be it? Any ideas?
[Samsung Galaxy Star] BatDroid:
r u using slimkat??

coz on other roms zd lags.
[Samsung Galaxy Star] drewbar:
Hello,

I'm using stock deodexed [prerooted] rom by Akshay Sharma. I did a clean install and everything works fine. I'm currently using smartassv2 - 1400 MHz to 200 MHz. I disabled google play services and freeze other preinstalled applications that I will not be using.

After using it for 3 days, I can actually feel the difference compared to not OC it.
[Samsung Galaxy Star] psych.half:
It's been a hectic last two days for me. I didn't like the idea of working on a unclean tree. So I manually applied each patch on stock kernel source. Turns out most failed patches were already in source. Guys at sammy just copied over the newer files from another kernel. Some I had to fix by hand..

First test booted at 3.15 , second test didnt boot at 3.30.. Then I realized I hadn't recompiled the modules. . We are now on 3.30.. clean tree, with zd defconfig..

And I'm gonna need logs for RIL... The command it was hanging up was AT+SFUN=4 on your previous log and AT+SPIMEI on mine.. The IMEISV had shown up in CM10.1 IIRC
[Samsung Galaxy Star] BatDroid:
will try changing governor..

u flashed kernel before or after flashing Rom?
[Samsung Galaxy Star] corphish:
Cool. So are you planning to patch the kernel all the way to 3.0.101?

Anyway as for RIL, I am pretty much sure that its those IMEI/SV related AT commands freezing the modem. When those commands aren't executed, everything seems to be fine in default setup.

Signals work fine, and the readings are appropriate (to test that, I took my SGS to college today, where I get very poor signal reception on my carrier, and it did correspond to that).

When I turn on flight mode, and then turn off, I do get connections and all.

I even tried to dirty read IMEI/SV from efs/ from frameworks, but that would end up in File I/O error. So I hardcoded the values, and now I will try to get more features of telephony stack to get working. Then I shall deal with IMEI. I dont like the way how it is being done, but I got no choice :/

Edit: Modem does hang later. I am sending you a build via PM, for testing radio logs...and also for your kernel testing. [MENTION=5925208]psych.half[/MENTION]
[Samsung Galaxy Star] BatDroid:
This is my one last Q about this kernel.

people r talking about clean install and I did.

wipe data,cache partition,dalvik

format system,data,boot,preload,cache nd all.

mounted all.

Then I installed stock deodex nd flashed the kernel.

Antutu v5 shows 5800

v6 shows 9000

nd games lags.

used no frills nd thunderzap.

it always runs on 1ghz.

I tried ondemand,smartassv2,performance.

I/O cfq,noop,deadline etc.

But with slimkat nd svanilla,its a different story.

Antutu v5 8200

v6 12000

But I never could run it on 1ghz+ frequency.

All kernel control app shows same thing.

Last 5 min or 100 minutes or whatever, it runs on 1Ghz.

I tried to play gta SA,it lags as hell,u cant even believe.

Flashed stock kernel,lags gone.

So,I tried on demand governor.

Shouldn't it go more than 1Ghz + when I was playing gta sa??

And how the progress with RIL??

I m waiting for ur precious answer.

Thanks in advance..
[Samsung Galaxy Star] corphish:
You don't need to wipe anything before flashing a kernel.

Infact you dont need to wipe so much stuff to flash a ROM either.

Wiping data does a cache wipe too, wiping so much stuff is simply a waste of time.

CPUFreq is highly borked in our generation of spreadtrum chips (idk what they did in their later socs).

So even if the CPU runs at 1600Mhz (as shown by app), its really hard to tell whether its really running in that clock speed or not. However I did see some changes in benchmarks (improvement ofc), that is why I thought CPU does clock at that speed.

For lags in games, I heard Dynamic readahead is quite responsible for that, I guess I could remove that and gaming might improve.

As for RIL, I got SIM card registration successfull, but then modem would hang and the party would be over.

I will see how I can work around that, I will try to get working mobile data atleast.

IMEI/IMEISV will be faked, so users need to use Xposed modules and all to fix that by themselves.

Forget dual sim :)
[Samsung Galaxy Star] doesntexits:
Overclocking support in Spreadtrum kernel? How?
[Samsung Galaxy Star] psych.half:
cpufreq scaling is bypassed, the platform specific cpufreq_set_rate function just returns with an 0 without doing anything, at least for the sc8810 board..

i think i already said this.. the cpu isn't being scaled at all.. hence, apps don't show time in state or the frequency changes.. the cpufreq you see with the ondemand governor is a bug.. you'd fry the cpu if you were actually running on 1600Mhz, (it's not possible to reach that much in the first place)

So guys just set your governor to performance and maybe you'll save some cpu cycles checking if an constant value is 0, and governor's own computations

That said, the whole cpufreq driver is a mess.. well, the kernel source is too.. I'm having a hard time upgrading the kernel already..

Currently I'm on 3.0.45 and on the process of testing 3.0.60 https://github.com/phalf/WIP_kernel_mint2g/commits/r60

I will try a stab at cpu scaling, once I'm done with all this..
[Samsung Galaxy Star] corphish:
And the I thought you had gone :o

Anyway I see you do a lot of cherry pickings and additions to the kernel, great (y).

It would be great if it could be used in CM when its ready.

Anyway, do you know about the relation between IMEI and the network provider?

Because its clear that its IMEI that causes the modem crash, breaking the RIL entirely.

When disabled, RIL works fine (except mobile data).

Well I can surely figure out a way of reading IMEI from efs, and then putting it to framework, but will it be OK?

Like I doubt that the respective network provider will see a customer with 'Unknown' IMEI, and they will eventually stop the services for him (which is one of the reasons why I took down beta1)

And you were right, IMEISV works as it should, it does not crash modem.
[Samsung Galaxy Star] psych.half:
Well, the last patches were cleanly applied. Yep that means we are now on 101.

Those cherry-pickings are just commits to get to the latest version. Additions and features will be cherry picked from now on and after I merge the branch.

There is one problem. The very last patch that patches "arch/arm/mm/cache-l2x0.c" causes a build failure. I had reverted the commit in order to compile it. Cause the file is heavily modified and has assembly stuff. I will push the rebased r101 branch once I figure it out. In the meantime you can build from the main rup branch if you want. It's on version 90.

And about IMEI.. getting it on the framework level is only half the battle.. If we can't get it on the modem. normally carries would not even register on the network without an IMEI