Re: Don't know where to start linux kernel programming
Thank you very much. :) On Tue, Aug 22, 2017 at 4:44 PM, Kamil Konieczny < k.koniec...@partner.samsung.com> wrote: > Hi, > > On 22.08.2017 12:52, SUNIL KHORWAL wrote: > > > I'm new to linux kernel programming, I want to be a linux kernel hacker > but > > i don't know where to start. > > Please help me. > > Start from https://kernelnewbies.org/ > https://lwn.net/ > https://www.kernel.org/ > > You are using gmail, so this may help: > > linux/Documentation/process/email-clients.rst > > or > > http://elixir.free-electrons.com/linux/v4.13-rc6/source/ > Documentation/process > http://elixir.free-electrons.com/linux/v4.13-rc6/source/ > Documentation/process/email-clients.rst > > There is eudyptula challange (currently busy, no new subscriptions) > and there is note about [not] using gmail for kernel: > > https://events.linuxfoundation.org/sites/events/files/slides/ec.pdf > > -- > Best regards, > Kamil Konieczny > Samsung R&D Institute Poland > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Don't know where to start linux kernel programming
Hi, I'm new to linux kernel programming, I want to be a linux kernel hacker but i don't know where to start. Please help me. Thanks Sunil Khorwal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
File missing error
Hi I'm a beginner in linux's device driver. I am getting below errors - implicit declaration of function ‘ioperm' implicit declaration of function ‘sleep’ And when I am adding sys/io.h then i am getting "fatal error: sys/io.h: No such file or directory. One more question - How can I convert scan code to character. Please reply! Thanks Khorwal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
How to use git-send-email for deep threading
Hello, I am working on eudyptula challenge and I have to send solution file and later patches on that file using git-send-email. I have to send email in such a way that it looks something like this in receiver's email inbox. Two Solution Files (Makefile and .c driver file) └─> [PATCH 01/02] Patch 1 on earlier solution file └─> [PATCH 02/02] Patch 2 on earlier solution file I tired using different options in git send-email, but what I get is incorrect linking of mails. Two Solution Files (Makefile and .c driver file) [PATCH 01/02] Patch 1 on earlier solution file └─> [PATCH 02/02] Patch 2 on earlier solution file I am not able to send two files using git send-email for the first email. I have to use --force to send any source file. Even in this, only first file is attached in mail. I also tried send first file using web browser mail client and then sending patches using git send-email, but it also do not work as expected. I have read git-send-email documentation but not able to comprehend how I can achieve my requirement from it. Can someone please give pointers on how I can send email correctly as per my requirement using git-send-email? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Boot up fail with linux-next source code tag next-20141226
Hi Sudip, I was building and booting kernel on VMware Player. My guest OS is Ubuntu 12.04 with 3.5.0-48-generic. I tried to boot on both Linux and Windows host with Ubuntu guest and both fails to boot the newly built kernel. Then I tried to boot on real hardware and linux-next boots up without any issue. I still had a question that is this a common when kernel do not boot up on VM? I like to prefer VM because I have only one PC and it sounds risky to install new kernel everyday. And thanks for the response.Sunil Shahu. On Tuesday, 30 December 2014 2:56 PM, Sudip Mukherjee wrote: On Tue, Dec 30, 2014 at 2:33 PM, Sunil Shahu wrote: > Hi, > > I am trying to build and boot linux-next kernel tree. > > My original kernel with Ubuntu 12.04 LTS was 3.5.0-23-generic. > > I checked out code with tag next-20141226. I generated a ".config" file with > "make localmodconfig". I installed modules and kernel. > On restart PC do not boot up. > > I then checked out tag v3.16-rc3 and booted. It worked pretty good and > booted properly. > > I had few question from this exercise: > > 1) Why my PC didn't boot up with linux-next kernel? > 2) Do I need to apply any specific patches to boot mainline linux-next > kernel on my Ubuntu 12.04 PC? > 3) How do people test mainline kernel-next? Do they apply their OS specific > patch on linux-next tree or test linux-next on some specific OS? I am regularly working with linux-next, and i am using ubuntu 13.04 , 14.04. I never had to use any patch to boot it. also tested on 10.04. what error message you got? Sudip > > Thanks, > Sunil. > > > ___ > 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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Boot up fail with linux-next source code tag next-20141226
Hi, I am trying to build and boot linux-next kernel tree. My original kernel with Ubuntu 12.04 LTS was 3.5.0-23-generic. I checked out code with tag next-20141226. I generated a ".config" file with "make localmodconfig". I installed modules and kernel.On restart PC do not boot up. I then checked out tag v3.16-rc3 and booted. It worked pretty good and booted properly. I had few question from this exercise: 1) Why my PC didn't boot up with linux-next kernel?2) Do I need to apply any specific patches to boot mainline linux-next kernel on my Ubuntu 12.04 PC?3) How do people test mainline kernel-next? Do they apply their OS specific patch on linux-next tree or test linux-next on some specific OS? Thanks,Sunil. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
from WHERE platform driver's probe is called?
Hello, I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum.http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050 For further information I went through code in platform_driver_register() and got lost. I looked web but could not find substantiation information. I am still not able to locate from WHERE this probe function is called and WHO calls it?Can someone please point to source code or some other document related to this? Thanks,Sunil. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[PATCH] staging: bcm: vendorspecificextn: Fix coding style
Hello, I was going through kernel source and found out that I can work on staging area for fixes. I have generated a patch for coding style fixes. I have few questions about how do submit my patch and to whom. 1) Is it ok if I send it directly to Greg Kroah-Hartman , who seems to be signing off all the patches in that directory as per git log. 2) What is the standard procedure to submit my patch after I have verified it. Whom do I send it? How do I get it review? How to get it merged in mainline? Also, I am attaching my patch here. Any suggestions on patch and answer to my queries will be great help. Thanks, Sunil. From d09048ffe41531d691df9d90fe25e34ffc11c8f8 Mon Sep 17 00:00:00 2001 From: Sunil Shahu Date: Sun, 2 Nov 2014 19:37:15 +0530 Subject: [PATCH] staging: bcm: vendorspecificextn: Fix coding style This fixes the coding style warnings of line over 80 characters. Signed-off-by: Sunil Shahu --- drivers/staging/bcm/vendorspecificextn.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/staging/bcm/vendorspecificextn.c b/drivers/staging/bcm/vendorspecificextn.c index d38a06f..797d21d 100644 --- a/drivers/staging/bcm/vendorspecificextn.c +++ b/drivers/staging/bcm/vendorspecificextn.c @@ -11,7 +11,8 @@ * STATUS_SUCCESS/STATUS_FAILURE * */ -INT vendorextnGetSectionInfo(PVOID pContext, struct bcm_flash2x_vendor_info *pVendorInfo) +INT vendorextnGetSectionInfo(PVOID pContext, + struct bcm_flash2x_vendor_info *pVendorInfo) { return STATUS_FAILURE; } @@ -61,8 +62,9 @@ INT vendorextnExit(struct bcm_mini_adapter *Adapter) * arg -input parameter sent by vendor * * Returns: - * CONTINUE_COMMON_PATH in case it is not meant to be processed by vendor ioctls - * STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL return value + * CONTINUE_COMMON_PATH in case it is not meant to be processed by + * vendor ioctls STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL + * return value */ INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg) @@ -88,8 +90,9 @@ INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg) * STATUS_SUCCESS/STATUS_FAILURE */ -INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, - UINT offset, UINT numOfBytes) +INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, + enum bcm_flash2x_section_val SectionVal, + UINT offset, UINT numOfBytes) { return STATUS_FAILURE; } @@ -112,8 +115,9 @@ INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_sect * Returns: * STATUS_SUCCESS/STATUS_FAILURE */ -INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, - UINT offset, UINT numOfBytes, BOOLEAN bVerify) +INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, + enum bcm_flash2x_section_val SectionVal, + UINT offset, UINT numOfBytes, BOOLEAN bVerify) { return STATUS_FAILURE; } @@ -135,8 +139,9 @@ INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_sec * Returns: * STATUS_SUCCESS/STATUS_FAILURE */ -INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal, - UINT offset, UINT numOfBytes) +INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, + enum bcm_flash2x_section_val SectionVal, + UINT offset, UINT numOfBytes) { return STATUS_FAILURE; } -- 1.7.9.5 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: error : insmod
Hi kristof, when i executed the below line. i din't get what i suppose to get...the message "hello, world".. did i miss any steps sunil@ubuntu:~/test/drive$ sudo insmod helloworld.ko On Mon, Feb 11, 2013 at 4:34 PM, Kristof Provost wrote: > On 2013-02-11 16:24:17 (+0530), sunil wrote: >> Have a look at this: >> >> donno wats happening: >> >> sunil@ubuntu:~/test/drive$ sudo rmmod helloworld >> sunil@ubuntu:~/test/drive$ lsmod|grep hellow* >> Binary file helloworld.ko matches >> Binary file helloworld.o matches > > This doesn't actually do what you seem to think it does. > You're not passing the 'hellow*' argument to grep. The 'hellow*' is > first expaned by your shell, so it probably turns that command line into > 'lsmod | grep helloworld.c helloworld.o helloworld.ko'. > Try using 'lsmod | grep hellow' instead (i.e. without the *). > >> sunil@ubuntu:~/test/drive$ modprobe -r helloworld >> FATAL: Module helloworld not found. > > Obviously, because your previous command succeeded. The module is no > longer loaded. > > Regards, > Kristof > > PS: Please don't top-post. > PS 2: Please keep the mailing list in cc. > -- Regards, Sunil A S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
error : insmod
hi all, while inserting module to the linux kernel, m facing this problem ---ERROR- sunil@ubuntu:~/test/drive$ insmod helloworld.ko insmod: error inserting 'helloworld.ko': -1 Operation not permitted sunil@ubuntu:~/test/drive$ sudo modprobe helloworld FATAL: Module helloworld not found. please help!! thanks & regards Sunil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kernel source code tree
Hi all, need help, I am trying to write simple device driver. But before that i need to download kernel source code tree someone please explain how to download this and configure. I am very new to this. I am using ubuntu 12.04 thanks & regards sunil A S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Asking another process sleep from another process or interrupt context
Yah, Thanks for the help Mulyadi and Sandeep. -- Sunil On Sat, Dec 1, 2012 at 10:35 AM, Mulyadi Santosa wrote: > Hi Sandeep > > On Sat, Dec 1, 2012 at 11:50 AM, SandeepKsinha > wrote: > > Interrupt context is a better alternative. Make changes around the code > > which picks up the next process for execution. The waking up would be > taken > > care automatically in that case. > > > > Also, this approach would be least disruptive if compared with the other > > alternative you listed out. > > > > Mulyadi, > > Any help? > > Since you "summon", then I have no other choice :) > > OK, I need to be careful here. If I may to clear up the things, there > are two objectives here: > > 1. To unschedule other process > > Alright,I think the simplest one is setting need_resched to true or 1 > (as you guys already found out). That's not the fastest way, but I am > sure the most straight forward way. > > 2. To block the process until it is allowed to run... > > Sounds like mimic-ing SIGSTOP handler to me.. > > So I guess, to do the entire thing simplest way, is by sending SIGSTOP. > Agree? > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Asking another process sleep from another process or interrupt context
Hello List, This is what I am trying to do in linux kernel. When some event occurs; Process X wants to tell process Y to un-schedule itself(Y) [ and change state from "running or ready to run" to "not ready to run until told otherwise" ]. Process X will take care of waking up Y later. One approach probably is to set "*need_resched*" for process Y so that schedular picks another process at the first opportunity. Is there any other alternative ? Is it safe to do this from interrupt context instead of process X's context ? -- Sunil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies