Friday, December 2, 2016

QEMU : Installing Debian on Qemu emulated MIPS - Linux(x86) host

Hello People,

So, Here I needed to test some drivers functionality with 16K page size specifically. After walking through my options I settled with Linux on Qemu emulated MIPS. QEMU is a generic and open source machine emulator.



Here are the steps to install Debian on emulated MIPS machine using Qemu:


Preparation:
Here I am using Ubuntu 14.04 x86 system as my host machine.

1 . Installing Qemu on host system - install qemu package,

apt-get install qemu

2. Need to download a debian-installer kernel (vmlinux-3.16.0-4-4kc-malta) and initrd (initrd.gz) to boot from.

Setting up the MIPS system:

1. First need to create a virtual disk to install Debian on,

qemu-img create -f qcow2 debian_mips.qcow2 10G

This will create virtual disk of 10G size.

2. Next, install Debian to this virtual disk
qemu-system-mips -hda debian_mips.qcow2 -kernel vmlinux-3.16.0-4-4kc-malta -initrd initrd.gz -append "console=ttyS0" -nographic

Then follow shown on terminal as of normal Debian installation to the end.
This will take quite a while (so better get that fresh cup of coffee) as it will download all packages needed for installation.

boot:
After installations, next step is to boot into the system we just installed.

qemu-system-mips -hda debian_mips.qcow2 -kernel vmlinux-3.16.0-4-4kc-malta -append "root=/dev/sda1 console=ttyS0" -nographic

VoilĂ , you will be booted into MIPS system with Debian Linux!!
Rest is just usual Debian/Linux.


Accessing Host: 
Next thing that any developer will need is access to the Host system for exchanging all sort of stuff....driver, applicatin, source code etc.

You can SSH into the Host as bellow or just do SCP.
ssh host_user@10.0.2.2

Referances:
Networking: http://wiki.qemu.org/Documentation/Networking
Qemu: http://wiki.qemu.org/Main_Page

Cheers!!

Friday, September 23, 2016

Android CTS 7.0_r1 : Running modules list through automated script

Hello Guys,
How are you doing? hope all is well. Its been while, lets get started!

So whats new? Yeah Android 7 is new! Android 7 has been out now for a while and everybody (device vendors) wants it up and running as soon as possible. So here I am trying to get Android 7 up for some super secrete project, just kidding, yes I (and my team) had just completed bring up of the device with Android N (i.e. Android 7, called Nougat) yeeeh! but that's just the half battle, still need to run Android Compatibility Test Suite (CTS) to win the rest.



So, here is the issue, The device I have has some serious battery problem, it cant charge through USB if its connected to computer, it needs to be connect to charger to do so. So every time I kick CTS plan device goes down before it completes. The solution is instead of running whole plan run module by module and get result but its heck lot of manual work and I have to keep eye on it. Also in CTS 7 google has changed structure a bit lot.

So here I am going to give you scripts which helps you run CTS modules one-by-one and also saves results location in log file. So if device goes down while running some module you can continue from where you left. You just need to follow some steps as bellow:


1. Download CTS 7  

You can download CTS package from : CTS download   and extract it.

 

2. Get list of modules

After extracting CTS package go to android-cts/tools directory and execute following command to get available modules list,
Then copy list of modules to a file e.g. modules.lst or you can get it here 

3. Script to run modules one-by-one from the list

Now what you need is a script that runs modules from above list one-by-one, here it is, 

Running the CTS modules using script,

If device dies while running some module using the script, you can press 'ctrl+c' to stop script in between and remove modules from 'modules.lst' file which ran to completion successfully, then run the script again as before to continue from where you left.

4. Collecting logs of CTS

Result of each module ran using above script can be found in android-cts/results/ directory in separate sub-directories with sub-directory name as time-stamp when respective module has started. Above script collects all modules time-stamp in log file, modules.lst.log, which you can use latter to correlate time-stamps recorded to find each modules result/log directory. See snap-shot bellow,

That's it guys, have a nice day!!
Cheers!!!

Tuesday, July 26, 2016

Ubuntu 14.04 : How to install 4.4.8 Kernel

Hello,

Here are some simple steps to install Kernel 4.4.8 on your Ubuntu machine.
Open terminal and execute following commands in given order.

32bit Ubutnu:

Lets download the packages needed for installation.

Now, install downloaded packages: it will take a while, just sit back and relax

64bit Ubuntu:

Same way as earlier, lets download required packages first,
Installing downloaded packages: same as that of 32bit

