2010年12月16日 星期四

建立軟目錄

下載了兩個eclipse - 3.5.2 and 3.6.1
解完壓縮都叫eclipse

所以先解壓縮一個之後
mv eclipse eclipse-3.5.2
在解壓縮另外一個
mv eclipse eclipse-3.6.1

利用軟目錄的特性
我可以用
ln -s eclipse-3.6.1 eclipse
就可以建出eclipse
之後進入eclipse就等於進入eclipse-3.6.1

透過Facebook分享

2010年12月14日 星期二

.PHONY in makefile

.PHONY不是一個真正的檔案名稱
當有相同檔案名稱的時候
使用
.PHONY: aaa
aaa: bbb
    ccc

make aaa
就是告知make要check bbb後 請執行ccc

而不會去比較aaa檔案與bbb檔案的更動時間

Reference:
http://www.gnu.org/software/make/manual/make.html#Phony-Targets

透過Facebook分享

Gnu make manual

Gnu make manual online

透過Facebook分享

2010年12月13日 星期一

確認你的Linux系統以及CPU是32 or 64 bit

1.確認linux作業系統
uname -m
出現i386/i486/i586/i686就是32bit
出現x86_64就是64bit

2. 確認CPU
grep flags /proc/cpuinfo
有出現lm就是64bit


nelsonchung@gps1004:~/myandroid9.1/hardware/libhardware_legacy/gps$ grep flags /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
nelsonchung@gps1004:~/myandroid9.1/hardware/libhardware_legacy/gps$

那32bit該怎麼看呢??


Reference:
http://www.thegeekstuff.com/2010/12/linux-32-or-64-bit/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+TheGeekStuff+(The+Geek+Stuff)

透過Facebook分享

2010年12月12日 星期日

修改GRUB開機倒數 under ubuntu 10.04

Ubuntu 10.04使用GRUB 2

GRUB 2中文指南

已經沒有在/boot/grub/menu.lst裡面修改嚕
因為被/boot/grub/grub.cfg取代嚕
可是GRUB 2不建議你修改這個檔案
請修改/etc/default/grub

sudo vim /etc/default/grub


GRUB_TIMEOUT=10
改成
GRUB_TIMEOUT=2


編輯完之後要使用update-grub他會自動更新/boot/grub/grub.cfg

nelsonchung@ubuntu:/boot/grub$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found Microsoft Windows XP Professional on /dev/sda1
done

重新開機看效果

透過Facebook分享