Re: /proc/modules not showing any output

2018-12-19 Thread Praveen Kumar
On Wed, Dec 19, 2018 at 10:05 PM Aruna Hewapathirane
 wrote:
>
>
>
> On Wed, Dec 19, 2018 at 11:18 AM Praveen Kumar  
> wrote:
>>
>> On Wed, Dec 19, 2018 at 9:28 PM Aruna Hewapathirane
>>  wrote:
>> >
>> > 
>> >>
>> >> I think, on my test machine, by default, there are many modules which
>> >> get added during boot up, which with vanilla kernel is not happening.
>> >> Thanks for your input.
>> >>
>> >> Regards,
>> >>
>> >> ~Praveen.
>> >>
>> >
>> > What does lsmod show you in the vanilla kernel ? If you want the same 
>> > modules to load in the vanilla
>> > kernel folow steps given below:
>> >
>> > 1 -boot into the older 4.4.162-78-defaultkernel
>> > 2 - change into the vanilla kernel source 4.20.0-rc6 builddirectory
>> > 3 - $ lsmod > lsmod.txt
>> > 4 - $ make LSMOD="lsmod.txt" localmodconfig
>> >
>> > Boot into your newly compiled vanilla kernel and run lsmod and smile :-)
>> >
>> > Hope this helps - Aruna
>> >
>> Thanks Aruna. This helps.
>
>
> Glad we could help. I noticed your running Ubuntu ? Since your testing and 
> compiling
> why not give Debian a go ? Ubuntu uses both free and proprietary software 
> while Debian
> uses free software only and with Debian there are zero surprises. Rock solid, 
> Stable and
> is actually lightweight compared to Ubuntu. Good luck.
>
> Aruna
>

I actually use both deb (Ubuntu) and rpm (Opensuse) both for my dev activity.
And, yes its no harm trying light weight OS. Will try on Debian for
next test VM.
Thanks for your suggestion once again.

Regards,

~Praveen.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: /proc/modules not showing any output

2018-12-19 Thread Praveen Kumar
On Wed, Dec 19, 2018 at 9:28 PM Aruna Hewapathirane
 wrote:
>
> 
>>
>> I think, on my test machine, by default, there are many modules which
>> get added during boot up, which with vanilla kernel is not happening.
>> Thanks for your input.
>>
>> Regards,
>>
>> ~Praveen.
>>
>
> What does lsmod show you in the vanilla kernel ? If you want the same modules 
> to load in the vanilla
> kernel folow steps given below:
>
> 1 -boot into the older 4.4.162-78-defaultkernel
> 2 - change into the vanilla kernel source 4.20.0-rc6 builddirectory
> 3 - $ lsmod > lsmod.txt
> 4 - $ make LSMOD="lsmod.txt" localmodconfig
>
> Boot into your newly compiled vanilla kernel and run lsmod and smile :-)
>
> Hope this helps - Aruna
>
Thanks Aruna. This helps.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: /proc/modules not showing any output

2018-12-19 Thread Praveen Kumar
On Wed, Dec 19, 2018 at 8:36 PM Greg KH  wrote:
>
> On Wed, Dec 19, 2018 at 06:52:39PM +0530, Praveen Kumar wrote:
> > Hi All,
> >
> > Compiled the vanila kernel 4.20.0-rc6 build, and was trying to get
> > module information, but /proc/modules is not showing any output ( both
> > on arm64 and x86_64 )
> >
> > root@ubuntu:~# uname -a
> > Linux ubuntu 4.20.0-rc6-00082-g65e08c5e8631 #7 SMP PREEMPT Fri Dec 14
> > 15:54:30 IST 2018 aarch64 aarch64 aarch64 GNU/Linux
> >
> > root@ubuntu:~# cat /proc/modules
> > root@ubuntu:~#
> >
> > Tried with older version 4.4.162-78-default modules were properly shown.
> >
> > Can you please help if there is something which I am missing during
> > compilation or is there any potential bug here ? Thanks in advance.
>
> Are you sure your .config file has enabled modules?  Have you actually
> loaded any?  If you do not load any, nothing will show up in that proc
> file :)
>

Thanks Greg for the reply.
I think I did compile with enabled modules.
kern-xen-dev:/mnt/kernel/linux # cat .config | grep MODULE
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
CONFIG_STRICT_MODULE_RWX=y
CONFIG_MODULES=y  <<<<<<<<
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_COMPRESS is not set
CONFIG_MODULES_TREE_LOOKUP=y

