Showing posts with label eee pc. Show all posts
Showing posts with label eee pc. Show all posts

Saturday, September 27, 2008

[How-to] Install Android SDK on Asus eeepc Linux

Asus eeepc comes with xandros Debian Linux version but does not have development tools. This guide shows you how to setup the development tools for Android SDK.

Part (A) You need to add the debian package source and install the compiling tools and JDK from Sun in eee pc Linux

(1) Launch Terminal (Ctrl-Alt-T)

(2) edit the file/etc/apt/sources.list
sudo vi /etc/apt/sources.list

and add this line to the end of the file "sources.list"
deb http://http.us.debian.org/debian/ stable main

(3) Run these commands in Terminal to install building tools

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential ant



(4) Download JDK from Sun
(Latest Release)
http://java.sun.com/javase/downloads/index.jsp

The current version of JDK is
Java SE Development Kit 6u7
Download the Linux version and the file without rpm. That is

jdk-6u7-linux-i586.bin

(5) Run these commands in Terminal to install JDK


chmod +x jdk-6u7-linux-i586.bin
./jdk-6u7-linux-i586.bin

#then follow the install instructions and answer yes and then a directory jdk1.6.0_07 will be created

sudo mv jdk1.6.0_07 /usr/
cd /usr/bin
sudo ln -sf /usr/jdk1.6.0_07/bin/java
sudo ln -sf /usr/jdk1.6.0_07/bin/javac
sudo ln -sf /usr/jdk1.6.0_07/bin/jar


Part (B) Download and Install Android SDK

(1) Download the Android SDK
http://code.google.com/android/download.html

download the Linux version, the current version is
Linux (i386) android-sdk-linux_x86-1.0_r1.zip

(2) unzip and install the android SDK say to /usr/

unzip android-sdk-linux_x86-1.0_r1.zip
sudo mv android-sdk-linux_x86-1.0_r1 /usr/


(3) edit ~/.bash_profile
vi ~/.bash_profile
change
PATH=~/bin:"${PATH}"
to
PATH=~/bin:/usr/android-sdk-linux_x86-1.0_r1/tools:"${PATH}"

(4) Test run Android emulator

starting emulator in portrait mode will be out of view in eeepc, so we need to run it in landscape mode. Moreover the sound does not work.
To start the emuator for the first time, use these commands in Terminal

Assume, Android SDK is installed in /usr and android data will be kept at ~/androiddata


export PATH=${PATH}:/usr/android-sdk-linux_x86-1.0_r1/tools
mkdir -p ~/androiddata
emulator -datadir ~/androiddata -noaudio -skin HVGA-L


or, alternatively, if you have to run the emulator in portrait mode, you need to scale it say by 0.6

emulator -datadir ~/androiddata -noaudio -scale 0.6



Please be patient for the Emulator for the first time as it takes very long to create the data on first installation


Part (C) Test building HelloActivity from the sample code

(1) If you have installed the Andriod SDK and started the emulator for the first time, it is better to reboot the computer first and then start the emulator again.

(2) Create the Projects directory say
mkdir -p ~/Projects

(3) start emulator in Terminal
emulator -noaudio -skin HVGA-L &

(4) copy the HelloActivity from sample of SDK to Projects directory
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/HelloActivity ~/Projects/

(5) Use activityCreator to create the build file
activitycreator --out ~/Projects/HelloActivity com.example.android.helloactivity

(6) Build the HelloActivity project
cd ~/Projects/
ant


(7) Install the HelloActivity project to emulator
cd ~/Projects/
ant install


Remember, you must start the emulator before installing binary

(8) Then you can test the installed program HelloActivity in the emulator
To uninstall the program do this in Terminal
cd ~/Projects/
ant uninstall


If you need an integrated development environment, use Eclipse and install the plug-ins as described in the Android download site.

If you amend some codes in the Project and want to reinstall use

cd ~/Projects/
ant reinstall



For Mac OS X installation, just skip the Part (A) of this guide and follow similar procedure in other parts, as Mac OS X has these building tools / JDK already installed.

For other sample projects from SDK the activityCreate scripts are
cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/LunarLander ~/Projects/
activitycreator --out ~/Projects/LunarLander com.example.android.lunarlander
cd ~/Projects/LunarLander
ant install

cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/NotePad ~/Projects/
activitycreator --out ~/Projects/NotePad com.example.android.notepad
cd ~/Projects/NotePad
ant install

cp -r /usr/android-sdk-linux_x86-1.0_r1/samples/Snake ~/Projects/
activitycreator --out ~/Projects/Snake com.example.android.snake
cd ~/Projects/Snake
ant install


Enjoy.

Saturday, February 16, 2008

Operation failed HUAWEI HSUPA/HSDPA/3G E272 modem

