tag:blogger.com,1999:blog-383795382024-03-05T05:05:35.947-06:00Papa Geek: TinkeringMy tinkering and thoughts... Sometimes these are mutually exclusive.Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-38379538.post-3065006112874105852008-08-08T13:26:00.001-05:002008-08-08T13:27:11.378-05:00Well, that didn't last very longBack From Typepad. I just couldn't bring myself to pay for something I wasn't using all that much!Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-46821105785971351542007-10-14T22:00:00.000-05:002007-10-14T22:02:16.332-05:00Moving -- Going to Typepad.comSince my wife and I have both decided to start contributing to a joint blog, we've moved over to<br /><br /><a href="http://trotters4eva.typepad.com">http://trotters4eva.typepad.com</a> and<br /><br /><a href="http://trotters4eva.typepad.com/papa_geek">http://trotters4eva.typepad.com/papa_geek</a>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-65309938491626265282007-10-12T16:51:00.001-05:002007-10-12T16:54:00.510-05:00Push Gmail For Windows MobileFor the past month, since getting my Windows Mobile PocketPC, I've been having the hardest time finding an easy and FREE way to get my GMail pushed to my phone.<p>Well, I've finally found it. It goes by the name emoze. This is a native Windows mobile app that synchs your GMail inbox with your phone. However, messages deleted from the phone are not deleted from GMail. Also, it will download all your GMail contacts into your phone... This can be turned off, but usually, you'll have almost all of them before you can.</p><p>The nice thing is that once you have it all set up, it works like a dream pushing emails almost instantaneously.</p><p>Go to <a href="http://www.emoze.com/">http://www.emoze.com</a> For more info, and for direct install for the supported phones <a href="http://mobile.emoze.com/">http://mobile.emoze.com</a></p>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-35973331379937891742007-10-12T16:34:00.001-05:002007-10-12T16:38:20.498-05:00Mobile Blogger.com<p class="mobile-photo"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW0XsVPxk9hZsY28rxThJQm2NvwA5mtQnE8jXuYaQ5lSX5HJFRYdz6A402Rms7ziIKMx8go0y3RrzHABMw_6Iq5VnhATucXxhB-Dh2MrjDfsPEnomeVFtNCyFSp_FpwAdPJA7OsA/s1600-h/IMAGE_021-773629.jpg"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW0XsVPxk9hZsY28rxThJQm2NvwA5mtQnE8jXuYaQ5lSX5HJFRYdz6A402Rms7ziIKMx8go0y3RrzHABMw_6Iq5VnhATucXxhB-Dh2MrjDfsPEnomeVFtNCyFSp_FpwAdPJA7OsA/s320/IMAGE_021-773629.jpg" alt="" id="BLOGGER_PHOTO_ID_5120566855008774322" border="0" /></a></p>Ohhhh yeah, I'm waaaaaay behind the time as this is my first official<br />mobile blog post. As I am doing this as a test of not only<br />blogger.com, but also of my new phone, I'm including a picture of<br />something on my desk for the fun of it.<p>Hope to be posting more often now.</p><p><br /></p>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-30756646097253783642007-06-20T22:26:00.001-05:002007-06-20T22:31:22.847-05:00I have returnedSorry for the long delay, but I'm back to trying to update this blog... at least occasionally.<br /><br />I've been running my tail off at work since we just released our new firmware for our switches, and I'm helping to track down a possibly bad Xorg driver (how I've come to loath silicon motion's linux drivers).<br /><br />But on the positive side, I have started really porting linux 2.6.19.7 to our board that uses a Freescale MPC8272. I tell you what, we use every damn one of our SCCs and SMCs, plus the FECs as well.<br /><br />Good news is I've got all those interfaces mostly working and can boot Linux very easily over NFS. (Yes, this just a debug step). I've even had fairly good success porting over our custom modules to the 2.6 way of "thinking". <br /><br />I have a new appreciation of JTAG, I'll tell you that much!Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-57650975771478477642007-04-19T21:48:00.000-05:002007-04-19T21:53:35.362-05:00Sorry for the Delays in PostingI have recently been tasked with an interesting assignment that is driving me a bit batty and is consuming a lot of my mental effort during the day.<br /><br />I'm in the process of porting an MPC8274-based 10Gb ATCA switch to work with the 2.6 series linux kernel. I'm having a hell of a time even getting the serial port to work (as in I haven't been successful even after a week of work).<br /><br />So.... not much for updates other than informational today. Although, what I learn will be placed here as I can't find a damn thing on google to really help me with this....Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-79935517960625735202007-03-26T22:40:00.000-05:002007-03-26T22:44:56.979-05:00THLinux UpdateI know that this will sound crazy, but I'm radically changing my approach to THLinux and may shelve it completely. After tinkering around for a bit, I realized that I am basically trying to recreate <a href="http://buildroot.uclibc.org/">Buildroot</a> from scratch. Which is stupid because the developers of both busybox and uClibc maintain the Buildroot scripts.<br /><br />So, what I am looking to do is use the buildroot to construct a basic, static bootable core environment. Then I will look into adding in debian-like support so that you can build up your own debian-derived system (as the basic dpkg is supported by busybox... as is).<br /><br />So, as I said earlier about THLinux, it's extremely alpha and subject to my whims.... neither of which can be considered stable. ;-)Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com1tag:blogger.com,1999:blog-38379538.post-13866725459897076212007-03-21T22:51:00.000-05:002007-03-21T22:58:52.497-05:00THLinux and Gumstick Gentoo UpdatesAs per my THLinux announcement, I have created a <a href="http://home.comcast.net/%7Ehunter.cobbs/thlinux">homepage</a> for it. Now, don't laugh at the formatting of the page please. Remember, I'm an engineer... not a graphic design artist! But there are some basic gotchas and download link. Right now, the safest thing to do if you want to just try it out is to execute "#./build_thlinux; ./install_thlinux /dev/sd{a,b,c,d}1 {-g}"<br /><br />sd{a,b,c,d}1 is your thumb drive device that you'd like the rootfs directory dumped into, and the {-g} will install and setup grub on the thumb drive(provided you have grub-install on your host computer).<br /><br /><br />THLinux TO DO:<br />---------------<br /><ul><li>Add build/install support for "nslookup" as it is broken in my busybox build (will come from bind 9.4.0)</li><li>Add elinks/lynx for web browsing</li><li>Look at adding TinyX and Matchbox for GUI support</li><li>Investigate Cross-Compiled installs... (this could get very interesting... )</li></ul><br />Gumstick Gentoo TO DO:<br />-----------------------<br /><ul><li>Create THLinux-like build scripts to construct Gumstick Gentoo with a simple build script</li><li>Investigate the experimental uclibc-based Gentoo for shrinking image even more.<br /></li></ul>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-55843912849555484112007-03-12T21:47:00.000-05:002007-03-16T22:03:04.814-05:00New USB Linux Solution Announcement: THLinuxAfter tinkering around with gentoo, debian, ubuntu, and many other distribution solutions, I found that none of them did what I wanted in a small space. Well, I believe I have finally solved the issue.<br /><br /><a href="http://home.comcast.net/%7Ehunter.cobbs/thlinux/"><span style="font-weight: bold;">Announcing: THLinux</span></a><br />----------------------<br /><br />A full 2.6.x series kernel distribution with a simple master build script that fits in <64mb><li>Boots From USB thumbdrive</li><li>Linux 2.6.17.14 Kernel with approx 32MB+ of available modules</li><li>Scripted build environment with minimal deployment requirments</li><li>Custom Compiled</li><li>Build Script is customizable to update rootfs and kernel sources</li><li>Basic IPv4 Networking</li><li>Text Editing </li><li>Mount and read from nearly any type of file system</li><li>Patch minor bugs in busybox-1.4.1:</li><ul><li>Patched applets/applets.c to allow static busybox linked against glibc (although the developers might argue I broke it to allow statically linked .... ;-) )</li><li>Fixed scripts/mkconfigs so that it generates a correct bbconfigopts.h</li><li>Fixed scritps/trylink so that it will actually work in ubuntu(and probably other distributions as well)<br /></li></ul><br /><br />TODO:<br />Download missing/newer sources and patches<br />Add more functional programs<br />Add support for Cross Compiling<br />Add support to build PXE-bootable images<br />Create a "make menuconfig" style interface<br /><br />So far, I have been able to create a bootable thumb drive with the user needing only minimal command line interaction. A full build log is maintained in the background while providing simple status updates to the standard output.<br /><br />As of right now, my build environment has been tested and appears to be fully operational in Ubuntu Dapper Drake and Edgy Eft(with downgrade to 4.0 series compiliers) . Granted, it's an early alpha stage, but what in the embedded world isn't?Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-79549620369432389512007-03-02T21:27:00.000-06:002007-03-02T22:04:30.414-06:00Top Ten Ways to Get a Geek to Help...In my browsing around the web and doing computer tech work for the past ten years, I've come across some truths in this world... relating to Geeks of course. Therefore, I intend to share my knowledge of how to actually get a geek to help you out when you need it.<br /><ul><li style="font-weight: bold;">0x0A - Ask Them<br /></li><ul><li>This may sound completely insane, but sometimes you can actually get help from a Geek if you ask nicely. Usually, you can pick out the Alpha Geek easily with this tactic as (s)he will usually make some sound resembling a cackle and roll their eyes. Beta Geeks will mumble something about being too busy and walk away. Then you get to the Gamma(wanna-be) Geeks. Sure, it won't be the best Geek in the world to get your task done, but something at least will happen.<br /></li></ul><li style="font-weight: bold;">0x09 - Threaten Them</li><ul><li>This is only slightly better than the 0x0A approach. Mainly all this will accomplish is motivating the Beta Geek to get something done for you, if begrudgingly. However, expect a snide remark from an Alpha Geek, and you will most likely get a "deer-in-headlights" look from the Gamma Geeks.</li></ul><li><span style="font-weight: bold;">0x08 - Pay Them</span><br /></li><ul><li>As much as Geeks say they do it as a hobby, everyone likes money. Depending on the amount offered, you could easily net you an Alpha Geek.<br /></li></ul><li><span style="font-weight: bold;">0x07 - Buy Food for Them</span><br /></li><ul><li>As much as Geeks like money, they like free things even more. Even if the free things are utter CRAP, it's like Geek Gold. Food however, is about an average-level enticement. Therefore, expect Gamma - Beta Geeks to be enticed.</li></ul><li><span style="font-weight: bold;">0x06 - Give Old Computer Parts to Them</span><br /></li><ul><li>Following on the same line of thought, this is a Gamma - (low-rent)Alpha Geek enticement. The only reason I say low-rent is that an Alpha Geek will most likely already own a small shed that does nothing but act as their spare parts bin.</li></ul><li><span style="font-weight: bold;">0x05 - Tell Them You Can Do Something, and then Screw Up</span><br /></li><ul><li>Now that we're past the <span style="font-style: italic;">NORMAL</span> enticements, you need to understand something about Geeks. They love to show their superior knowledge about all things Tech. Therefore, if you don't want to take the direct approach with bribes, you need to appeal to another facet of the Geek's personality: Inferiority Complexes that are masked by in-depth knowledge of tech. So as the title suggests, tell the (Gamma - Beta) Geek all about this handy trick you just learned and how you want to show it off. Then as they are intently watching, intentionally do EVERYTHING wrong, and say, "<span style="font-style: italic;">Well it worked on that old Penturiam 98 Box downstairs... why doesn't it work here?</span>" At this point, stand back and let the Geek get to work.<br /></li></ul><li><span style="font-weight: bold;">0x04 - Buy Beer for Them (Legal ages only, please)</span><br /></li><ul><li>Ahh, now we're <span style="font-style: italic; color: rgb(0, 0, 0);">GETTING</span> somewhere! About the only thing better than an all night-programming session is having a pack of frosty beverages to help "get you in the zone". This tactic will likely net you the big one, an Alpha Geek. Although, it does help to know what level your Geek is; therefore, be sure to use tactic 0x0A to figure out who is the Alpha Geek.<br /></li></ul><li><span style="font-weight: bold;">0x03 - Tell Them That There's No Way They Can Do Something</span><br /></li><ul><li>The only thing an Alpha Geek likes better than beer or showing off what they know is a challenge, especially when you single them out in front of others to say they can't do something. If nothing else, the Geek will get it done out of <span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);">SPITE</span>. They will then make it known they did it out of spite and in a really loud manner. Be prepared to take a bit of diatribe at this point.<br /></li></ul><li><span style="font-weight: bold;">0x02 - Be a Member of the Opposite Sex</span><br /></li><ul style="font-weight: bold;"><li><span style="font-weight: normal;">Geeks need luvin too.... Even if there's no chance of it happening</span><br /></li></ul><li><span style="font-weight: bold;">0x01 - Be a HOT Member of the Opposite Sex</span><br /></li><ul><li><span style="font-style: italic; color: rgb(0, 0, 0);">Seriously</span>, did you really think you were gonna get a date out of it?<br /></li></ul></ul>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-25091704206113253722007-03-01T21:56:00.000-06:002007-03-02T21:09:56.803-06:00Other World Computing Warranty Hassles....<span style="font-weight: bold;">Update 3/2/2007: After kicking it around at OWC, apparently, their owner made an exception and has granted my warranty request. I also want to point out that the original owner of the ram has used these people MANY times and has nothing but praise for them.</span><br /><br /><br />First off, let me say that I don't usually like to do these sorts of things, but I figured that people (especially Macintosh owners) might like to hear this.<br /><br />Next, let me setup the situation. I bought a Mac Mini second hand from someone who had upgraded the ram with a 1GB DDR2700 DIMM from OWC, a computer upgrade website targeted towards the Mac user. The RAM has since gone bad and I'm trying to get a warranty replacement since it has a lifetime warranty.<br /><br />As they have a confidentiality statement in their email that does not permit reproduction, I will give you a summary as to protect all involved except the company in question.<br /><br />Since I saw no restrictions on the warranty information on their site, I emailed their RMA form and received a response .<br /><br />The response seemed friendly enough asking if they could use the original credit card to place a hold in order to expedite a cross shipment(nothing outlandish there).<br /><br />Since the original owner should not be liable for this, I let them know that I had ownership of the ram and would like to use my card and address to secure the cross-shipment.<br /><br />They responded back saying that their warranty was not transferable.<br /><br />At this point, I go to their website and read their warranty policies(see the quoted text at the end of this post). Nothing in there about being non-transferable or limited in any way other than direct physical abuse.<br /><br />I respond back to my contact with this, to me, reasonable view of their warranty, and they once again said that their warranty was not transferable.<br /><br />At this point I requested contact from the supervisor and have, as yet, received no response. Hence my dilemma. This RAM is about a year old, has verifiable problems, the warranty(as far as I can tell) should still be valid, but they won't do anything about it. The really interesting part however, is that the original owner CAN request a warranty exchange and I believe that they can use my card and address, but they won't do it if I make the request. What am I missing?<br /><br />At least for initial owners, they seem good enough at customer service.<br /><br />-- The Papa<br /><br /><br /><br /><span style="color: rgb(153, 153, 153);">Here the text of their memory warranty page as of 3/1/2007. (screen shot was too difficult to post on blogger. Although, I do have both a screenshot, an HTML dump, and all the emails for my evidence.</span><br /><blockquote style="color: rgb(153, 153, 153);"><br /><p class="style2">All OWC Memory is covered by a Lifetime Advance Replacement Warranty and 30 Day Money Back Guarantee! This warranty shows our commitment and confidence in the product we sell. OWC certifies and tests ALL OWC memory to ensure that this memory meets or exceeds the specifications for those systems a module is listed as being correct/compatible with. Unlike the competition, OWC owns and maintains our own lab that includes nearly every Apple/Mac model we list compatibility for. In addition to the long testing every OWC module undergoes before shipping (most just short test if they test at all), we also continuously batch test modules in the actual machines. You can count on OWC to consistently deliver the top quality memory products you need, correct for your system for a lifetime of reliable operation.</p> <p class="style2">OWC Memory Warranty/Guarantee terms:</p> <p class="style2">Within 15 Days of invoice date*: Should any issue be experienced with a module in a system it is listed to be compatible with, OWC will - At no cost to you, issue a Return Shipment Label that covers the return shipping of said product back to OWC. It will be your choice at that time for OWC to advance ship replacement product or request that OWC provide a full refund for the original product upon it's return to OWC. OWC covers the full cost of returning the product as well as the cost of shipping the replacement.</p> <p class="style2">Within 30 Days of invoice date: Any memory module may be returned for refund or to be exchanged for a different item. Refund/Exchange value provided for memory returned is the lesser of the invoiced price or current web listed selling price. Return must be received within 30 days of the original invoice date, after 30 days - Lifetime Warranty terms apply.</p> <p class="style2">A Lifetime Warranty applies to all OWC Memory items unless otherwise specified. Should your memory product cease to function in a system that module was listed as compatible with at the time of purchase, OWC will replace the module at no cost. At your option, OWC can either advance ship a replacement via a credit card authorization that will be released upon receipt of the original product or do standard replacement whereby OWC will ship the replacement memory upon receipt of the suspect product. In either case, you will be responsible for the return freight to OWC and OWC will be responsible and cover the cost for shipping the replacement product to you.</p> <p class="style2">The OWC Lifetime Warranty on memory does not cover damage that is the result of mishandling, incorrect installation, or incorrect use and is limited only to the OWC memory module. Although relatively rare, the most common mistake we see with memory installation is where a module has been forced into a slot backwards. All memory modules have a notch or notches on the pin connector that connects into the computer's memory slot. The memory slot has corresponding 'blocks/breaks' that<br />line up with the notches so the correct installation orientation is easy to determine. Sometimes it takes a little bit of force to push a module into the slot and you can remove and re-insert an existing module just to get comfortable with the process. As long as you have taken care to line the notches up, and push the memory in all the way, you'll be good to go every time!</p> <p class="style2">*15 Day DOA Pickup policy applies only for delivery/pickup within the USA.</p></blockquote><p style="color: rgb(153, 153, 153);" class="style2"></p>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-29949677592920275272007-02-16T12:28:00.000-06:002007-07-14T00:18:55.591-05:00Gumstick Gentoo - Consolidated Links<script language="javascript">var MyShoutItURL = "http://www.shoutwire.com/comments/80878";</script><script src="http://www.shoutwire.com/feed/MyShoutIt.js" language="javascript"></script><br /><br /><br />I know that it might be difficult to find the location in my tutorial you'd like to start/end, so I decided to consolidate the links with a brief overview of what's covered in each section. Hopefully, this will aid the readers.<br /><br />Part 1: <a href="http://hcob3.blogspot.com/2007/01/part-1-gumstick-gentoo.html">Know thy Enemy - Portage</a><br /><ul><li>Basic Difficulties of squashing Gentoo into a small space</li><li>Identification of Directories holding much of the storage space</li><li>Overview of tools we will need</li></ul><br />Part 2: <a href="http://hcob3.blogspot.com/2007/01/part-2-gumstick-gentoo.html">Always two, there are. A Master and an Apprentice</a><br /><ul><li>Basic definition of Embedded System Development (host, target)</li><li>How to setup your Host for development</li><li>Extracting the Base Gentoo Stage 3 setup</li></ul><br />Part 3: <a href="http://hcob3.blogspot.com/2007/01/part-3-gumstick-gentoo.html">Fattening the Turkey</a><br /><ul><li>Developing the core Gentoo system for deployment</li><li>Building kernel with needed options for USB boot</li><li>Editing grub menu.lst for USB boot<br /></li><li>Installing X-windows and fluxbox</li></ul><br />Part 4: <a href="http://hcob3.blogspot.com/2007/02/part-4-gumstick-gentoo.html">Go forth and Multiply (except for snakes... they're adders)</a><br /><ul><li>Partitioning/Formatting USB Device</li><li>Mounting for deployment</li><li>Deployment of Gentoo onto thumbdrive</li><li>Final setup of Grub.<br /></li></ul>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com2tag:blogger.com,1999:blog-38379538.post-76417931438676488162007-02-11T14:28:00.000-06:002007-03-01T21:15:05.502-06:00Debian Sarge on USB ThumbdriveHonestly, I was quite surprised with Debian Sarge. It literally took just installing the OS on a thumb drive for it to work like a charm.<br /><br />Personally, I downloaded the "businesscard" iso: http://www.debian.org/CD/netinst/<br /><br />This is a core system that boots your host computer, sets up your network devices, and installs a debian system over the internet. Amazingly, it works like a charm.<br /><br />The only thing I did to minimize the installation size was to choose "manually select packages" when queried about the type of system I would be using.<br /><br />At the end I had an ~300MB rootfs with no gui. Adding in Xwindows server and a personally selcted KDE bumped this up to ~650MB (in other words, don't just ad in the KDE meta-package. Choose which parts you really need).<br /><br />It's sad how simple it really becomes when a Distro like Debian uses an initramfs. I will definitely be looking into iniramfs for my PXE-Based Linux Test Software for work.Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-57149208578740838122007-02-04T14:27:00.000-06:002007-02-04T14:30:48.616-06:00Request for TopicsIf anyone reading this has a suggestion for Linux topics to cover, I'd be happy to entertain them. I currently am developing multiple root file systems for a new distribution I'm calling "THLinux". All of them will be embedded in nature and fit into as small a footprint as possible.<br /><br />Currently, I've been working on a ~600-750MB Debian USB drive with KDE and a tar-gziped deployment archive(~256MB download).<br /><br />Feedback is definitely welcome!Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-1169700418245475422007-02-03T21:02:00.000-06:002007-02-05T09:39:40.607-06:00Part 1: Gumstick GentooI redid the time stamps so this flows more logically down the page.<br /><br />To recap: I have been able to fit a full Gentoo distribution (with X server and Fluxbox) into a 1GB, bootable USB thumb drive. This is from a standard Stage3 install of full glibc (not the experimental uClibc/busybox distributions).<br /><br /><br /><span style="font-weight: bold;">Part 1: Know thy enemy.</span><br />----------------------------------------<br /><br />The major difficulty surrounding any "embedded" install of Gentoo lies in one of its greatest strengths:<br /><br /><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">PORTAGE</span><br /><br /></span>Most people who have installed a Stage3 system without really delving into the particulars of Gentoo probably have one simple question rolling around in their heads:<br /><br />"Why is Gentoo SOOOOO big when it's a custom-compiled Linux Distribution?!?!?!"<br /><br />Well, the short answer to this is quite direct. Portage is freaking HUGE! So, what is a Linux Embedded OS Developer (who REALLY likes Gentoo) to do? Why, take out your enemy of course! Figuratively speaking....<br /><br />Portage has several directories in the file system that it directly manipulates:<br /><ul><li>/usr/portage (duh)</li><li>/var/cache</li><li>/var/db</li><li>/var/tmp/portage</li></ul>Well, that's nice. But there is also another major culprit in shrinking a Gentoo install<br /><ul><li>/usr/src</li></ul><br />Now that you know the major "hogs" to a Gentoo system, what is one to do? Why quickly, quietly, and methodically "take them out of the picture", of course!<br /><br />As a teaser... I will let you know some of the standard Linux utilities that you will be using to make this Gumstick Gentoo work:<br /><ul><li>mount</li><li>chroot</li><li>emerge</li><li>nano/vim(my tool of choice)<br /></li></ul><br />Is that it, you ask? Why yes Virginia, that's all you really need!<br /><br /><a href="http://hcob3.blogspot.com/2007/01/part-2-gumstick-gentoo.html">On to Part 2</a>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-18940811564115645482007-02-03T21:01:00.000-06:002007-02-05T09:40:17.470-06:00Part 2: Gumstick GentooNow that we know the enemy, what are we going to do about it? Now, we need to setup our Gumstick Environment.<br /><br /><br /><span style="font-weight: bold;">Part 2: Always two, there are. A Master and an Apprentice</span><br />------------------------------------------------------------------------------<br /><br />The trick with making an "embedded" system is that you develop it on a full-fledged host system and deploy the results to your target device. Well, we apply that same idea here. The main difference is that we're keeping our emerge environment separate from our final system. Since it's unlikely that you will often update software in an embedded environment, this is a safe assumption. But, the way I do it preserves that emerge tree so that you can hook it back into your Gentoo system for any needed updates/additions.<br /><br />So, you're asking... how in the HELL do we do that? With some simple tricks I've picked up on my travels through Linux.<br /><br /><br /><span style="font-weight: bold;">The Environment:</span><br /><br />I have a two-tiered Gentoo environment for this project. First, find a directory to do some work in. You will need the ability to use all the commands listed in <a href="http://hcob3.blogspot.com/2007/01/part-1-gumstick-gentoo.html">Part 1</a>. I usually do the following in my home directory:<br /><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir gentoo portage_tree</span><br /><br />For this setup, <span style="color: rgb(51, 204, 0); font-style: italic;">gentoo/</span><span style="font-style: italic;"> </span>will hold my target file system, and <span style="color: rgb(51, 204, 0); font-style: italic;">portage_tree/</span> will hold, you guessed it, Portage! Now, we need to populate these directories with their skeleton directories.<br /><br />Portage Tree Directories:<br />---------------------------------<br /><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p portage_tree/usr_portage<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p portage_tree/usr_src</span><span style="color: rgb(51, 204, 0);"><br /></span><span style="font-style: italic; color: rgb(51, 204, 0);"> # mkdir -p portage_tree/var_cache</span><br /><span style="color: rgb(51, 204, 0);"># </span><span style="font-style: italic; color: rgb(51, 204, 0);">mkdir -p portage_tree/var_db<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p portage_tree/var_tmp_portage</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);"></span><br /><span style="font-style: italic;"></span><br />Target File System Directories:<br />-----------------------------------------<br /><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p gentoo/usr/portage<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p gentoo/usr/src<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p gentoo/var/cache<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p gentoo/var/db<br /></span><span style="color: rgb(51, 204, 0);"> </span><span style="font-style: italic; color: rgb(51, 204, 0);"># mkdir -p gentoo/var/tmp/portage</span><span style="font-style: italic; color: rgb(51, 204, 0);"><br /></span><span style="font-style: italic; color: rgb(51, 204, 0);"><br /></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);">N</span><span style="color: rgb(0, 0, 0);">otice much symmetry to that?? Well, that's because we're effectively mirroring our portage tree to a remote directory. Since we have access to the mount command, we can abstract this quite well. This remote file system can eventually be mounted from a local machine like we are about to do, or it can be mounted on an entirely DIFFERENT machine that is accessible through NFS.<br /><br /><br />Now, we need to prep our environment for extraction of the Stage 3 tarball. I'm assuming, at this point, you actually know a bit about Gentoo and how to get hold of the stages and the portage snapshots.</span></span><span style="font-style: italic; color: rgb(51, 204, 0);"><br /><br /></span><span style="color: rgb(51, 204, 0);"> <span style="color: rgb(0, 0, 0);"></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);">Linking our Portage Tree to our System:<br />--------------------------------------------------<br /><span style="color: rgb(51, 204, 0); font-style: italic;"> # mount -o bind ~/portage_tree/usr_portage \<br />~/gentoo/usr/portage<br /></span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(51, 204, 0); font-style: italic;"> # mount -o bind ~/portage_tree/usr_src \<br />~/gentoo/usr/src<br /></span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(51, 204, 0); font-style: italic;"> # mount -o bind ~/portage_tree/var_cache \<br />~/gentoo/var/cache<br /></span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(51, 204, 0); font-style: italic;"> # mount -o bind ~/portage_tree/var_db \<br />~/gentoo/var/db<br /></span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(51, 204, 0); font-style: italic;"> # mount -o bind ~/portage_tree/var_tmp_portage \<br />~/gentoo/var/tmp/portage</span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);"><span style="color: rgb(51, 204, 0); font-style: italic;"><br /><br /></span><span style="color: rgb(0, 0, 0);">Now, I'm sure you're wondering, "what the hell is -o bind". Well, that is a nice option to mount. It allows you to statically link or "bind" one directory to a different one. Therefore, what ever happens in, for instance, <span style="font-style: italic; color: rgb(51, 204, 0);">~/gentoo/var/cache</span> is actually STORED in <span style="font-style: italic; color: rgb(51, 204, 0);">~/portage_tree/var_cache</span>. Neat trick, eh?<br /><br />Now that we have our environment setup, how bout we extract those Stage 3 and Portage tarballs?<br /><br />Extracting the Gentoo System:<br />------------------------------------<br /><span style="font-style: italic; color: rgb(51, 204, 0);"># tar -jxvf ~/stage3-<your>.tar.bz2 -C ~/gentoo</your></span><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># tar -jxvf ~/portage-latest.tar.bz2 -C ~/gentoo/usr</span><span style="font-style: italic; color: rgb(51, 204, 0);"><br /><br /></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(0, 0, 0);">For those of you who have never seen the -C option here, it copies the resulting extraction into the specified directory.<br /><br /><br />At this point, your Gentoo system is ready for a workout.<br /><br /><span style="color: rgb(51, 204, 0); font-style: italic;"></span><span style="color: rgb(51, 204, 0); font-style: italic;"># cp /etc/resolve.conf ~/gentoo/etc</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># mount -t proc none ~/gentoo/proc</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># mount -t sysfs none ~/gentoo/sys</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># chroot ~/gentoo</span><span style="color: rgb(51, 204, 0); font-style: italic;"></span><br /><br />Now my that hands are getting tired, I'll end this section here. If you've ever done a Gentoo installation before, you should be able to start tinkering as you wish. You might not even need the rest of the guide!!<br /><br /><a href="http://hcob3.blogspot.com/2007/01/part-3-gumstick-gentoo.html">On to Part 3</a><br /></span></span></span></span></span>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com1tag:blogger.com,1999:blog-38379538.post-54841449818528378352007-02-03T21:00:00.000-06:002007-02-05T09:41:04.536-06:00Part 3: Gumstick GentooTo recap, we've identified our trouble (portage tree); we've removed it from our final system; and, we have entered our Stage 3 install via chroot<br /><br /><span style="font-weight: bold;">Part 3: Fattening the Turkey</span><br />----------------------------------------<br /><br />I am assuming that you know how to setup your USE, MAKEOPTS, and CFLAGS options with Gentoo. If not, go read their documentation. They are usually very good.<br /><br />First things first, we need to be sure we are running the latest and greatest.<br /><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># emerge --sync</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># emerge portage (if suggested)</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># etc-update (if needed)</span><br /><br /><br />Ok, now we have the most up-to-date portage and portage tree. What to do? Why make sure we can boot this puppy! That means kernel and bootloader.<br /><br />Since we will be using this stick on multiple computers, I'd definitely reccommend a microkernel approach except for a few particular modules. Namely, we expect to be putting this on a USB Drive. That means that genkernel would be a great choice since it turns most everything into modules. So:<br /><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># emerge gentoo( or vanilla)-sources genkernel grub vim(my editor of choice)</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);"># genkernel --menuconfig all</span><br /><br /><span style="color: rgb(255, 0, 0);">Note: All the following is from memory, so be lenient on me for minor errors. But, please to notify me of problems!</span><br /><br />In your menuconfig, you need to traverse through the tree to both the SCSI the USB Drivers section. Say yes(not M) to the following modules:<br /><br /><span style="color: rgb(51, 102, 255);">EHCI (usb 2.0)</span><br /><span style="color: rgb(51, 102, 255);">UHCI (the OTHER usb 1.1)</span><br /><span style="color: rgb(51, 102, 255);">OHCI (usb 1.1)</span><br /><span style="color: rgb(51, 102, 255);">USB Mass Storage (and all sub modules)</span><br /><span style="color: rgb(51, 102, 255);">USB HID (and all sub modules)</span><br /><br /><span style="color: rgb(51, 102, 255);">SCSI devices(your thumb drive will look like a scsi device.)</span><br /><br />Exit and save your kernel. From here, genkernel can will take control. However, since you don't have a boot loader configured AND you're in a chroot environment, you'll have to do some boot loader config manually. Also, lets make some easy to use symbolic links in /boot.<br /><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># cd /boot</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># ln -s </span><span style="color: rgb(51, 204, 0); font-style: italic;">{kernel image} </span><genkernel><span style="color: rgb(51, 204, 0); font-style: italic;">vmlinuz </span><br /><span style="color: rgb(51, 204, 0); font-style: italic;"># ln -s </span><genkernel></genkernel></genkernel><span style="color: rgb(51, 204, 0); font-style: italic;">{initrd image}</span><genkernel><genkernel><span style="color: rgb(51, 204, 0); font-style: italic;"> initrd.img </span><br /><br /><br /><br />Boot Loader:<br />----------------<br /><br />Now, you notice that I chose grub as that is my most familiar. So everything in this section is dependant on that.<br /><br />First thing with grub is that you need to specify what device map to what identifier. For instance.<br /><br /><span style="color: rgb(51, 204, 0);">#vim /boot/grub/device.map (you probably don't have one of these, so this will also create it)</span><br /><br /><span style="color: rgb(51, 102, 255);">Inside VIM:</span><br /><span style="color: rgb(51, 102, 255);">- /dev/sda (hd0) #USB Thumbdrive</span><br /><span style="color: rgb(51, 102, 255);">- /dev/hda (hd1) #in case you have a kernel on the primary IDE drive you wan to use</span><br /><span style="color: rgb(51, 102, 255);">- /dev/fd0 (fd0) #floppy disk</span><br /><span style="color: rgb(51, 102, 255);">-</span><br /><br />Now, we also need to create a menu for grub.<br /><br /><span style="color: rgb(51, 204, 0);">#vim /boot/grub/menu.lst (also, you probably don't have this one)</span><br /><br /><span style="color: rgb(51, 102, 255);">Inside VIM:</span><br /><span style="color: rgb(51, 102, 255);">-</span><br /><span style="color: rgb(51, 102, 255);">- defalut 0 #which "title" option to boot by default... 0-based</span><br /><span style="color: rgb(51, 102, 255);"> - timeout 5 #5 seconds to change your mind </span><br /><span style="color: rgb(51, 102, 255);">-</span><br /><span style="color: rgb(51, 102, 255);"> - title Gentoo Stick</span><br /><span style="color: rgb(51, 102, 255);"> - root (hd0,0)</span><br /><span style="color: rgb(51, 102, 255);">- kernel /boot/vmlinuz ro quiet rootdelay=10</span><br /><span style="color: rgb(51, 102, 255);">- initrd /boot/initrd.img</span><br /><br /><br />Some explaining:<br /><br />root - in this case, specifies that any "/"(root) directory is on the first partition on the first device in device.map<br /><br />kernel - path to your kernel... relative to "root" plus any other options<br /><br />initrd - path to your initrd... relative to "root"<br /><br />rootdelay=10 - this is a bit of a hack built into 2.6 kernels. It pauses for 10 seconds just before it tries to load your root file system specified on the kernel line. This allows your usb device to actually be detected by drivers that may be a bit slow on the uptake.<br /><br /><span style="color: rgb(255, 0, 0);">NOTE: we have yet to do a "<span style="color: rgb(51, 204, 0); font-style: italic;"># grub-install</span>" for a very good reason; ie We're ina chroot environment and we don't have our target drive mounted... So, DON'T try it yet.</span><br /><br />Now, we just need the fun stuff... a GUI<br /><br /><span style="color: rgb(51, 204, 0);"># emerge fluxbox x11 xfree86-vesa xdm</span><br /><span style="color: rgb(51, 204, 0);"># echo "exec fluxbox" >> ~.xinitrc</span><br /><span style="color: rgb(51, 204, 0);"># passwd</span><br /><br />Now, we should have a base system configured ready to deploy... What's one to do? Why exit our chroot.<br /><br /><span style="color: rgb(51, 204, 0);"># exit</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/proc</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/sys</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/dev</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/usr/src</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/usr/portage</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/var/cache</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/var/db</span><br /><span style="color: rgb(51, 204, 0);"># umount ~/gentoo/var/tmp/portag</span>e<br /><br /><a href="http://hcob3.blogspot.com/2007/02/part-4-gumstick-gentoo.html">On to the final Part 4</a><br /></genkernel></genkernel>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com1tag:blogger.com,1999:blog-38379538.post-46430362225804378772007-02-03T20:59:00.000-06:002007-02-03T21:40:10.772-06:00Part 4: Gumstick GentooTo recap, we've built a basic stage3 Gentoo system in a chroot environment. Now, we are ready to deploy that image.<br /><br />Part 4: Go forth and Multiply (except for snakes... they're adders)<br />---------------------------------------------------------------------------<br /><br />Now, we've got a nice prepared stage3 Gentoo ready for deployment. It's even nicer because we have removed our portage tree and have it available for later upgrades.<br /><br />So now, what do we do? Why deploy our image.<br /><br />First we need to prep our disk drive. Since Ext3 fs is compiled as a module, this will be a good choice for our final file system. The first step is to create a partitioning scheme. Since flash disk have a limited life span and are damn slow to access, we do NOT want to create a swap partition there. However as a teaser, I'll let you know that it's possible to steal ram from your video card (that's not in use) and turn it into a block device... i.e. perfect swap space.<br /><br /><span style="color: rgb(51, 204, 0); font-style: italic;">#fdisk /dev/sd{a,b,c,d}<span style="color: rgb(51, 204, 0); font-style: italic;">(your drive goes here... and alwas specify it without a number)</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;">fdisk> d(elete all partitions currently on the system)</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;">fdisk> n(ew, create a primary partition that takes up your entire drive)</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;">fdisk> a( set the boot flag on partition 1)</span><br /><span style="color: rgb(51, 204, 0); font-style: italic;">fdisk> w(rite the partition table and exit)</span><br /><br /></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 0, 51);">Ok, now we need to create our file system on the new partition, mount the new fs, and deploy our image.</span></span><span style="color: rgb(51, 204, 0); font-style: italic;"><br /><br /><span style="font-style: italic; color: rgb(51, 204, 0);">#mkfs.ext3 /dev/sd{a,b,c,d}<span style="font-style: italic; color: rgb(51, 204, 0);">1 (this time we specify a number because we need the partition)</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);">#tune2fs -c0 -i0 /dev/sd{a,b,c,d}<span style="font-style: italic; color: rgb(51, 204, 0);">1 (disable error checking... these do have limited writes...</span></span></span></span><span style="color: rgb(0, 0, 0); font-style: italic;"><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 204, 0);"></span></span></span><span style="color: rgb(51, 204, 0); font-style: italic;"><span style="font-style: italic; color: rgb(51, 204, 0);"><span style="font-style: italic; color: rgb(51, 204, 0);"><br /><span style="font-style: italic; color: rgb(51, 204, 0);">#mount /dev/sd{a,b,c,d}<span style="font-style: italic; color: rgb(51, 204, 0);">1 /mnt</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);">#cd ~/gentoo</span><br /><span style="font-style: italic; color: rgb(51, 204, 0);">#find . | cpio -pdm{u}{v}<span style="color: rgb(51, 204, 0);"> /mnt</span><br /><br /></span></span></span></span></span><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 204, 0);"><span style="color: rgb(51, 0, 51);">The command that includes cpio is useful for many reasons. <span style="color: rgb(51, 51, 255);">CPIO</span> is an extremely useful backup utility as it can take a stream from <span style="color: rgb(51, 51, 255);">FIND</span> and copy the files anywhere you want them. Also, the <span style="color: rgb(51, 51, 255);">{u}</span> allows you do to an unconditional overwrite, and the <span style="color: rgb(51, 51, 255);">{v}</span> will tell you all about your progress. It should be noted that <span style="color: rgb(51, 51, 255);">{p,d,m}</span> are required to maintain your permissions, create needed directories and accept piped names.</span><br /><br /><span style="color: rgb(51, 0, 51);">Now you have to edit your grub file in such a way that is knowledgeable of the fact that your USB hard drive is trying to be loaded at the same time as you are trying to execute <span style="color: rgb(51, 51, 255);">"/sbin/init"</span>. I will leave the rest of the configuration up to you except for the usb-specific kernel parameters. The parameter that you will specifically need is "<span style="color: rgb(51, 51, 255);">rootdelay={5,10}</span>". This rootdelay command does exactly what it says. It delays trying to activate your root partition for x seconds (5 or 10 as shown above). This will give your kernel enough time to recognize the thumb drive and activate it before the concurrent thread tries to load up your root file system.</span><br /><br /><span style="color: rgb(51, 0, 51);">After you have configured grub, you can execute the following to attempt an automatic setup.</span><br /><br /><span style="color: rgb(51, 204, 0); font-style: italic;">#grub-install --root-directory=/mnt /dev/sd{a,b,c,}</span><br /><br /><span style="color: rgb(51, 0, 51);">The root directory tells grub where to look for <span style="color: rgb(51, 51, 255);">/boot/grub/</span> and the other part specifies the MBR of the usb drive you are attempting to set up. If this fails for any reason, you're like going to need to do a manual grub install. That's something for another article.</span><br /><br /><span style="color: rgb(51, 0, 51);">Now if all went well, you should be able to<span style="font-style: italic; color: rgb(51, 204, 0);"> #umount /mn</span><span style="color: rgb(51, 204, 0);">t</span> and attempt a reboot of your new Gumstick Gentoo.</span></span></span></span></span></span>Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0tag:blogger.com,1999:blog-38379538.post-1166992851004508992006-12-24T14:38:00.000-06:002007-03-01T21:20:58.554-06:00Well crap...I was able to completely delete my previous blog here, but I couldn't recover it....<br /><br />Great...<br /><br />However, I will soon place some information here about my tinkering with Gentoo. As an appetizer, I will let you know that I have been able to shoe-horn Gentoo with X11 and Fluxbox into a bootable 1GB USB Thumb drive. Hopefully in the following weeks, I will begin posting a how-to on the matter.Hunterhttp://www.blogger.com/profile/08491506104245527530noreply@blogger.com0