ARM Toolchain r1

First GCC 6.1 based ARM (32-bit) toolchain released on my FTP. Built using crosstool-NG for Ubuntu 16.04 (x86_64) with GLIBC 2.23. arm-unknown-linux-gnueabi-6.1.0-1.tar.xz Download, unpack into /usr/local, and add to your $PATH export PATH=/usr/local/arm-unknown-linux-gnueabi-6.1.0-1/bin:$PATH There’s lots of neat stuff included, both a sysroot and a debug-root with GDB and gdbserver for target. For details on using it, see the excellent docs. The main purpose for my building this is TroglOS, but it is useful for other purposes as well of course. [Read More]

Finit3: Almost there ...

Today the new logo for Finit3 was added to the GitHub repo and the homepage

Finit3 logo

Gorgeous, isn’t it?! 😎

This fancy artwork means we’re nearing the end of a long and agonizing release cycle where a lot of the internals of Finit have been rewritten and new exciting features have been added! More on this in an upcoming post 😃

The General Idea

OK, so here’s the general idea: take one teaspoon of a well equipped SBC with Marvell chips you know well, add an awesome WiFi hotspot with USB connection, stir feverishly for several weekends in a row, then sprinkle some AlpineLinux and a custom kernel on top. Enjoy! I have no clue if this will actually work, may even try porting my own little thing called TroglOS to the ClearFog first, I don’t know, but it will definitely be awesome! [Read More]

Live KVM migration with virt-manager

With the new servers and my server room shaping up, I’ve been working on setting up ALL THE THINGS! I just managed to set up live migration of the KVM virtual machines I use for testing my FLOSS projects. Here is a short writeup of that, just as a reminder for myself.

Checklist

  1. Make sure the libvirt versions are the same. I tried setting up migration between CentOS 7.2 and and Ubuntu LTS 16.04 which turned out to be a mess of insurmountable incompatibilities. I’ve now gone back to run Ubuntu on everything and it all works fine.
  2. Set up NFS for the backend store of /var/lib/libvirt/images. Make sure to export the share properly, I tried first with my ReadyNAS, but couldn’t set up root access (defaulted to nobody).
  3. Set up VM disk caching=none
  4. Set up VM processor model=default
  5. Profit

Good Luck! :)

[Read More]

Fake RAID Adventures

The other day I got my geeky hands on two old SuperMicro X8STI-F 1U servers. I plan to use them as build and embedded target emulation servers for my open source projects as well as Minecraft server for my kids :)

[Read More]

Upgrade X1 Carbon BIOS from Linux

This is a very brief writeup of how to upgrade the BIOS on a X1 Carbon (G1) from Linux. For more information on this topic there is always the excellent ThinkWiki.

OK, this post is more about creating the bootable USB stick needed, was too much of a chicken to try Flashrom

[Read More]

Redirecting Ports For Fun and Profit

Recently I needed a simple TCP/UDP port redirector and stumbled upon this Stackoverflow post. As usual I wasn’t first wanting to this without using iptables.

There were several alternatives, but since my target was embedded with limited amount of RAM and flash I wanted something really small. So the best fit turned out to be redir, which unfortunately only could handle TCP connections. This is what led me to write uredir to complement redir. Eventually I ended up adoptiing redir as well, which meant giving it a bit of a facelift and to give them both the same look and feel.

Currently they are two separate applications, which in some use-cases can be beneficial (small size), but I may in the future transplant the UDP functionality of uredir into redir. We’ll see, right now though I have several other projects to attend to :-)

[Read More]

Using netcat to test your Internet daemon

So you’re having a problem with the Internet daemon you wrote. You’re convinced the firewall, or some other magic, in your modern Linux distribution is eating your packets. No. First, make sure your daemon is actually running and has successfully bound to the address and port in question: sudo netstat -atnup If your application is not listed there you have a problem with it binding its server socket. Check the return values from bind(). [Read More]

The key to successful boot

How do you know when your UNIX service (daemon) is ready? Simple, it has created a PID file, signalling to you how to reach it. Usually this file is created as /var/run/daemon.pid, or /run/daemon.pid, and has the PID of daemon as the first and only data in the file. This data may or may not have a UNIX line ending.

Only trouble is: most UNIX daemons do not re-assert that PID file properly on SIGHUP (if they support SIGHUP that is). When I send SIGHUP to a daemon I expect it to re-read its /etc/daemon.conf and resume operation, basically a quicker way than stop/start.

Annoyingly however, most daemons do not signal us back to tell us when they’re done with the SIGHUP. Naturally a new movement has risen that says we should all instrument our daemons with D-bus … I say no. Simply touch the PID file instead.

[Read More]

Lecture from the UNIX beards

After the rm -rf /* disaster that hit me a couple of weeks ago I’ve been rebuilding my setup, restoring the few files I’ve had backed up, and collecting advice from the elders. Turns out there are a few tricks that can save your home directory from accidents like mine. The first one is rather obvious, but I’m writing it down anyway: Keep separate accounts. If possible, use separate accounts (with different permissions obviously) for different projects. [Read More]