Mike Mallin's Homepagehttps://mremallin.ca/2022-11-29T00:00:00-05:00Xilinx ISE on an Apple M1 Pro - Rosetta 2 Edition2022-11-29T00:00:00-05:002022-11-29T00:00:00-05:00Mike Mallintag:mremallin.ca,2022-11-29:/2022/11/29/xilinx-ise-on-an-apple-m1-pro-rosetta-2-edition/<p>Let's keep going down the rabbit hole</p><p>Continuing on from my last post about running <a href="https://mremallin.ca/2022/10/24/xilinx-vivado-on-an-apple-m1-pro-rosetta-2-edition/">Xilinx Vivado</a> on an Apple M1 Pro machine, lets look into the older brother of Vivado, ISE.</p>
<p>This builds upon the past article so please start by reading and following that one first!</p>
<p>In preparation for install, the following additional packages are required:</p>
<div class="highlight"><pre><span></span><code>sudo apt-get install libncurses5:amd64 libsm6:amd64 libxmu6:amd64 libxm4:amd64 libxpm4:amd64 libstdc++5:amd64
</code></pre></div>
<p>After unpacking the ISE installer for Linux, the xsetup file will need to be modified, similar to how it was done for Vivado. Look for the following block:</p>
<div class="highlight"><pre><span></span><code>#<span class="w"> </span><span class="nv">run</span><span class="w"> </span><span class="nv">setup</span><span class="w"> </span><span class="nv">executable</span><span class="w"> </span><span class="nv">depending</span><span class="w"> </span><span class="nv">on</span><span class="w"> </span><span class="nv">different</span><span class="w"> </span><span class="nv">platform</span><span class="w"></span>
<span class="k">if</span><span class="w"> </span>[<span class="w"> </span><span class="s2">"$platform"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Linux"</span><span class="w"> </span>]<span class="w"></span>
<span class="k">then</span><span class="w"></span>
<span class="w"> </span><span class="nv">machineType</span><span class="o">=</span>`<span class="nv">uname</span><span class="w"> </span><span class="o">-</span><span class="nv">m</span>`<span class="c1">; # Get the machine type</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span>[<span class="w"> </span><span class="s2">"$machineType"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"x86_64"</span><span class="w"> </span>]<span class="w"></span>
<span class="w"> </span><span class="k">then</span><span class="w"></span>
<span class="w"> </span>#<span class="w"> </span><span class="mi">64</span><span class="w"> </span><span class="nv">bit</span><span class="w"></span>
</code></pre></div>
<p>And replace the <code>x86_64</code> platform with <code>aarch64</code>:</p>
<div class="highlight"><pre><span></span><code>#<span class="w"> </span><span class="nv">run</span><span class="w"> </span><span class="nv">setup</span><span class="w"> </span><span class="nv">executable</span><span class="w"> </span><span class="nv">depending</span><span class="w"> </span><span class="nv">on</span><span class="w"> </span><span class="nv">different</span><span class="w"> </span><span class="nv">platform</span><span class="w"></span>
<span class="k">if</span><span class="w"> </span>[<span class="w"> </span><span class="s2">"$platform"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Linux"</span><span class="w"> </span>]<span class="w"></span>
<span class="k">then</span><span class="w"></span>
<span class="w"> </span><span class="nv">machineType</span><span class="o">=</span>`<span class="nv">uname</span><span class="w"> </span><span class="o">-</span><span class="nv">m</span>`<span class="c1">; # Get the machine type</span><span class="w"></span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span>[<span class="w"> </span><span class="s2">"$machineType"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"aarch64"</span><span class="w"> </span>]<span class="w"></span>
<span class="w"> </span><span class="k">then</span><span class="w"></span>
<span class="w"> </span>#<span class="w"> </span><span class="mi">64</span><span class="w"> </span><span class="nv">bit</span><span class="w"></span>
</code></pre></div>
<p>Launch <code>xsetup</code> and you'll now be able to install ISE (I used version 14.7) in your VM.</p>
<p>Once installation is complete, you'll need to add the following symlinks for ISE to run:</p>
<div class="highlight"><pre><span></span><code>cd /lib/x86_64-linux-gnu/
sudo ln -s /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libXLicClientMgrFNP.so /lib/x86_64-linux-gnu/
sudo ln -s /usr/lib/x86_64-linux-gnu/libXpm.so.4 libXp.so.6
</code></pre></div>
<p>Note, the first shared library is found within the ISE installation directory so you may need to tweak the command depending on where you installed it.</p>
<p>You're now able to launch ISE and start compiling projects!</p>
<div class="highlight"><pre><span></span><code>cd /opt/Xilinx/14.7/ISE_DS
source settings64.sh
ise
</code></pre></div>
<p>I haven't played much with any of the in-circuit debugging tools so YMMV with how you use it. I find that the initial launch of ISE and associated tools can be very slow to see the first window, then it's relatively useful after that.</p>Xilinx Vivado on an Apple M1 Pro - Rosetta 2 Edition2022-10-24T00:00:00-04:002022-10-24T00:00:00-04:00Mike Mallintag:mremallin.ca,2022-10-24:/2022/10/24/xilinx-vivado-on-an-apple-m1-pro-rosetta-2-edition/<p>Rosetta 2 has no right to be this good</p><h1>Summary</h1>
<ul>
<li>Expect some bugs to appear</li>
<li>Stupid fast for what it is (within 20% - 30% of a 3800x for building <a href="https://github.com/ufrisk/pcileech-fpga">pcileech-fpga/ScreamerM2</a>)</li>
<li>Can't easily migrate an existing VM to add Rosetta 2 support (yet)</li>
</ul>
<h1>Short Version</h1>
<ul>
<li>Upgrade to MacOS 13</li>
<li>Upgrade to the latest UTM (4.0.9)</li>
<li>Create a new VM with Apple's virtualization framework as the backend (instead of QEMU)</li>
<li>Follow these steps to enable rosetta support: https://docs.getutm.app/advanced/rosetta/</li>
<li>Make the VM multiarch with <code>sudo dpkg --add-architecture amd64</code></li>
<li>Install all the necessary x86_64 packages for Vivado</li>
<li>Extract your choice of Vivado installer (<code>./Xilinx_Unified_2020.2_1118_1232_Lin64.bin --keep</code>)</li>
<li>Edit the setup script to skip the architecture check</li>
<li>Install Vivado</li>
<li>Edit the launcher script to skip the architecture check</li>
<li>Launch Vivado and enjoy!</li>
</ul>
<h1>Long Version</h1>
<p>The day has come with the release of MacOS 13 Ventura that Rosetta 2 is now available to Linux virtual machines! Apple has provided a handy way of exposing Rosetta 2 to the virtual machine via their <a href="https://developer.apple.com/documentation/virtualization/running_intel_binaries_in_linux_vms_with_rosetta">Virtualization framework</a>.</p>
<p>Once I had installed the new MacOS, I was eager to give it a try. I use <a href="https://getutm.app/">UTM</a> to run virtual machines on my M1 Pro. After the upgrade, I was hoping I could just tweak my existing VM to gain rosetta 2 support but unfortunately that is not possible. I had to create a brand new VM in order to switch from QEMU to Apple's Virtualization framework. I also tried to convert my existing qcow2 image to raw in hope I could import it that way but was unsuccessful. The VM would shutdown within a few seconds of booting while flashing an error message on screen.</p>
<p>This led to creating a new VM for just FPGA development... One Debian netinstall later and I'm staring at a fresh VM waiting to explore. After installing Debian, and the <code>binfmt-support</code> package I continued with the <a href="https://docs.getutm.app/advanced/rosetta/">instructions here</a> to enable Rosetta 2 within my VM.</p>
<p>You can verify that the VM is ready to direct x86_64 executables to Rosetta 2 by running <code>/usr/sbin/update-binfmts --display</code> and looking for <code>rosetta</code> in the output:</p>
<div class="highlight"><pre><span></span><code>rosetta (enabled):
package = <local>
type = magic
offset = 0
magic = \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00
mask = \xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff
interpreter = /media/rosetta/rosetta
detector =
</code></pre></div>
<p>With Rosetta 2 available, we can now turn to getting the system setup for x86_64 executables. First thing to do is to enable multiarch support with <code>sudo dpkg --add-architecture amd64</code>. Verify that there is now an <code>amd64</code> entry in the output of <code>dpkg --print-foreign-architectures</code>.</p>
<h2>Necessary Packages</h2>
<p>After adding multiarch support to the VM, make sure to update the package repository (<code>sudo apt-get update</code>) before continuing. The following is the list of packages needed to see Vivado through from installer to a successful build:</p>
<div class="highlight"><pre><span></span><code>sudo apt-get install gcc-10-base:amd64 glib-networking:amd64 libatk-bridge2.0-0:amd64 libatk1.0-0:amd64 libatspi2.0-0:amd64 libavahi-client3:amd64 libavahi-common-data:amd64 libavahi-common3:amd64 libblkid1:amd64 libbrotli1:amd64 libbsd0:amd64 libc6:amd64 libcairo-gobject2:amd64 libcairo2:amd64 libcolord2:amd64 libcom-err2:amd64 libcrypt1:amd64 libcups2:amd64 libdatrie1:amd64 libdbus-1-3:amd64 libdeflate0:amd64 libepoxy0:amd64 libexpat1:amd64 libffi7:amd64 libfontconfig1:amd64 libfreetype6:amd64 libfribidi0:amd64 libgcc-s1:amd64 libgcrypt20:amd64 libgdk-pixbuf-2.0-0:amd64 libglib2.0-0:amd64 libgmp10:amd64 libgnutls30:amd64 libgpg-error0:amd64 libgraphite2-3:amd64 libgssapi-krb5-2:amd64 libgtk-3-0:amd64 libharfbuzz0b:amd64 libhogweed6:amd64 libicu67:amd64 libidn2-0:amd64 libjbig0:amd64 libjpeg62-turbo:amd64 libjson-glib-1.0-0:amd64 libk5crypto3:amd64 libkeyutils1:amd64 libkrb5-3:amd64 libkrb5support0:amd64 liblcms2-2:amd64 liblz4-1:amd64 liblzma5:amd64 libmd0:amd64 libmount1:amd64 libnettle8:amd64 libnsl2:amd64 libnss-nis:amd64 libnss-nisplus:amd64 libp11-kit0:amd64 libpango-1.0-0:amd64 libpangocairo-1.0-0:amd64 libpangoft2-1.0-0:amd64 libpcre2-8-0:amd64 libpcre3:amd64 libpixman-1-0:amd64 libpng16-16:amd64 libproxy1v5:amd64 libpsl5:amd64 librest-0.7-0:amd64 librsvg2-2:amd64 librsvg2-common:amd64 libselinux1:amd64 libsoup-gnome2.4-1:amd64 libsoup2.4-1:amd64 libsqlite3-0:amd64 libssl1.1:amd64 libstdc++6:amd64 libsystemd0:amd64 libtasn1-6:amd64 libthai0:amd64 libtiff5:amd64 libtinfo5:amd64 libtirpc3:amd64 libudev1:amd64 libunistring2:amd64 libuuid1:amd64 libwayland-client0:amd64 libwayland-cursor0:amd64 libwayland-egl1:amd64 libwebp6:amd64 libx11-6:amd64 libxau6:amd64 libxcb-render0:amd64 libxcb-shm0:amd64 libxcb1:amd64 libxcomposite1:amd64 libxcursor1:amd64 libxdamage1:amd64 libxdmcp6:amd64 libxext6:amd64 libxfixes3:amd64 libxi6:amd64 libxinerama1:amd64 libxkbcommon0:amd64 libxml2:amd64 libxrandr2:amd64 libxrender1:amd64 libxtst6:amd64 libzstd1:amd64 zlib1g:amd64
</code></pre></div>
<p>Unfortunately I lost track of my shell history and don't have the condensed list of packages which expanded to this. Sorry!</p>
<h1>Installing Vivado</h1>
<p>Now we can get to the main event! Installing and running Xilinx Vivado. For my use, I installed version 2020.2. I'd hope that the edits made are similar across multiple versions.</p>
<p>First thing to get started is to unpack the installer. I used the net installer version, though I'd assume that the complete package version is also similar. The installer can be unpacked by adding the argument <code>--keep</code> to its invocation. This will extract all of it's contents to a folder of its choice (<code>removeLin64</code> in my case.)</p>
<p>Navigate to that folder and open the xsetup script for editing. Look for a block of code that looks like:</p>
<div class="highlight"><pre><span></span><code># ERROR out if this installation is running on 32 bit OS
# and does not support 32 bit installation
if [ "$(uname -m)" != "x86_64" ]; then
# check that the 32 bit library directory exist or not
lnx32LibDir="<span class="cp">${</span><span class="n">workingDir</span><span class="cp">}</span>/lib/lnx32.o"
if [ ! -d <span class="nv">$lnx32LibDir</span> ]; then
# terminate with an ERROR
echo "ERROR: This installation is not supported on 32 bit platforms."
exit 1;
fi
fi
</code></pre></div>
<p>Then comment it out so it looks like:</p>
<div class="highlight"><pre><span></span><code># ERROR out if this installation is running on 32 bit OS
# and does not support 32 bit installation
#if [ "$(uname -m)" != "x86_64" ]; then
# # check that the 32 bit library directory exist or not
# lnx32LibDir="<span class="cp">${</span><span class="n">workingDir</span><span class="cp">}</span>/lib/lnx32.o"
# if [ ! -d <span class="nv">$lnx32LibDir</span> ]; then
# # terminate with an ERROR
# echo "ERROR: This installation is not supported on 32 bit platforms."
# exit 1;
# fi
#fi
</code></pre></div>
<p>This will allow you to start the installer and get Vivado installed. Select the options you'd like and let it run. On my machine, it took about 30m to install. 20m to download and another 10m to install.</p>
<p>During installation, I ran into my first major issue. About 80% of the way through the download, the VM hard locked. This required a few reboots to recover as I had to manually run fsck before my drive would get mounted as <code>rw</code> instead of <code>ro</code> due to the errors. On the plus side, once I restarted the installer it picked up right where it left off. This was a good intro to the performance seen with Rosetta 2 as it was verifying the previously downloaded files at north of 800Mb/s! Super fast!</p>
<p>After that minor hiccup, the rest of the installation proceeded without fail.</p>
<h1>Running Vivado</h1>
<p>Similar to the installation script, the main Vivado executable also checks the system architecture before proceeding. Edit the file <code>/<path to your install folder>/Vivado/<Version>/bin/loader</code> and look for the following block:</p>
<div class="highlight"><pre><span></span><code><span class="nt">case</span><span class="w"> </span><span class="err">`</span><span class="nt">uname</span><span class="w"> </span><span class="nt">-m</span><span class="err">`</span><span class="w"> </span><span class="nt">in</span><span class="w"></span>
<span class="w"> </span><span class="nt">x86_64</span><span class="o">)</span><span class="w"></span>
<span class="w"> </span><span class="o">;;</span><span class="w"></span>
<span class="w"> </span><span class="o">*)</span><span class="w"></span>
<span class="w"> </span><span class="nt">echo</span><span class="w"> </span><span class="nt">1</span><span class="o">>&</span><span class="nt">2</span><span class="w"> </span><span class="s2">"Unsupported architecture: `uname -m`"</span><span class="w"></span>
<span class="w"> </span><span class="nt">exit</span><span class="w"> </span><span class="nt">1</span><span class="w"></span>
<span class="w"> </span><span class="o">;;</span><span class="w"></span>
<span class="nt">esac</span><span class="w"></span>
</code></pre></div>
<p>Then comment out the exit:</p>
<div class="highlight"><pre><span></span><code><span class="nt">case</span><span class="w"> </span><span class="err">`</span><span class="nt">uname</span><span class="w"> </span><span class="nt">-m</span><span class="err">`</span><span class="w"> </span><span class="nt">in</span><span class="w"></span>
<span class="w"> </span><span class="nt">x86_64</span><span class="o">)</span><span class="w"></span>
<span class="w"> </span><span class="o">;;</span><span class="w"></span>
<span class="w"> </span><span class="o">*)</span><span class="w"></span>
<span class="w"> </span><span class="nt">echo</span><span class="w"> </span><span class="nt">1</span><span class="o">>&</span><span class="nt">2</span><span class="w"> </span><span class="s2">"Unsupported architecture: `uname -m`"</span><span class="w"></span>
<span class="w"> </span><span class="p">#</span><span class="nn">exit</span><span class="w"> </span><span class="nt">1</span><span class="w"></span>
<span class="w"> </span><span class="o">;;</span><span class="w"></span>
<span class="nt">esac</span><span class="w"></span>
</code></pre></div>
<p>I left the warning message in place as a reminder that this is not really supported. Once saved, you should be able to launch and run Vivado as usual.</p>
<h1>Benchmarks</h1>
<table>
<thead>
<tr>
<th>Computer</th>
<th>Project Generation</th>
<th>Synthesis</th>
<th>Implementation</th>
<th>Bitstream Generation</th>
</tr>
</thead>
<tbody>
<tr>
<td>2020 Ryzen 7 Tower (16 threads)</td>
<td>22s (cache primed), 50s (first boot)</td>
<td>1m42s</td>
<td>3m02s</td>
<td>22s</td>
</tr>
<tr>
<td>2022 MacBook Pro (Rosetta 2 - 8 threads)</td>
<td>26s</td>
<td>2m04s</td>
<td>4m09s</td>
<td>28s</td>
</tr>
<tr>
<td>2012 MacBook Air (2 threads)</td>
<td>36s</td>
<td>3m26s</td>
<td>7m20s</td>
<td>37s</td>
</tr>
</tbody>
</table>
<p>I've put the chart out first as it speaks volumes to the work Apple has done to polish Rosetta 2. I'll be the first to admit it's not a direct apples-to-apples comparison, but it's definitely a surprising result. These are here to give a rough ballpark as to what you can expect from running your Linux workloads using Rosetta 2. For starters, the disk performance is very different between my Ryzen tower and my M1 Pro; the tower uses a SATA SSD for Linux and a 4Tb WD Red Pro for data drive (Vivado is installed to the Red+) whereas the M1 Pro has a PCIe based SSD running everything.</p>
<h2>Ryzen 7 Tower Specifications</h2>
<ul>
<li>AMD Ryzen 7 3800x</li>
<li>Gigabyte x570 Aorus Pro Wifi Motherboard</li>
<li>32Gb DDR4-2600 ECC RAM</li>
<li>MSI RTX3070</li>
<li>Samsung 840 Pro SATA SSD (Linux Boot Drive)</li>
<li>WD Red Pro 4TB (ZFS Data Drive)</li>
</ul>
<h1>Conclusion</h1>
<p>I'm quite amazed as to the amount of performance available on this laptop. I was hoping to get somewhere above the 2012 MacBook Air, not within spitting distance of my desktop! I've played around a bit in Vivado to check some of the features/functionality but there's been nothing obviously broken so far. Another night will be needed to see if I can still use any of the FPGA debugging features within Vivado.</p>
<p>This is a solid showing by Apple with the performance of both the M1 Pro and Rosetta 2 with a few minor bumps along the way.</p>Baba's Pasta Sauce Recipie2022-09-14T00:00:00-04:002022-09-14T00:00:00-04:00Mike Mallintag:mremallin.ca,2022-09-14:/2022/09/14/babas-pasta-sauce-recipie/<p>Deliciously simple</p><p>Some days you just want to eat something that feels comforting. For me, that's my Baba's pasta sauce recipie which I'd like to share below. Enjoy!</p>
<h1>Ingredients</h1>
<ul>
<li>1/2 Medium Onion, diced</li>
<li>1 Can Corned Beef</li>
<li>2 Cups (500mL) of Garden Cocktail, Vegetable Helper or V8 Juice</li>
</ul>
<h1>Preparation</h1>
<ol>
<li>In a medium sauce pan, fry the onions over medium-high heat</li>
<li>Once the onions have become translucent (before browning), add the can of corned beef</li>
<li>After a few minutes, the texture of the corned beef will change and it will start flaking apart. Once all the beef has been broken down, add the Garden Cocktail and simmer for 5m until all the juice is warmed up</li>
<li>Serve over fresh pasta or rice</li>
</ol>Xilinx Vivado on an Apple M1 Pro2022-08-27T00:00:00-04:002022-08-27T00:00:00-04:00Mike Mallintag:mremallin.ca,2022-08-27:/2022/08/27/xilinx-vivado-linux-apple-m1/<p>It's only a matter of time...</p><p>I recently picked up a new 14" MacBook Pro and have started to migrate all of my projects to it as my single, portable workstation. Besides gaming, the only thing at this time that requires an x86_64 processor are the FPGA toolchains I use on occasion. I figured this would be a good time to see what the current state of x86_64 emulation is on the Apple M1 processors.</p>
<p>The first thing I tried out was using <a href="https://getutm.app">UTM</a> to emulate a debian x86_64 installation. I thought this would be fairly close to my old laptop setup (2012 MacBook Air, i7, 8GB Ram + 16GB Swap, Arch x86_64) in performance. That is not the case at the moment. The main limitation at the moment is that QEMU (which UTM is based on) only supports single-core emulation of x86-family CPUs. It wasn't too bad getting Debian 11 installed in emulation, roughly 30m or so. Vivado was a lot more painful unfortunately. I started off with the Web installer of 2020.2. I gave up after 4 hours as it was only downloading at 500KB/s - 1MB/s. I downloaded the complete installer from MacOS and scp'd it over in less than 30m... Installing it from disk wasn't too bad and it took 1h 3m to copy all the files. I'll let the next table speak for itself. This is a very rough benchmark for building <a href="https://github.com/ufrisk/pcileech-fpga">pcileech-fpga/ScreamerM2</a> from scratch.</p>
<table>
<thead>
<tr>
<th>Computer</th>
<th>Project Generation</th>
<th>Synthesis</th>
<th>Implementation</th>
<th>Bitstream Generation</th>
</tr>
</thead>
<tbody>
<tr>
<td>2012 MacBook Air</td>
<td>36s</td>
<td>3m26s</td>
<td>7m20s</td>
<td>37s</td>
</tr>
<tr>
<td>2022 MacBook Pro</td>
<td>2m40s</td>
<td>2h50m</td>
<td>1h10m</td>
<td>4m41s</td>
</tr>
</tbody>
</table>
<p>As you can see, even a 10 year old computer is still 10x faster than x86 emulation on a M1 Pro.</p>
<p>You may be thinking, "what about running a native OS and only emulating Vivado?" That's a very good point! There are two options for this that I know of:</p>
<ol>
<li>Run Windows 11 ARM - Dev Branch Insider Edition in the hypervisor and rely on windows to translate the x86_64 binary</li>
<li>Wait for MacOS 13 and the exposure of Rosetta 2 to hypervisor guests. See <a href="https://github.com/utmapp/UTM/issues/4100">UTM #4100</a> for details.</li>
</ol>
<p>I attempted 1. after the excruciating wait for Debian to finish building. This time things were much faster and almost approaching the level of performance as the old MacBook Air. Project generation was within spitting distance at 42s. Unfortunately that's where all the good luck ran out. I ran into crash every time I tried to launch the Vivado GUI. I used TCL mode from the command promt to generate the project but when starting the build one of the subprocesses would always hang during out-of-module synthesis of the IP. I tried deleting and rebuilding the project many times but was unable to get past this step.</p>
<p>As you can see, it's really promising that it's theoretically possible to run and use Vivado on the M1-series CPUs, but the performance and stability isn't there yet. I'm hopeful that this will change over the coming years as the emulation infrastructure is built out further.</p>Xilinx Vivado 2020.2 Not Starting on Linux2022-04-09T00:00:00-04:002022-04-09T00:00:00-04:00Mike Mallintag:mremallin.ca,2022-04-09:/2022/04/09/xilinx-vivado-linux-not-starting/<p>Missing libxcrypt-compat</p><p>After some recent system updates, I found that Vivado was no longer starting on my Linux box. The following error was seen:</p>
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="o">~</span><span class="p">]</span><span class="o">$</span><span class="w"> </span><span class="n">vivado</span><span class="w"></span>
<span class="o">******</span><span class="w"> </span><span class="n">Vivado</span><span class="w"> </span><span class="n">v2020</span><span class="o">.</span><span class="mi">2</span><span class="w"> </span><span class="p">(</span><span class="mi">64</span><span class="o">-</span><span class="n">bit</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="o">****</span><span class="w"> </span><span class="n">SW</span><span class="w"> </span><span class="n">Build</span><span class="w"> </span><span class="mi">3064766</span><span class="w"> </span><span class="n">on</span><span class="w"> </span><span class="n">Wed</span><span class="w"> </span><span class="n">Nov</span><span class="w"> </span><span class="mi">18</span><span class="w"> </span><span class="mi">09</span><span class="p">:</span><span class="mi">12</span><span class="p">:</span><span class="mi">47</span><span class="w"> </span><span class="n">MST</span><span class="w"> </span><span class="mi">2020</span><span class="w"></span>
<span class="w"> </span><span class="o">****</span><span class="w"> </span><span class="n">IP</span><span class="w"> </span><span class="n">Build</span><span class="w"> </span><span class="mi">3064653</span><span class="w"> </span><span class="n">on</span><span class="w"> </span><span class="n">Wed</span><span class="w"> </span><span class="n">Nov</span><span class="w"> </span><span class="mi">18</span><span class="w"> </span><span class="mi">14</span><span class="p">:</span><span class="mi">17</span><span class="p">:</span><span class="mi">31</span><span class="w"> </span><span class="n">MST</span><span class="w"> </span><span class="mi">2020</span><span class="w"></span>
<span class="w"> </span><span class="o">**</span><span class="w"> </span><span class="n">Copyright</span><span class="w"> </span><span class="mi">1986</span><span class="o">-</span><span class="mi">2020</span><span class="w"> </span><span class="n">Xilinx</span><span class="p">,</span><span class="w"> </span><span class="n">Inc</span><span class="o">.</span><span class="w"> </span><span class="n">All</span><span class="w"> </span><span class="n">Rights</span><span class="w"> </span><span class="n">Reserved</span><span class="o">.</span><span class="w"></span>
<span class="n">couldn</span><span class="s1">'t load file "librdi_tcltasks.so": libcrypt.so.1: cannot open shared object file: No such file or directory</span>
<span class="n">Could</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nb">load</span><span class="w"> </span><span class="n">library</span><span class="w"> </span><span class="s1">'librdi_tcltasks'</span><span class="w"> </span><span class="n">needed</span><span class="w"> </span><span class="n">by</span><span class="w"> </span><span class="s1">'core'</span><span class="p">,</span><span class="w"> </span><span class="n">please</span><span class="w"> </span><span class="n">check</span><span class="w"> </span><span class="n">installation</span><span class="o">.</span><span class="w"></span>
<span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="n">executing</span><span class="w"></span>
<span class="s2">"error "</span><span class="o">$</span><span class="n">result</span>\<span class="n">nCould</span><span class="w"> </span><span class="ow">not</span><span class="w"> </span><span class="nb">load</span><span class="w"> </span><span class="n">library</span><span class="w"> </span><span class="s1">'$library'</span><span class="w"> </span><span class="n">needed</span><span class="w"> </span><span class="n">by</span><span class="w"> </span><span class="s1">'$feature'</span><span class="p">,</span><span class="w"> </span><span class="n">please</span><span class="w"> </span><span class="n">check</span><span class="w"> </span><span class="n">installation</span><span class="o">.</span><span class="s2">""</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="n">procedure</span><span class="w"> </span><span class="s2">"rdi::load_library"</span><span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="mi">4</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="n">invoked</span><span class="w"> </span><span class="n">from</span><span class="w"> </span><span class="n">within</span><span class="w"></span>
<span class="s2">"rdi::load_library core librdi_tcltasks"</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="n">file</span><span class="w"> </span><span class="s2">"/opt/Xilinx/Vivado/2020.2/lib/scripts/rdi/features/core/core.tcl"</span><span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="mi">5</span><span class="p">)</span><span class="w"></span>
<span class="n">ERROR</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="n">Common</span><span class="w"> </span><span class="mi">17</span><span class="o">-</span><span class="mi">217</span><span class="p">]</span><span class="w"> </span><span class="n">Failed</span><span class="w"> </span><span class="n">to</span><span class="w"> </span><span class="nb">load</span><span class="w"> </span><span class="n">feature</span><span class="w"> </span><span class="s1">'core'</span><span class="o">.</span><span class="w"></span>
<span class="n">INFO</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="n">Common</span><span class="w"> </span><span class="mi">17</span><span class="o">-</span><span class="mi">206</span><span class="p">]</span><span class="w"> </span><span class="n">Exiting</span><span class="w"> </span><span class="n">Vivado</span><span class="w"> </span><span class="n">at</span><span class="w"> </span><span class="n">Sat</span><span class="w"> </span><span class="n">Apr</span><span class="w"> </span><span class="mi">9</span><span class="w"> </span><span class="mi">20</span><span class="p">:</span><span class="mi">38</span><span class="p">:</span><span class="mi">20</span><span class="w"> </span><span class="mf">2022.</span><span class="o">..</span><span class="w"></span>
</code></pre></div>
<p>This was fixed by installing <code>libxcrypt-compat</code>.</p>Insuring a Modified Car in Ontario2020-06-14T00:00:00-04:002020-06-14T00:00:00-04:00Mike Mallintag:mremallin.ca,2020-06-14:/2020/06/14/insuring-modified-car-ontario/<p>Lots of small things to consider and plan for!</p><p>I hope you're all staying healthy and safe during these odd times. I'd like to share my adventures in insuring my modified Miata as I found it was hard to find good information on the process. I'm lucky to have had a friend go through a similar ordeal when he insured his modified car and his guidance was extremely helpful here.</p>
<p>This does not substitute for talking to your insurer and this information may not be accurate for your circumstances. This is a record of my experiences in hopes that some parts may be useful to you.</p>
<h1>So you want to purchase and insure a modified car in Ontario?</h1>
<p>Let's start with my personal definition of a modified car:</p>
<blockquote>
<p>A car that has been modified to increase performance.</p>
</blockquote>
<p>Performance being a blanket statement here. It could mean cornering, acceleration, ride height, anything. Most insurance companies will insure lightly modified cars; stuff like sway bars, stereos, lights. Of course, your mileage may vary depending on your circumstances and insurer/underwriter. Every single one has a different answer as to what kind of modifications (and associated risk) they will accept.</p>
<p>As a rule of thumb, the following will disqualify you from most Ontario insurance companies:
* Lowered suspensions
* Any engine modifications after the intake (cams, after market turbochargers or superchargers)
* Any exhaust modifications before the catalytic converter (exhaust manifolds)
* Custom paintwork
* Non-OEM body work/modifications</p>
<p>In my case here, I have a lowered Miata. As soon as I said lowered, this cut my insurance options to two: <a href="https://www.hagerty.ca/">Hagerty</a> and <a href="http://www.facilityassociation.com/">Facility</a>.</p>
<h1>Finding Insurance</h1>
<h2>Hagerty</h2>
<p>This is the usual choice for most car enthusiasts to insure their toys. Their rates are low as they cater to the classic car and modified car crowds. One of the drawbacks is that there can often be a lot of limitations on usage to get their low rates. Mileage and other users come to mind. Anecdotally, after being bought out by Aviva they have been more strict on modifications than in past years. After going though the application, I did end up getting rejected from coverage. That leaves the remaining option, Facility.</p>
<h2>Facility</h2>
<p>This is the catch-all insurer for Ontario. They will insure people that nobody else will insure. Think multiple DUIs, accidents, and so on. You'll need to find a broker/agent to go through them. I was lucky enough that my existing insurer was able to apply on my behalf for me which greatly simplified the process. The process was similar to any other provider I've been with except for the additional documentation for modifications.</p>
<p>When documenting your modifications, make sure that you have the receipts for them. These are <em>essential</em> to determining the value of modifications added to your vehicle. The value is based on the list price without tax or shipping. If you ordered from another country and didn't use Canadian dollars (CAD) for currency then you may convert back into CAD. Supporting receipts and documentation to show the exchange rate on the day you paid that will also help. You'll also need to have a value of the car when signing up so they can insure you in the right category. Price-wise, you will be paying a modest premium for their services. Just remember, if you're insured with someone and the modifications are not declared and sanctioned, there may be difficulties in case of a claim. </p>
<h1>Appraisals</h1>
<p>I ended up getting two appraisals for my Miata; One for MTO and one for Insurance. Anecdotally, the rules have changed as to who can give an appraisal for MTO (registration purposes). Only car dealerships and those accredited by the Ministry can. You'll need to get your car to a dealership in order for them to appraise it.</p>
<p>I also chose to get an insurance appraisal so that my insurance knows where the number I put comes from. In the event of an incident, they will be more likely to pay out based on the appraised value. I ended up using the services of Marc Racine of <a href="https://www.facebook.com/pristineappraisals/">Pristine Appraisals</a> He was very friendly, courteous and was able to answer all of my questions about the process. His report on my Miata was very detailed and gave me pointers on what to work on if I wanted to increase the value of the car.</p>
<h1>Registration @ MTO</h1>
<p>Once insurance is sorted, registration is like any other car. Go to MTO with your license, bill of sale, MTO appraisal, signed ownership, and proof of insurance, safety and you'll be set!</p>
<p>One thing to note for the future, if you're in a catch-22 where you need the appraisal to get insurance, insurance to get the registered fit ownership, and registered ownership to finalize the appraisal it is possible to break the cycle. I didn't know it at the time but it's possible to get a temporary permit even before you've registered the vehicle as yours in order to drive it around and get safety and appraisals done before registering it as your car.</p>
<p>If you forget, you'll be towing your car around a lot before you can get it on the road... Ask me how I know!</p>New Decade, New Fun2020-01-14T00:00:00-05:002020-01-14T00:00:00-05:00Mike Mallintag:mremallin.ca,2020-01-14:/2020/01/14/new-decade-new-fun/<p>2020 is just another fun year ahead</p><p>Happy New Years all! What a way to wrap up the past decade. It's certainly been an exciting one full of many unplanned twists and turns. Thanks to all my friends for being awesome! I'm very priviledged to have all of these memories with you. Here's hoping the coming year brings many more fond ones.</p>
<p>Over the holidays, I was reading Hacker News where I came across a <a href="https://news.ycombinator.com/item?id=21879397">Christmas Tree</a> on the front page. It's a cool little animation that really caught my eye. It's been a while since I coded up a small ornament so I decided to attempt it in C (and OpenGL). It took a few days of effort and I'm very <a href="https://github.com/mremallin/christmas_tree">pleased with the results</a>. After trying to find a set of tutorials for coding in OpenGL3 it was fairly straightforward to get it working well on both my laptop and desktop at full speed.</p>
<p>For a laugh, I tried loading it on a Raspberry Pi (Model 1B) that I had kicking around. Without any changes, I'm only getting 2fps when it runs... I think I'll spend a bit of time working through optimizing it for a much smaller and constrained platform. It'll be nice to play around with some in-depth optimization again. I'll definitely be posting more as I optimize it!</p>2ZZ-GE Low Power While In Lift2019-03-03T00:00:00-05:002019-03-03T00:00:00-05:00Mike Mallintag:mremallin.ca,2019-03-03:/2019/03/03/2zz-slow-lift/<p>It's an older car, there's bound to be small things</p><p>I've been noticing over the past few months that whenever I would enter lift (~6200rpm) in my Matrix that sometimes it would only creep up to the redline and not go flying up. This has been pretty intermittent and has not thrown any check engine lights. Sometimes I would still get the expected surge of acceleration for weeks at a time only to have it go slowly for a day or so.
I found a <a href="https://www.pistonheads.com/gassing/topic.asp?t=1221852">forum thread here</a> describing a similar issue but on a Lotus. The <a href="http://www.youtube.com/watch?v=ISZrgxqvFCo">video linked in the first post</a> shows exactly what I've been seeing. In the comments, he talked about cleaning the MAF and seeing the problem go away. I decided to do that, and I found that the sensor on the MAF was coated in gunk. A few shots of sensor cleaner later and it was looking like new. I went for a test drive and found that the changeover from small cam to big cam was much smoother and the power was much more consistent according to the butt-dyno. I've got some data to sort through and I'll see if there's anything noticeable in the graphs.</p>Solidoodle 3 Back Online2019-02-26T00:00:00-05:002019-02-26T00:00:00-05:00Mike Mallintag:mremallin.ca,2019-02-26:/2019/02/26/solidoodle-3-back-online/<p>Calibration, calibration, calibration...</p><p>I have a new project on the way that's going to need a bit of room in my basement. After re-organizing I needed a place for my Solidoodle 3 to live. Turns out there's plenty of space by my desk to keep it around. It was a bit of an ordeal to get it back online and printing nicely.</p>
<h1>Step the First: Where's Solidoodle?</h1>
<p>Turns out that Solidoodle went out of business a few years back. This put a bit of a wrench into things as their <a href="http://www.solidoodle.com/">site was practically closed</a>, save for some software links. The software currently posted is not compatible with my (older) printer. The software that does work was a package based on Repetier and Slic3r. I found a site that's still hosting them <a href="http://www.soliwiki.com/Official_Solidoodle_Software_Download">here</a>. The one you would need is the 'Repetier Host Package.'</p>
<h1>Step the Second: Linux?</h1>
<p>It's really awesome that there is an available Linux package. Personally, I'd prefer to run a version that's a bit more up to date. In this case, I installed Repetier and Slic3r from the Arch User Repository for my desktop. Now that I had software, I needed calibration information</p>
<h1>Step the Third: Windows?</h1>
<p>I installed the Repetier host software on my Windows partition as that's how I used to use it. I knew that worked in the past so that's where I started today. Once it was installed, I spent a bit of time digging through the files for Repetier and Slic3r to get the base settings for the printer to base my own calibrations from.</p>
<h1>Step the Fourth: Calibrate, calibrate some more, and do it again.</h1>
<p>After I had the base settings, I followed the <a href="http://wiki.solidoodle.com/solidoodle-1">calibration guide</a> that I found. Seriously, levelling the bed was one of the best things that improved my print quality since the last time I tried a few years ago. I used to have issues with prints lifting and flying away almost every time. Now it's been reduced to odd or thin parts. I've posted my current settings below for future reference.</p>
<h1>Step the Fifth: What's next?</h1>
<p>Printing more things of course! In order to do that, I need software to create the parts. I came across <a href="https://www.freecadweb.org/">FreeCAD</a> which seems to be a decent drop-in replacement for SolidWorks. I'll talk some more about it and post the part I made in a future post.
<a href="https://www.thingiverse.com/thing:3109785">The phone holder showcased is from here.</a></p>
<p>Filament (ABS)</p>
<ul>
<li>Diameter: 1.74mm</li>
<li>Extrusion Multiplier: 0.68</li>
<li>Temperature:</li>
<ul>
<li>Extruder: First Layer - 208, Other Layers - 203</li>
<li>Bed: First Layer - 95, Other Layers - 90</li>
</ul>
</ul>
<p>Print Settings</p>
<ul>
<u>Layers and perimeters</u>
<li>Layer height: 0.3mm</li>
<li>First layer height: 0.35mm</li>
<li>Vertical shells: 3</li>
<li>Solid layers: Top - 3, Bottom - 3</li>
<li>Extra permimeters if needed: Yes</li>
<li>Avoid crossing perimeters</li>
<li>Detect thin walls: Yes</li>
<li>Detect bridging permiters: Yes</li>
<li>Seam position: Aligned</li>
<u>Infill</u>
<li>Fill density: 10% (Changes per print)</li>
<li>Fill pattern: Rectilinear (Changes per print)</li>
<li>Combine infill every: 1 layer</li>
<li>Fill gaps: Yes</li>
<li>Fill angle: 45</li>
<li>Solid infill threshold area: 70</li>
<li>Only retract when crossing perimeters: Yes</li>
<u>Skirt and brim</u>
<li>Loops (minimum): 3</li>
<li>Distance from object: 5mm</li>
<li>Skirt height: 1 layer</li>
<li>Exterior brim width: 3mm</li>
<li>Interior brim width: 3mm</li>
<u>Speed</u>
<li>Perimiters: 30mm/s</li>
<li>-> Small: 30mm/s</li>
<li>-> External: 70%</li>
<li>Infill: 50mm/s</li>
<li>-> Solid: 50mm/s</li>
<li>-> Top Solid: 50mm/s</li>
<li>-> Gaps: 20mm/s</li>
<li>Bridges: 60mm/s</li>
<li>Support Material: 60mm/s</li>
<li>Travel: 130mm/s</li>
<li>First layer speed: 30mm/s</li>
<u>Advanced</u>
<li>Default extrusion width: 0.42mm</li>
<li>First layer: 220%</li>
<li>Infill/perimeters overlap: 55%</li>
</ul>
<p>Printer Settings</p>
<ul>
<u>General</u>
<li>Bed Shape: x - 195mm, y - 195mm</li>
<li>Speed: 250000</li>
<li>G-code flavor: RepRap (Marlin/Sprinter)</li>
<u>Custom G-code</u>
<li>See below</li>
<u>Extruder 1</u>
<li>Nozzle diameter: 0.4mm</li>
<li>Min limit: 0.15mm</li>
<li>Max limit: 0.3mm</li>
<li>Extruder offset: x - 0mm, y - 0mm</li>
<li>Retraction length: 1mm</li>
<li>Retraction speed: 30mm/s</li>
<li>Minimum travel after retraction: 2mm</li>
<li>Retract on layer change: Yes</li>
</ul>
<p>Starting G-code:</p>
<blockquote>
<div class="highlight"><pre><span></span><code>G21; set mm units
G90; set absolute coordinates
G28 X0 Y0; home x and y axes
G1 X100 Y100 F4000; move extruder above bed
G28 Z0; home Z axis
G92 E0; reset extrusion distance
</code></pre></div>
</blockquote>
<p>End G-code:</p>
<blockquote>
<div class="highlight"><pre><span></span><code>G92 E0; reset extrusion distance
G1 E-3 F1000; linear move, retract 3mm extruder, 1000mm/s feedrate
G28 X0 Y0; home X, Y axis
</code></pre></div>
</blockquote>Linux Kernel 4.19 Compilation failure on Debian 92018-12-30T00:00:00-05:002018-12-30T00:00:00-05:00Mike Mallintag:mremallin.ca,2018-12-30:/2018/12/30/linux-kernel-4.19-compile-failure-debian-9/<p>Note, don't nuke a debian install unless you're really sure...</p><p>I've spent a good chunk of the day trying to compile a new kernel for my Debian install in order to test out a sound card patch. There's a lovely <a href="https://www.reddit.com/r/SoundBlasterOfficial/comments/9mm5ad/sound_blaster_r3dr3dizzxrae5_linux_driver/">reddit thread here</a> which descibes a potential patch for using a Sound Blaster Zx under Linux.</p>
<p>When attempting to build the kernel with this patch, I came across the following missing package dependencies when building on Debian 9:</p>
<ul>
<li>bison</li>
<li>flex</li>
<li>libelf-dev</li>
</ul>
<p>The last one caused me a lot of pain due to the following compilation errors:</p>
<blockquote>
<p>CC /home/mmallin/src/kernel/linux-4.19.13/tools/objtool/special.o
In file included from /usr/include/gelf.h:32:0,
from elf.h:22,
from check.h:22,
from builtin-orc.c:29:
/usr/include/libelf.h:46:4: error: unknown type name ‘Elf32_Word’
Elf32_Word ch_type; /<em> Compression format. </em>/
^~~~~~~~~~</p>
</blockquote>
<p>Turns out <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1528020">according to this thread</a> it is my CPATH environment variable causing issues with the libelf header inclusion. Clearing the environment variable fixed the above compilation issue.</p>Thermal Paste Replacement of a Mac Mini Knockoff2018-11-02T00:00:00-04:002018-11-02T00:00:00-04:00Mike Mallintag:mremallin.ca,2018-11-02:/2018/11/02/mini-thermal-paste/<p>Too much heat for me!</p><p>For the past few years I had a Mac Mini knock-off as a pfSense router. It's a little dual-core celeron that served me well until it started getting unstable and halting every few weeks. The replacement I picked up from pcEngines and I'll talk about it another day. After this little guy got retired from routing, I decided to install Kodi on it and use it in my media centre.</p>
<p>It seemed to do a bit better in that role, but still had some instability issues. I had enough of it tonight and decided to crack it open to see if there's anything I could do. I was in luck as after removing the motherboard I was greeted by some nice shiny dies and a ton of thermal paste.</p>
<p>I cleaned up the dies and thermal interface block with some ArticClean and applied some fresh Artic Silver 5 before reassembly. It's been running for a few minutes now and the load temperature has stabilized at 47c (down from a toasty 55c.) I've also noticed immediately that the menus no longer hang while also playing a video in the background. Success!</p>Fixing DNS Resolution with OpenVPN2018-10-11T00:00:00-04:002018-10-11T00:00:00-04:00Mike Mallintag:mremallin.ca,2018-10-11:/2018/10/11/fix-dns-resolution-openvpn/<p>Check your VPN client settings!</p><p>I've had some troubles after re-configuring my VPN with resolving DNS names within my local network. I fixed this by pointing my VPN client DNS server to the VPN gateway address and setting my lcocal domain to the same as my local network.</p>
<p>Time to play with pfSense some more to see if I can get that configuration pushed from my server to my clients instead of manual configuration.</p>Source Code Available2018-09-10T00:00:00-04:002018-09-10T00:00:00-04:00Mike Mallintag:mremallin.ca,2018-09-10:/2018/09/10/source-code-posted/<p>Want to see how this site is built?</p><p>I've taken the time to post the source code used to generate this website on to <a href="https://github.com/mremallin/mremallin-ca">github</a>. Feel free to take a look!</p>Slight Service Interruption2017-02-15T00:00:00-05:002017-02-15T00:00:00-05:00Mike Mallintag:mremallin.ca,2017-02-15:/2017/02/15/check-your-scripts/<p>Sometimes programs are not updated.</p><p>Sorry about the service interruption over the past few days. As you could probably see, my certificates expired and due to my security configuration you could not connect.</p>
<p>I use Let's Encrypt to get a SSL certificate for this site and was previously relying on the simp_le client in order to get certificates. It was more lightweight on required packages than the official certbot. Unfortunately, the implementation of simp_le was not updated to support a recent change and my certificates were failing to be renewed. Now that I'm home, I switched over to the official certbot client. Coupled with a handy cronjob, I shouldn't have to worry about this again.</p>
<p>Lessons learned:</p>
<ul>
<li>Debug logs are not useful if you don't look at them</li>
<li>Using unofficial clients is at your own peril</li>
</ul>Heathkit EA-3 Finished2017-01-18T00:00:00-05:002017-01-18T00:00:00-05:00Mike Mallintag:mremallin.ca,2017-01-18:/2017/01/18/heahtkit-ea3-done/<p>This took a while...</p><p>My heathkit EA-3 amplifier is finally playing music again. It's well over 50 years old at this point, but was worth every penny to bring back.</p>
<p>After I rebuilt it's internals (new caps/resistors), I left it on the shelf as it was still crackling on occasion. Fast forward to this past november when I found a supplier of old capacitors. I neglected to replace the main 4-part capacitor previously and figured this could be the cause. $40 USD later and the amp was still crackling.</p>
<p>Time for a professional to take a look... I ended up taking it to Hi-Tronics in Ottawa who are well versed in repair and restoration. One tube diagnostic later and it turns out all but one of the tubes were toast. I ended up ordering new ones from thetubestore.com. The full set for this amplifier ended up around $160.</p>
<p>Here's the list of tubes it needed:</p>
<ul>
<li>6CA4 - Electro-Harmonix</li>
<li>6AU6WC - JAN GE NOS</li>
<li>6AN8 - GE NOS</li>
<li>12AX7 - Electro-Harmonix</li>
<li>2xEL84 - JJ</li>
</ul>
<p>Finally, in order to feed the amp I turned to my favourite tiny computer, the Raspberry Pi. Since the last time I looked into a Jukebox, there's been an interesting distro that came out called Volumio. It checks pretty much all boxes that I wanted in a remote control Jukebox as it has a slick web UI that works on all platforms. Done.</p>Where are the cars?2016-12-10T00:00:00-05:002016-12-10T00:00:00-05:00Mike Mallintag:mremallin.ca,2016-12-10:/2016/12/10/where-are-the-cars/<p>Update time!</p><p>Two questions I've gotten recently are: "What happened to the smart car?" and "What happened to the Jaguar?". The first has been parted out and sold to a smart car enthusiast the second is still sitting at the garage, waiting for a place for Chris and I to work on it. I got overly ambitious with the car plans and it's blown up in my face. I've come to realize now that time for side-projects is starting to drop and I need to prioritize different aspects of my life than I did two years ago.</p>
<p>It's a tough lesson to learn; there's so much that I want to learn about and do in this world and I don't have the {time/space/money} to do it all. I'm hoping that I can get access to a garage or workshop so that I can start to spend some time with the Jaguar.</p>DHCPNAK When NFS Booting a Kernel2016-01-01T00:00:00-05:002016-01-01T00:00:00-05:00Mike Mallintag:mremallin.ca,2016-01-01:/2016/01/01/kernel-nfs-dhcpnak/<p>Don't forget to cleanup after yourself</p><p>I figured out one of my issues when NFS booting my Raspberry Pi monitoring server. During boot, it would hang with DHCP NAK being received by the Pi. This happened after I added a static DHCP lease that was different than the automatic DHCP lease originally configured.</p>
<p>The fix was to remove the old lease file /var/lib/dhcp/dhclient.eth0.leases.</p>Towards Soundblaster ZX Support on Linux2015-12-15T00:00:00-05:002015-12-15T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-12-15:/2015/12/15/soundblaster-zx-linux/<p>Almost there</p><p>After a number of dead-ends towards getting sound running on my desktop, I think it's almost there after the hard work of some of the linux kernel maintainers.
<a href="https://bugzilla.kernel.org/show_bug.cgi?id=55541">Bug 55541</a>
<a href="https://bugzilla.kernel.org/show_bug.cgi?id=109191">Bug 109191</a></p>
<p>The first bug is for the CA0132 DSP series of cards (Recon3D, Soundblaster Z). This fixes the DSP not working on x86_64 kernels.
The second bug is specifically for the Soundblaster Z series of cards. This is <em>not</em> yet resolved, but it seems like there's active work towards fixing it.</p>
<p>Only downside to recent fixes is that there's no current support or patches in Debian 8 (yet). This means compiling a new kernel. I've chosen to run 4.4-rc5, but in the future non-RC kernels should be used (4.4+ should be good).</p>
<p>For reference, here's the steps to build a new kernel on Debian 8. DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING. YOU CAN BREAK YOUR INSTALL BY MINDLESSLY FOLLOWING THESE INSTRUCTIONS.</p>
<div class="highlight"><pre><span></span><code>wget https://cdn.kernel.org/pub/linux/kernel/v4.x/testing/linux-4.4-rc5.tar.xz
mv linux-4.4-rc5.tar.xz /usr/src
</code></pre></div>
<p>A note here, due to my local setup I had to copy the source, set ownership to root:root and build as root. For regular users, having your own user own the source folder should be fine.</p>
<div class="highlight"><pre><span></span><code>tar xvf linux-4.4-rc5.tar.xz
cd linux-4.4-rc5.tar.xz
cp /boot/config-3.16.0-4-amd64 .config
make-kpkg clean
make-kpkg --rootcmd fakeroot --revision=1.0.mmallin --initrd --jobs 8 kernel_image modules-image
cd ..
dpkg -i linux-image-4.4.0-rc1_1.0.mmallin_amd64.deb
</code></pre></div>
<p>Reboot at this point. Then you'll have to install an updated NVIDIA driver due to the kernel change. One last reboot later and you should be staring at your X desktop again.</p>1999 Corolla Valve Cover Replacement2015-03-14T00:00:00-04:002015-03-14T00:00:00-04:00Mike Mallintag:mremallin.ca,2015-03-14:/2015/03/14/corolla-valve-cover/<p>Shiny</p><p>Finally got around to replacing the seeping valve cover gasket on the corolla. Look at the shiny!</p>TekSavvy Usage for Pebble2015-03-02T00:00:00-05:002015-03-02T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-03-02:/2015/03/02/ts-usage-pebble/<p>TekSavvy Bandwidth Usage on your watch!</p><p>I took some time this past weekend to play with my Pebble and ended up coding a small JS watch application to show me the current usage on my TekSavvy connection.</p>
<p>I present: "<a href="https://apps.getpebble.com/applications/54f4fbcd89900ede4d0000b2">TekSavvy Usage</a>".</p>
<p>It's a simple app that will show you how much bandwith you've used along with how much is actually counted. As I don't have a way of telling what type of connection (Cable/DSL/etc...) along with the actual cap, I've kept it simple to show what's been used both on (counted) and off (not counted) peak hours (2am to 8am is off peak).</p>
<p>Press the select button to refrest the information. The data seems to be refreshed once per day.</p>
<p>A small note, I am not at all affiliated with TekSavvy (except that I use them as an ISP) so this app is not supported or endorsed by them. Thanks to Andre for giving me the go-ahead to publish this.</p>Smart Car Rebuild - Feb. 202015-02-20T00:00:00-05:002015-02-20T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-02-20:/2015/02/20/smart-car-rebuild-feb20-15/<p>CSCs Cleaned</p><h1>Today's Agenda</h1>
<ul>
<li>Clean bearing caps for the camshaft</li>
<li>Clean timing sprocket</li>
</ul>
<p>Probably gonna need a new timing sprocket. This one is quite worn. Other notes include an odd, diagonal wear pattern on CSC4. All CSCs look good enough to go back in.</p>Smart Car Rebuild - Feb. 72015-02-07T00:00:00-05:002015-02-07T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-02-07:/2015/02/07/smart-car-rebuild-feb7-15/<p>Head up, valves out</p><h1>Today's Agenda</h1>
<ul>
<li>Added more to the parts washer</li>
</ul>
<p>Today, I added some more goodies to the parts washer. Mainly a submersible pump. IT WAS SOOOOO WORTH IT! Parts are really easy to clean with the jet of degreaser and brushes. The coat of oil over all the parts seems to just melt away now.</p>Smart Car Rebuild - Feb. 62015-02-06T00:00:00-05:002015-02-06T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-02-06:/2015/02/06/smart-car-rebuild-feb6-15/<p>Head up, valves out</p><h1>Today's Agenda</h1>
<ul>
<li>New tool</li>
<li>Valves fully out</li>
</ul>
<p>Took some time today to make a run to princess auto for a valve spring compressor. Ended up getting the biggest one they had, and it was worth every penny. Only downside was that it needed an adapter to reach the valves in the smart car's head. I didn't have the proper one around, so I just used a deep 15mm socket and shook the head a bit to get the retainers out. Worked well enough...</p>Deal or no deal?2015-01-31T00:00:00-05:002015-01-31T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-01-31:/2015/01/31/no-deal-jan-31-15/<p>No deal here</p><p>Off at the theatre today to see The Imitation Game. Had a bit of fun before the show. This time, there was no deal...</p>Smart Car Rebuild - Jan. 92015-01-09T00:00:00-05:002015-01-09T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-01-09:/2015/01/09/smart-car-rebuild-jan9-15/<p>Block apart</p><h1>Today's Agenda</h1>
<ul>
<li>Crack the block open</li>
<li>Check out internals of old block</li>
</ul>
<p>Took the day to finally split the block and examine the internals. Some bearings worn in weird ways, but otherwise look good. I may not have needed to split the block. Still an excellent learning experience. Now that everything is in pieces, the fun to put it all back together begins!</p>Smart Car Rebuild - Jan. 82015-01-08T00:00:00-05:002015-01-08T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-01-08:/2015/01/08/smart-car-rebuild-jan8-15/<p>Parts cleaning</p><h1>Today's Agenda</h1>
<ul>
<li>Track down new bearing cap bolts</li>
</ul>
<p>First stop was to check out Ottawa Fastener Supply. With the assistance of the guys there, we concluded that these are not common bolts but specific parts for the OM660.<br>
They are RIBE (Richard Bergner) Aluform Bolts, M9, 100mm (currently 104, most likely due to the TTY application), with some sort of dry lubricant on them.<br>
Next stop is eBay and other European stores to try and track down new ones. Worst case I'll have to go against my own words and use them again if I can't find a suitable replacement.</p>Pioneer DEH-80PRS Network Vs. Standard2015-01-03T00:00:00-05:002015-01-03T00:00:00-05:00Mike Mallintag:mremallin.ca,2015-01-03:/2015/01/03/deh-80prs-network-vs-std/<p>The Manual Doesn't Tell All...</p><p>A while ago I noticed that I didn't have a rear channel in my Corolla's stereo setup. After a lot of digging this evening, the culprit is the STD/NTW swtich on my head unit. </p>
<p>The Difference?<br>
Standard uses the outputs on the rear as Front, Rear, Subwoofer.<br>
Network uses them as Front, Bandpass, Subwoofer. </p>
<p>Now I have a rear again, Yay!</p>Smart Car Rebuild - Dec. 152014-12-15T00:00:00-05:002014-12-15T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-15:/2014/12/15/smart-car-rebuild-dec15-14/<p>Parts cleaning</p><h1>Today's Agenda</h1>
<ul>
<li>Start degreasing the timing chain cover.</li>
</ul>
<p>So, I set up a makeshift degreasing station made of:<br>
* Laundry Tub<br>
* 1.5" Ball Valve<br>
* 5 Gallon Jug<br>
* Metal Strainer<br>
* Coffee Filters<br>
* Degreaser </p>
<p>As I don't have enough to cover the cover, I'll be leaving one side submerged overnight and then switching to the other side in the morning.</p>Smart Car Rebuild - Dec. 132014-12-13T00:00:00-05:002014-12-13T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-13:/2014/12/13/smart-car-rebuild-dec13-14/<p>Parts engine</p><h1>Today's Agenda</h1>
<ul>
<li>Get an engine for spare parts</li>
</ul>
<p>Thanks to Troy at Troy Wilson Automotive in Williamsburg, I have a spare engine block. It has a head issue and was running on two cylinders, so it should be a good thing to have if I need it.<br>
Also found out the Corolla doubles as a pickup truck!</p>Smart Car Rebuild - Dec. 122014-12-12T00:00:00-05:002014-12-12T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-12:/2014/12/12/smart-car-rebuild-dec12-14/<p>Lower crankcase</p><h1>Today's Agenda</h1>
<ul>
<li>Remove lower crankcase</li>
<li>Remove crankshaft</li>
<li>Remove thrust washers</li>
</ul>
<p>Had to grind a prybar down to open the crankcase. There are four openings around the block that are about 1-2mm tall which can be used to crack open the seam. Some kind of black RTV. Machine applied most likely. <br>
Once open, crankshaft is exposed. Main oil seal was still in place, took some force to pull that side up and out. Will have to replace it when putting the engine back together. Probably after the entire block is back together.
Seems like we didn't blow up the main bearings. Top races look fine to my eyes.</p>Smart Car Rebuild - Dec. 112014-12-11T00:00:00-05:002014-12-11T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-11:/2014/12/11/smart-car-rebuild-dec11-14/<p>Crankcase main screws</p><h1>Today's Agenda</h1>
<ul>
<li>Undo main set of screws on crankcase</li>
</ul>
<p>Eight of them, undid in order shown here: http://www.smartz.co.uk/showthread.php?14617-Torque-Setting-for-OM660-(diesel)<br>
Bolts are TTY, don't reuse them!</p>
<h2>Useful Info from above link:</h2>
<p>8 2 4 6<br>
5 3 1 7</p>
<h2>Torque settings:</h2>
<ul>
<li>bolts for crankshaft bearing cap is 55 Nm + 90 deg </li>
<li>conrod cap on conrod is (tightening in three passes): </li>
<li>new bolts 5 Nm + 25 Nm + 180 deg </li>
<li>
<p>used bolts 5 Nm + 25 Nm + 90 deg </p>
</li>
<li>
<p>Bolts of a head of the cylinder block (tightening in five passes): 30 Nm + 90 deg + 90 deg + 90 deg + 10 deg </p>
</li>
<li>Flywheel 45 Nm + 90 deg </li>
<li>Pulley Crankshaft 140 Nm + 90 deg </li>
</ul>Test Post2014-12-07T00:00:00-05:002014-12-07T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-07:/2014/12/07/pelican-test-post/<p>New website!</p><p>Test post with new pelican engine!</p>
<p>Please bear with me as I bring back all the content from the old version of the site!</p>Smart Car Rebuild - Dec. 72014-12-07T00:00:00-05:002014-12-07T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-07:/2014/12/07/smart-car-rebuild-dec7-14/<p>Crankcase outer screws</p><h1>Today's Agenda</h1>
<ul>
<li>Undo outer set of screws on crankcase</li>
</ul>
<p>Bunch of them, two separate sizes. Pic shows layout.</p>Smart Car Rebuild - Dec. 42014-12-04T00:00:00-05:002014-12-04T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-04:/2014/12/04/smart-car-rebuild-dec4-14/<p>Piston 1 Parts and more</p><h1>Today's Agenda</h1>
<ul>
<li>Clean up piston 1 parts</li>
<li>Clean up valve lash adjuster</li>
</ul>
<p>More parts for degreasing.</p>Smart Car Rebuild - Dec. 22014-12-02T00:00:00-05:002014-12-02T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-02:/2014/12/02/smart-car-rebuild-dec2-14/<p>Piston 1 Bearings</p><h1>Today's Agenda</h1>
<ul>
<li>Clean up piston 1 bearings</li>
</ul>
<p>Just a quick run through degreaser and wipe down. Seem pretty worn for 184k.</p>Smart Car Rebuild - Dec. 12014-12-01T00:00:00-05:002014-12-01T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-12-01:/2014/12/01/smart-car-rebuild-dec1-14/<p>Piston 1, Oil Pump</p><p>Smart engine is in the basement now, engine stand is built and we're ready to start further disassembly of the block. </p>
<h1>Today's Agenda</h1>
<ul>
<li>Remove oil pump and drive chain</li>
<li>Remove piston 1 (closest to timing chain)</li>
</ul>
<h2>Oil Pump</h2>
<ul>
<li>Release pressure on chain tensioner and slide out</li>
<li>Undo bolt holding sprocket to pump</li>
<li>Remove sprocket and chain</li>
<li>Remove 3 bolts holding oil pump to lower block</li>
</ul>
<h2>Piston 1</h2>
<p>This was done the dumb way as there is no official documentation for the OM660 engine. The smart way is to remove the lower block first because it obstructs easy removal of the piston. (I learned for pistons 2 and 3.) </p>
<ul>
<li>Two screws holding the con rod cap to the con rod (paint dot should be on one side).<br>
<strong>NOTE:</strong> Undo screws first with 90* turn each, then proceed with removal</li>
<li>Push piston out of top of block with some sort of rod
<strong>NOTE:</strong> I managed to scratch the crank pin because of clearence issues with the lower block. Remove it first!</li>
</ul>Only took two attempts2014-04-04T00:00:00-04:002014-04-04T00:00:00-04:00Mike Mallintag:mremallin.ca,2014-04-04:/2014/04/04/two-attempts/<p>Too small?</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2014/04/04/two-attempts/images/Header.png">
Only took two tries to solder the ATTiny4 to the stripboard. Now to clean it up a bit and create a schematic with the rest of the parts.</p>About those ATTiny4s...2014-04-03T00:00:00-04:002014-04-03T00:00:00-04:00Mike Mallintag:mremallin.ca,2014-04-03:/2014/04/03/small-attiny4/<p>Too small?</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2014/04/03/small-attiny4/images/Header.png"></p>
<p>I may have been a bit overzealous in my quest for small... </p>
<p>My finger is 15mm wide in comparison.</p>Reusing an RF Board from an Xbox 3602014-03-31T00:00:00-04:002014-03-31T00:00:00-04:00Mike Mallintag:mremallin.ca,2014-03-31:/2014/03/31/xbox360-rf-board-reuse/<p>Why buy when you can build?</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2014/03/31/xbox360-rf-board-reuse/images/Header.png">
I’ve been interested in this project for a while, but finally have had the time and parts to follow through. My initial implementation is on an ATTiny461, but I’ve ordered some ATTiny4s to play around with as well. </p>
<p>The basic premise is that the RF board on a Xbox360 uses 3.3v USB to communicate and with some inf file changes, we can use it on a PC! Only issue is that you can’t sync a controller. There are workarounds (Play-n-charge kits), but I’d rather this be self-contained to take on the road. So, the only option is to use a microcontroller to trigger the RF board to sync. I used an ATTiny461 because it’s what I had lying around the house, but people have used <a href="http://dilisilib.wordpress.com/2011/03/07/wireless-xbox360-controller-on-a-pc-without-the-commercial-dongle/">Raspberry Pis, Arduinos, and PICs</a>. As long as you have some IO pins, you’ll be fine.</p>
<p>The post above mentioned to use some diodes to bring down the voltage, but I would rather have something that can handle different loads. I ended up reusing one of the voltage regulators from the 360 itself. The one I picked is an NCP1117. It’s an adjustable regulator that’s a drop in replacement for the LM317. I destroyed another RF board when trying to desolder the connector, so I used the metal shield on it for a heatsink. A couple of resistors later, and I now have 3.3v at up to 1A!</p>
<p><img alt="Breadboard" class="align-center" src="https://mremallin.ca/2014/03/31/xbox360-rf-board-reuse/images/breadboard.jpg">
The <a href="https://github.com/mremallin/ATTiny461-360RFBoard">code</a> is adapted from a few different variants on the page, but is functionally the same. It will perform a LED init, then send the animation command and wait for the power button to be pressed to perform a sync. One thing I got sidetracked with was reducing the power consumption of the 461. Idle draw was 4.2mA when I started, and was 0mA when I was done. The biggest change was putting the microcontroller asleep instead of leaving it to idle in a busy loop. The power button is hooked to the external INT0 pin, so I can set it to a very low powered sleep mode. The RF board draws the most power anyways, so the 461’s draw becomes negligible over long periods of time. IIRC, the RF board draws around 95mA when doing nothing, and 130mA during the startup animation.</p>
<p>All that’s left is to print an enclosure (Thanks Chris!), and assemble it permanently with an ATtiny4! I’ll add schematics and STLs once they’re ready.</p>Vroom Vroom2014-03-02T00:00:00-05:002014-03-02T00:00:00-05:00Mike Mallintag:mremallin.ca,2014-03-02:/2014/03/02/vroom-vroom/<p>12 Cylinders of Beauty</p><p>{% youtube ZgjItOA6Da4 %}</p>Building a Raspberry Pi Jukebox2013-09-10T00:00:00-04:002013-09-10T00:00:00-04:00Mike Mallintag:mremallin.ca,2013-09-10:/2013/09/10/rpi-jukebox-build/<p>Network Jukebox w/ a Raspberry Pi</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2013/09/10/rpi-jukebox-build/images/Header.png"></p>
<p>You will need:</p>
<ul>
<li>Raspberry Pi<br>
I used a Model B for the Ethernet port. You'll need to find how to add wifi yourself if you use a Model A</li>
<li>USB Sound Card<br>
I used a Soundblaster Play USB as it was cheap at my local Canada Computers. (Sound quality isn't bad either)</li>
<li>SD Card<br>
Minimum 2Gb. As long as you can install raspbian. After I was done, I only used 1.1Gb.</li>
</ul>
<p>Step 1: Install Raspbian </p>
<p>Head over to www.raspbian.org and get your brand new Pi running with it.
However you choose to install doesn't matter.
Just get a basic system with network/ssh access going (don't install the "Debian Desktop Environment") and come back for step 2.</p>
<p>Step 2: Add software<br>
For there to be music, we need some software to play it. As root run:</p>
<div class="highlight"><pre><span></span><code> apt-get install mpd cifs-utils alsa-base alsa-utils alsa-oss oss-compat alsa-plugins
</code></pre></div>
<p>This installs: </p>
<ul>
<li>CIFS Utilities. Useful for mounting SMB shares (coincidentally where my music is located)</li>
<li>MPD. Music Player Daemon, the root of this project.</li>
<li>ALSA. Useful if you want sound output.</li>
</ul>
<p>Now that this is all installed, let's get some music playing!</p>
<p>Step 3: Configure MPD</p>
<p>Configuring MPD isn't too ridiculous. Just read the comments and google for the more challenging questions.</p>
<p>Fire up your editor of choice on /etc/mpd.conf.</p>
<p>Essential config items are:</p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nv">music_directory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o"><</span><span class="nv">dir</span><span class="o">></span><span class="w"> </span>#<span class="w"> </span><span class="nv">Set</span><span class="w"> </span><span class="nv">this</span><span class="w"> </span><span class="nv">to</span><span class="w"> </span><span class="nv">your</span><span class="w"> </span><span class="nv">library</span><span class="w"></span>
<span class="w"> </span><span class="nv">bind_to_address</span><span class="w"> </span>“<span class="nv">any</span>”<span class="w"> </span>#<span class="w"> </span><span class="nv">Useful</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nv">not</span><span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="nv">static</span><span class="w"> </span><span class="nv">IP</span><span class="w"></span>
<span class="w"> </span>#<span class="w"> </span><span class="nv">Following</span><span class="w"> </span><span class="nv">allow</span><span class="w"> </span><span class="nv">autodiscovery</span><span class="w"> </span><span class="nv">over</span><span class="w"> </span><span class="nv">zeroconf</span><span class="o">/</span><span class="nv">avahi</span><span class="w"></span>
<span class="w"> </span><span class="nv">zeroconf_enabled</span><span class="w"> </span>“<span class="nv">yes</span>”<span class="w"></span>
<span class="w"> </span><span class="nv">zerconf_name</span><span class="w"> </span>“<span class="nv">Boombox</span><span class="w"> </span><span class="nv">MPD</span>”<span class="w"></span>
<span class="w"> </span>#<span class="w"> </span><span class="nv">Audio</span><span class="w"> </span><span class="nv">output</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nv">my</span><span class="w"> </span><span class="nv">sound</span><span class="w"> </span><span class="nv">card</span><span class="w"></span>
<span class="w"> </span><span class="nv">audio_output</span><span class="w"> </span>{<span class="w"></span>
<span class="w"> </span><span class="nv">type</span><span class="w"> </span><span class="s2">"alsa"</span><span class="w"></span>
<span class="w"> </span><span class="nv">name</span><span class="w"> </span><span class="s2">"My ALSA Device"</span><span class="w"></span>
<span class="w"> </span><span class="nv">options</span><span class="w"> </span><span class="s2">"dev=dmixer"</span><span class="w"></span>
<span class="w"> </span><span class="nv">device</span><span class="w"> </span><span class="s2">"plug:dmix"</span><span class="w"></span>
<span class="w"> </span>}<span class="w"></span>
<span class="w"> </span><span class="nv">mixer_type</span><span class="w"> </span>“<span class="nv">software</span>”<span class="w"> </span>#<span class="w"> </span><span class="nv">My</span><span class="w"> </span><span class="nv">soundcard</span><span class="w"> </span><span class="nv">mixer</span><span class="w"> </span><span class="nv">is</span><span class="w"> </span><span class="nv">in</span><span class="w"> </span><span class="nv">software</span><span class="w"></span>
</code></pre></div>
<p>Step 4: Just add Music </p>
<p>Add the following to /etc/fstab to auto-mount a network share on boot:</p>
<div class="highlight"><pre><span></span><code> //X.Y.Z.W/Music /mnt/Music cifs credentials=/root/.credentials,iocharset=utf8,file_mode=0777,dir_mode=077 0 0
</code></pre></div>
<p>With /root/.credentials being a file that contains:</p>
<div class="highlight"><pre><span></span><code> username=<your username>
password=<your password>
</code></pre></div>
<p>and X.Y.Z.W being the IP of your file server.</p>
<p>Run as root to mount your share:</p>
<div class="highlight"><pre><span></span><code> mount -a
</code></pre></div>
<p>Now you should have access to your music!</p>Configuring your tftpboot share for PXE2013-08-25T00:00:00-04:002013-08-25T00:00:00-04:00Mike Mallintag:mremallin.ca,2013-08-25:/2013/08/25/tftpboot-pxe/<p>Netboot makes life easy!</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2013/08/25/tftpboot-pxe/images/Header.png"></p>
<p>Now that your servers are set up for PXE booting, you need something to share to the BIOS of your target computers.</p>
<p><img alt="Figure 1" class="align-center" src="https://mremallin.ca/2013/08/25/tftpboot-pxe/images/Figure1.png">
Figure 1 - Directory layout of my tftpboot share</p>
<p>There are some essential files you need and a specific structure to follow. You need pxelinux.0 from a syslinux distribution. (More info here: http://www.syslinux.org/wiki/index.php/PXELINUX)</p>
<p>Once you have that, you need a config file for it. First, create the directory “pxelinux.cfg” in your tftpboot share. In that directory, create a file named “default”.</p>
<p>My “default” config file is:</p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="nv">DEFAULT</span><span class="w"> </span><span class="nv">linux</span><span class="w"></span>
<span class="w"> </span><span class="nv">prompt</span><span class="w"> </span><span class="mi">0</span><span class="w"></span>
<span class="w"> </span><span class="nb">timeout</span><span class="w"> </span><span class="mi">0</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">memtest86</span><span class="o">+</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">gparted</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">lubuntu</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">memdisk</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">arch</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">ping</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="nv">MENU</span><span class="w"> </span><span class="k">INCLUDE</span><span class="w"> </span><span class="o">/</span><span class="nv">pxelinux</span>.<span class="nv">cfg</span><span class="o">/</span><span class="nv">clonezilla</span>.<span class="nv">conf</span><span class="w"></span>
<span class="w"> </span><span class="k">include</span><span class="w"> </span><span class="nv">debian</span><span class="o">-</span><span class="nv">installer</span><span class="o">/</span><span class="nv">amd64</span><span class="o">/</span><span class="nv">boot</span><span class="o">-</span><span class="nv">screens</span><span class="o">/</span><span class="nv">menu</span>.<span class="nv">cfg</span><span class="w"></span>
<span class="w"> </span><span class="nv">default</span><span class="w"> </span><span class="nv">debian</span><span class="o">-</span><span class="nv">installer</span><span class="o">/</span><span class="nv">amd64</span><span class="o">/</span><span class="nv">boot</span><span class="o">-</span><span class="nv">screens</span><span class="o">/</span><span class="nv">vesamenu</span>.<span class="nv">c32</span><span class="w"></span>
</code></pre></div>
<p>You do not need all of the lines that I have. I made a separate config for each of my PXE booted OSes. I’ve also added the debian netboot ones at the end so that I get a nice screen like the title shot. My configs are located here.</p>
<p>Once your configs are setup, just put your kernel/initrd in a sane place and update your config. Look at my sample ones for guidance.</p>
<p>For some OSes, you will need to enable NFS access on your nas4Free box. I’ll add that in a later entry.</p>Configuring nas4free and pfSense for PXE2013-08-02T00:00:00-04:002013-08-02T00:00:00-04:00Mike Mallintag:mremallin.ca,2013-08-02:/2013/08/02/nas4free-pfsense-pxe/<p>Netboot makes life easy!</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2013/08/02/nas4free-pfsense-pxe/images/header.png"></p>
<p>One of the more useful things I’ve setup in my house recently has been the ability to network boot any machine. It’s made my life so much easier if I need to run a diagnostic or switch to gparted if I mess up an install.</p>
<p>Configuring nas4free
In order to boot from the file server, we need to have a static IP on it so that pfSense points PXE clients to the right place, all the time.</p>
<p>Go to Network -> Lan Management. Set the IPv4 Type to be “Static”, then set a static IP for your server (XXX.YYY.ZZZ.WWW) that will not conflict with your DHCP settings. You will also need to set your Gateway IP.</p>
<p><img alt="Figure1" class="align-center" src="https://mremallin.ca/2013/08/02/nas4free-pfsense-pxe/images/figure1.jpg">
Figure 1 - Setting a static IP</p>
<p>Next, you need a tftp share to hold the required files. Under Services -> TFTP, check the enable box, then choose a folder to share.</p>
<p><img alt="Figure2" class="align-center" src="https://mremallin.ca/2013/08/02/images/figure2.jpg">
Figure 2 - Enabling TFTP</p>
<p>Configuring pfSense
First thing we need to do is to configure pfSense to point any PXE devices to our file server.</p>
<p>Under Services -> DHCP Server, click advanced beside the “TFTP server” option and enter the IP of your file server (XXX.YYY.ZZZ.WWW).</p>
<p><img alt="Figure3" class="align-center" src="https://mremallin.ca/2013/08/02/nas4free-pfsense-pxe/images/figure3.jpg">
Figure 3 - Enter your file server IP here</p>
<p>Next, click advanced by the “Enable network booting” option. Enter the IP of your file server (XXX.YYY.ZZZ.WWW) and the filename “pxelinux.0”. “pxelinux.0” is the boot executable that will handle loading the list of OSs’ and booting them.</p>
<p><img alt="Figure4" class="align-center" src="https://mremallin.ca/2013/08/02/nas4free-pfsense-pxe/images/figure4.jpg">
Figure 4 - Enter in the server IP and the file to boot from</p>
<p>Hit “Save” and you can now boot from your fileserver! Except that you need to set up the PXE data. That’s for part 2.</p>Windows 7 on UEFI vs. MBR Disks2013-06-26T00:00:00-04:002013-06-26T00:00:00-04:00Mike Mallintag:mremallin.ca,2013-06-26:/2013/06/26/win7-efi-mbr/<p>UEFI and MBR can't get along...</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2013/06/26/win7-efi-mbr/images/Header.jpg"></p>
<p>I was attempting to install Arch Linux the other day, and managed to tank my partitions... Oh Well, let’s install windows again and use UEFI! I followed the guide <a href="http://forums.lenovo.com/t5/Windows-7-Knowledge-Base/Prepare-an-usb-thumb-drive-to-boot-windows-7-in-UEFI-mode/ta-p/656637">here</a> to install, but I kept getting the same error; 0xc0000225. I attempted to reinstall multiple times, with different partition layouts, but kept getting the same error. It took an hour of googling but I stumbled across <a href="http://forums.anandtech.com/showpost.php?p=34621321&postcount=10">this post</a>, which details that you cannot have any MBR disks in your system, with a UEFI install.</p>
<p>To recap: If you’re installing a UEFI install of windows, you CANNOT have any MBR disks in your system or it will fail.</p>Raspberry Pi Jukebox2013-04-10T00:00:00-04:002013-04-10T00:00:00-04:00Mike Mallintag:mremallin.ca,2013-04-10:/2013/04/10/rpi-jukebox/<p>Network Jukebox w/ a Raspberry Pi</p><p><img alt="Header" class="align-center" src="https://mremallin.ca/2013/04/10/rpi-jukebox/images/Header.jpg" title="Raspberry Pi Model B">
<a href="http://www.raspberrypi.org/faq">http://www.raspberrypi.org/faq</a></p>
<p>I’ve started on a project that’s been on my mind for a while. I have an old console stereo that I’d like to modernize (only the electronics; keeping the 50s style).</p>
<p>I’m thinking right now the best way to do this would be Raspbian + MPD. This gives me the flexibility to control it from pretty much anything (toasters too!).</p>