greg donald

How-to guide for beginner-level Linux Kernel patch submissions

June 20, 2015

Every day I see new Linux Kernel hackers fail at their first patch submission. I'm not an expert, but I've learned how the process works and most importantly I've learned how to avoid irritating Linux Kernel maintainers. The "maintainers" are the gate keepers to the Linux Kernel. If you piss them off you will never land any patches into the Linux Kernel. All Linux Kernel development takes place in the open and hundreds (thousands?) of Linux Kernel developers will see and possibly read your patch submissions. You will want to make every effort to submit the best possible patch you can. That's where I come in. If you follow my guide there's a better than average chance you will actually land your patch into the Linux Kernel. For a beginner I recommend working on the drivers/staging tree maintained by Greg Kroah-Hartman. Clone Greg KH's staging tree: > git clone git:// This will take a while. After that you need to checkou...

diff, git, kernel, linux, patch, sed

Console Blackjack in Go

April 26, 2015

I wrote a console version of Blackjack in Go: You can install it with these commands: go get go install ...

blackjack, console, github, go, golang

Linux Kernel Powerball Module

September 28, 2014

I don't play the lottery but I find random number generators and the Linux Kernel interesting so I wrote a simple Linux Kernel module that does a PowerballTM "quick pick".   You can download it from GitHub: ...

kernel, linux, lottery, module, powerball

How to filter out Bash arguments

September 22, 2014

Ever want to know how to drop an argument (and value), --dir in this case, from a Bash script? Someone from my local LUG asked how to do it and this is what I came up with: Fun ;) #!/usr/bin/env bash args=("$@") myargs=() nextarg=-1 for ((i=0; i<$#; i++)) { if [ $nextarg == $i ]; then continue; fi case ${args[$i]} in --dir) nextarg=$((i+1)) ;; *) myargs+="${args[$i]} " esac } echo $myargs ./remove_dir.bash --dir foo --bar baz --bar baz ...


How-to build latest Linux kernel from Linus' git repo on Debian/Ubuntu

May 25, 2014

Here's a how-to for building a recent Linux kernel on your Debian GNU/Linux box: You will need to do all this as root. It's serious business building new Linux kernels :) su - The dash after the su command makes it behave as if you had logged in as root directly, a full login environment is applied. Make sure you have the required tools and libraries installed: apt-get install build-essential module-init-tools initramfs-tools procps libncurses5-dev kernel-package fakeroot git-core screen zlib1g-dev Use git to clone Linus' latest git repo: cd /usr/src git clone git:// This will take a long time: Cloning into 'linux'... remote: Counting objects: 2725713, done. remote: Compressing objects: 100% (412816/412816), done. remote: Total 2725713 (delta 2286272), reused 2725359 (delta 2285962) Receiving objects: 100% (2725713/2725713), 559.28 MiB | 3.30 MiB/s, done. Resolving deltas: 100% (2286272/2286272), done. Once y...

debian, kernel, linux, ubuntu