2010年12月16日 星期四

disable original audio driver and create virtual audio driver

上了charles patch
目的要將原本的audio driver disable
弄一個假的audio driver

nelsonchung@gps100make PRODUCT-imx51_bbg-eng 2>&1 | tee build_imx51_bbg_android.log4:~/myandroid9.1/frameworks/base/libs/audioflinger$ mm showcommands
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2
TARGET_PRODUCT=imx51_bbg
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRF85B
============================================
No private recovery resources for TARGET_DEVICE imx51_bbg
make: Entering directory `/home/nelsonchung/myandroid9.1'
Copy: out/target/product/imx51_bbg/root/init.rc
out/host/linux-x86/bin/acp -fpt device/fsl/imx5x/init.rc out/target/product/imx51_bbg/root/init.rc
target SharedLib: libaudioflinger (out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-g++ -nostdlib -Wl,-soname,libaudioflinger.so -Wl,-T,build/core/armelf.xsc -Wl,--gc-sections -Wl,-shared,-Bsymbolic -Lout/target/product/imx51_bbg/obj/lib   out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioMixer.o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioResampler.o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioResamplerSinc.o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioResamplerCubic.o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioFlinger.o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioPolicyService.o          -Wl,--whole-archive   -Wl,--no-whole-archive  out/target/product/imx51_bbg/obj/STATIC_LIBRARIES/libaudiointerface_intermediates/libaudiointerface.a out/target/product/imx51_bbg/obj/STATIC_LIBRARIES/libaudiopolicybase_intermediates/libaudiopolicybase.a -llog -lcutils -lutils -lbinder -lmedia -lhardware_legacy -ldl -lc -lstdc++ -lm  -o out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so   -Wl,--no-undefined  -Wl,--fix-cortex-a8  /home/nelsonchung/myandroid9.1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/interwork/libgcc.a
out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioPolicyService.o: In function `android::AudioPolicyService::AudioPolicyService()':
AudioPolicyService.cpp:(.text._ZN7android18AudioPolicyServiceC1Ev+0x13a): undefined reference to `createAudioPolicyManager'
out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioPolicyService.o: In function `android::AudioPolicyService::AudioPolicyService()':
AudioPolicyService.cpp:(.text._ZN7android18AudioPolicyServiceC2Ev+0x12e): undefined reference to `createAudioPolicyManager'
collect2: ld returned 1 exit status
make: *** [out/target/product/imx51_bbg/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so] Error 1
make: Leaving directory `/home/nelsonchung/myandroid9.1'

出現error

因為修改BoardConfigCommon.mk
所以建議make clean
重新編譯新的system.img

cd ~/myandroid9.1
make clean
make PRODUCT-imx51_bbg-eng 2>&1 | tee build_imx51_bbg_android.log

請等2~3個小時

ok

透過Facebook分享

建立軟目錄

下載了兩個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分享