Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Oct 3, 2012

Ubuntu 12.04 notes.

Ubuntu 12.04 has been released for a while. I recently installed this version and almost everything works great except the video and wireless driver. I have google for a very long time and viewed many threads to solve these two problems. Therefore, this post is just to remind me how I solved this problem.

Video Drivers:

My notebook's graphic card is ati radeon hd 4300. If you want to check what graphic card your computer is using just type:

lspci -vnn | grep VGA

and it will show you the information that you need.
Actually, there are many ways to install the graphic drivers. The following is just how I set my video drivers.
First make sure you haven't installed an old fglrx drivers. If you do, simply type:

sudo apt-get remove --purge fglrx* fglrx_* fglrx-amdcccle* fglrx-dev*

this command will remove the fglrx driver that your system is currently using.
After remove the old drivers, download the binary file from the amd support web site:
In my case, the binary file I need to download is as follow. http://support.amd.com/us/gpudownload/windows/previous/12/Pages/radeon_linux.aspx?os=Linux%20x86&rev=12.4
After download the binary file type:

chmod +x amd-driver-installer-12-4-x86.x86_64.run
./amd-driver-installer-12-4-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i *.deb

That's it. Reboot your system and the fglrx should installed properly.
More detailed, check the following two reference websites.
https://help.ubuntu.com/community/BinaryDriverHowto/ATI
http://askubuntu.com/questions/124292/what-is-the-correct-way-to-install-ati-catalyst-video-drivers

Wireless Drivers:

My notebook's wireless NIC is Broadcom BCM 4312. Again, if you want to know what chipset your device is using type:

lspci -vnn | grep Network

And it will print out the information you need. After knowing the chipset, it's time to find out what kind of driver/module that I need. Actually, installing the new wireless driver is very simple in ubuntu 12.04. Just type sudo apt-get install backport-module-cw-$kernel_version the kernel_version is your kernel version which can use uname command to verify it. After this instruction, it will install almost all the wireless module(atheros or broadcom chipset) from newer kernel version. Hope this post can help others. :)

Nov 28, 2011

ubuntu 11.10 plus plasma widget

I recently install the ubuntu 11.10. I spent some time to get used to the unity interface.
But the unity shell is lack of widgets and therefore I decided to install the plasma-desktop to my ubuntu. :P


1. install the package by the following command:
   apt-get install plasma-desktop plasma-scriptengine-python
2. create launcher to start the plasma desktop:
   type gnome-desktop-item-edit ~/Desktop --create-new
   and it will popup a dialog box.
   select "application" in the type field,
   filled "plasma-desktop" or whatever u like in the name field,
   filled "plasma-desktop" in the command field,
   and press ok.
   P.S u can also create a launcher to stop the plasma by filled the command field with killall plasma-desktop.
3. Let plasma looks better in unity
   a. System Settings > Application Appearance > Widget Style > GTK+
   b. System Settings > Workspace Appearance > Desktop theme > Get new theme
   c. Search for ‘Ambiance’
   d. install it and use it.
   e. remove the bottom panel if u don't like it.
4. Use the nautilus as default folder manager
   control center(system setting) > file associations > inode > directory [ then add: "nautilus --no-desktop" ]
   or you can just install dolphin if u don't like the nautilus.

That's it enjoy!!

reference website:
http://www.omgubuntu.co.uk/2011/05/how-to-run-kde-plasma-widgets-in-ubuntu-unity/
https://bbs.archlinux.org/viewtopic.php?id=48046

Apr 20, 2011

building the android adt for eclipse

After building the android source code and the sdk. I tried to build the adt as well.
But remember when you make adt, android will delete the .sdk and the .img which generated from android source code. (I took a lot of time to make the image files T T )
Therefore, my advice is backup those file before building the android adt.

OS: ubuntu 10.10
java version: sun-jdk1.5

Ok, now this is how I built my android adt.
1. Download  eclipse from here. (I prefer Download manually. When I use apt-get install eclipse, the building process failed.)
P.S I prefer the RAP and RCP version (since the package is smaller).

2. After downloading, extract the file to any directory you want.
   for example: ~/eclipse

3. set the environment variable ECLIPSE_HOME.
    export ECLIPSE_HOME=${the directory you extract your eclipse}

4.the final step is to make the adt using the script contain in the source code.
    ${android home}/tools/eclipse/scripts/build_server.sh ${destination-directory}
    
P.S the build_server.sh script may be contains in different folder depend on which version of source code you download
           ${android home} is where your android source code is
           ${destination-directory} is where you want to put your adt zip file.


After all these steps, you can see a zip file in your destination folder.


reference website: Build android device tool for eclipse

Apr 18, 2011

building the android sdk

After compiling the android source, It's time to compile the sdk.
Remember before start compiling the sdk, you need to use the sun jdk 1.5.
use this command: update-alternatives --config java 
to switch to jdk5.
However, when I'm compiling the sdk when follow the above steps, there are still error.
My solution is:
1. use lunch sdk-eng before make sdk(if the error still occur)
2. remove all the java sdk in my ubuntu such as openjdk and sun-java1.6.jdk(except jdk5)

And after these two steps, I successfully finished compiling the sdk
you can find the jdk in ~/out/host/${your_machine}/sdk
here is the layout:
drwxr-x--- 3 user user      4096 2011-04-18 10:11 .
drwxr-xr-x 9 user user      4096 2011-04-18 10:10 ..
drwxrwx--- 7 user user      4096 2011-04-18 10:10 android-sdk_eng.user_linux-x86
-rw-r--r-- 1 user user 172889941 2011-04-18 10:11 android-sdk_eng.user_linux-x86.zip
-rw-r--r-- 1 user user    648232 2011-04-18 10:11 sdk_deps.mk


steps review:
                     sudo update-alternatives --config java(change to jdk5)
                     lunch sdk-eng
                     make sdk

Before building the android source

What I forgot to mention in the previous is that the environment setting.
Before we start downloading and compiling the android source code, there are
some important stuff we need to do first.
1.according to the website, we need to download the jdk6 for Gingerbread and newer. And jdk5 for froyo or older.

  The following is how to do this.
   add deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
          deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse
   in your /etc/apt/source.list
  
   and sudo apt-get update
          sudo apt-get install sun-java5-jdk(for jdk5)
  
after that the sun java jdk5 is installed.
you can use : update-alternatives --config java 
to change which version you want.


2. the rest of the package is just like the website says. follow those steps and you can start download and compile your android.

compiling android source code

Yesterday, I finally finished compiling the android source code. It took me the whole afternoon to accomplish this job.
The following is how it work.
My environment is: ubuntu 10.10 netbook edition. 

1.download the android source code.(Tooks me lots of time. 5GB source code)
    this step is referenced from the android official website.
2.compile the android source code
    the official website has it all. However, there are some detail that the website doesn't mentioned.
     when compiling the source code, I met two problems.
      a.the first problem happened when compiling the qemu,
         and the solution is install some extra packages.
         sudo apt-get install xllproto-core-dev (provides Xatom.h)
         sudo apt-get install libxll-dev (provides Xlib.h)
      referenced website: Issue 15
    
     b.another problem is when compiling the adb,
        Error message is like: /usr/bin/ld: cannot find -lncurses
        solution is install an extra package.
        sudo apt-get install libncurses5-dev
     reference website: problem compiling adb....

After these problems, everything works really fine.

And after compile is finished, u will see a directory called "out" in you android root directory.



Labels