Patch, Automake, and ARM CPU and Microserver Notes

A random collection of notes from Today’s science experiments.

Diff and Patch

To make a patch (using diff), get 2 folders: old and new.

To apply a patch:

To diff/patch a single file:

Source: http://jungels.net/articles/diff-patch-ten-minutes.html

Autocmake/Autoconf

configure.am is a key file in autoconf toolchains. Once you change it, you need to rebuild your tools.

AFAIK, you should be able to use autoreconf to rebuild configuration info, but this wasn’t enough for the Linuxes I was using.

Because the compile symlink was wrong, I had to invoke –add-missing. Apparently –add-missing was removed in a more recent version of autoconf/autoreconf. Instead, do this:

I’ll be honest, I don’t entirely understand the pieces, but this is what I needed and it worked.

Source: https://www.sourceware.org/autobook/autobook/autobook_43.html

TAR GZIP BZIP

Source: http://www.computerhope.com/unix/utar.htm

ARM CPU Details on Linux

Information about the CPU can be acquired by doing a “cat /proc/cpuinfo

What I’m interested in are the things on the Features line.

Meaning Reference: http://unix.stackexchange.com/a/43563

You can determine if a Linux has been compiled to use Hard Float (i.e. entirely hardware floats, instead of software floats, or software float calling conventions) like so:

Source: http://raspberrypi.stackexchange.com/a/4681

OS and Linux Architecture can be checked using uname:

ARM CPUINFO Feature strings

Info: https://wiki.debian.org/ArmHardFloatPort/VfpComparison
Args: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html

I’m not entirely sure which CPU Scaleway uses, but there are options:
Armada XP Cloud Processor (Quad Core): http://www.marvell.com/embedded-processors/armada-xp/

Parallella:

Scaleway C1:

Installing an OS Image on an SD Card

Download an image, and plug in an SD/MicroSD card.

Now, write the image as follows.

Noting that /dev/mmcblk0 is the name of the SD Card reader on my machine. We write to the device directly, not a partition (p1,p2), which in turn will create partitions.

Building MariaDB from Source

Get prerequisites.

Get latest source release. Go here for a URL, then wget that.

https://github.com/MariaDB/server/releases

MariaDB relies on cmake.

Installing MariaDB from sources

Reference: https://mariadb.com/kb/en/mariadb/Build_Environment_Setup_for_Linux/
Reference: https://mariadb.com/kb/en/mariadb/generic-build-instructions/
Reference: http://www.kitware.com/blog/home/post/434
Reference: https://dev.mysql.com/doc/refman/5.1/en/binary-installation.html