TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Project ideas for a Linux kernel module

81 pointsby maileyabout 2 years ago
Hey HN, I&#x27;m currently a senior CS student (graduating in fall), I wanted to align my career with low level&#x2F;embedded systems and I wanted to focus more on the kernel&#x2F;firmware side of things.<p>so to that end, What would be a good idea for a linux kernel module I can work on, something that may get me to interact with any topics involving communication standards&#x2F;protocols ( i2c, SPI, or JTAG, wireless, BLE).<p>thank you.

23 comments

pabs3about 2 years ago
Probably the most useful thing you could do would be take any Android device (or iOS device with the bootrom exploit) and rebase the patches for it on mainline, clean them up and get them merged into mainline Linux. Same goes for any other device not supported in mainline really, but Android devices are almost always like this.<p>Along those lines, look at all the dkms modules in any Linux distro and try to talk to the module authors about mainlining, do the work needed if they agree to it.<p>Also, I have some ideas for Linux kernel things I noticed are needed in my branches of linux.git. I doubt I&#x27;ll work on them any time soon, so feel free to use the ideas&#x2F;code I&#x27;ve left in the branches.<p><pre><code> cleanups&#x2F;bluetooth-magic-numbers cleanups&#x2F;debian features&#x2F;dmesg-richness features&#x2F;hwmon-streaming features&#x2F;in-kernel-cross-fs-copy features&#x2F;lvm-raid-discard features&#x2F;runtime-syscall-lookup features&#x2F;sys-class-storage features&#x2F;tmpfs-o-discard features&#x2F;tmpfs-user-xattr features&#x2F;usbip-flexibility </code></pre> <a href="https:&#x2F;&#x2F;github.com&#x2F;pabs3&#x2F;linux&#x2F;branches&#x2F;all">https:&#x2F;&#x2F;github.com&#x2F;pabs3&#x2F;linux&#x2F;branches&#x2F;all</a><p>Not directly related to your question, but check out the KernelNewbies community and also some of the FOSS internship programs, especially GSoC and LKMP offer paid internships to work on the Linux kernel.<p><a href="https:&#x2F;&#x2F;kernelnewbies.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kernelnewbies.org&#x2F;</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;fossjobs&#x2F;fossjobs&#x2F;wiki&#x2F;resources#internships">https:&#x2F;&#x2F;github.com&#x2F;fossjobs&#x2F;fossjobs&#x2F;wiki&#x2F;resources#internsh...</a>
评论 #35786261 未加载
mschuster91about 2 years ago
If you&#x27;re in for a wild ride, you could try to take some reasonably current Android phone and get enough of the manufacturer&#x27;s changes to the Linux kernel upstream to run generic Linux on it.<p>There are a lot of patches that are purely Android-specific and won&#x27;t ever make it to upstream Linux, but others, like the drivers for flash chips and USB? These could definitely be submitted upstream.<p>Samsung for example uploads their FOSS dumps to [1].<p>First thing I&#x27;d do is to get u-boot working as a fourth-stage bootloader so you don&#x27;t have to wrestle with ODIN or fastboot every time you rebuild your kernel. That alone should be a decent sized university project.<p>[1] <a href="https:&#x2F;&#x2F;opensource.samsung.com&#x2F;uploadList?menuItem=mobile&amp;classification1=mobile_phone" rel="nofollow">https:&#x2F;&#x2F;opensource.samsung.com&#x2F;uploadList?menuItem=mobile&amp;cl...</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Booting_process_of_Android_devices" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Booting_process_of_Android_dev...</a>
评论 #35785182 未加载
评论 #35785090 未加载
LeonMabout 2 years ago
I have recently been looking into getting a 12&quot; Apple Macbook for on the road. The 12&quot; Macbooks were small 12&quot; Intel laptops produced between 2015 and 2017. They can boot Linux, but many devices are not functioning.<p>They are great little machines, though a bit underpowered (even when they were new) so running MacOS is not a great experience. Decent Linux support should give these devices a second live.<p>Most devices <i>should</i> be able to work, as they are all standard components. My suspicion is that we are mostly lacking device trees and maybe some SMC work.<p>I expect the circuit diagrams for this laptop to be floating around the web somewhere (otherwise shoot Louis Rossman an email), so reverse-engineering the SMC should be doable, and a great low level&#x2F;embedded challenge.
评论 #35786523 未加载
quelsolaarabout 2 years ago
Id love a way for userspace applications to leverage the MMUs memory protection to trigger user code. Let me give you an example: Lets say I have large block of memory that is encrypted. I want to random access this memory, but i don&#x27;t want to decrypt the entire memory before i start using it. I may have worker threads that start decrypting the data for me, but i don&#x27;t want to wait for them. Ideally, id like to set a memory protection flag on all pages that are still encrypted, and then if any access is made of these pages, a callback will trigger that lets you decrypt the block and remove the flag from the page, only when accessed.<p>This could be used for things like user space memory mapping of networked memory, where memory is retrieved from a remote computer when accessed. This would make it possible to transparently implement userspace large scale shared memory systems in a very elegant way. Good luck with what ever you decide to do!
评论 #35785076 未加载
评论 #35798537 未加载
cushychickenabout 2 years ago
Writing or modifying an existing driver for something like an I2S DAC would suit you, I think.<p>You&#x27;d have to figure out phandle support for the I2C configuration channel, fire up I2S streaming by enabling it in the kernel and piping audio to the DAC, then playing it into some speakers.<p>Could expand it by adding some filtering. Many DACs have filter banks that you can populate with coefficients via I2C.<p>There&#x27;s some decent kernel module resources and examples in this repo if this is something you&#x27;re brand new to:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;Johannes4Linux&#x2F;Linux_Driver_Tutorial">https:&#x2F;&#x2F;github.com&#x2F;Johannes4Linux&#x2F;Linux_Driver_Tutorial</a><p>If you have any interest or experience in cybersecurity and have considered doing that professionally, my company is hiring and likely will be all year. We probably have a use for a new SWE on the embedded side. Email me at my username at Gmail.
评论 #35786437 未加载
评论 #35793281 未加载
ciesabout 2 years ago
Given Linux now allows bits written in Rust, I think a port-to-Rust project may be interesting. There&#x27;s probably some place on the internet where the Rust minded are discussing what are the most interesting projects in this space (I have no idea, sorry). It could make a cool review on the differences between both implementations, wrt complexity, safety, LOC, compile time, etc.
teleforceabout 2 years ago
Perhaps you can work on the new promising Shortest Path Bridging (SPB) in the Linux kernel that has not been very popular as it should be [1],[2],[3].<p>[1] 802.1Q-2018 - IEEE Standard for Local and Metropolitan Area Network--Bridges and Bridged Networks:<p><a href="https:&#x2F;&#x2F;ieeexplore.ieee.org&#x2F;document&#x2F;8403927" rel="nofollow">https:&#x2F;&#x2F;ieeexplore.ieee.org&#x2F;document&#x2F;8403927</a><p>[2] Provider Backbone Bridging for Linux:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;openss7&#x2F;pbbr">https:&#x2F;&#x2F;github.com&#x2F;openss7&#x2F;pbbr</a><p>[3] Are there inherent problems with 802.1aq preventing wider adoption?<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;networking&#x2F;comments&#x2F;8gez0r&#x2F;are_there_inherent_problems_with_8021aq&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;networking&#x2F;comments&#x2F;8gez0r&#x2F;are_ther...</a>
whoami_nrabout 2 years ago
One of the early projects I worked to teach myself networking was Port Knocking[1]. Think of it like designing a calling bell for your servers where they can smartly understanding who is doing the &quot;knocking&quot; on their ports. Writing it as a linux kernel module, with the low level cryptographic functions would be a great learning tool imo. I also wrote about my progress here[2] when I attempted this about 7-8 years ago.<p>[1]:<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Port_knocking" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Port_knocking</a> [2]:<a href="https:&#x2F;&#x2F;rnikhil.com&#x2F;2016&#x2F;12&#x2F;12&#x2F;port-knocking-python.html" rel="nofollow">https:&#x2F;&#x2F;rnikhil.com&#x2F;2016&#x2F;12&#x2F;12&#x2F;port-knocking-python.html</a>
评论 #35785352 未加载
bugmen0tabout 2 years ago
write a backdoor :) A kernel module that drops the user into a root shell if they call an obscure kernel functionality with a secret value in some registers.<p>This should be somewhat easy to start and self-contained. If you want, you can easily extend it if you want things to become more fancy. E.g., hiding the secret constant. Implementing a challenge response protocol, limiting access to other global state (hardware dongle? ip address?) and so on.
madushan1000about 2 years ago
There is an effort to write linux drivers for peripherals in Pine Ox64 <a href="https:&#x2F;&#x2F;wiki.pine64.org&#x2F;wiki&#x2F;Ox64" rel="nofollow">https:&#x2F;&#x2F;wiki.pine64.org&#x2F;wiki&#x2F;Ox64</a>, the chip(BL808) documentation is not that great. But would be a good exercise to write some drivers.
评论 #35793352 未加载
rsecoraabout 2 years ago
Some ideas:<p>* You can select a board with not fully supported peripheral Examples RISC-V or Loongson boards with incomplete or missing drivers.<p>* or create a higher abstractions over the SPI for a A&#x2F;D or D&#x2F;A or pwm chip. The module offers a &#x2F;dev&#x2F; file that hides the SPI communication or the motor position and encoding...
notthetupabout 2 years ago
One of my pet peeves is that the Linux SPI driver framework has a very transactional API. You can read&#x2F;write N bytes to a bus at a time.<p>Some SPI devices can stream out lots of data on the bus. I’m looking at you ADCs.<p>It’d be nice to have a stream style API for that. Not sure which Linux framework is best suited for that. Maybe IIO but something on those lines might be fun to explore.
kuterabout 2 years ago
One project I made for myself was to to wtite a kernel module that could control the led backlight of my laptop keyboard.<p>I had to first reverse engineer the windows utility that was written in c# and found out that it used wmi commands. After reading the kernel code for a while I realized there where already some code that implemented HP WMI commands.<p>Using that as a foundation it was quite easy to write my own kernel module that could change the led colors. Then I tried to integrate it with the linux kernel&#x27;s led API. Since the LEDs where RGB it was a little different to integrate but I managed to find some examples in some playstation joystick driver code.<p>This project was a lot of fun, but I would say that you should be careful not to break your hardware. I have broken devices even from the user space by pushing it beyond it&#x27;s limits.
评论 #35787027 未加载
raybbabout 2 years ago
Not a project idea, but you might get a little inspiration from Asahi Lina. They&#x27;re developing the linux kernel for M1 Macs and often stream it. <a href="https:&#x2F;&#x2F;github.com&#x2F;asahilina">https:&#x2F;&#x2F;github.com&#x2F;asahilina</a>
评论 #35786352 未加载
dvhabout 2 years ago
I always wanted a module that writes string to syslog. Sometimes it&#x27;s hard to tell where certain things start, especially during init, so I would add string to kernel log, do the thing, add another string marking the end of my thing and then in the syslog I would find that first string and what&#x27;s after that is what I need.
评论 #35785880 未加载
dokemabout 2 years ago
Write a simple USB driver for interacting with some arduino widget. I&#x27;m talking actual USB not serial emulation. For instance, when you plug in some microcontroller&#x2F;arduino with a small LCD screen you can `echo Hello World &gt; &#x2F;dev&#x2F;my_lcd_screen` and it will appear.
Freeaqingmeabout 2 years ago
Maybe it would be a nice project to see if you could get Zig working in the Linux kernel?
tyingqabout 2 years ago
You mention communication protocols. There was a recent article here about a tool bridging an ipv6 only Linux box to the ipv4 world using LD_PRELOAD. A kernel module could trap the calls in a more clean way. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35773554" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35773554</a>
rurbanabout 2 years ago
Just write i2c or SPI for a baremetal firmware, not esp32 nor stm. linux is way overkill for small devices.
评论 #35793424 未加载
dyingkneepadabout 2 years ago
Can I get &#x27;&#x2F;dev&#x2F;chatgpt&#x27;? That would make scripting easier.
评论 #35789217 未加载
评论 #35793442 未加载
stuaxoabout 2 years ago
Being able to mount compressed archives as a file system could be interesting.
评论 #35786946 未加载
lumb63about 2 years ago
If you have any interest, HardMAC 802.15.4 driver support in the kernel is poor. I’m learning this the hard way, right now.
评论 #35793377 未加载
daviddever23boxabout 2 years ago
If you&#x27;re willing to forgo Linux, there is a lot of work &#x2F; interest in Zephyr.
评论 #35798589 未加载