We are done! Just reboot system and you should see newer Kernel installed on your system.
Cheers!!

Thursday, March 31, 2016

issue "/usr/include/linux/errno.h:1:23: fatal error: asm/errno.h: No such file or directory" while cross-compiling

Aloha,

So, making this post as it did cost me more than couple of hours to figure-out what the hell is happening.

I was building some (secrete) driver for android yesterday and I needed to install cross-compile tool-chain  for same, but while installing tool-chain on Ubuntu some of the packages already installed got removed by package installer.

Next, I set up the environment for building driver and kicked the build. Suddenly I started getting following error from compiler:


I did not noticed that some package has been forcefully removed while installing tool-chain. After some Googl'ing I found the package that needs to be installed.

Just install following package and issue will disappear :)

$sudo apt-get install linux-libc-dev:i386

cheers!!

Tuesday, July 21, 2015

Tmuxing with Tmuxinator

Ooolo,

So, Here is what’s happened, I was doing some testing with driver for #top_secrete project. So each time to test my driver, I have to go through following steps,

- ssh to target platform (tab0), run vim to edit code
- ssh to target platform (tab1), cd to source dir
- source environment
- build/install
- ssh to target (tab2), cd to log dir and start ldmesg script to continuously monitor dmesg logs
- ssh to target (tab3), cd to test dir and start test (server)
- ssh to target (tab3), cd to test dir and start test (client).


aahh, lots of steps and if driver crashes during testing (and that's what happens most of the times), I have to repeat this whole process again. Above described (steps) stuff is mostly unproductive. So how to avoid it??

So here comes tmux,

Tmux (terminal multiplexer) allows you to switch between multiple programs in single terminal. Its similar to screen.

Getting started resources for tmux :
-Part1
-Part2

So if I login in to target system over SSH in one terminal and start tmux, I can create multiple tabs inside single terminal using tmux to run multiple programs. This solves partial problem i.e. multiple SSH logins, but sill I have to do lots of stuff manually after creating multiple tabs using tmux. I needed further automation in the process...

After doing some googling I came across tool called tmuxinator.
It does exactly what's needed. Tmuxinator is awesome tool that allows you to configure tmux session i.e. how many TTYs (tabs) to start with, executing some commands on start, splitting window, base/root directory for each tabs can be configured separately, cool right!

Getting started resources for tmuxinator:
-Basics

So tmuxinator automates most of the steps above, it launches tmux, creates multiple tabs, source env, changes dir to specific directory and additionally we can maintain multiple project settings/profiles much easily and what it needs is simple configuration file.

Cheers!
(will update more soon!)

Tuesday, May 19, 2015

How to increase vmalloc size [vmalloc: allocation failure]

Hello,

So this is what happened, I was working on the graphics driver and testing some GLBenchmark applications to see if everything is smooth and healthy. But one of the test was always failing for unknown reason (at that time). I have put more than couple of hours to debug that. I was ignoring some errors in dmesg (kernel log) that I was getting,

May 18 14:53:38 pc-vbox kernel: [412318.373157] vmap allocation for size 37752832 failed: use vmalloc=<size> to increase size.
May 18 14:53:38 pc-vbox kernel: [412318.373161] vmalloc: allocation failure: 37748736 bytes
May 18 14:53:38 pc-vbox kernel: [412318.373163] GLBenchmark27_X: page allocation failure: order:0, mode:0xd2



Latter I found that application was quite a heavy and vmalloc is failing due to insufficient space. On x86_32 systems default vmalloc size is 128MB and can be override by vmalloc kernel boot option. vmalloc() allocates block of memory with continuous virtual addresses or pages  (no guarantee that pages are actually contiguous in physical RAM) . You can find current vmalloc size of your system as bellow,

$cat /proc/meminfo | grep -i vmalloc

VmallocTotal: 122880 kB
VmallocUsed: 28216 kB
VmallocChunk: 94156 kB


How to increase vmalloc space?
We have to modify the kernel boot options in grub in order to do that.
open /etc/default/grub and make following change,
This will increase total vmalloc space to 512MB, next you need to update the grub as follows,

$sudo update-grub

After this corresponding  change will be reflected in /boot/grub/grub.cfg file as bellow,


Then just reboot the system and that solved my problem. Its not the thumb rule to set vmalloc to 512M but just set to what solves your problem!

After reboot you can see vmalloc size increased,

$cat /proc/meminfo | grep -i vmalloc
VmallocTotal:     524288 kB
VmallocUsed:       64768 kB
VmallocChunk:     366544 kB


cheers



Wednesday, September 17, 2014

Capture and monitor dmesg continuously

Greetings folks!

If you are working on device drivers for Linux/Android we do rely on dmesg for almost all of the times. But you know the dmesg buffer is limited, its circular buffer. So what ever overflows the buffer is lost for good (?). We feel need to increase the buffer size but its not trivial task and also most of the times enough is just not enough!

Here are some simple scripts for Linux to log dmesg continuously and dump into file and at the same time you can monitor changes in dmesg!

Give exe permissions to script and run as bellow,
$sudo ./ldmesg.sh

Now, dmesg is getting continuously logged in dmesg.log file in current directory. Next script needs to be run in another terminal tab/window which will monitor changes in dmesg (actually dmesg.log).

Give exe permissions to script and run as bellow,
$./mdmesg.sh


Image bellow shows dmesg being monitored.

For Android developers, here is ldmesg modified to use it over adb,
 
-- Cheers!!

Monday, June 2, 2014

Linux Experience on Windows!

Yes, I love Linux and Windows too (yaah!..lets just say that!, as I use windows phone :)). Almost all engineers works most of the time on Linux and likes to fly VIM and similar editing tools. But sometimes sh*t happens and we forced to work on Windows and believe me it really feels like trapped in hell. Yes, I have been there, So here is your door to Heaven through the Hell!

