Welcome to the Linux Foundation Forum!

Which artifact from the Hello World driver task should be uploaded?

For the Hello World driver, which of the artifacts should be uploaded? (.ko driver, patch, or mdesg output)?

Write a "hello world" kernel module - generate send the patch and dmesg output from the module to Shuah Khan skhan@linuxfoundation.org and also upload the file.

Best Answer

  • imanseyed
    imanseyed Posts: 10
    edited April 29 Answer ✓

    This is what I did when submitting my application for the spring mentorship:

    1. I sent the patch using git-send-email . You can add the dmesg output either in the changelog of the patch or after the --- in the patch file.
    2. I ran the kernel on QEMU (you can do it in any other hypervisor) and took a screenshot showing the use of insmod and the output of dmesg | tail. If your dmesg comes from BusyBox, the output should appear immediately after running insmod, so capturing dmesg separately may not be necessary.
      2.1. I also took a screenshot of the module code and the Makefile.
      2.2. Then, I combined everything into a PDF for submission.

    Note: You shouldn't upload the .ko file. The size of the struct module most likely differs between your kernel and your mentor's, so the module won't load anyway:
    https://elixir.bootlin.com/linux/v6.14-rc6/source/kernel/module/main.c#L2006-L2010
    Even if it does, no one will load an unknown kernel module on their machine due to security concerns d:

Answers

  • rujrabhatt
    rujrabhatt Posts: 11

    .ko file, Makefile should be sent via email attachments , and output record as screenshot or, dmesg output put it into one file like : "dmesg | cat >> dmesg_output.txt" , and upload it on dashboard. Thats seems right i guess, also send this txt file via mail as well, also I am open to any other suggestions as well.

  • rujrabhatt
    rujrabhatt Posts: 11

    hi @imanseyed i have one doubt before sending the patch , should we use git commit ? or only git format-patch directly after adding files git add .. kindly clarify the process and steps thank you

  • imanseyed
    imanseyed Posts: 10

    @rujrabhatt said:
    hi @imanseyed i have one doubt before sending the patch , should we use git commit ? or only git format-patch directly after adding files git add .. kindly clarify the process and steps thank you

    For your application, you can simply create a commit (don't forget to sign it) and generate the patch using git format-patch -1. You can't create a patch by just staging your files. For more complex situations such as patch series, you can use b4 later on:
    https://b4.docs.kernel.org/en/latest/contributor/prep.html

  • rujrabhatt
    rujrabhatt Posts: 11
    edited April 30

    hi @imanseyed sure got the idea and, just now tried to send the patch , have used "git commit -s -v" then added comments on top. Post that used "git format-patch -1 HEAD" and have made local branch before any commit. then got the patch as 0001-------.patch , then used "git send-email --To: --Cc: "

  • sudarshan19
    sudarshan19 Posts: 5

    I have sent the patch for kernel extra version using git send-email. Also I took the screenshots of booted kernel(uname -r) and Makefile. Do I need to send the PDF Document of that screenshots to skhan@linuxfoundation.org via gmail or uploading the file is enough? what else we need to write in the document?
    Does 'dmesg output from the module and send it' in every task mean taking the screenshot of the output and pasting in PDF document and sending document via gmail, is it?

Categories

Upcoming Training