I didn’t learn anything in this one that I didn’t already know, but it is a very good explanation for a beginner.
Tag Archives: linux
Mail Call #36: QuickStudy Cheatsheets and Soldering Stuff from Amazon | In The Lab With Jay Jay
This post is part of my video blog and you can find more information about this video over here.
You can support this channel on Patreon: patreon.com/JohnElliotV
Silly Job Title: Electronics Guru.
In this video we see what arrived in the mail from Amazon. The main haul was my QuickStudy cheatsheets. But I also go this stuff too:
Thanks very much for watching! And please remember to hit like and subscribe! :)
Following is a product I use picked at random from my collection which may appear in my videos. Clicking through on this to find and click on the green affiliate links before purchasing from eBay or AliExpress is a great way to support the channel at no cost to you. Thanks!
Yum Cha 100pcs Heat Shrink Wire Connectors![]() |
Let’s go shopping!
Running Linux in PDF
Fixing compile_commands.json for VS Code and Linux kernel sources
I have my Linux kernel sources setup like this:
-------------------
Fri Jun 14 00:35:24 [bash:5.2.15 jobs:0 error:0 time:2449]
jj5@virtuoso:/home/jj5/repo/git/git.kernel.org/torvalds-linux
$ git remote show origin
* remote origin
Fetch URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Push URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (local out of date)
-------------------
The scripts/clang-tools/gen_compile_commands.py runs just fine:
------------------- Fri Jun 14 00:35:28 [bash:5.2.15 jobs:0 error:0 time:2453] jj5@virtuoso:/home/jj5/repo/git/git.kernel.org/torvalds-linux $ scripts/clang-tools/gen_compile_commands.py -------------------
But there is a problem with some unknown clang options, as you can see here:
So I wrote this collection of sed scripts to delete the problematic options:
-------------------
Fri Jun 14 00:11:28 [bash:5.2.15 jobs:0 error:0 time:1013]
jj5@virtuoso:/home/jj5/repo/git/git.kernel.org/torvalds-linux
$ cat jj5/fix-commands.sh
#!/bin/bash
main() {
set -euo pipefail;
cd "$( dirname "$0" )";
cd ..;
local file="compile_commands.json";
sed -i 's/-mpreferred-stack-boundary=3//g' "$file"
sed -i 's/-mfunction-return=thunk-extern//g' "$file"
sed -i 's/-mindirect-branch=thunk-extern//g' "$file"
sed -i 's/-mindirect-branch-register//g' "$file"
sed -i 's/-fno-allow-store-data-races//g' "$file"
sed -i 's/-fconserve-stack//g' "$file"
sed -i 's/-mrecord-mcount//g' "$file"
}
main "$@";
-------------------
Bug fixed! Thanks to my mates on IRC for helping me fix this one. This clangd extension for VS Code seems to work really well.
p.s. another possible solution is here.
Linux kernel coding style
Today I had a read of the Linux kernel coding style. Eight character indents and brace on new-line for functions and no braces for single line conditionals… yuck. :P
Common files and directories found on popular Linux systems
Over on https://digitalforensics.ch/linux/ there is a PDF you can download which lists common files and directories you might find in popular Linux systems.
vDSO (virtual dynamic shared object)
Today I learned about the vDSO on the Linux man page: vdso(7) — Linux manual page. It’s a facility for replacing syscalls with normal user-space function calls for things like getting the time of day for better performance.
Moving interrupts to threads in the Linux kernel
Found an old LWN article: Moving interrupts to threads.
Linux books
New books
Ordered on Amazon today:
- Understanding the Linux Kernel 3e: From I/O Ports to Process Management
- Linux Device Drivers 3e
- Linux Network Administrator’s Guide 3e
I’m not sure what to make of the fact that these books are nearly 20 years old… totally out of date, but all that is available? What’s up with that?

