Thursday, April 29, 2010

FemtoLinux

My new initiative - low latency embedded Linux web site is up and running at www.femtolinux.com.

Our goal is to reduce Linux interrupt-to-application latency (that's correct, not just interrupt latency) to the same numbers that RTOS such as VxWorks deliver, i.e. 10μs.

Labels: ,

Wednesday, May 21, 2008

Upgrading Fedora i386 to x86_64

Fedora Core 9 installation script warns that upgrading FC i386 to FC9 x86_64 is likely to fail, which is indeed what happens if you chose to proceed. However, the resulting mess can be fixed relatively easily.

First, the grub configuration must be fixed. Just boot from the installation DVD, do "chroot /mnt/sysimage", edit grub.conf file to include the correct kernel and other filenames (note that for some reason it was moved from /etc/grub.conf to /boot/grub/grub.conf) and rerun grub-install. After that you should be able to boot.

The next step is to fix yum/rpm configuration. Edit "/etc/rpm/platform" and change the platform to "x86_64-redhat-linux". After that yum should work OK, except that for some reason the DVD repository may not be configured correctly. Check that " /etc/yum.repos.d/Fedora-install-media.repo" (or any other InstallMedia configuration file) has the following:

[InstallMedia]
name=Fedora 9
mediaid=1210111941.792844
metadata_expire=-1
gpgcheck=0
cost=500
enabled = 1
baseurl=file:///media/Fedora%209%20x86_64%20DVD


Now you should have more or less working system with lots of packages from previous installation which were not upgraded correctly. I wrote a small script which looks for all Fedora Core 8 packages and upgrades them to FC9 x86_64. Remember to disable all repositories except for InstallMedia before running the script:

for i in `rpm -qa | grep fc8 `; do
echo $i
j=`rpm -q $i --qf %{NAME}`
echo $j
rpm -e --nodeps $i
yum -y install $j
done


You may also want to upgrade all "i386" packages in the same way, in which case just replace "fc8" with "i386" in the above script.

Labels: , , , , , ,

Thursday, October 25, 2007

Yet another Rapidshare hack

A few weeks after I published my Rapidshare Linux hack (which removes the delay between two consecutive downloads by changing the MAC and the IP addresses) and probably completely unrelated to this Rapidshare introduced another annoying "feature" - up to 1 minute delay before the first download.

It turns out that there is a trivial hack for this too (but only for these who are smartlucky to use Firefox). First you will have to install Greasemonkey Firefox addon and after that my Rapidshare delay removal script.

Enjoy!

P.S. This Javascript hack is not exactly new, I just automated it using Greasemonkey.
P.P.S. Here is the script source code:

window.addEventListener(
'load',
function() { this.c = 0},
true);

It simply changes the value of "c" variable to 0 after the page finishes loading. This variable is used by Rapidshare Javascript delay function, so my script just sets this delay to 0.

Update: Apparently this does not work anymore as they check the time delay on the server too.

Labels: , , , , ,

Monday, October 15, 2007

DViCO

DViCO is a Korean company which produces quite popular TViX media players. Most of them are based on Sigma Designs reference board and run some kind of embedded Linux. They even have a GPL page on their website with the full text of GPL v2 and a link to the source code tarball, which indicates that they admit to using Linux in their systems and understand what GPL is.

The only problem is that the above tarball, which is supposed to include the full sources of their software along with the compilation instructions, is identical to the one released by Sigma Designs for their EM8500 reference board. As TViX system has clearly different hardware and software, these source won't run "as is" on their hardware and clearly do not contain their modifications, i.e. derived work, to the GPL code.

Unfortunately, this is very typical and common case of GPL violation.

Interestingly enough, their "firmware upgrade" image appears to be encrypted in some way as I did not manage to find any of the known Linux filesystem images inside of it when I tried to get shell access.


Links:
DViCO
DViCO "GPL" page
Sources of Sigma Designs EM8500 reference board

Labels: , ,

Tuesday, October 09, 2007

Rapidshare hack for Linux

As it turns out it's unbelievably easy to overcome annoying time delay between downloads of the free Rapidshare account. And it's even easier if you happen to run Linux.

Rapidshare "remembers" the IP address you used to download, so all you have to do is to change it between subsequent downloads by restarting DHCP client. In order to ensure that you will not get the same IP address (Linux DHCP client tries to get the same IP by first issuing the DHCP REQUEST and only if it fails - DHCP DISCOVER; and most DHCP servers will try to lease the same IP address for the same MAC address) you have to change... right, the MAC address. And, as I mentioned above, this is yet another example of Linux being much more user-oriented OS than the other one - changing MAC address on Linux is a breeze.

#!/bin/sh
ifdown eth0
let "rnum = $RANDOM % 255"
d=`printf "%02X\n" $rnum`
ifconfig eth0 hw ether 00:0F:EA:37:9F:$d
rm /var/lib/dhclient/dhclient-eth0.leases
ifup eth0


Remember to change the MAC address of the correct interface, i.e. the one on which you get the normal (routable) IP address.

Labels: , , , ,

Sunday, October 07, 2007

LinuxConf Europe 2007 article and presentation: Hacking Embedded Linux Based Home Appliances

Abstract

Embedded Linux is an interesting phenomenon. With millions of devices shipped to-day, from residential gateways to cellular phones, it may be Linux's biggest success story ever. However, it gets disproportionately small amount of interest from the open source community. Part of the blame is on the companies developing embedded Linux based products, which feel uncomfortable with the idea of opensource. However, even bigger problem can be the fact that embedded systems are perceived as black boxes which are very hard to hack, contrary to an "open" PC.
This article tries to break this stigma by showing Linux developers how to hack various Linux based devices that they might already have at home. If we understand that it's easy and fun to hack embedded systems, I believe embedded Linux issues will get more attention from opensource community, which will eventually result in more embedded-friendly Linux kernel, more embedded-oriented opensource projects and better Linux-based products.

Links:
article
presentation

Labels: , , , ,

Linux Journal article: Building a Next-Generation Residential Gateway

A bit high-level article about how the simple lego-like approach of building Linux-based residential gateways is going to change when vendors are required to support high throughputs of 802.11n, PON and DOCSIS 3 on cheap commodity hardware.

Labels: , , ,