Im going to shorten the background this time as its all available in my previous question my previous kernel question.
Basically, i have a sm-t330nu samsung galaxy tab 4 and am trying to compile a test kernel from source.
Question #1: How is it possible that a kernel direct from samsung could have so many compile errors? would the source not be of a production ready kernel? or do they simply use a single linux kernel (depending on software number i suppose) with the ability to be built for many different platforms/models of tablet depending on configuration?
Question #2: After doing some very basic debugging (helped by google) ive gotten passed 5-6 compiling issues (badly linked mach/msm_rtb.h, missing #includes, etc) with absolutely no prior c knowledge. however im now stuck on one that i believe truly needs c knowledge to trouble shoot. My error reads:
kernel/sys.c: In function 'override_release':
kernel/sys.c:1306:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
error, forbidden warning: sys.c:1306
When i research that particular error, i got that basically, in the funtcion 'override_release' there is an equation that is not correctly balanced. However I do not understand proper c syntax to be able to make the change.
here is the code snippet 'override_release':
if (current->personality & UNAME26) {
const char *rest = UTS_RELEASE;
char buf[65] = { 0 };
int ndots = 0;
unsigned v;
size_t copy;
while (*rest) {
if (*rest == '.' && ++ndots >= 3)
break;
if (!isdigit(*rest) && *rest != '.')
break;
rest++;
}
v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
copy = min(sizeof(buf), max_t(size_t, 1, len));
copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
ret = copy_to_user(release, buf, copy + 1);
}
return ret;
Im pretty sure the issue is in the lines:
if (*rest == '.' && ++ndots >= 3)
break;
if (!isdigit(*rest) && *rest != '.')
break;
edit#1
ok so im getting my source from http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=sm-t330nu. which i believe to be a complete working source simply because it was used in this post http://forum.xda-developers.com/tab-4/development/recovery-philz-smnu-t2980094 for the recovery build. So as you say its likely a configuration issue, maybe im missing build flags or something...
There are many defconfigs to choose from when building the kernel from source so i went with my cpu type (msm8226) and my model/software type (milletwifiue) .
As for the error telling me the line where the error resides (i think you meant 1306 instead of 1310 kernel/sys.c:1306:10)..
line 1306 is
copy = min(sizeof(buf), max_t(size_t, 1, len));