Thursday, October 28, 2010

FSOSS 2010 - Plug Computing Workshop (October 28, 2010)

Since I started in my program, I never missed a single FSOSS event. I can't find any reason not to join; It's cheap, I learn things that for sure won't be available anywhere else, and lastly..FREEBIES!! Of all the FSOSS events, workshops have always been what I like the most. Today I showed up for Chris Tyler's Plug Computing Workshop.

The workshop covered everything from setting up the GuruPlug to creating a personalized image server. I'm convinced on how powerful ARM PCs are, so I'm considering of getting one and probably experiment on it.

As always, workshops include Q&A part. I never had a chance to ask any question but I learned from Chris some important things to know about the GuruPlug and similar ARM based plug computers
  • GuruPlugs have problems with Gigabit Ethernet (slows down for some odd reason)
  • Overheat problems (the reason why it's got a fan in the middle)
  • GuruPlugs consume electricity comparable to a radio clock
Useful Links:
PandaBoard
BeagleBoard
SheevaPlug

Friday, October 22, 2010

The day I learned about Python

Chris Tyler discussed a little bit about Python today for my classmates working on projects that include moderate to heavy scripting. I'm not really good at programming languages but I always find myself interested to learn about it.

As soon as I got home, I hurriedly turned on my PC and wrote my first Hello World in Python. Sir Chris told me last Thursday when I asked him which programming language will stand out the most in the near future, He replied... "Python".
I definitely agree to what he said; Considering some popular software embed/use Python.

Anyway I'm interested in learning more so I downloaded my copy of "Dive into Python".

Regarding the ARMv7 Project, I haven't had a time this week. I still need to catch up on my readings.

Wednesday, October 20, 2010

Details about the ARMv7 Project

I had a great time talking to Chris Tyler yesterday about the ARMv7 Project. He explained the tests needed for the project and briefly contrasted ARMv5 & ARMv7.

My project details include:
-Working on the cdot-beagleXM-0-3 host
-Study the make command and the gcc compiler
-Compile software under ARMv7

Just a quick info:
cdot-beagleXM-0-3 is an ARMv7 board that tests ARMv5 architecture builds. What does that mean?? I can't think of any good analogy but this.. It's like running an old PC game on a NEW computer. It will work, but without the enhanced features on.
With that said, my project will try to test if the technologies in ARMv7 provide significant performance difference against ARMv5.

BeagleBoard XM image


More About ARM and BeagleBoard
BeagleBoardXM
List of ARM processors
Supporting Architectures above armv5tel Project Page

Wednesday, October 13, 2010

Using Mock & Koji

After wasting 2 weeks of trying to build my own spec file from scratch, It's a pain to say that I need more time to fully understand some of the macros used in my privoxy build. privoxy's spec file although short, has lines meant for advanced builders. It's a real challenge for a noob builder like me!! :)

On the brighter side, building a spec for nled walked me through the basics I need. The "How to Create an RPM Package" and the "Maximum RPM" are both good resources.

Using Mock

The "Using Mock to test package builds" page has all the instructions and links needed for a successful mock build (In which I noticed that my build was slower compared to using rpmbuild-ba). I also followed the instructions for setting up SELinux policy for mock.



Using Koji

Using Koji in Fedora is also pretty straight forward. Setting up my certificates and uploading my build didn't take long.

Here's an image of my build status:



Lastly....

I'm putting off my tests for rpms to work on the armv7tel project. I only have a project page draft for now, but I'll make sure to document everything.

Details on my armv7tel project can be viewed here

Wednesday, September 22, 2010

Week 2 (September 13) - RPM Packages I (using rpmbuild)

Objectives:
- Prepare system for rpm packaging by installing core development tools.
- Rebuild/Repackage an existing RPM package using rpmdev tools and play around with the .rpmmacros -j value for each compile.

Preparations for rpm packaging:

In order to successfuly repackage a source rpm, certain tools are needed in my fedora system.

I need all of the following (Install using yum):
rpmdevtools
rpm-build
rpmlint
rpm
yum-utils

Rebuild/Repackage an existing RPM package:

NOTE: None of the steps below require root
STEPS:
1. Once all the required tools are downloaded, I need to create my build directory using the command
#rpmdev-setuptree
The rpmdev-setuptree command will create the rpmbuild directory located at my user's home (~/rpmbuild).

2. Download a source package using yum.
#yumdownloader --source privoxy

3. Install the downloaded source package (which places the package's .spec file into ~/rpmbuild/SPECS and other source and patch files in ~/rpmbuild/SOURCES).
Command: rpm -i pkg*src*rpm
#rpm -i privoxy-3.0.16-2.fc13.src.rpm

4. I then have to go to ~/rpmbuild/SPECS/ directory and check the spec file of the software to be packaged; then run the "rpmbuild" command on the spec file, which will go through a series of steps to produce my packages.
#rpmbuild -ba privoxy.spec

Editing the .rpmmacros file and change the value for -j:

The .rpmmacros file is an invisible file located in user's home directory (~/.rpmmacros)
There's not much I know of this file (I'll study more about it) but as Chris Tyler stated in class, the %_smp_mflags -j3 (where -j3 is the default option)
tells the kernel on how to fast it should go when installing a software.
So I played around with the %_smp_mflags -j3 value. I was expecting that a higher -j value would mean faster build time.....

I was wrong!

Unfortunately for my build, the   -j3 (default) option, is  .565 seconds slower than the -j1 option  in time (user mode). I tested other options up to   -j5 which resulted to slower build times.

I will  test my build on other systems this coming Friday to make sure my observation is correct. The test was ran on a Fedora 13 system (virtual machine) using Windows 7 as a host (AMD dual-core).

UPDATE: (September 26, 2010)

I learned from Chris that the -j1 option in the .rpmmacros file is well suited for single core processors. I proved it true when I checked my virtualbox settings for my guest machine. I have a single core processor setup.

I recompiled the same package, only this time in an amd dual core system. The default value -j4 seems to be well suited for a faster compile.

Monday, September 13, 2010

Lab 1

Last friday was an encouraging class session. Chris Tyler played a couple of FSOSS videos that featured the people behind the fedora community. Watching the video stirred me to think of ways of how to contribute more to the Open Source community. Well, this blog is one of it...

As for the first lab, I installed Truecrypt on my Fedora 13 system. It wasn't a smooth install for I have to resolve some dependencies needed for the code compilation.

Here's how I installed it:

1. I downloaded the source code package: (Linux .tar.gz)
    http://www.truecrypt.org/downloads2


2.  Untar, move to the extracted directory and start compiling.
     tar xvf truecrypt-7.0a-source/
     cd truecrypt-7.0a-source/
     make

3.   The first batch of errors filled my screen that says:
      /home/user/Downloads/truecrypt-7.0a-source/Common/SecurityToken.h:211:error: template argument 4 is invalid

     I took notice of the word "SecurityToken.." googling lead me to RSAlabs.The set of files are part of an API called Cryptoki

     Here are the commands needed to install it:
    
     wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h
     wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h
     wget ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h



4. I stumbled on my 2nd error when I tried to compile again; this time the error reads:

     Assembling Aes_x64.asm
     make[1]: nasm: Command not found
     make[1]: *** [../Crypto/Aes_x64.o] Error 127
     make: *** [all] Error 2

    Before I stumble into more errors, I decided to google and find known  dependencies for Truecrypt.

     yum install nss-pkcs11-devel fuse-devel wxGTK wxGTK-devel

    Then I installed nasm assembler

5.  I recompiled and successfully installed Truecrypt to my system.







Helpful Links:

http://penguinenclave.blogspot.com/2009/07/truecrypt-62-install-guide-for-fedora.html

http://linuxsysadminblog.com/2009/07/install-truecrypt-on-fedora-10/





     


      

Thursday, September 9, 2010

My first Blog

Brief Intro

Hi! My name is Mark, currently on my 7th semester taking up CTY at Seneca College. I will be using this blog to post SBR600 related topics including some Open Source knowledge bits n bytes.

Link to my FAS2 Page: https://fedoraproject.org/wiki/User:Mjeamiguel
Seneca Wiki Link: http://zenit.senecac.on.ca/wiki/index.php/User:Mjeamiguel

my IRC name is mjeamiguel, most of the time I'll be at #seneca under the freenode network:

Here's my quick chat session using Chatzilla, (a  pretty amazing plugin for firefox )