What all are the drivers those get compiled with the kernel?

2017-09-11 Thread Dipanjan Das
There are numerous drivers present in the 'drivers' directory of Linux
kernel. The kernel source for any Android mobile device [e.g.
https://android.googlesource.com/kernel/msm/+/android-msm-2.6.35] is, too,
not an exception. Definitely all the drivers are not relevant for the
chipset which the mobile device is built on.

It leads me to believe that *not* all the drivers which are present in the
kernel source for a mobile device are built and shipped on commercial
phones. Given the kernel source, how can one figure out what all are the
drivers those get compiled for that particular mobile device?

-- 

Thanks & Regards,
Dipanjan
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Booting Custom Kernel

2014-06-08 Thread Dipanjan Das
Dear Arindam,

What I understand is, your system has two Ubuntu 12.04 installations side
by side. Are you using any one of those two to compile the 2.6 kernel? If
so, then executing "*sudo make install*" will copy the kernel vmlinux,
initrd and System map files to /boot directory and trigger an "*update-grub*"
to rebuild grub menu. Your new kernel should appear afterwards. May be you
are not being able to see the kernel listing because of having a ZERO
timeout in GRUB menu which is causing it to boot to the default one
directly. Make sure it is not the case.


On 6 June 2014 00:34, Arindam Pal  wrote:

> Dear Sir,
> I am currently trying to boot a custom kernel from source.
> 2.6.61.32. and tried to replace the kernel of an Ubuntu 12.04 LTS with
> kernel 3.11.X.Y. That computer also has an another Ubuntu installation
> 12.04 with same kernel as that of the another Ubuntu installation.
> Now , when I boot the machine and try to boot with the 2.6
> kernel, I can't do that and Grub is not even mentioning that particular
> version of the kernel. If any help about this issue is possible , please
> drop me a mail.
>
> Regards,
> Arindam Pal
> M.Tech (CS), 1st year,
> Indian Statistical Institute
> ph no: +91 7685950229 
> 
> 
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Linux Kernel compiles all the sources for a single a syscall

2014-06-07 Thread Dipanjan Das
Hi,

I have compiled 3.4 kernel. Following the tutorial
, I have
updated syscall_64.tbl and triggered a 'make'. Now it has started elaborate
compilation process, e.g. /fs/*.o sources. Shouldn't make only compile the
changed files?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Invoking a system using syscall()

2014-06-06 Thread Dipanjan Das
Hi,

I want to invoke getpid() system call using syscall. Here's the code
snippet below. But, I can't find anything in dmesg|tail output.

#include 

int main()
{
   pid_tret = syscall(20);
   return 0;
}
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Adding a syscall to specific kernel version

2014-06-05 Thread Dipanjan Das
Hi,

I am trying to add a new syscall to kernel 3.4. So far I have tried at
least four different tutorials from Internet. To my utter frustration,
whatever source files they have referred in the tutorials, at least one of
those is missing in all the cases.

Why isn't there a consistent interface for addition of syscall across
kernel version?

How will I get to know the method for a specific kernel version officially?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to test a syscall prior to compiling the kernel

2014-06-03 Thread Dipanjan Das
Hi Greg,

You have misunderstood the question. That, too, because me being too brief.

What I tried to mean is NOT to test the syscall after the modified kernel
is compiled and booted. That's easy.

To add the syscall to the kernel, one needs to drop a C code implementing
the body of the call itself to some appropriate location of the kernel
source tree. Isn't it so? I am doing that for the first time and want to be
sure that the compilation, especially the includes work. Otherwise, the
kernel compilation may throw an error midway, thereby wasting my time.


On 4 June 2014 09:22, Greg KH  wrote:

> On Wed, Jun 04, 2014 at 08:52:31AM +0530, Dipanjan Das wrote:
> >
> > Hi,
> >
> > While adding a syscall, how do I test the syscall code itself? If I
> simply try
> > to compile the C file individually, will the compiler be able find the
> > includes?
>
> Did you try:
> man 2 syscall
>
> greg k-h
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to test a syscall prior to compiling the kernel

2014-06-03 Thread Dipanjan Das
Hi,

While adding a syscall, how do I test the syscall code itself? If I simply
try to compile the C file individually, will the compiler be able find the
includes?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Build error while building Linux Kernel 3.4

2014-06-02 Thread Dipanjan Das
Hi.

I tried building Linux Kernel 3.4 from the source on Ubuntu 10.04 (Linux
LAPTOP 2.6.32-21-generic #32-Ubuntu), gcc 4.4.3 on Intel processor. Here's
the output:

make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK include/linux/version.h
  CHK include/generated/utsrelease.h
  CALLscripts/checksyscalls.sh
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  LD  init/built-in.o
  CC  arch/x86/kernel/signal.o
arch/x86/kernel/signal.c:260: error: ‘__NR_sigreturn’ undeclared here (not
in a function)
arch/x86/kernel/signal.c:271: error: ‘__NR_rt_sigreturn’ undeclared here
(not in a function)
arch/x86/kernel/signal.c: In function ‘do_signal’:
arch/x86/kernel/signal.c:798: error: ‘__NR_restart_syscall’ undeclared
(first use in this function)
arch/x86/kernel/signal.c:798: error: (Each undeclared identifier is
reported only once
arch/x86/kernel/signal.c:798: error: for each function it appears in.)
make[2]: *** [arch/x86/kernel/signal.o] Error 1
make[1]: *** [arch/x86/kernel] Error 2
make: *** [arch/x86] Error 2
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to call syscalls - SYSCALL or 0x80 interrupt

2014-06-02 Thread Dipanjan Das
Is in incorrect because the execve() call in the code is to the libc stub
but not the actual syscall itself?


On 3 June 2014 10:19, Greg KH  wrote:

> On Tue, Jun 03, 2014 at 09:45:33AM +0530, Dipanjan Das wrote:
> >
> > Hi,
> >
> > I came across this discussion in StackExchange. Does anyone have any
> idea on
> > this?
>
> Yes, the code looks correct, the question asked is incorrect :)
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Man pages for Kernel API

2014-06-02 Thread Dipanjan Das
Hi,

Like there is section #2 of man pages dedicated to syscalls, is there any
official way to get the list of all supported Kernal APIs?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to call syscalls - SYSCALL or 0x80 interrupt

2014-06-02 Thread Dipanjan Das
Hi,

I came across this discussion in StackExchange
.
Does anyone have any idea on this?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: get_user() and put_user() missing in syscall list

2014-06-02 Thread Dipanjan Das
I am new to Linux kernel stuffs. How are Kernel API and syscalls differ
from each other?


On 2 June 2014 13:43, Varka Bhadram  wrote:

>   These two are not the system calls. they are the Kernel API's to
> transfer the data from user address space to the kernel address space.
>
>  please see:
> http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239
>  http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143
>
>  Regards,
>  Varka Bhadram
>
> *MailScanner has detected a possible fraud attempt from
> "lxr.free-electrons.com" claiming to be* On June 2, 2014 at 11:29 AM
> Dipanjan Das  wrote:
> <http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239>
>
>
>  Hi,
>
>  Here's an exhaustive list
> <http://man7.org/linux/man-pages/man2/syscalls.2.html> of Linux syscall,
> but I can't find get_user() and put_user() API. Why is it so? What am I
> missing?
>  ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> ---
>
> [ C-DAC is on Social-Media too. Kindly follow us at:
> Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]
>
> This e-mail is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. If you are not the
> intended recipient, please contact the sender by reply e-mail and destroy
> all copies and the original message. Any unauthorized review, use,
> disclosure, dissemination, forwarding, printing or copying of this email
> is strictly prohibited and appropriate legal action will be taken.
> ---
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


get_user() and put_user() missing in syscall list

2014-06-01 Thread Dipanjan Das
Hi,

Here's an exhaustive list
 of Linux syscall,
but I can't find get_user() and put_user() API. Why is it so? What am I
missing?
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies