public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Khadija Kamran <kamrankhadijadj@gmail.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: outreachy@lists.linux.dev,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] staging: axis-fifo: initialize timeouts in probe only
Date: Mon, 20 Mar 2023 11:37:46 +0500	[thread overview]
Message-ID: <ZBf/OuuUUeharrXp@khadija-virtual-machine> (raw)
In-Reply-To: <2599595.k3LOHGUjKi@suse>

On Thu, Mar 16, 2023 at 09:07:09PM +0100, Fabio M. De Francesco wrote:
> On giovedì 16 marzo 2023 19:35:09 CET Khadija Kamran wrote:
> > On Thu, Mar 16, 2023 at 05:17:47PM +0100, Fabio M. De Francesco wrote:
> > > On giovedì 16 marzo 2023 16:09:08 CET Khadija Kamran wrote:
> 
> [snip]
> 
> > Hey Fabio!
> > 
> > Hope you are doing well. After  spending a lot of time on this I am
> > stuck now. Kindly help me resolve this issue or understand it better.
> > 
> > Following your instructions I deleted my config file and copied one from
> > the /boot/ directory. After that I enabled the dependencies(CONFIG_OF=y
> > and CONFIG_HAS_IOMEM=y). I was successfully able to enable axis-fifo as
> > a module.
> > 
> > I then ran the following commands:
> >  - make drivers/staging/axis-fifo/
> 
> No, this is not the right command... you are not invoking the linker to make 
> the .ko object.
> 
> Use "make M=drivers/staging/axis-fifo/"
> or "make M=drivers/staging/axis-fifo/ W=1 -j8" (the latter to enable level '1' 
> warning and run on your 2 * 4 logical cores).
> 
> >  - sudo make modules_install install(this command took hours) :'(
> 
> This is odd, it shouldn't :-/
> 
> As I said in another message, I'll set aside some time to help you check if 
> you need to fine tune your VM and Hypervisor configuration. 
> 
> I'm returning on the same subject we have been talked about because you said 
> at least twice that your builds and install are too slow. We'll try to 
> diagnose it in an IRC session on #kernel-outreachy (I'm pretty sure for the 
> first days of next week - I'll send an invite).
> 
> > > When you are done with build, install, and final reboot to test if your
> > > module can "modprobe" or "insmod" (i.e. link with the running custom 
> kernel
> > > you built, installed and boot), try to compare the output of the following
> > > commands:
> > > 
> > > # uname -a
> > > Linux suse 6.2.2-1-default #1 SMP PREEMPT_DYNAMIC Thu Mar  9 06:06:13 UTC
> > > 2023 (44ca817) x86_64 x86_64 x86_64 GNU/Linux
> > 
> > The above command works
> > 
> > > AND
> > > 
> > > # modinfo <name of the module you are testing here>
> > 
> > On running 'modinfo axis-fifo' I get error saying module axis-fifo not
> > found.
> 
> Try again after building with "M=drivers/staging" (as said above). Don't 
> forget to run "make modules_install install" and then reboot into your custom 
> built Kernel, not the distribution's kernel.
> 
> While you are there, run "lsmod" to see all loaded modules. Pick one randomly 
> from the output list and run "modinfo name_of_the_module_you_want_info_about".
>  
> > > I'm running "modinfo kvm" (but showing only two of many lines):
> > > 
> > > # modinfo kvm
> > > filename:       /lib/modules/6.2.2-1-default/kernel/arch/x86/kvm/
> kvm.ko.zst
> > > vermagic:       6.2.2-1-default SMP preempt mod_unload modversions
> > > 
> > > Can you see that the kernel in "uname -a" and the filename and vermagic 
> have
> > > the same "6.2.2-1-default"? Well, so I'm sure I'm running the right Kernel
> > > and inserted the appropriate "kvm" module.
> > > 
> > > Furthermore, before rebooting your custom kernel, you may also look at the
> > > directory in the Kernel where you compiled your module and search for 
> "*.o"
> > > "*mod*" and "*.ko" files. If you have them, you built your module 
> properly.
> > 
> > There is a "*.o" file and "*.mod" file but there is no "*.ko" file in
> > the axis-fifo directory.
> > 
> > Kindly help me with this.
> > 
> > Regards,
> > Khadija
> > 
> > > Thanks,
> > > 
> > > Fabio
> 
> Let me know if this time it works.
> 
> Fabio
> 
> P.S.: Have you had time to read that "Linux Kernel Module Programming" guide I 
> sent you the link of? You can find a lot of information about modules there. 
> I'd strongly recommend you to read it. 
>

Fabio,

I have not read it yet. But it is in my mind and as soon as I get some
free time I will start reading it :)

Thank you!

> 

  parent reply	other threads:[~2023-03-20  6:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 12:56 [PATCH v5] staging: axis-fifo: initialize timeouts in probe only Khadija Kamran
2023-03-16 13:02 ` Greg Kroah-Hartman
2023-03-16 13:04 ` Greg Kroah-Hartman
2023-03-16 15:12   ` Khadija Kamran
2023-03-16 14:07 ` kernel test robot
2023-03-16 14:38 ` Fabio M. De Francesco
2023-03-16 15:09   ` Khadija Kamran
2023-03-16 16:17     ` Fabio M. De Francesco
2023-03-16 18:17       ` Fabio M. De Francesco
2023-03-16 18:35       ` Khadija Kamran
2023-03-16 20:07         ` Fabio M. De Francesco
2023-03-20  6:00           ` Khadija Kamran
2023-03-20 14:09             ` Fabio M. De Francesco
2023-03-20  6:37           ` Khadija Kamran [this message]
2023-03-16 20:17         ` Fabio M. De Francesco
2023-03-20  6:04           ` Khadija Kamran
2023-03-17  6:59 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBf/OuuUUeharrXp@khadija-virtual-machine \
    --to=kamrankhadijadj@gmail.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox