McGarrah Technical Blog

Posts in category "personal"

New Laptop update

My new to me Thinkpad T480 is doing great. The better processor and the upgraded Nvidia MX150 GPU are both getting a workout with several of the new LLM models. I maxed out the RAM, Wifi, Hard Drive, and swapped around adding all the best components/features to one laptop consolidated from several different junkers I purchased. Those components include IR Camera, WWAN, backlit keyboard, good batteries, and a nice case.

Along time between posts

So it’s been quite awhile since I posted anything to any blog. I did post a couple updates as I did projects in grad school. The Wordpress site I used for this earlier died and was hosted on a VMware ESXi server in my homelab. I didn’t have time to fix it while in school so no postings since mid-2016.

Home Renovation & Graduate school

I’ve been busy with remodeling and renovations at home and the beach house. Also getting ready for going to graduate school at the Georgia Institute of Technology OMSCS program and that has kind of kept me busy.

The ESXi work and other technical fun stuff has been put on hold for awhile until I can get my free time free again. That always seems to be the case.

I’ve got a couple of articles in the hopper that I have not had time to polish for release on integrating Active Directory & Kerberos on Ubuntu LTS 14.04 with Windows 2003/2008 servers and remote desktop access using a tool called Guacamole.

DLNA with Sony

Bought a Sony Blu-ray player with DLNA support. Added MediaTomb with a static binary on the Blackarmor. Tested it an it wasn’t very happy. It did run but the performance just wasn’t there.

The default Sony Blu-ray with my new BA NAS 400 series works just fine. A solution to my long standing problem with playing my digital content on my TV and sound system. DLNA support in the Sony equipment just seems to work.

Amazon Web Services

New job and learning AWS in support of distributed computing. I’ve done a good bit of research to understand the ecology of web services. They can be expensive but when you count total costs, they come out pretty close to break-even. You can lease computational power for relatively short periods to do quick work, then give the hardware back and stop paying for it. That is a powerful shift in technology.

OpenStack, CloudStack, Eucalyptus and a couple others where in the running while doing the evaluations. Each had their advantages which I’ll probably write about later.

I settled on implementing a Eucalyptus system using spare hardware. So far I’ve got a working and running system built from the source code. It provides a subset of the AWS services on local hardware for testing. The S3 support isn’t quite there as of version 3.3.0 but it might improve in the next couple of months. S3 is simple storage interface allowing for storing information by a key value. Their EC2 support appears to be much better and allows for quickly building virtual machines with pre-configured operating systems.

In the background, I’m writing Java code to implement AWS tools and services. I forgot how much fun Java can be.

Cygwin Ports by way of binary files

Binary Files

I wanted to do some work on an undocumented binary file format. The free HexEdit tool for Windows from Catch22 Software is a pretty good for mapping data structures to the raw binary/hex data in a file. It uses the C format struct to format the data structures into a human readable format. It could use some additional docs on how to use the typedef format but was relatively easy to figure out.

What was frustrating was finding a tool that would allow for doing binary diffs with a decent interface. There are several methods for doing binary diffs on files. The unix ‘od’ command, ‘bvi’ and others presented themselves but were not as interactive as I would like when looking at large numbers of files visually for iterative small changes. Editors and Binary Editors fall into an area of preferences. I could be entering a flame-war picking a tool but would love to hear some feedback on tools people have used.

What I found that seemed to fit the bill for me was Chris’ excellent tool called vBinDiff found at his website. Since I wanted to use UNIX tools for scripted automation but still be on a Windows system, I installed Cygwin. Getting vbindiff to work on Cygwin was a testament to Chris’ excellent code base. After finishing up and getting it working, I thought it might be nice to package it for the Cygwin project.

Cygports

Thus started my journey into Cygport. I found myself frustrated with the documentation for the assumption that I knew a lot about the Cygwin packaging which is what I was trying to avoid by using the tool. This is not a bashing session for cygport which does an amazing job of wrapping up lots of the trivia that is Cygwin packaging. What was missing is a basic “HowTo Package ABC” for Cygwin. The cygport documents while good are written for someone who had done the manual process of packaging at some point. The documentation failed to meet my expectations as a competent developer who has done lots of porting work to quickly introduce me to this new means of packaging for their platform. There is not quick guide on the simple cases with a couple of interesting example. The other lack was how to get these example applications of varied type out of Cygwin easily. I figured it out and afterwards felt silly for not having seen it. All that said, I have come the realization that I have to put some time aside and try to write an HowTo guide on packaging for Cygwin.

I’ve got two packages done so far. vBinDiff is the first and I am still polishing that install as I learn more along the way. vbindiff is currently working great as a package on my local system. Wy60 is another tool from years back when I worked on UniData/Universe systems and needed access to their Wyse 60 PICK interfaces. This makes for two packages and I have used several features to make these work. I’ll have to learn how to submit a request for inclusion into the main Cygwin package group. There is a mailing list and a set of questions to answer. I’ll just need to put some time aside for it. :)

Interests

So those are my current interests in the world of technology. I keep playing around with the BlackArmor NAS devices occasionally and would like to find the time to get the USB to serial interface setup on my second unit. The ARM gcc tool-chain languishes for lack of time as well. The DLNA server ended up being too much of a pain without a decent tool-chain so I knuckled under and installed Microsoft Media Center on an old laptop to feed my digital media to my xbox360. I really want to revisit that particular issue and get a low-power digital media server working. Maybe I’ll find the time and pick those back up.

Eucalyptus (AWS private Cloud Computing)

I’m not going to give a full run down of what Eucalyptus is but just point you to their marketing material at their website. The quick summary is it offers the Amazon Web Services loaded on a local computer. These include several of the most interesting services: EC2, S3, EBS, AMI, IAM, and recently they added Autoscaling, Elastic Load Balancer, and Cloudwatch. If that alphabet soup has your interest piqued, then you should continue reading.

Building one of these using their pre-packaged images is dead simple. I’m not one to do anything the simple way and decided to build everything from the source directly from their Github repository. This was not an easy task but definitely taught me a lot about their software and the components of the system. I would recommend a first-time user to not take my route and just take their binary builds from RPM or their ISO image. Fedora Core has these as well and the guy who supports it is a great guy. Please take the path of least resistance first to get familiar with the software.

AWS - Running Services Locally (a quick survey of products)

My first step was to review the major services we wanted to use on Amazon. They have a massive set of services available for use and some are not easily replicated without a major infrastructure and skill set to manage it. To give you some idea of the number of services here is a summary of the services and a quick reference as of August 2013.

Debian on BA NAS 110

Hajo on the BlackArmor Forums has an older posting about getting Debian Linux 5.0 (Lenny) installed on BA NAS 110/220/4x0. This is not a port that includes the kernel but simply a minimum install that gets the system setup to install binaries out of the Lenny EABI ARM platform. The kernel that comes with the BA NAS is compatible with those binaries. The newer kernel for the Debian 6 or higher is not compatible with the BA NAS. This has some limitations but offers a way to get to some newer software pre-compiled. I don’t want to loose the existing functionality on my test system but the draw to DLNA services is pretty strong right now.

To top it off, Debian has a nicely setup cross-compilation setup documented for people working on non-Intel platforms. This offers a way to compile newer software without killing myself anymore on building the entire compiler and supporting software myself.

The goal has always been to make the NAS device useful and I want to play my movies off it to my TV upstairs so this might be the next thing I play with on the development NAS.

miniDLNA

I was reading a bit more on DLNA servers and found that someone had gotten miniDLNA working under the Debian port for the BlackArmor NAS. NickolasZev looks like he is enjoying his Debian install on his BA110. He is documenting his Debian initial install, adding miniDLNA, a webserver, bittorrent and download manager. I’m not interested in putting Debian on mine and want to stay as close to the vanilla firmware as possible but it is nice to see that someone has it working on the hardware.

DLNA server for BlackArmor NAS

Today I was reading a couple of forums and bumped into a write up on the “BubbleUPnP - UPnP/DLNA Control Point and Renderer” application for Android that has both DLNA client and server support. The BubbleUPnP setup also has a Java based server mentioned in their section on NAS devices, such as the QNAP which is very similar to the BlackArmor NAS.

Earlier in my writing, I was reviewing a version of Java for the ARM that was called “Sun Java SE for Embedded”. It would allow for executing a Java application on the BlackArmor. Up until now, I did not have a Java application to really motivate me to install and test this but the BubbleUPnP DLNA server might allow for my BlueRay Play, Roku and Android cell phone to play my movies directly off the BlackArmor NAS.

There is one problem which is getting the ffmpeg library compiled and running. This is described in the docs above for the QNAP NAS but I’ve not been successful at getting a working toolchain yet. I may have to backtrack and see if I can just use the toolchain provided by Seagate to compile this newer version of ffmpeg.

Another issue is that the Java SE for Embedded is licensed strangely by Oracle. It cannot be redistributed and requires licensing costs if it is redistributed by a professional package.

So step one would be to compile the ffmpeg library and test it out. I hope to try that out with the existing Seagate toolchain. The next step would be to get the Java SE Embedded to run a basic HelloWorld application on the console. After that, try to get the BubbleUPnP server running.

I’ll see if I can get a couple hours together to work on this this coming week. It would be nicer to have an open source DLNA server but I’ll take what I can get. Since I’m talking about taking some time to compile C/C++ code anyway to get this working, I checked on open source DLNA servers and popped up something from eLinux that was interesting to read over. It looks like MediaTomb, uShare, and Serviio are candidates that could replace the BubbleUPnP server if I get the compiler toolchain working.

We will just have to see how much time I can get together to play around with this.

Junking Hardware / Cleaning Office

I’m clearing out about 90% of my old hardware from my home office.

Things like my ancient Sun Sparc Station 4 and 5 for my old Oracle work, and the older Sparc Classic (lunchbox), Sparc IPX systems used in my distributed web development days, and the Cobalt RaQ and iMac G3 systems I did development on about a decade ago. I’m also dumping a Compaq 286 laptop that served me well in doing assembly and C coding and it’s cousin the 486 that was my constant companion for several years. The dumping continues with numerous boxes of old cabling, strange and exotic old cards (ISA, PCI, MCA, EISA, VESA, Sbus, and some I don’t even recognize now), a couple of engineering sample video cards, some really old KVMs, couple of 24 port serial port concentrators (that I hacked the firmware on) and even a pair of old Cisco 2500’s used in my network testing days. It’s about 20 years of hardware exiting the house before we do the renovations and addition to my home.

It is really sad to see some of these little guys leave the house but looking forward to a cleaned out home office that I can get back to being a pleasant work and coding environment. So out the door they go.

In dumping all this equipment, I’ve been gathering the hardware junk box that I can re-use in other hardware projects. So far I have two of these boxes with weird stuff like an old Palm 5 docking station, some ear phones, some older coaxial cable, and the other random assortment of hardware junk you find useful when hacking hardware. These two boxes are starting too look really strange like something from a Mad Max movie.

This is cathartic writing about all these old pieces of equipment that were used in my professional and personal learning processes. It’s hard to part with some of these because of the happy memories associated with figuring out the next big problem in technology for that time.

Good bye little friends and now to start gathering the next set. :)

UPS and Print Server

I bought an “APC Back-UPS ES 550” awhile back from CostCo without knowing for sure if it would work with the Seagate BlackArmor NAS. It works great so far. I was afraid I would have to hack on the configuration file for the software but it worked out of the box without any extra effort other than enabling the UPS Manager.

I had a second dilemma which was that I use the NAS as my print server for an older “Brother MFC 7420” printer and did not want to loose that configuration. There is only one USB port off the back of the unit that is supposed to work with printers and UPS. So for my next surprise, I found that it works for both the UPS and printer with an old un-powered notebook USB hub that I got as a door prize at some Cisco event.

I may test plugging up my old 500GB Seagate USB hard disk to that hub as well and see if it recognizes the space and makes it available.

So for anyone else, I cannot vouch for all UPS and printers but my configuration above is working great.

Serial Port on BlackArmor NAS

I found my old Samsung x426 USB cell phone programmer cable as I was cleaning out my home office. I might have mentioned this cable earlier when I wrote about adding a serial console to the BlackArmor NAS. The cable is a really old style one that has a weird connector for the cell phone way before the mini-USB became standard. The interesting thing about this cable is that it has a serial to USB converter chip (2303HXC 0546) that does the magic of converting serial to USB. That is why that thing was ridiculously expensive ($35) when I bought it back in the day.

Why this is even on my radar as possible is that the website CrapNAS had an entry for how to connect a serial or USB cable so you can watch the Linux boot up as a serial console session. They specify two different ways to do this. For the serial connection, they specify a MAX3232 as necessary. The USB connection has a schematic that includes a 2303HX. I’m not sure what the difference is between that and my 2303HXC so I will be doing some reading before I cut into the cable and get out the soldering iron.

Why am I even messing around with a serial console? Because as I am planning to mess around with the lower level system, I should have a back out plan if I do something wrong. A serial console on the device gives me more options during the boot up even if I cannot connect via a network connection.

As far as getting time to work on the compiler toolchain, I’ve been relaxing over the holiday break with family, cleaning my messy home office and have not even booted up the virtual machine since my last post. I intend to get back to it someday.

Seagate Black Armor NAS

Yeah it’s been hectic at work and lots to do in domestic life as well so this hobby project hasn’t gotten much attention. Christmas break is coming however and I’m planning on getting some time to work on it. I think most Open Source projects or hobbies get a boost over the holidays.

Merry Xmas & Happy New Year in case I don’t get back here before the holidays.

Newlib error during compile

Earlier I was working on the problem with compiling using the arm-elf-gcc on very basic programs. After some work, I found the base problem is that the libc replacement from newlib are not being picked up at compile time and properly using the syscalls mechanism. Hardwired hacks to work around it produced an executable but something is still wrong with how the compiler was built.

I’ve distilled the error down to a single search.

Google Search: "/lib/libc.a(lib_a-exit.o): In function `exit':" "newlib/libc/stdlib/exit.c:65: undefined reference to `_exit'"

Several other people appear to have run into the same problem, so I’ll be reading up on the problem and see what solutions exist.

Compilation failures

The problem is that I can get an ARM executable but not sure why the default system is not working to produce a basic HelloWorld.

Toolchains compiled

Two full toolchains built and a third that I still think might be made to work. The first is using older versions of everything and was mostly done as a test to get the build environment working against known sources that are known to build. Even this known build process required some effort to get working in a current OS environment. Those docs, notes and scripts will be coming in the near future.

Cross-compiler toolchain update

I’ve been working on building a toolchain using the notes from OpenHardware Building the ARM GNU 4.3.2 with some success. I finally got the base set of GCC 4.3.2 tools to build successfully. I have not used the resulting GCC to produce an ARM executable or verified the executable works on the Black Armor NAS. Those are tests for tomorrow evening when I can get the NAS setup again on the network. It is currently in a box in the corner.

There were several minor things that needed to be updated and modified to get the scripts and environment to work. I’ve kept careful notes and will post those in the next couple of days once I’ve tested the output from the compiler works. I’m also attempting to update the versions of the libraries and software to more current versions as well. The GCC 4.3.2 and associated libraries are several years old and I’m trying to get the GCC 4.6.x to build along with newer newlib, binutils and insight/gdb using the same basic set of notes and scripts. I bumped into a zlib issues in the second phase GCC build that stumped me for the night. I’ll hit it again tomorrow. Again, I’m keeping careful notes and build docs for the newer version as well.

The dependencies from the operating system are sometimes a pain to track down for the software. I picked a very stripped down install of Ubuntu. The operating system I am using is Ubuntu Server 11.10 because it is easy to install and update. Any Linux would do but the package names may change. Ubuntu Server has no frills so you add everything you need which means all the libraries like GPM, etc.

So there is some progress and in the next couple of days I’ll let you know if the build produces working ARM executables. I’m really excited about getting a working “HelloWorld” out there.

Making Sea Salt

I did something completely different. I didn’t boot my laptop the entire Thanksgiving weekend.

I went to the beach, ate steamed oysters, grabbed several gallons of water, spent time with my wife, filtered the water, watched television, and boiled the water to get sea salt. I now have a nice little container of sea salt flakes from my favorite beach and a salt slurry.

