Nov
19
2007
The embedded linux development consists of the development of
1) Bootloader
2) Linux Kernel customization
3) Root filesystem generation.
The newest trend in the Root filesystem generation is Debootstrap. But if you still need control over the file system creation, then this good old shell script is present there to rescue you 
#!/bin/bash
# Housekeeping…
rm -f /tmp/ramdisk.img
rm -f /tmp/ramdisk.img.gz
# Ramdisk Constants
RDSIZE=5000
BLKSIZE=1024
# Create an empty ramdisk image
dd if=/dev/zero of=/tmp/ramdisk.img bs=$BLKSIZE count=$RDSIZE
# Make it an ext2 mountable file system
/sbin/mke2fs -F -m 0 -b $BLKSIZE /tmp/ramdisk.img $RDSIZE
# Mount it so that we can populate
mount /tmp/ramdisk.img /mnt/initrd -t ext2 -o loop
# Populate the filesystem (subdirectories)
mkdir /mnt/initrd/bin
mkdir /mnt/initrd/sys
mkdir /mnt/initrd/dev
mkdir /mnt/initrd/proc
mkdir /mnt/initrd/lib
mkdir /mnt/initrd/etc
# Grab busybox and create the symbolic links
pushd /mnt/initrd/bin
cp -a /root/hi ./first
chmod +s first
popd
# Grab the necessary dev files
cp -a /dev/console /mnt/initrd/dev
cp -a /dev/zero /mnt/initrd/dev
cp -a /dev/mem /mnt/initrd/dev
cp -a /dev/ramdisk /mnt/initrd/dev
cp -a /dev/ram1 /mnt/initrd/dev
cp -a /dev/ram0 /mnt/initrd/dev
cp -a /dev/ram /mnt/initrd/dev
cp -a /dev/null /mnt/initrd/dev
cp -a /dev/tty /mnt/initrd/dev
cp -a /dev/tty1 /mnt/initrd/dev
cp -a /dev/tty2 /mnt/initrd/dev
# Equate sbin with bin
pushd /mnt/initrd
ln -s bin sbin
popd
# Finish up…
umount /mnt/initrd
gzip -9 /tmp/ramdisk.img
cp /tmp/ramdisk.img.gz /root/ramdisk.img.gz
Have a happy ramdisk.
no comments | tags: Embedded Linux, ramdisk
Nov
14
2007
Seems like I am more attracted towards google’s innovations in the Linux domain. The new craze is Android API.
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
The Android SDK is available at http://code.google.com/android/download.html . If you are interested in making some USD (a cool 10 M !!), then have a look at the Android Developer challenge (http://googleblog.blogspot.com/2007/11/calling-all-developers-10m-android.html)
no comments | tags: GOOGLE, Java, Linux, mobile
Nov
13
2007
Yet another first from google..
The OpenSocial API provides a common set of APIs for social applications across multiple websites including Engage.com, Friendster, hi5, Hyves, imeem, LinkedIn, MySpace, Ning, Oracle, orkut, Plaxo, Salesforce.com, Six Apart, Tianji, Viadeo, and XING.
With standard JavaScript and HTML, developers can create apps that access a social network’s friends and update feeds.
More details are available in the google code page of OpenSocial : http://code.google.com/apis/opensocial/
no comments | tags: GOOGLE, OpenSocial
Nov
6
2007
I used to wonder how these python programmers write their setup.py , a wonderful script which installs the python modules. After some digging , I found it as pythonic as a simple python program. Here is my setup.py that I have submitted to the flayer plugin project of google
#!/usr/bin/env python
#
# Copyright 2007-2008 Maxin B. John <maxinbjohn@gmail.com>
# Some portions copyright 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from distutils.core import setup
setup(name = “flayer”,
version = “0.0.1″,
description = “Python wrapper library for Flayer”,
author = “Wad, Taviso”,
license = “GPL”,
url = “http://code.google.com/p/flayer”,
packages=['flayer','flayer.wrappers','flayer.input','flayer.valgrind'],
)
see , everything happens in a simple call of the setup() which is present in the distutils module.
Yes, Python rules…
no comments | tags: libflayer, Python, setup.py
Nov
5
2007
PyX is a Python package for the creation of PostScript and PDF files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface.
The Postscript 2D/3D graph generation is an easy job if you are using PyX module in Python.
no comments | tags: Python, PyX