20081021

Hello, Open-Source World!

It's official... Google's brainchild, Android, has finally said
Hello, Open-Source World!

I wonder how many hours it will take for the first Neo 1973 or Neo FreeRunner port to surface. The biggest challenge, it will seem, will be to provide a bridge between the (minimal) ARMv5TE instruction set that Android was designed for, and the OpenMoko handsets' ARMv4T instruction set (as present in the Samsung 2442 SoC).

Perhaps the next handset that OpenMoko releases will feature native ARMv5TE compatibility.

Update: I've been building android for the last few hours, having made a few build-oriented changes that I think will help bridge the ARMv5TE - ARMv4T gap. I'm going to list a few of the errors I've been running into below. Please note - although I only list each undefined instruction once, the errors occur in multiplicity and in different subdirectories. I will post ARMv4T compliant work-arounds soon. Please be patient.

  • bionic/libc/arch-arm/bionic/memcmp.S:44: Error: selected processor does not support `pld [r0,#0]
  • system/core/libpixelflinger/t32cb16blend.S:121: Error: selected processor does not support `smulbb lr,r7,lr'
  • system/core/libpixelflinger/t32cb16blend.S ... Error: selected processor does not support `smulbt ...'
  • external/jpeg/jidctfst.S:148: Error: selected processor does not support `smlabb r0,r2,r3,r5'
  • dalvik/vm/arch/arm/CallEABI.S:239: Error: selected processor does not support `blx ip'
  • dalvik/vm/mterp/out/InterpAsm-armv5.S:2653: Error: selected processor does not support `ldrd r2,[r0,#offStaticField_value]'
  • dalvik/vm/mterp/out/InterpAsm-armv5.S ... Error: selected processor does not support `strd ...'
  • external/sonivox/arm-wt-22k/lib_src/ARM-E_mastergain_gnu.s:77: Error: selected processor does not support `smulwb r4,r4,nGain'
  • external/sonivox/arm-wt-22k/lib_src/ARM-E_voice_gain_gnu.s:114: Error: selected processor does not support `smlawb tmp1,gainLeft,tmp0,tmp1'
  • external/opencore//codecs_v2/audio/aac/dec/src/calc_auto_corr.cpp
    /tmp/ccBi9nUH.s: Assembler messages:
    /tmp/ccBi9nUH.s:652: Error: selected processor does not support `clz r0,ip'
  • smultt, smlatt, smlawt, smulwt, qadd, qsub, qdadd, qdsub, smlabt
  • etc, etc, etc ...
Build problems that were not architecturally related:
  • out/target/product/generic/obj/SHARED_LIBRARIES/libdvm_intermediates/Misc.o: In function `dvmAllocBit': dalvik/vm/Misc.c:247: undefined reference to `ffs'
Theoretically, there are three possibilities to in order to have Android on the FreeRunner.
  • The first is to ] replace [ the red-highlighted mnemonics using an equivalent ARMv4 or ARMv4T instruction sequence. In some cases, this is impossible without a lot of context information.
  • The second is to completely re-implement each section from scratch, wherever one of the ARMv5TE instructions are issued, but using an algorithm optimized for the ARMv4 or ARMv4T architecture
  • The third option is to just remove it, e.g. for the pld instruction which only optimizes memory fetches by hinting (or not?)

20081014

The 2008 Election

It looks as though Canada will again be under a minority conservative regime until we hold our next election. The results of our 2008 election are almost identical to that of 2006 (300 000 000 #$!@#^@!ing dollars later) but with a few notes. Voter turnout was only 59% - the worst in the history of Canada - with only 13832972 of 23401064 registered electors casting a ballot (that does not include unregistered voters). However, I'm happy to see that the Liberals, NDP, Bloc Quebecois, and Green Party managed to prevent a majority conservative government disaster.

It's terribly tragic that Canadians were seduced into voting for the conservative party out of fear for our economic situation - a situation which the conservative party must take a large part of responsibility for. Please let me take this opportunity to apologize to the rest of the world; Canada had her chance to show the world's developing nations how we, the developed nations, deal with environmental issues. By allowing ourselves to continue subjugation to Harper's slippery oil-mafia, we have basically written an environmental cheque that our asses cannot cash.

Green party results by province
ProvinceNumber of Votes%
Alberta1115059
British Columbia1687239
Manitoba317237
New Brunswick226836
Newfoundland32742
Northwest Territories7526
Nova Scotia350228
Nunavut6758
Ontario4114448
Prince Edward Island34885
Quebec1262994
Saskatchewan232796
Yukon188013
Green Votes826747
The size of a metropolitan city...
6%
and we still don't have 1 single seat in the house of commons


I hope that the Harper government acknowledges that poor voter turnout had a huge hand in their minority victory yesterday. There are many Canadians who were unable to make it to the ballot box due to extenuating circumstances - the working class in particular - a huge contrast to Harper's generally upper-class representation. On the other hand, there are probably a lot of Canadians who have such little confidence in our system that they choose not to vote. Some vote because they have not been following the debates.

One thing that was very interesting to observe is that None of the metropolitan cities in Canada (Toronto, Vancouver, Montreal) were won over by the Conservative party. My guess is because we are the ones who primarily have to deal with the smog. People in urban environments are usually have the lesser addiction to oil.

In any event, the Green Party has achieved such an amazing increase in voter turnout from previous years. However, of the ~ 14 million people who voted, ~ 1 million of those voted for the Green Party, yet we still don't have a single seat representing our interests in the House of Commons due to the MP system.

Seriously, we need to reform the way that we vote in this country - why not assign a score to each political candidate instead of voting for a single one? Also, account for "no-shows" and "no-confidence" votes. Mathematically, proportional representation just makes more sense. Account for the loss of power by rural communities by giving rural areas more municipal and regional power, while the interests of the greater public are represented proportionally.

20081006

Linux-2.6.27-rc8 on the EEE 702

Although the Linux kernel version 2.6.27 has not yet been officially released, I was able to download, build and patch release-candidate-8 for my EEE PC with many notable improvements - most notably a working ath5k module. Correction: The Linux kernel version 2.6.27 was released 20081009 and you can read the changes here.

First of all, I was actually planning on using the 2.6.26-gentoo sources, which implemented the changes upstream that I had made for the 2.6.24-eee-r1 sources, because it already had the eeepc-laptop module sources included, and (limited) ath5k support.

However, when I tried to 'modprobe ath5k' with the 2.6.26-gentoo kernel, I encountered a nasty error message saying that the AR2425 chip is still under development (boo-urns!), and that support for the AR2425 chip would be included in the 2.6.27 sources. That made me revert back to my 2.6.24-eee-r1 linux kernel, but not for long!

Having never been the type to accept defeat so easily, I decided to use the vanilla-sources-2.6.27-rc8. The main difference between the vanilla and Gentoo sources are, that the Gentoo kernel sources (and subsequently the eee sources) are patched versions of the vanilla kernel, which include security fixes as well as various other features (SquashFS for example).

Now, I do need SquashFS for my squashed portage, but the security patches I could do without for the time being, until Kernel.org, and Gentoo, release their respective 2.6.27 kernel sources. Aside from that, I would need to compile external modules for the EEE pc, such as uvcvideo (webcam), eeepc-linux (Fan / CPU / FSB control).

Thanks to the inclusion of the eeepc-laptop sources, providing ACPI interfaces for all of the EEE PC Fn buttons, I could now omit the external asus-acpi module, as well as the quasi-proprietary ath_hal module provided with net-wireless/madwifi-ng.

Yes, that's right! Now the Atheros chipset on the EEE PC will work with the standard 'wext' wireless interface, allowing the unpatched version of NetworkManager to run seamlessly!!! Although I have switched to WICD since the last time I tried to use NetworkManager, but I thought I'd mention the changes anyway.

Here are a few patches that might be of interest:
eeepc-linux-2.6.27-rc8.patch
linux-2.6.27-rc8-squashfs3.4.patch
atl2-2.6.27-rc8.patch

All of these will work with sys-kernel/vanilla-sources-2.6.27_rc8.

Enjoy!

20080926

New Overlay for Syscomp Design

I recently used my digital storage oscilloscope and  function generator for the first time since retrieving all of my electronics from storage after returning from Germany. These are really handy devices for examining low-frequency (pre-micro) electronics. After I wrote a couple of ebuilds to install the Open Instrumentation Project software, I thought I'd make the ebuilds publicly available.

Syscomp Design is incidentally run by a former professor of mine from Ryerson, Peter Hiscocks. I thoroughly enjoyed his course on microprocessor / microelectronic interfacing, and luckily did so before he went into early retirement. On a somewhat unrelated note, we're both part of the TLUG :) It's good to see that Prof. Hiscocks is keeping himself busy these days - Syscomp just released a new device that obseletes both of the units I bought 3 years ago! Although he mentioned that the older oscilloscope circuit has more dedicated storage space and time resolution.

If anyone would like to check out the overlay using layman, then you should be able to do it with the following command
layman -o http://virtb.visibleassets.com:2080/layman.conf -a syscomp

After that, you should be able to do the following (as root)
for i in dso101 cgr101 wgm101; do
echo "sci-electronics/$i" >> /etc/portage/package.keywords
done
emerge -av1 dso101 cgr101 wgm101

I've contributed two patches (one for wgm and another cgr) which allow for more flexible storage of the program files in /usr/lib.

Enjoy!

20080919

EEE 702 Has Poor Graphics Performance

I've owned my EEE 8G for quite a long time and also fully customized the software on it as a binary Gentoo distribution. However, one thing that I've found noticeably lacking is the performance of full-screen video. The video device on the EEE is an Intel 915 Mobile Graphics chip, which I believe uses shared memory.

If you know of a way to improve the video framerate of the EEE, then please post your Xorg.conf and related mesa / intel driver versions.

Thane Heins' Demos on 'Back EMF'

The interpretation of the results obtained by Thane Heins are under quite a bit of debate. Many people doubt their own eyes because they seem to think that he's create 'free energy'. Even a prof at MIT is 'stumped'.

Another engineer friend of mine who's well versed in electric motors is going to try to replicate the experiment and hopefully see exactly where the extra energy is coming from. Many people have been able to charge a battery from their self-built apparatus.

Results of search "Thane Heins" on YouTube.com

20080917

My FreeRunner Debug Board v3 Has Arrived


Well, I finally received the Debug Board v3 that I've been hounding Koolu for ever since I received my FreeRunner. The Dboard, as it's sometimes called, provides a JTAG interface to the Neo FreeRunner from OpenMoko / FIC and can also be interfaced with any other ARM device via the unpopulated 20-pin JTAG header at the bottom of the image. I'm particularly interested in trying out BeagleBoard debugging with my Dboard after I build a 20-pin to 14-pin adapter.

It's a good thing that I ordered my Dboard from OpenMoko directly because Koolu has publicly stated that they will not be offering the Debug Board to their customers because the FreeRunner is unbrickable. Although, by assuming that the Debug Board's only use is for bootloader debugging, it precludes all sorts of other uses for the board such as step-debugging with GDB through static firmware images, kernel debugging, or the potential of debugging, say, Android, NetBSD or any other OS.

I'm happy now that I have mine anyway. I hope that they don't stop mass production of the Dboard either, because it might be a more versatile alternative than the FlySwatter, although both offer freely available schematics.

If anyone out there has experience JTAG debugging with both the FlySwatter and the Debug Board v3, then I would be very happy to hear comments detailing the pros and cons of each.

20080915

TS-7800: Linux RAID NAS for the Home User?

Update-20100328: Seeing as how Marvell are essentially the only ARM licensees who have gigabit ethernet technology, this device would decidedly make a really cool control board for the USRP2 from Ettus Research, Inc. Luckily, I've been doing some hacking with libusrp2 lately ;-)

I've had my TS-7800 for quite some time now, and I haven't really done anything fantastic with it yet, although, my original plans were to use it quite suitably as a NAS. The TS-7800 uses the Marvell Feroceon MV88F5182 CPU, and while lacking vector floating point (VFP) support, it is perfect for use as a storage controller.

This would be used by Erin & myself for fault-tolerant storage of important data.

Now, when I say fault-tolerant, I'm speaking of a redundant array of inexpensive disks (RAID). The TS-7800 does not come with a hardware RAID controller, as they are very expensive and usually only found in bulky server equipment, but any linux appliance is perfectly capable of acting as a software RAID controller.

The TS-7800 only supports two SATA connected drives, which means that if I only include these two devices in my software RAID configuration, the RAID level is limited to RAID 0 ("striping", improves speed, no redundant storage), or RAID 1 ("mirroring", data redundancy, slight speed overhead). Of course, I would choose the second option to have our data stored reliably. In that case, my capacity would be half of the total disk capacity.

If I were only including two SATA connected drives in my configuration, my RAID configuration would be limited. However, if I chose to make use of more devices connected via the TS-7800's USB ports, then I could have a RAID 5 configuration (striped, with parity). Just like a RAID 1 configuration, no data is lost if one disk is damaged. Unlike the RAID 1 configuration, rebuilding the damaged disk means more than simply copying the information from the other disk. Furthermore, if I implemented this and mixed SATA / USB disks, then there would surely be a performance hit when reading from / writing to a USB disk, which would slow down the array as a whole since operations would be striped across all disks in a RAID 5 configuration. RAID 5 also performs poorly in software when small files are being repeatedly updated because of the parity calculation requirement.

I think, in the end, I'll choose to use two 500 GB SATA disks, 3.5" in size just because the price is so relatively low, such as these, and start off with a simple RAID 1 configuration. Later on, if I feel the need to upgrade the capacity of the disks, or the raid array itself, I can hopefully buy some more similar disks and connect two more via USB, in spite of the slowdown that it might cause.

20080912

BeagleBoard Notes

My BeagleBoard recently arrived from DigiKey and after resoldering an RS232 connector and downloading the binary images, I was good to go.

If you're planning on only using the BeagleBoard as a USB gadget, connected to a PC, where the PC acts as the USB master, then you do not need to worry about a USB Mini A cable.

If you would like to network the BeagleBoard and a PC through the USB OTG port, then a USB Mini A cable is not necessary. You would use a regular USB Mini B cable which is the type used for most digital cameras.

20080905

Toolchain for the Neo FreeRunner

Well, it's been a while, hasn't it !?

Erin, Jules, & I were all quite busy over the last few weeks - we travelled all over the lower half of Ontario, and then went camping at Bruce Peninsula National Park & on Manintoulin Island.

(Note to self, make Google map containing a trail of our route + photos)

We're now back in Montreal, and it's pretty intense. I have 4 exams coming up in the next 3 weeks and will surely have my hands full for all of them. Hopefully the examination board at the Uni-Kiel allows me to write the exams remotely from Montreal, given my special circumstances (baby, f/t job, etc), so that I don't have an overly-demanding schedule when I return in March / April.

Soooo wie so, I was pleased to receive my new Neo FreeRunner mobile phone when I got back to Montreal. Last week I upgraded the firmware to om2008.8 which has a slick, webkit-based UI. After having used it for a week, I can honestly say that this guy will be the iPhone killer, for anyone who likes to do extreme things with mobile devices at least.

My EEE PC is doing very well, and another one is on the way for Erin. I was hoping that it would get here in time for her birthday, but it seems that there is an 8-10 week shipping delay from the Royal Bank!!! Daaaamn!!!

In a few days, I'm expecting to receive a BeagleBoard in the mail along with a 15.1" touchscreen panel - I can't wait ;-) Then is a cipherlabs 9400 handheld for industrial scanning. I'll be putting linux on that too.

I really have to say, though, that I'm really starting to feel the lack of a graphical package manager for Gentoo-based mobile devices. Seeing how it's my job now to implement a web-based, distributed (pushing) package management system, I don't think it will be very hard for me to implement a mobile (pulling / normal) graphical package manager.

There's another guy on the gentoo-embedded list from Portugal, named Ângelo (a.k.a. miknix), who is also aiming to do the same thing with the HTC Wizard (also a pretty sweet-looking handheld w/ integrated keyboard).

Anyway, if there are any Gentoo users out there who would like to download an i686-pc-linux-gnu -> armv4tl-softfloat-linux-gnueabi cross-toolchain suitable for OpenMoko cross-compilation, then check out my latest toolchain. Please don't forget to read the README file.

I guess the next cross toolchain I come up with will target the armv7a-c6x-linux-gnueabi BeagleBoard, which also happens to have Jazelle Technology (something I have wanted to experiment with for a while!).