Problem : Operation failed when connecting using HSUPA/HSDPA/3G modem
Got this error with my smartone vodafone HUAWEI HSUPA/HSDPA/3G E272 modem in EEE PC Linux

The error log revealed PPP failed and no longer working

Failed to run pon. (pppclientservice.cpp: 1007)
pppd error (pppclientservice.cpp: 1005)

Solution 1:
Re-create a new Network Connection in EEE PC Linux

Solution 2 :
run this in Terminal
sudo rm /var/run/pppd2.tdb

then restart the connection

Thursday, February 14, 2008

Format SD card in eee pc (refomat to other filesystems)

sudo fdisk -l  # find your existing devices in Linux

sudo umount /dev/sdb1 # first unmount the device


Assume the partition is already created, you can run the following command to reformat the SDCARD to the supported filesystems in Linux



sudo mkfs.ext2 -L SDCARD /dev/sdb1 # format to ext2

sudo mkfs.ext3 -L SDCARD /dev/sdb1 # format to ext3

sudo mkdosfs -F 32 -n SDCARD /dev/sdb1 # format to FAT32

sudo mkdosfs -F 16 -n SDCARD /dev/sdb1 # format to FAT16

Sunday, February 10, 2008

Install VirtualBox for eee pc linux with 2G ram support

References http://forum.eeeuser.com/viewtopic.php?pid=105740

http://dlsvr01.asus.com/pub/ASUS/EeePC/EeePC4G(701)/VGA_XP_071011.zip

(1) add source in /etc/apt/sources.list
deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free
deb http://www.VirtualBox.org/debian etch non-free

(2) install necessary build-essential
sudo apt-get install build-essential

(3) download Linux Kernel from ASUS
http://dlsvr01.asus.com/pub/ASUS/EeePC/701/Linux_Kernel_071127.rar

(4) unrar the Linux Kernel and install the package
dpkg --install linux-source-2.6.21.4-eeepc_5_all.deb
cd /usr/src
tar -xjvf linux-source-2.6.21.4-eeepc.tar.bz2
sudo rm linux-source-2.6.21.4-eeepc.tar.bz2
sudo ln -s /usr/src/linux-source-2.6.21.4-eeepc /usr/src/linux
cd linux-source-2.6.21.4-eeepc
sudo make menuconfig
sudo apt-get install libncurses5-dev

(5) Go to
Processor type and features -> High Memory Support -> Change from "off" to "4gb"
Exit and Save Configuration

(6) cd /usr/src/linux
sudo make oldconfig && sudo make prepare

(7)
sudo make all

(8)
sudo apt-get install virtualbox

(9) sudo usermod -a -G vboxusers user

(10) create a shell script /home/user/vboxrun.sh
sudo /etc/init.d/vboxdrv start
sudo /etc/init.d/vboxnet start
/usr/bin/VirtualBox
sudo /etc/init.d/vboxdrv stop
sudo /etc/init.d/vboxnet stop

(11) sudo chmod +x /home/user/vboxrun.sh

(12) Edit and Append the text to /opt/xandros/share/AsusLauncher/simpleui.rc

Virtual Box
Virtual Box
Virtual Box

Friday, February 1, 2008

Change Truetype fonts in EEE PC Linux

Peform these steps if you want to change trutype fonts of eee pc Linux and in firefox

(1) Download Droid Font Family (ZIP of TTF) (1.8 MB)

(2) unzip DroidFamily.zip -d /usr/share/fonts/truetype/

(3) edit these two files
userChrome.css and userContent.css
in /home/user/.mozilla/firefox/9rhzolat.default/chrome/

and add these lines

* {
font-size: 10pt !important;
font-family: Droid Sans Fallback !important;
}

(4) if you don't have userChrome.css and userContent.css
copy them from userChrome-example.css and userContent-example.css

(5) run fc-cache –v –f /usr/share/fonts/

(6) run sudo kcontrol and change the default font for the system as below

Saturday, January 19, 2008

Global proxy server for EEE PC Linux

If you use EEE PC in Linux environment and you are behind a firewall, you have to setup proxy server in various applications. These are a few examples here

(1) Firefox (web browser)

Edit -> Preferences -> Network tab -> Settings button -> choose manual proxy configuration


(2) apt-get (install/update package)

In terminal, run
export http_proxy="http://user:pw@proxyaddress:port"

e.g. in Hong Kong Public Library
export http_proxy="http://hkclproxy.hkpl.gov.hk:8080"


(3) svn (subversion)

edit the [global] section in this file ~/.subversion/server

e.g. in Hong Kong Public Library
[global]
http-proxy-host = hkclproxy.hkpl.gov.hk
http-proxy-port = 8080

(4) wget

add the following to ~/.wgetrc file:
http_proxy = http://hkclproxy.hkpl.gov.hk:8080/
use_proxy = off
wait = 15
use the following command option --proxy say to enable ad hoc proxy
wget --proxy http://www.google.com/