I read a couple of web pages on doing this and most of what they say is common sense. Filter the water to clean out the sand and other impurities. Boiling is recommended to kill off any nasty organisms. Getting the water from a beach that is not polluted is recommended. Also do not collect just after a rain. The resulting salt is a mixture of salt flakes similar to kosher salt and crystals like the fancy salt mills use. I may take the salt slurry and add a bit of water and put in a shallow pan to crystallize so it is nicer looking.

I’m considering making some of this into Christmas presents to family who like our little beach cottage.

Now that was something completely different.

Building the GNU ARM Toolchain: Part 2

Lesson learned on doing a toolchain build or anything else for that matter; make sure you are reading the most current documentation available. I was working with very old versions of the software by using the GNU ARM website mentioned earlier. In digging into the problems for those builds, I found a few other sites that have detailed discussions on building the toolchain for specific version of the ARM platform.

Building the GNU ARM Toolchain: Part 1

I found the GNU ARM Toolchain website awhile back and that they have several different versions out there for the toolchain. A toolchain is just the basic tools needed to build software. In this case it is the standard libraries, the compiler, debugger and various other tools needed to write software. The version of the toolchain that is provided by Seagate is version 3.0 and a very old version. The oldest on the ARM website is 3.3 with 4.1 being the newest.

Sun Java SE for Embedded Systems (Jazelle DBX)

Earlier I mentioned a technology called “Jazelle DBX” for the ARM processor that allows for Java Bytecode eXecution (JBX) directly in the ARM hardware which should make it run faster. That DBX technology is being phased out with newer Thumb-2 instruction set being the new preference by ARM for acceleration. However, the processor in the BlackArmor NAS was the first processor to have this Jazelle DBX feature and I want to see if it has any merit. I did some digging around, like I mentioned I would, and found that Sun had produced a version of Java that may have this technology.

Black Armor Reading on ARM Architecture

So earlier I was digging around trying to find out more about the Black Armor NAS hardware and pulled some interesting information. Unfortunately, I don’t have a lot of ARM background so a good bit of it was confusing as I reviewed it.

Snippet from earlier hardware information gathering:

$ uname -a
Linux NAS3 2.6.22.18 #1 Thu Aug 26 12:26:10 CST 2010 v0.0.8 armv5tejl unknown
$ cat /proc/cpuinfo
Processor       : ARM926EJ-S rev 1 (v5l)

To rectify my lack of knowledge I started reading on Wikipedia and found the ARM architecture which made me realize that I’ve been missing out on an entirely different ecology of technologic innovation. The features that are available for each processor was an interesting ride down memory lane with my memory of Intel CPU features, that I’m familiar with, running parallel to the ARM decisions in the same areas. They have two completely different paths but seem to have interchange between the two. ARM has an interesting history as a company as well.

Black Armor status

So my list of things to figure out keeps growing but I don’t seem to get any time to work on them.

  1. UPS software setup
  2. DLNA server functionality
  3. USB Hub issue to figure out so I can run the UPS and Printer together.
  4. Serial Port hack (new)

I also want to get the serial port hack working which requires some physical work disassembling the NAS and maybe some soldering work to build a serial converter. The major work is already done by another guy on http://crapnas.blogspot.com but I’d have to follow along. There also appears to be a shortcut with an old Nokia USB cell phone cable that might be worth checking out.

Maybe next weekend I’ll get some time. Project is just not getting cycles but I’m still thinking about it.

Black Armor USB Ports on NAS

So I’m working on the UPS addition and forgot I use that USB port for my printer sharing. So time to do some reading on USB hubs and the Black Armor NAS 110. The printer is important and the UPS is important. I wonder if I can mix my peanut butter and chocolate.

Even stranger, there is a USB port on the front of the box but that is special purposed for just USB Memory backups only.

So I have several paths here to check.

Black Armor: A ToDo List - UPS and DLNA

I have two new quick projects that I need for my Black Armor NAS 110 in the immediate future.

First I need the UPS functionality for this device as I’m taking power hits at my residence and my old UPS’ are just way too old and not working to keep the NAS running after a power blip. I bought an APC Back-UPS ES BE550G 550 VA 330 Watts at CostCo with one of their specials. The Black Armor NAS documentation said it only works with APC UPS so I thought I was okay but with further reading in the forums they say results vary with APC devices. So time to see if my new APC UPS will work with the built-in software or if the software needs improvements. So I hope to have a smart UPS running but just the dumb UPS functionality without a shutdown mode will have to do if I cannot get it working. The smart UPS depends on apcupsd 3.12.2 according to a post.

$ /usr/sbin/apcupsd --version
apcupsd 3.12.2 (18 January 2006) redhat

Next on the list is to figure out how functional the streaming media works on the device. This will hopefully be more straight forward than the UPS. Family time will be vastly improved if I can get the DVD collection running off this device. DLNA is an interesting subject and my BlueRay player hooked to my TV may be able to play movies off the NAS. That would be optimal.

Black Armor NAS Information

Here is the beginning of a dump of information on the Black Armor device from the Linux kernel and environment. From this I learned the processor type and features. I also got some pointers to cross-compiler options used. These will all be important later.

Rsync on Black Armor NAS 110

I figured out something simple but neat on the Black Armor NAS 110 (BA-NAS110) device. It has rsync a powerful file-system replication tool from UNIX.

Caveats are that in order to do this you must have root on the device and a ssh connection with the command line. I’ll write a friendly doc on how to get ‘root’ later. (Just search for Hajo Noerenberg’s work on the subject sans the friendly write up if you want to do it now.)

So, the BA-NAS110 is capable of using rsync from the command line to replicate its data to another NAS or Linux system if you have root on the system. Getting it setup was simple enough but knowing that the rsync daemon and client were on the systems was the trick.

You have to create a rsyncd.conf file since there isn’t one pre-built. Syntax is common to the typical rsync 3.0.4 version.

Seagate Black Armor 110 NAS

I found something fun.

The Seagate NAS (Network Attached Storage) that I’ve been using at my house is running an embedded Linux. A NAS is a big network hard drive you can share between computers. I got a root account on it and have found a whole world of fun that could be done in there. Root is the master administrative account for UNIX systems that let you do extra things beyond the normal.

First steps is getting a functional toolchain and then build some trivial tools. The goal would be to have a full set of GNU tools available in a package format for people to use. I want to publish a full working OpenSSH with scp support and rsync for this thing as a starting point. Maybe add some features for NFS. Just digging around on this thing reminded me how much I enjoy hacking on hardware.

Visiting DC

Doing a presentation on NIST 800-53, IRS Publication 1075, ISO/IEC 17799, and how it relates to the NIST CWE (common weakness enumeration) at the IRS.

The basis is a comparison of the FTC Safeguards versus IRS Safeguards requirements.

Dear god am I boring when this excites me as much as it does.

Droid stuttering GPS

Ran into a goofy problem with my Motorola Droid after it just working great for the last few months. The GPS just decided to stop connecting one day. This is major bad news as the turn-by-turn navigation is a really nice feature I use a lot.

Of course I had not done anything before it stopped working …. except add Google Latitude with cell tower location, uninstall the WeatherChannel application, and installed the Weatherbug application.

Dug into the forums and found something on Weatherbug and pulling the battery on restart. Finally figured out it was probably the “Fix for GPS bug” option in Weatherbug. Testing it and posted it back to the Google Help.

New phones

Well last I posted, we just got the new Motorola Razr’s in 2007. Dumped those last month and have the Motorola Droid’s for all three of us. Nifty little things with lots of apps and things.

They are teaching a course at NCState on Java programming on Android which sounds interesting. I got a couple of books on programming for them but no time to mess with it yet.

Post later.

New cell phones

I bought new cell phones (Motorola Razor v3) for the whole family and I’ve just gotten them connected to my laptop. I’m trying to get my calendar and contact list on Gmail to download to it. The MPT (Motorola Phone Tools) lets you tie Outlook or Lotus Notes to your phone. The 5th gen video ipod has a tool to convert Gmail Calendar into your iPod. That might be an interesting place to start. It would be nice to tie the calendar together for the whole family on our phones.

The phone itself is actually quite a powerful little toy. The mobile java is an interesting environment.

Welcome to the blog

I’m not a writer but I’m going to try put some posts in here occasionally. We’ll see what happens.