Saturday, 10 October 2015

How to Run Barrelfish operating system on Ubuntu

How to Run Barrelfish operating system on Ubuntu:


Barrelfish is not an operating system like any other linux and windows.It doesn't have any fancy GUI as of now.
The Barrelfish packages are unpacked in Ubuntu and the application programs are run in terminal like  any other  programs.


The instructions given below will help you to clone it.


Thank you Lokesh for providing this information.


Prerequisites:
1)Ubuntu operating system
2)Internet


The very Important step to begin is to update the packages present in ubuntu so to do that ,copy and paste it in terminal


$sudo apt-get update


How to Install Barrelfish:-   


Step-1.To get a full build environment of barrelfish on Ubuntu by running the following command::(For more information:wiki.barrelfish.org/Getting_Started)


     $sudo apt-get install build-essential bison flex cmake gcc-multilib qemu-system-x86 qemu-system-arm ghc libghc-ghc-paths-dev libghc-parsec3-dev libghc-random-dev gcc-arm-linux-gnueabi g++-arm-linux-gnueabi


Step-2.Get the latest version of Barrelfish from the mercurial repository::


      $git clone git://git.barrelfish.org/git/barrelfish


*CHECK: check whether the barrelfish files are installed or not.


Step-3.Once you have cloned the repository, cd into it, create a build directory, and enter it::


     $cd barrelfish
     $mkdir build
     $cd build


Step-4.Run ``hake.sh``, giving it the path to the source directory and target architecture(s)::
          Paste the command below as it is in the terminal.
  
     $ ../hake/hake.sh -s ../ -a x86_64


Note:
     This will configure the build directory and use GHC to compile and then run hake, a tool used to generate the ``Makefile``.
     you will receive an acknowledgement message saying-
*CHECK:"DONE!"   "Generated Makefile"
         Tip:If you get any error(ghc command not found gcc paths are not created)build environment is not  installed properly goto step-1 and install again


Step-5.If everything worked Run make, and wait ::
     $make


Note:  *If you get any error(defs.h files are not available)It means while cloning the barrelfish the packages are not  unpacked properly.
One of the ways to solve this error is copy x86_64 folder from a properly installed system.
(path for x86_64 folder:./barrelfish/build)
IT WILL TAKE A MINIMUM OF 15 MINUTES WHEN YOU ARE "MAKE"ing FOR THE FIRST TIME.SO BE PATIENT


Step-6.If everything worked, you should now be able to run Barrelfish inside QEMU ::
  
     $ make sim


Done … :)


Please drop a comment below if this works for you/if you have any errors regarding this.


Thank you.












Friday, 9 October 2015

HOW TO HAVE AN ATTRACTIVE "About us"

To create an attractive “About us” for an app this will help you


First create an XML file


aboutsus.xml


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical" >
   
  <TextView
      android:text="Write about you here"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"     />
</LinearLayout>

Then create a Java file


Aboutus.java


//don’t forget to change the package here
package com.example.test;


import android.app.Activity;
import android.os.Bundle;


public class Aboutus extends Activity {


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aboutus);
}


}


and Here comes the main part


open manifest.xml then


inside <application> …. </application> copy below code


<activity
           android:name="com.example.test.Aboutus"
           android:label="@string/app_name"
           android:theme="@android:style/Theme.Dialog" >
                 <intent-filter >
               <action android:name="android.intent.action.ABOUT" />


               <category android:name="android.intent.category.DEFAULT" />
           </intent-filter>
       </activity>


Run the code and have an attractive “about us”