NetBSD ASCII flag for the bootloader

As mentioned in my “Customizing NetBSD boot banners” article, it’s really easy to customize NetBSD boot banners using the boot.cfg configuration file. In a previous life, I used to draw ASCII art (mostly in the pre-2000 era) and more precisely a type of ASCII art referred as newschool ASCII in the artscene. By taking advantage of the extended character set (the 128 to 255 range) of the IBM PC’s code page 437, it was possible to achieve great detail and really smooth curves....

January 12, 2023 · 2 min

Toolchains adventures - Q3 2022

This is the sixth post in my toolchains adventures series. Please check the previous posts in the toolchains category for more context about this journey. In Pkgsrc land, I updated binutils to the 2.39 version, mold to the 1.3.1, 1.4.0, 1.4.1, and 1.4.2 versions, patchelf to the 0.15.0 one, and finally pax-utils to the 1.3.5 one. Regarding OpenBSD, we imported llvm-profdata into the base system in early July, so I took the opportunity to propose importing llvm-cov as well....

September 23, 2022 · 2 min

Toolchains adventures - Q2 2022

This is the fifth post in my toolchains adventures series. Please check the previous posts in the toolchains category for more context about this journey. In Pkgsrc land, I updated mold to the 1.2, 1.2.1, and 1.3 versions, and pax-utils to the 1.3.4 one. I also added a z3 option to our llvm and clang packages to allow building them against the Z3 theorem prover. When both lang/llvm and lang/clang are built with the z3 option enabled, the Z3 constraint solver is activated for the Clang static analyzer....

June 30, 2022 · 3 min

Clang Static Analyzer and the Z3 constraint solver

As far as static analyzers are concerned, one of the most important point to consider is filtering out false positives as much as possible, in order for the reports to be actionable. This is an area on which Coverity did an excellent job, and likely a major reason why they got so popular within the open source community, despite being a closed-source product. LLVM has the LLVM_ENABLE_Z3_SOLVER build option, which allows building LLVM against the Z3 constraint solver....

June 21, 2022 · 3 min

Differences between base and ports LLVM in OpenBSD

LLVM was imported in the OpenBSD ports tree back in 2008, and happily lived there for a long while before being imported in the source tree at the g2k16 hackathon in 2016. I previously wrote about this in “The state of toolchains in OpenBSD” last year. As mentioned in my previous article, we do not use upstream build system to build LLVM in the base system, but hand-written BSD Makefiles. Importing CMake into the base system was not an option, because of the size of the project and the large dependency chain it requires for building....

June 20, 2022 · 3 min

Assembly instructions distribution

In my article about running FreeBSD on the Vortex86DX CPU, I mentioned using objdump to disassemble kernels in order to check whether they were using CMOV instructions or not. One thing leading to another, I thought it would be fun to calculate the distribution of assembly instructions in ELF binaries. It turns out it can be done rather easily with a bit of Shell foo. For the purpose of this article, I used SQLite 3....

June 13, 2022 · 11 min

OpenBSD folklore and share/misc/airport

Back in 2016, I sent a diff to OpenBSD’s tech@ mailing list which added missing airports and area codes for Poland. Theo kindly pointed out privately that there was a rule governing the update of this file, which was known among OpenBSD developers but never made it into a commit. So I ended up making one adding my home airport (RZE) to the list and specifying update rules: only add ones you have been to....

June 8, 2022 · 2 min

Customizing NetBSD boot banners

I recently discovered that it’s surprisingly easy to customize the NetBSD boot loader banner, simply by adding some directives in the boot.cfg configuration file. Here is the relevant part of the boot.cfg(5) manual page: banner The text from banner lines is displayed instead of the standard welcome text by the boot loader. Up to 12 lines can be defined. No special character sequences are recognised, so to specify a blank line, a banner line with no value should be given....

May 12, 2022 · 2 min

File transfers via the parallel port on DOS using LapLink

I’ve already mentioned the HP t5570e and HP t510 thin clients a few times on this site, so they probably don’t require any more introduction. I will however just stress that one of the nice thing they have going for them is that they still have serial and parallel ports. I’ve already put their parallel port to good use, as it allowed me to re-plug my Flash Advance Linker and also use the wonderful OPL3LPT device (an ‘AdLib’ parallel port FM synthesizer soundcard)....

April 13, 2022 · 3 min

Toolchains adventures - Q1 2022

This is the fourth post in my toolchains adventures series. Please check the previous posts in the toolchains category for more context about this journey. In Pkgsrc land, I packaged and imported pax-utils, and updated mold to the 1.0.1, 1.0.2, 1.0.3, 1.1, and 1.1.1 versions. Since version 1.0.2, mold can now link NetBSD object files thanks to work done by pho@. I also committed upstream fix for CVE-2021-45078 in binutils to fix an out-of-bounds write, and imported our NetBSD/aarch64 support patches for ld from the NetBSD’s src repository....

April 1, 2022 · 1 min