My Tech notes: July 2009
Subscribe

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, July 29, 2009

CROSS COMPILING X11 FOR ARM Board

STEPS FOR CROSS COMPILING X11 FOR ARM
Go to /usr/X11R6/lib in my linux PC.

1) install ARM toolchain, If not installed
2) Get x11 source from http://www.x.org/
3) extract all the tar files, using tar -xvzf
4) edit cross.def and host.def files, in cross.def set the paths
of tool chain in host.def file set crossCompile to YES and
DoLoadableServer to NO
5) make shadow directory "build" and link to xc "lndir ../xc"
6) run Make World


error: linux_vm86.c 281 impossible constraint in 'asm'
268 res might be used uninitialized in this function.
fix:comment line 281,
set res=0


error: implicit decleration of function 'SET_FLAG'
fix: comment line 111 in
programs/Xserver/hw/xfree86/os-support/linux/int10/helper_exec.c


error:Undefined reference to XF86VidModeQueryVersion in glxinfo
And glxgears
Undefined reference to XF86VidModeQueryVersion in xdriinfo
fix:download libXxf86vm.so.1.0 into our armtoolchain lib path
and make softlinks

ln -s libXxf86vm.so.1.0 libXxf86vm.so
ln -s libXxf86vm.so.1.0 libXxf86vm.so.1

error:X_cursor.cfg command not found.
fix:

copied all the binaries from cvs in our
arm-tools-chain bin folder...didnt work

copied libXcursor.so.1.0.2 from cvs in our arm-tools-chain
and made links

ln -s libXcursor.so.1.0.2 libXcursor.so.1
ln -s libXcursor.so.1.0.2 libXcursor.so
...still didnt work

copied xcursor.pc in pkgconfig of toolchain.

looks like xcursorgen is missing .
got it from debian.still didnt work.

copied xcursorgen from programs/xcursorgen/ to tool chain
still didnt work.

export XCURSORGEN=/usr/X11R6/bin/xcursorgen
!!! WORKED !!!


Total compilation time with "Make World" is 20 minutes.

after compilation it prints a message:
"Full build of Release 6.8 complete."

error: while doing make install got the error in fonts:
"/bin/sh -b: command not found"

workaround:
removed "models" folder from Makefile at
"programs/Xserver/XpConfig/C/print/Makefile
fix:Open the makefile in Xserver/XpConfig/C/print/models/XXX/fonts/Makefile
and then set MKFONTSCALE=$(XBINDIR)/mkfontscale below XBINDIR on line
no around 389.

Wednesday, July 22, 2009

Define:Blu-ray & About Blu-ray Movies HDTV Info

The Advancement of technology had entered into nanometer age. search in google define:Blue-ray will get wiki pages here is summary of it. Blu-ray Disc (also known as Blu-ray or BD) is an optical disc storage medium designed to supersede the standard DVD format. Its main uses are for storing PlayStation 3 games, high-definition video, and data storage, with up to 50 GB per disc. This is quite impressive, The disc has the same physical dimensions as standard DVDs and CDs.
Why Blu-ray disc stores 50GB on same size of DVD/CD?
Well here is advancement of laser technology, thanks to Shuji Nakamura for his invention on blue laser,
The name Blu-ray Disc derives from the blue-violet laser used to read the disc. While a standard DVD uses a 650 nanometre red laser, Blu-ray uses a shorter wavelength, a 405 nm blue-violet laser, and allows for almost six times more data storage than on a DVD.
check out about
Blu-ray Movies - Everything about Blu-ray movies and releases.at http://www.blu-ray.com/movies/
Few interesting stuff from Blu-ray FAQ
How much data can you fit on a Blu-ray disc?
A single-layer disc can hold 25GB.
A dual-layer disc can hold 50GB.
How much video can you fit on a Blu-ray disc?
Over 9 hours of high-definition (HD) video on a 50GB disc.
About 23 hours of standard-definition (SD) video on a 50GB disc.
Why should I upgrade from DVD to Blu-ray?
The simple answer is HDTV.
visit http://www.blu-ray.com

Tuesday, July 21, 2009

Get HyperSCSI for SAN - Storage Area Network

Get HyperSCSI for SAN - Storage Area Network
SCSI (Small Computer Systems Interface) family of protocols. HyperSCSI can allow one to connect to and use SCSI and SCSI-based devices (like IDE, USB, Fibre Channel) over a network as if it was directly attached locally.
Why HyperSCSI over iSCSI?
The main advantage of HSCSI compared to iSCSI is
  1. especially a lower network load as well as an end system (server and client) load.
  2. TCP/IP SAN performance is still not good enough without hardware acceleration
  3. FC-based SANs cannot do Storage Wide-Area Networks
  4. Fully functional software implementation of both client and server so HSCSI can be used for a solution built on commonly available hardware, no expensive and specialized hardware is needed.
  5. Therefore, HSCSI can be used for building small and cheap SANs.
HSCSI main disadvantage is this protocol has no official standard like iSCSI nd so it is unsupported in any way by manufacturers developing hardware data storage solutions.
Two modes of operation
one for local access,Local HyperSCSI over Ethernet (HS/eth),
and the other for wide-area connectivity, Wide-Area HyperSCSI over IP (HS/IP).
The reason why I am posting this is, I could not able to locate source code for HyperSCSI easily.
HyperSCSI source code download link for linux
download links
http://www.dsi.a-star.edu.sg/main/dev/mainPage.asp?cid=15022&Lid=0

Will post more if get luck while compiling HyperSCSI for ARM target board.

Wednesday, July 15, 2009

The things must know about Linux kernel ...

As a kernel or device driver developer one must know what Linux kernel can not

1) No access to C library
Generally, C library is large. Accessing a C lib function from kernel space is very time consuming.
It affects the kernel speed and size. So many libc functions are implemented in the kernel. Just like printf in libc is implemented as printk in kernel.

2) The kernel lacks memory protection.
Application in user space lacks memory protection. so when an application access illegal memory location, it results in segment violation. But when in kernel space segment violation occures, it results in oops. It is a major kernel error.

3) Difficult to use floating point.
When floating point arithmetic is done in user space, kernel manages the transition from integer to floating point mode. But enabling floating point in kernel, the kernel requires manually saving and restoring the floating point register. It is extra overhead for kernel.

4) Limited and small stack
Linux kernel has very small stack size. The size varies by architectures. Generally it is 8KB for 32-bit architecture and 16KB for 64-bit architecture.

5) Requires synchronization and concurrency
Linux kernel is a preemptive multitasking operating system. So scheduler schedules any process among the pool of processes. It requires synchronization between tasks. The concurrency is required when two or more processes tries to access the same resource.

Sunday, July 12, 2009

Linux Kernel Based Chrome OS : Google

Google Chrome OS is an open source, lightweight operating system. It is designed mainly considering netbooks. The notebooks will be available to consumers in mid 2010.
This will be an open challenge to its rival MS Window. The key aspects of Google Chrome OS are its security, simplicity and speed.

Saturday, July 11, 2009

What is difference between monolithic kernel and microkernel?

Monolithic kernel has simple design. Monolithic kernel is a single large processes running entirely in a single address space. It is a single static binariy file. All kernel services exist and execute in kernel address space. The kernel can invoke functions directly. The examples of monolithic kernel based OSs are Linux, Unix.

In Microkernels, the kernel is broken down into separate processes, known as servers. Some of the servers run in kernel space and some run in user-space. All servers are kept separate and run in different address spaces.The communication in microkernels is done via message passing. The servers communicate through IPC (Interprocess Communication). Servers invoke "services" from each other by sending messages. The separation has advantage that if one server fails other server can still work efficiently. The example of microkernel based OS are Mac OS X and Windows NT.