I added a new kernel module and was able to see the module added.

kern-xen-dev:/mnt/kernel/linuxfs # insmod linuxfs.ko
kern-xen-dev:/mnt/kernel/linuxfs # cat /proc/modules
linuxfs 16384 0 - Live 0xc01c1000 (O)

I think, on my test machine, by default, there are many modules which
get added during boot up, which with vanilla kernel is not happening.
Thanks for your input.

Regards,

~Praveen.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


/proc/modules not showing any output

2018-12-19 Thread Praveen Kumar
Hi All,

Compiled the vanila kernel 4.20.0-rc6 build, and was trying to get
module information, but /proc/modules is not showing any output ( both
on arm64 and x86_64 )

root@ubuntu:~# uname -a
Linux ubuntu 4.20.0-rc6-00082-g65e08c5e8631 #7 SMP PREEMPT Fri Dec 14
15:54:30 IST 2018 aarch64 aarch64 aarch64 GNU/Linux

root@ubuntu:~# cat /proc/modules
root@ubuntu:~#

Tried with older version 4.4.162-78-default modules were properly shown.

Can you please help if there is something which I am missing during
compilation or is there any potential bug here ? Thanks in advance.

Regards,

~Praveen.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Free Linux/Ubuntu VMs for Kernal Development?

2017-03-15 Thread Praveen Kumar
Hello,

A bit confused with "free Linux/Ubuntu VMs".
Do you mean you looking for VM image ( to directly run  your tests )
or an emulator to create VMs locally and play around.

For the first, I have not tried with. Probably vmware images can be found at :
http://www.osboxes.org/vmware-images/

But, if you are looking for emulators, I would say Xen and Virtualbox.
I use them for most of my development for linux kernel related work
items. To start with, I would suggest you to start with Virtualbox.
Its easy to begin w.r.t. configuration, installation and other items.

Link : https://www.virtualbox.org/

Regards,

~Praveen.

On 14 March 2017 at 15:45, François  wrote:
> On Tue, Mar 14, 2017 at 12:18:33PM +0800, Freeman Zhang wrote:
>> On 3/14/17 12:04 PM, Balaji Barmavat wrote:
>> > Anybody's has any VM's links to download, for practice kernel
>> programming?
>>
>> Well, I am using QEMU system emulator, for it's easier to connect to GDB
>> debugging and itself handles bootloader thing. You can set all things up
>> by one line parameters, really tidy.
>>
>> The disadvantage is that I've been told system running in QEMU is slow,
>> but for kernel programming that wouldn't be the problem, will it?
>>
>> What about others?
>
> Depending on what you're working on, you can also use User Mode Linux
> (UML) [1] which produces a elf, that you can run easily on top of your
> existing linux distro.
> Basically, you have to choose the "um" arch when compiling your kernel.
>
> [1] http://user-mode-linux.sourceforge.net/old/UserModeLinux-HOWTO.html
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Bio flags

2016-07-06 Thread Praveen Kumar
Hi,

I am porting some of  file system related code from 3.0.101 kernel to
4.4.13 kernel and found that the number of bio flags have been reduced from
13 to 8 and some of the which been removed are :

BIO_UPTODATE
BIO_RW_BLOCK
BIO_EOF
BIO_EOPNOTSUPP
...

I was unable to find much in the documentation sections regarding the flags.
Can someone please help providing inputs or pointers over this change.

Thank you for your help.

Regards,

~Praveen.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


What is negative lookup in linux filesystem

2015-10-05 Thread Praveen Kumar
Hi,

I am trying to understand the path-lookup in linux filesystem and was going
through https://www.kernel.org/doc/Documentation/filesystems/path-lookup.txt

Under 'Rename' heading, I came across the negative lookup terminology,
snapshot below

'Between deleting the dentry from the old hash list, and inserting it on
the new
hash list, a lookup may find neither 'A' nor 'B' matching the dentry. The
same
rename seqlock is also used to cover this race in much the same way, by
retrying a negative lookup result if a rename was in progress.'

Can anyone please help understanding the negative lookup concept and how do
we achieve it. Thanks in advance.

Regards,

~Praveen.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Xserver on framebuffer (/dev/fbX)

2014-07-08 Thread Praveen Kumar Pendyala
Hello,

I have a kernel framebuffer driver which creates a new framebuffer device
at /dev/fbX (X = 1 or 2 generally). Now I want to run a Xserver on this
framebuffer. Can someone please give some pointers on how to do this? My
code is available at https://github.com/praveendath92/udlfb (a fork of
displayLink kernel driver)

I'm attempting a USB remote display for linux. Any help is greatly
appreciated. Thanks.


Best,
Praveen,
http://praveenkumar.co.in
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Xserver on framebuffer (/dev/fbX)

2014-07-08 Thread Praveen Kumar Pendyala
On Tue, Jul 8, 2014 at 6:36 PM, Laurent Navet laurent.na...@gmail.com
wrote:

 Hi,
  I have a kernel framebuffer driver which creates a new framebuffer device
  at /dev/fbX (X = 1 or 2 generally). Now I want to run a Xserver on this
  framebuffer. Can someone please give some pointers on how to do this?

 Maybe this one : https://github.com/notro/fbtft/wiki/Framebuffer-use


I tried this. I'm able to start an XServer which shows up on my PC. But
when I try fbgrab to see the actual frame in the framebuffer I don't see
the same thing. I see just a static green screen (green screen is
initialized during fb driver setup).

Am I doing something wrong with my fb driver implementation?



 --
 « On ne résout pas un problème avec les modes de pensée qui l’ont
 engendré. »
 « You cannot solve current problems with current thinking. Current
 problems are the result of current thinking »




-- 
Praveen Kumar Pendyala,
Senior Undergraduate,
Department of Electrical Engineering,
IIT Bombay.
http://home.iitb.ac.in/~praveendath92/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Alternative for API system() in multi-threaded app

2013-04-22 Thread Praveen kumar
I was trying to replace system() API in my multi-threaded app as it is
suggested not to any calls in multi-threaded app which uses fork().
When I was going through the man pages of fork()..in the Notes section I
found
*   Since version 2.3.3, rather than invoking the kernel's fork()
system call, the glibc fork() wrapper that is provided as part of the NPTL
threading implemenâ*
*   tation invokes clone(2) with flags that provide the same effect as
the traditional system call.  The glibc wrapper invokes any fork handlers
that have  been*
*   established using pthread_atfork(3).*

Is this mean, I still can use fork() or any other API which uses fork() for
its implementation and make sure my app is thread safe or free from dead
locks

Thanks,
Praveen R
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Some Links for Easy Understanding of Linux of Kernel Source code

2013-03-05 Thread praveen kumar
Hello all
I am a collage student and i need some link so to under stand kernel source
code easily
and also how to do IPC programming
thank you
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Migrating from SA_INTERRUPT to IRQF_DISABLED...

2012-04-11 Thread Praveen kumar
Hi,
There is an old bug come up while migrating from 2.6.18 to 2.6.33The
interrupts were generating correctly
in 2.6.18 where the interrupt was registered using SA_INTERRUPT then while
migrating to 2.6.33 this has been changed to IRQF_DISABLED this is the
only change in migration... after doing this interrupt comes only once
.Interrupts does not behave how they were used to in 2.6.18.

Are any additional changes needs to be done here??? ...to get things
working here...

what could be the problem hereI dont have the option of moving to
latest kernel...


Praveen R
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: USB controller status

2012-01-17 Thread Praveen kumar
Hi Greg,

What type of diagnostics are you trying to do?
   I am trying to is to make communication to all the chips present
on board (from kernel) and make sure all the input/output lines are working
on that chip and the status of the configuration.
As I am doing with the other chips like video controller ,audio controller
etc ,I want to make sure the working condition of the USB controller and
some tests to prove input and output lines are working and if possible loop
back data test.

How can it not be configured correctly?

I am not sure in which condition the configuration of controller may fail
but just I want to make sure the controller is configured properly.

You have looked at the debugfs files for the usb controllers for this
type of thing already, right?

I have seen debugfs where I can dump all the configuration reg values ,but
not sure to see which reg values to confirm  controller is configured
properly.

