Getting System Tap up and running on F38 has involved chasing down a few modules.
Continue readingAuthor Archives: Adam Young
Smirking Sigma
Design prototypes for a band logo


All images Copyright Adam Young.
Designed in Inkscape. Working title is “Smirking Sigma”
The font used is Beachman Script. by David Rakowski. It really seems to capture the classic feel of a fifties music venue.
Remote git with ssh
Working on a different architecture from my Laptop means that I am invariably working on a remote machine. My current development can be done on an Ampere AltraMax machine, which means I have 80 processors available; quite a nice benefit when doing a Linux Kernel compile that can use all of the processors available.
Because the machine is a shared resource out of out lab, I want to make sure I can recreate my work there on another machine; this one could be reclaimed or powered down due to lab priorities. Thus, all my remote work is done in git, and I use the ssh protocol to pull changes from my work server to my laptop fairly regularly…whenever I feel I have valuable work that could be potentially lost.
Acronym Challenge Programmatic Interface
How do you know what is inside your computer? There are a couple tools. If the hardware is on the PCI bus, from the command line you can run lspci, which will in turn enumerate the discovered devices on that bus. But what if the hardware is not on the PCI bus? And how does the Kernel discover it in the first place? For the hardware that I have to work with, the answer is that it is enumerated by the Unified Extensible Firmware Interface (UEFI) coded embedded in the device and exposed via the Advanced Configuration and Power Interface (ACPI). This world is full of four letter acronyms. Here are my notes on some of them.
Continue readingipmitool lan print
when run from inside a console/ssh session will tell you the ipmi address of the machine you are on.
The Minimum Linux Kernel Module Code to Register a Driver
I’ve been working through John Madieu’s Book on Linux Device Driver Development. When typing in the Sample code for the Platform device, I got a Segmentation fault registering the device (insmod).
Continue readingKeeping build output on one screen
When a build goes wrong, the amount of error messaging can easily scroll off the screen. Usually the error is on the first line reported. Here’s a couple ways to make it easier to read just the lines you want.
The first is just to grep for the word ‘error.’ This works for gcc:
make 2>&1 | grep error |
Which produces
/root/devel/mctp_pcc/mctp_pcc.c:178:18: error: ‘name’ undeclared (first use in this function) /root/devel/mctp_pcc/mctp_pcc.c:178:52: error: ‘fe’ undeclared (first use in this function); did you mean ‘fd’? /root/devel/mctp_pcc/mctp_pcc.c:179:9: error: ‘ndev’ undeclared (first use in this function); did you mean ‘cdev’? /root/devel/mctp_pcc/mctp_pcc.c:179:37: error: ‘dev’ undeclared (first use in this function); did you mean ‘cdev’? /root/devel/mctp_pcc/mctp_pcc.c:182:17: error: ‘rc’ undeclared (first use in this function); did you mean ‘rq’? /root/devel/mctp_pcc/mctp_pcc.c:187:20: error: ‘idx’ undeclared (first use in this function); did you mean ‘ida’? /root/devel/mctp_pcc/mctp_pcc.c:190:24: error: ‘STATE_IDLE’ undeclared (first use in this function); did you mean ‘VTIME_IDLE’? /root/devel/mctp_pcc/mctp_pcc.c:193:34: error: ‘mctp_serial_tx_work’ undeclared (first use in this function) /root/devel/mctp_pcc/mctp_pcc.c:197:17: error: label ‘free_netdev’ used but not defined /root/devel/mctp_pcc/mctp_pcc.c:183:17: error: label ‘free_ida’ used but not defined /root/devel/mctp_pcc/mctp_pcc.c:199:1: error: no return statement in function returning non-void [-Werror=return-type] |
A bit of background…all Linux processes have 3 file descriptors (FD) by default. STDIN is for reading in information from other processes. STDIN is file descriptor 0. STDOUT is for, well, STANDARD’ output, or the output that the program is supposed to produce. STDOUT is FD 1. STDERR is for output that is not standard, and is intended for error messages. STDERR is FD 2.. Make and GCC spit their output into STDERR. The trick is to tell the program to redirect standard error into STDOUT via the magic symbol 2>&1. I read this in my head as “two goes into ampersand one.” STDERR is 2, STDOUT is 1.
If you want to get just the first set of line you can use the head command like this:
make 2>&1 | head -10 |
Which produces
make -C /lib/modules/6.2.0+/build M=/root/devel/mctp_pcc modules make[1]: Entering directory '/root/devel/linux' CC [M] /root/devel/mctp_pcc/mctp_pcc.o /root/devel/mctp_pcc/mctp_pcc.c: In function ‘create_mctp_pcc_nnetdev’: /root/devel/mctp_pcc/mctp_pcc.c:178:18: error: ‘name’ undeclared (first use in this function) 178 | snprintf(name, sizeof(name), "mctpipcc%x", fe); | ^~~~ /root/devel/mctp_pcc/mctp_pcc.c:178:18: note: each undeclared identifier is reported only once for each function it appears in /root/devel/mctp_pcc/mctp_pcc.c:178:52: error: ‘fe’ undeclared (first use in this function); did you mean ‘fd’? 178 | snprintf(name, sizeof(name), "mctpipcc%x", fe); |
This gets just the first 10 lines…use a different number if you want a different amount of output
These two options are fairly easy to type and thus don’t really call for scripting. As the amount of filtering gets longer,. you make want to make scripts that build up more complex selection of the output.
If you have control of your makefile, you can use the -Wfatal-errors
flag as is written up here, but I am calling into precanned Makefiles and it drops the flag. To modify Makefiles see this discussion.
One liner: Kill an unresponsive remote shell session
{enter} ~ . |
Why is ABC Notation not ABC…?
When we read we begin with
A.B.C
When we sing we begin with Do Re Mi
–“Do, a Deer…” THe Sound of Music
Western music has coalesced around the major scale. Which is really a pity, because western music notation was built around the natural minor scale.
Continue readingUse * to Search for the word under the cursor in vim
This might be my new favorite vimism.
The idea that there is a single character shortcut for searching for the character under the cursor is brilliant, and something I will use, quite a bit, in my day to day work. It might be more powerful than tags.