Tuesday, January 15, 2008

Copy & Paste in Terminal Window - EEE PC Linux Easy Mode

Copy & Paste in terminal window:
(1) Highlight the text in terminal window
(2) Press Shift-Insert = paste highlighted to current cursor position


Copy from terminal window and paste to other application:

(1) Highlight the text in terminal window
(2) Select other application
(3) Click Middle Mouse Button = paste highlighted text of terminal window to the current mouse position of other application

Monday, January 14, 2008

Asus EEE PC

Saturday, January 12, 2008

Internet Radio in EEE PC




Stream settings in Music Manager
商業一台 mms://mslive02.881903.com/cr1
商業二台 mms://mslive02.881903.com/cr2
Metro 997 mmsh://metromedia.997metroshowbiz.com/hit997
Metro Finance mmsh://metromedia.104metrofinance.com/fmselect
RTHK Radio 1 http://www.rthk.org.hk/live1.asx
RTHK Radio 2 http://www.rthk.org.hk/live2.asx
RTHK Radio 3 http://www.rthk.org.hk/live3.asx
RTHK Radio 4 http://www.rthk.org.hk/live4.asx
RTHK Radio 5 http://www.rthk.org.hk/live5.asx


Settings in Media Player

商業一台 mms://mslive02.881903.com/cr1
商業二台 mms://mslive02.881903.com/cr2
Metro 997 http://metromedia.997metroshowbiz.com/hit997
Metro Finance http://metromedia.104metrofinance.com/fmselect
RTHK Radio 1 mms://202.177.192.111/radio1
RTHK Radio 2 mms://202.177.192.111/radio2
RTHK Radio 3 mms://202.177.192.111/radio3
RTHK Radio 4 mms://202.177.192.111/radio4
RTHK Radio 5 mms://202.177.192.111/radio5

Thursday, January 10, 2008

Successful iPhone Toolchain build in eee pc


I have successfuly compile iPhone ToolChain in EEE PC environment.
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-svn-42498 -r 42498
svn co http://iphone-dev.googlecode.com/svn/trunk/ iphone-dev-209 -r 209


The screen dump shows the project build of hp15c for iPhone.

Build script
#!/bin/sh
cd ~/iphone

svn co http://llvm.org/svn/llvm-project/llvm/trunk \
llvm-svn-42498 -r 42498

svn co http://iphone-dev.googlecode.com/svn/trunk/ \
iphone-dev-209 -r 209


pushd llvm-svn-42498

./configure --enable-optimized

make ENABLE_OPTIMIZED=1

sudo make install

LLVMOBJDIR=`pwd`; export LLVMOBJDIR

popd


pushd iphone-dev-209

sudo mkdir /usr/local/arm-apple-darwin

mkdir -p build/odcctools

pushd build/odcctools

../../odcctools/configure --target=arm-apple-darwin \
--disable-ld64

make

sudo make install

popd


pushd ~/iphone

tar -xzvf MacOSX10.4u.sdk.tgz

pushd /usr/local/arm-apple-darwin

sudo tar -xzvf ~/iphone/include2.tgz

sudo tar -xzvf ~/iphone/iphone-filesystem.tgz

cd iphone-filesystem

HEAVENLY=`pwd`; export HEAVENLY

popd;popd


pushd include

./configure --with-macosx-sdk=/home/user/iphone/MacOSX10.4u.sdk

sudo bash install-headers.sh

popd


mkdir -p build/csu

pushd build/csu

../../csu/configure --host=arm-apple-darwin

sudo make install

popd


mkdir -p build/llvm-gcc-4.0-iphone

pushd build/llvm-gcc-4.0-iphone

../../llvm-gcc-4.0-iphone/configure \
--enable-llvm=`llvm-config --obj-root` \
--enable-languages=c,c++,objc,obj-c++ \
--target=arm-apple-darwin \
--enable-sjlj-exceptions \
--with-heavenly=$HEAVENLY \
--with-as=/usr/local/bin/arm-apple-darwin-as \
--with-ld=/usr/local/bin/arm-apple-darwin-ld

make LLVM_VERSION_INFO=2.0-svn-iphone-dev-0.3-svn

sudo make install

popd;popd

Automount SD card in EEE PC

  1. sudo mksir /mnt/SDCARD
  2. Edit /etc/udev/rules.d/50-xandros-udev.rules
  3. Find the comment
    # usb, removable storage
  4. Immediately after this comment, so that it will replace the Asus dialog, add the following line, changing the serial number to match your device and optionally changing the name SDCARD (in both places)


BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350"
, NAME="SDCARD", OPTIONS+="last_rule"
, RUN+="/bin/mount /dev/sdb1 /mnt/SDCARD"



Configure mount point

  1. Edit /etc/fstab
  2. Add a new line at the end
/dev/sdb1              /mnt/SDCARD    vfat    rw,uid=user


Wednesday, January 9, 2008

Format SD card to Linux filesystem in eee pc

Code:
fdisk /dev/sdb
New > Primary > Enter > Write > “yes” > Quit

Format new partition /dev/sdb1 to ext3 filesystem:

Code:
mke2fs -c /dev/sdb1 # format to ext2
tune2fs -j /dev/sdb1 # convert to ext3 (optional)
e2label /dev/sdb1 SDCARD # set volume label to “SDCARD”

change ownership to user for the SDCARD after remount:
Code:
sudo chown -R user:user /media/MMC-SD/SDCARD

Tuesday, January 8, 2008

Install IE 6 in eee pc Linux

sudo apt-get install wine cabextract

download ies4linux
http://www.tatanka.com.br/ies4linux/downloads/ies4linux-2.99.0.tar.gz

ies4linux-2.99.0
edit this file lib/functions.sh

find this

pid=$(wget -q -b -t 1 -T 5 -U “$useragent” -o /dev/null $URL $WGETFLAGS -O “$file” | sed -e ’s/[^0-9]//g’)
change to
pid=$(LC_ALL=C LANG=C wget -q -b -t 1 -T 5 -U “$useragent” -o /dev/null $URL $WGETFLAGS -O “$file” | sed -e ’s/[^0-9]//g’)

run to istall
./ies4linux -–no-gui

after install, run IE
./home/user/bin/ie6

Thursday, January 3, 2008

iPhone ToolChain build in EEE pc

My new EEE PC goes to technical support today due to internet sharing connection failed problem.

Today I download the iPhoneToolChain binary (intel) and install it in my ppc mac
(beware, it will overwrite your linker /usr/bin/ld)
and I have to reinstall the xcode in order to solve the problem as my ppc cannot run intel binary obviously.

the MakeFile should be changed to
CC=/usr/local/arm-apple-darwin/bin/gcc
CXX=/usr/local/arm-apple-darwin/bin/g++
CFLAGS=-fsigned-char
LDFLAGS=-Wl,-syslibroot,/usr/local/arm-apple-darwin/heavenly
-lobjc -ObjC
-framework CoreFoundation
-framework Foundation
-framework UIKit
-framework LayerKit
-framework CoreGraphics
-framework GraphicsServices
-framework Celestial
-framework MusicLibrary


This version of ToolChain seems to have a more complete header files than self build one

My objective is to put the binary file to my new EEE PC Linux for later iPhone development work.

If you need the iphone header file for 1.1.2, get it here
http://ericasadun.com/ftp/Misc/

For example, I modified the Makefile for iCountDown as below

APP=iCountDown

CC=arm-apple-darwin-gcc
LD=$(CC)

CFLAGS=-I/usr/local/arm-apple-darwin/include/ -fsigned-char

LDFLAGS=-lobjc \
-framework CoreFoundation \
-framework Foundation \
-framework UIKit \
-framework LayerKit \
-framework CoreGraphics \
-framework WebCore \
-framework GraphicsServices

all: ${APP}.app/${APP}

${APP}.app/${APP}: main.o iCountDown.o CDList.o SetupView.o CustomTable.o CustomTableCell.o ToggleDisplayView.o
$(LD) $(LDFLAGS) -v -o $@ $^

%.o: %.m
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

nice:
rm -f *.o

clean:
rm -f *.o ${APP}.app/${APP}


Wednesday, January 2, 2008

Personal Installation Guide of ASUS EEE PC 8G

Objective: To install Full Desktop for ASUS EEE PC

(1) Open terminal (Ctrl-Alt T)
sudo apt-get update
sudo apt-get upgrade

(2) add this source in /etc/apt/sources.list
deb http://download.tuxfamily.org/eeepcrepos p701 main

(3) Open terminal (Ctrl-Alt T)
sudo apt-get update
sudo apt-get install advanced-desktop-eeepc

(4) remove the above source in step (2)


Objective : To install binaries for gcc complier and make for iPhone toolchain in eee pc

(1) add this source in /etc/apt/sources.list
deb http://http.us.debian.org/debian/ stable main

(2) Open terminal (Ctrl-Alt T)
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install subversion

(3) remove the above source in step (1)

Objective: To change language locale

(1) make sure that there is only ASUS sources in /etc/apt/sources.list

(2) Open terminal (Ctrl-Alt T)
sudo apt-get update
sudo apt-get upgrade

(3) In terminal
sudo dpkg-reconfigure locales # add and change locales

sudo kate /etc/default/locale # change current locale

Objective: Linux boot to support 2G Ram

http://docs.google.com/View?docid=dqzwkb4_13csx38v