Also I was trying to get the linux-usb project (
http://sourceforge.net/apps/trac/sourceforge/wiki/Git) through git to make
use of some code in there for some of the tests but I am not able to get it.
Is there any alternative link from where I can get the code (like lsusb.c
etc )..

Thanks ,
Praveen




On Mon, Jan 16, 2012 at 11:07 PM, Greg KH g...@kroah.com wrote:

 On Mon, Jan 16, 2012 at 04:15:09PM +0530, Praveen kumar wrote:
  Hi All,
  As part of diagnostics  I have to make sure the USB controller is
  configured correctly.

 How can it not be configured correctly?

  Can I get this information from any entry in /sys or /proc ?? If yes
 where ??
  If no I plan to add a exclusive entry in the driver to do my diagnostics.

 What type of diagnostics are you trying to do?

  Is that feasible by reading some of the registers in
  the controller ??

 You have looked at the debugfs files for the usb controllers for this
 type of thing already, right?

 greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


USB controller status

2012-01-16 Thread Praveen kumar
Hi All,
As part of diagnostics  I have to make sure the USB controller is
configured correctly.
Can I get this information from any entry in /sys or /proc ?? If yes where
??
If no I plan to add a exclusive entry in the driver to do my diagnostics.
Is that feasible by reading some of the registers in
the controller ??

Praveen
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Getting Information from Multiple nodes

2011-11-17 Thread Praveen kumar
Thanks Anish ..
I got your point .
I was using
struct inode *inode = file-f_dentry-d_inode;
 min = iminor(inode);

to see which node has been opened,
I wanted to make sure myself the correct/best way of
getting this information.

Praveen


On Wed, Nov 16, 2011 at 8:02 PM, anish kumar anish198519851...@gmail.comwrote:

 On Wed, 2011-11-16 at 18:00 +0530, Praveen kumar wrote:
  Hi All,
  I have a I2C chip driver,and there are two identical chips on
  two different i2c bus.
  I have registered the driver and initialized it and created two
  nodes /dev/chip_0 and /dev/chip_1
 
  If I open the node from user how will I make driver identify which
  device to access .ie in the ioctl.

 So in your ioctl call you want to get the device structure right?
 If yes then have a look at scull/main.c file in scull folder at below
 location.
 git://github.com/martinezjavier/ldd3.git

 Basically you need to set private_data of filp at open time with device
 information and get the private_data from filp in ioctl.
 If you don't understand then just have a look at the file I mentioned.
 
  Am I clear ???
 
  Praveen
 
 
  ___
  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


Getting Information from Multiple nodes

2011-11-16 Thread Praveen kumar
Hi All,
I have a I2C chip driver,and there are two identical chips on two
different i2c bus.
I have registered the driver and initialized it and created two nodes
/dev/chip_0 and /dev/chip_1

If I open the node from user how will I make driver identify which device
to access .ie in the ioctl.

Am I clear ???

Praveen
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Debugging memset crashes

2011-02-23 Thread Praveen kumar
Hi,
I have an embedded system on which i get crash (Caused by memset )  at long
run( Reproducible 2/10 times ),
I wanted to know efficient ways (materials) to handle memset crashes .

*Program terminated with signal 11, Segmentation fault. *

#0 memset (dstpp=0xd2, c=value optimized out, len=3374)
at ../../../src/Common/OS/linux/memset.c:20
20 ../../../src/Common/OS/linux/memset.c: No such file or directory.
in ../../../src/Common/OS/linux/memset.c

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
*(1) Display the backtrace for the thread that crashed. *

#0 memset (dstpp=0xd2, c=value optimized out, len=3374)
at ../../../src/Common/OS/linux/memset.c:20
#1 0x100e76c4 in LPREncode (pEnc=0x5b1debc8, pRTPPacket=0x5be69ee4)
at ../../../src/Common/comm/lpr/lpr.c:647
#2 0x100dde50 in RTPChanWork (pChan=value optimized out)
at ../../../src/Common/comm/rtpchan/rtpchan.c:2699
#3 0x100de5d8 in RTPTxTask (userDefined=value optimized out)
at ../../../src/Common/comm/rtpchan/rtpchan.c:2853
#4 0x1051d744 in pthread_entry (args=value optimized out)
at ../../../src/Common/OS/linux/psosapi/pthreadapi.c:222
#5 0x0ffaadec in start_thread (arg=value optimized out)
at pthread_create.c:298
#6 0x0f892530 in clone () from /lib/libc.so.6
Previous frame inner to this frame (corrupt stack?)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
*(2) Display argument parameters and local variables for the thread. *

dstpp = (void *) 0xd2
c = value optimized out
len = 3374
xlen = value optimized out
 = value optimized out
dstp = 210


do anyone have some information..

Thanks in Advance
Praveen
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Adding Module to kernel

2011-01-04 Thread Praveen kumar
Dear All,
I have a kernel module which i want to add to kernel permanently(I was
doing it dynamically) .
How can we achieve this ?

Regards,
Praveen

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies