Tuesday 30 December 2014

Serial Port connection between two machines in virtual box


On Host Machine or Machine 1:
  1. Create host pine with \\.\pine\com1
  2. Tick on create pipe (you have to power on this machine 1st as you are creating pipe here)

Machine->Setting->Serial Ports (Setting for Machine 1 or Host Machine)

On Test Machine or Machine 2:
  1. Create host pipe with same name \\.\pipe\com1
  2. We are using host pipe created by host machine so please don’t mark checked for create pipe here.

Machine->Setting->Serial Ports (Setting for Machine 2 or Test Machine)


Now you can power on both machine for testing serial port.


Some Useful commands :


[root@localhost ~]# dmesg | grep tty
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Information about serial port setting:

[root@localhost ~]# stty < /dev/ttyS0
speed 9600 baud; line = 0;
-brkint -imaxbel
[Baud rate must be same at both machine]

Test Connection:

On First machine:
[root@localhost ~]# echo hii > /dev/ttyS0

On second machine:
 [root@localhost ~]# cat /dev/ttyS0
hii

[ Note : Please run cat command first ]

Monday 9 June 2014

Kick Start for Linux kernel Development

Following are the milestones for Linux kernel development. Use these as an overall guide or steps in kernel development.
  1.  Install any Linux OS such as Ubuntu , Read Hat.(I am using centOS for this article)
  2.  Understand how to install customized kernel.
  3.  Get familiar with some development tools. (Like ctags, cscope, vi editor, gcc compiler).
  4.  Understand Linux kernel basics, building blocks of Linux.
  5.  Understand part of Linux which you want to edit. (eg. FileSystem like ext4)
  6.  Then come series of kernel code modifications and debugging.