Cygwin , Its your door way. It gives same experience as Linux shell. It includes most of the packages engineer/programmers need. Even you can ssh to remote Linux system using same command as in Linux shell, do you believe! and list goes long, Let curiosity be your guide!

Here are some basic instructions for setup...

1. Installation
 Download installer according to your system needs (32/64bit) and start installation.
 Just go through usual installation steps,


Next...Next...


Choose any site to download from...
Wait for a minute...


Now you need to search packages you need and mark them for installation. 
There long list but I'll install vim for reference.
Search for it...
 Mark VIM for installation and go next...


It will find package dependencies and start downloading it, give it a time...

Click 'Finish' and installation is done.

2. Running VIM in Cygwin:
Now, go to start menu and start Cygwin. It will open shell similar to Linux shell. Your root directory will be installation directory (C:\cygwin64\)


Now, you can put your vimrc in your $HOME directory (i.e. C:\cygwin64\home\user.name\.vimrc) and it works just perfectly.

Here is bashrc file in vim ($vim .bashrc)

Cheers!

Saturday, June 15, 2013

VPN Client for Linux Systems: Alternative for Cisco AnyConnect VPN Client

Hi,

Here is how you can connect to your VPN server without Cisco AnyConnect VPN client.


1. First install network-manager plug-in for VPN

 $ sudo apt-get install network-manager-openconnect  

2. Click on your network manager applet you will see  "VPN Connections" option, roll mouse over it, some options will pop-up, then click on "Configure VPN..."



3. Then click on "Add" to add new VPN connection, select VPN connection type "Cisco AnyConnect Compatible VPN (openconnect)" and click on "create". Window to configure new VPN connection will pop-up.



4. Then enter your VPN gateway and click save.



5. To Connect to VPN, go to network manager applet again, then "VPN Connections", it will pop-up VPN connection you just created, click on it.  Then VPN connection window will be up, just click on connect icon to establish VPN connection.




Done!
cheers!!

Thursday, June 13, 2013

Life of C : Part 1 - Compilation

Hi Guys,

From so long I was thinking of putting some stuff together regarding all basic things about C that gives better understanding not only about C but also some about OS perspective. So Here is the start, (oh please... "Hello World!" again)


0. Prerequisites 
Through out the post I am assuming that reader has some knowledge of C. All explanations/examples  bellow are tested/explained on Linux system. To prepare system install following packages,

1. Compilation
Bear with the stupid example :)
This is basic C program, almost all programmers have written this program at least one in life.

Ok, so this is the C syntax to say computer to write/ display "Hello Guys!". What happens next?
Program to become executable it needs to go through certain steps,

1. Pre-processing
2. Compilation
3. Assembly
4. Linking


To see all intermediate file in process of compilation compile above program as follows,

This will save all intermediate files in current directory.
 1. Pre-processing
This is very first step in process of compilation of the C program. It mainly does following tasks,

1. Macro substitution
2. Comments stripping
3. Expansion of included files


Output of pre-processor for above program is as shown bellow,

file explanation:
1. first observation is at end of the file you can see argument in printf() is replaced by string "Hello Guys!" instead of macro.
2. second is it does not have any comments we added, they have been stripped out.
3. Third observation in "#include<stdio.h>" is replaced by lots of other stuff. It has been expanded and added in the source file so that compiler can clearly see "printf()" function.

It says printf() is defined somewhere externally.


2. Compilation
Next, compiler takes helloguys.i as input and converts it into compiler intermediate output file. This is assembly code. You can see "helloguys.s" file bellow. its consists of assembly instructions of your processor. Next assembler takes this instructions and converts them into machine code.

3. Assembly
In this stage "helloguys.s" file is taken as input and intermediate file "helloguys.o" is generated. This is object file.

This file contains machine level instructions. But function calls to external functions are not resolved yet. Since this is machine code it's not readable. But still see, it will look as bellow,

ELF string in file tells that this is Executable and Linkable Format.

4. Linking
So, this is the final stage of compilation process. It does linking of function calls and their definitions. Like printf() function. Until now this code doesn't know anything about printf(). It only puts place holder at the place of function call. At his stage actual function call printf() gets resolved and function address gets plugged-in.

function of linker:
1. Plug-ins actual function address
2. It also adds some extra code/info in your file. To run our code we need to submit it to system, so this stage adds some extra code to your code like, at start of code OS needs to set some environment variables, command line arguments plus some OS specific code so that OS can signal your application. Also to while exiting, code needs to return some variables to OS which will help to maintain the status of code and its environment. This all extra things will be added by linker.

To verify it, do following,



At least you can see that size of executable is lager than object file.

So, now you know Life of C, the stages that your code needs to go through before becoming executable.  This is just a tip of an ice-burg, there is lot more if you want to go into details.

Next part of the Life of C, will contain the life of your executable, what all happens when you submit it to OS to run.



Cheers!!!  

Wednesday, June 5, 2013

How to fix "VPN client driver encountered an error" on Windows 7/8 : Cisco AnyConnect VPN Client

This is most common problem with the windows 7/8.
While connecting to the corporate (or personal) network using Cisco AnyConnect VPN Client it gives error massage as bellow,
" The VPN client driver has encountered an error"

Solution is very simple, its just error in driver name in windows registry for VPN client driver.

  • Solution: (Windows 8)
1. Press Windows key to go to start menu
2. type "regedit" and hit enter, you will enter into Registry Editor window
3. Go to registry key "DisplayName" for vpn client driver as follows:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva\DisplayName

4. Double click on "DisplayName" and remove everything before "Cisco AnyConnect VPN Virtual Miniport Adapter for Windows"

For Example:
replace: "@oem8.inf,%vpnva_Desc%;Cisco AnyConnect VPN Virtual Miniport Adapter for Windows"
with: "Cisco AnyConnect VPN Virtual Miniport Adapter for Windows"

5. Click on "OK" and (re)start Cisco AnyConnect VPN Client
6. Enter your vpn server (e.g. myvpn.company.com), and enter your credentials as requested.
7. Click on Connect, DONE.

(Similar changes apply to Windows 7)
Cheers!!! 

Friday, May 24, 2013

Free Source Code Hosting for Personal/Business Use

Even as student or  in life time of Engineer we do many things, many great things (hehe), tonnes of projects, seminars etc. and we never know when we might need to re-touch or re-collect the project codes, presentations, latex reports, documents and so and so ... yes storing them on the optical disk or in some back-up drive is good idea but not the great one... we never know when this stuff stop working, after all we built it... isn't it? So you need to put them in place where they never get lost....on SOURCE CODE HOSTING SITES.

So there are many free source code hosting sites out there. Some of them can be used for small businesses for sharing and development, most of them comes with version control tools like mercurial (on of the best and easy). Here I am going to introduce you to some of them.


  1. Bitbucket:
    This is the one of the best source code hosting site suited for small business and of course for personal use too, its closed source site, no one can peek into your repository. For business purpose you can share any repository between FIVE users for free. You need to pay for more than five users. It comes with mercurial and git version control tools. Only disadvantage is that, if you are going to develop some open source tool/project you cant put good wiki pages related to your project.



    Advantage: Closed source code, no one can peek into your code, professional tool
    Disadvantage: No good wiki support
    Version Control: Mercurial, Git
  2. CodePlex:
    This is Microsoft's code hosting site. This is having most elegant interface and awesome wiki support. It also has best code sharing, discussion forum support. It has all facilities that person/group need for open source project development.
     

    AdvantageBest suited for open source projects. It has wiki, forum, sharing support, elegant design.
    DisadvantageYour code might not be closed.
    Version Control: Mercurial, Git
  3. Google Code:
    As can be seen from name itself, its service provided by Google. It also has good facilities, but interfaces are not that good. CodePlex is better than this, which provides same (more) services in elegant way. But one advantage is that, its linked to your Google mail account.


    AdvantageGives all basic tools with simple interface. Linked to your Google account, wiki support.
    Disadvantage: Interface is simple, your code might not be closed.
    Version Control: Mercurial, Git


So, in short if you are looking for personal, closed source backup tool or small business source sharing tool BitBucket it best suited for you. If you are open source enthusiast CodePlex is best suited. Google Code is just an alternative if you are looking for...

Cheers !!! 

Thursday, May 23, 2013

Create your own Linux (custom) commands

Hi,
Most of the time we need to use some commands repeatedly while working. It's just annoying to type them again and again, of course we can use reverse search [ctrl+r] for reverse command search but I am lazier than that ;)

Here are couple of ways to customize (or get more lazy) Linux commands,

  • Use Aliases to Customize Linux Commands:

This is actually for small commands (can be used for large ones also). You can set it in terminal as bellow,
 $alias ll='ls -l'  

Now onward whenever you execute 'll' command it will work as 'ls -l', so simple.

Another way is to add aliases in .bashrc file in your home directory so it will become permanent.
e.g. put following at end of ~/.bashrc

 # Aliases:   
 alias ll='ls -l'   
 alias la='ls -a'   

  • Write shell scripts for your commands:
This is when you need some larger scripts as your shorten command. In this case you can write script and put them under bin directory in your home directory. You also need to give exe permission to the script.

e.g  I want to make following script as my Linux command. This script initializes the current directory as root for  cscope and also creates cscope database for recursive directory structure,

 #!/bin/bash    
 # cscope_init script   
 # Creating cscope database for large project    
 # with recursive deirectory structure    
 # First go to root dir of the source code    
 # Run this script - cscope_init $PWD   
 if test $# -ne 1; then    
  echo "usage - $0 <PROJ_ROOT>"    
  exit 1    
 fi    
 echo "PROJ_ROOT - $1"    
 cd /    
 find $1 -name "*.[ch]" -o -name "*.asm" > $1/cscope.files    
 cd $1    
 cscope -b -q -k    
 echo "Done!   
write this script to cscope_init file, and add permission to execute it.

 $chmod +x cscope_init   

Now copy this file to ~/bin/cscope_init. Now onward you can run following command in any directory to create recursive cscope database for that directory,

 $cd /path/to/project/root/directory
 $cscope_init $PWD  

Result,
 PROJ_ROOT - /path/to/project/root/directory   
  Done!   

Done!!!!!!

Sunday, April 28, 2013

Monitoring dynamic changes in dmesg

By running following command in terminal allowes you to monitor dynamic changes in dmesg.

 $ watch "dmesg |tail -15"  

Saturday, April 27, 2013

Resizing the image and convert between image format

Use the convert program to convert between image formats as well as resize an image. It has ability to crop, change aspect ratio of image etc. 

Resizing image to exact size:

 convert <input_img> -resize 300x200^ -gravity center -extent 300x200 <output_img>  

Monday, August 6, 2012

Failed to read NTFS $Bitmap: Input/output error

  • ERROR:
    Error mounting /dev/sdb2 at /run/media/user/Study: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sdb2" "/run/media/user/Study"' exited with non-zero exit status 13: ntfs_attr_pread_i: ntfs_pread failed: Input/output error
    Failed to read NTFS $Bitmap: Input/output error
    NTFS is either inconsistent, or there is a hardware fault, or it's a
    SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
    then reboot into Windows twice. The usage of the /f parameter is very
    important! If the device is a SoftRAID/FakeRAID then first activate
    it and mount a different device under the /dev/mapper/ directory, (e.g.
    /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
    for more details.
  • REASON:

    This is due to fragmentation problem of the NTFS partition
  • SOLUTION:
    • Windows - Run command prompt in Administrative mode
      run following command:

      chkdsk /r f:
      (help - command manual )

      (if partition is "F")
    • Linux (fedora/ubuntu) - install "ntfsprogs" package
      Run following command:
      $ ntfsck /dev/sda1    #If your partition is /dev/sda11






     

Friday, July 27, 2012

samba share - ctags: Warning: cannot open source file "directory" : Value too large for defined data type

  1. Reason: Samba share mounted from windows in linux (fedora) may be read-only check in windows by going to properties of folder.
  2. Solution: if its marked as read-only, un-check box.
  3. fstab: add following lines at end of your /etc/fstab file
 //server/share_name    /path/to/mount/point  cifs rw,uid=1000,gid=1000,credentials=/home/user_home/smbcredential_file,dir_mode=0755,file_mode=0755  0  0  
  1. details: add your credentials to smbcredentials_file:
 username=server_username  
 password=server_password   

Wednesday, July 25, 2012

openGL : Fedora 17 : undefined reference to symbol 'cos@@GLIBC_2.0'

  1. ERROR:

    gcc wave.o -o wave -I/usr/include -L/usr/lib -lglut -lGL -lGLU -lX11 -m32
    /usr/bin/ld: wave.o: undefined reference to symbol 'cos@@GLIBC_2.0'
    /usr/bin/ld: note: 'cos@@GLIBC_2.0' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
    /lib/libm.so.6: could not read symbols: Invalid operation
    collect2: error: ld returned 1 exit status
  2. Solution:
    Add '-lm' flag while compiling.

    gcc wave.o -o wave -I/usr/include -L/usr/lib -lglut -lGL -lm  -lGLU -lX11 -m32

Tuesday, July 24, 2012

Sharing using SAMBA on fedora 17

  1. Install SAMBA in fedora 17:
    • $ sudo yum install system-config-samba samba-client samba-common samba system-config-samba system-config-users
  2. Set SElinux permissions:
    • $ sudo yum install policycoreutils-gui
    • in gnome go to Administration > SELinux Management and check (set) the following booleans
      • Allow qemu to share any file/directory read/write
      • Allow samba to share users home diectory 
      • Allow samba to export ntfs/fusersfs volumes
  3. Configure Firewall :
    • check the samba box in System > Administration > Firewall
  4. Configure SAMBA:
    1. Adding users:
      •  Go to System > Administration > Samba > Preferences > Samba Users > Add User
      •  Then to edit the Samba share that was created earlier, click on the share then > File > Properties > Access > Give access to users or choose to give access to everybody.
    2. Sharing user's HOME directory:Here is configuration file /etc/samba/smb.conf
      (NOTE: make changes in above file look as bellow and do not change other options, leave other settings as it is)

      ########## PART of smb.conf file #############
      #=======Global Settings=======
      [global] 
      workgroup = WORKGROUP
      server string = YOURSERVER
      netbios name = YOURSERVER
      interfaces = eth0 192.168.92.3/24
      # ----------------------- Standalone Server Options -------------------
      security = user
      #------------------------ Name Resolution -------------------------------
      wins support = yes
      #========= Share Definitions ===========
      [homes]
          comment = Home Directories
      ;   browseable = yes
          writable = yes
          valid users = %S

      [your_share]
          path = /path/to/your_share
          read only = no
          browseable = no
          valid users = username
      #######################################
       
    5.  Accessing share:
    • Access users HOME sharing:

      In windows go to Run> \\YOURSERVER\samba_username

      Enter your username and password of samba user.
    • Auto mount as Network drive:
      Right-click on computer>Map network drive

      choose Drive from drop down (e.g. L:)

      At Folder enter \\YOURSERVER\samba_username to access home directory share or enter \\YOURSERVER\your_share to access shared directory.

Monday, July 23, 2012

Installing openGL on Fedora 17

Steps to install openGL on fedora 17:
Installing:
 $sudo yum install freeglut-devel build-essential  
Compiling sample program:
  1. Get sample programs from SAMPLE  PROGRAMMS
  2. Makefile:
 LDFLAGS=-lglut -lGL -lGLU -lX11 -lm  
 INCLUDES=-I/usr/include  
 LIBS=-I/usr/lib  
 CC=gcc  
 SOURCES=wave.c teapot.c logo.c  
 TARGETS=$(SOURCES:.c= )  
 DEPS=  
 OBJS=$(SOURCES:.c=.o)  
 %.o: %.c $(DEPS)   
  $(CC) -c -o $@ $< $(INCLUDES) $(LIBS) $(LDFLAGS)  
 wave: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 teapot: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 logo: $(OBJS)  
  $(CC) $@.o -o $@ $(INCLUDES) $(LIBS) $(LDFLAGS)  
 .PHONY: clean  
 clean:  
  rm -f $(OBJS) $(TARGETS)  
E.g. Compiling  wave.c
 $make wave  
Running program:
E.g. To run wave.c program
 $./wave