2010年12月31日 星期五

imx51 make clean

build/core/envsetup.mk

root下的Makefile
include build/core/main.mk
會展開main.mk位於build/core

build/core/main.mk
內有clean

下make clean 就會呼叫到這裡


.PHONY: clean
dirs_to_clean := \
        $(PRODUCT_OUT) \
        $(TARGET_COMMON_OUT_ROOT) \
        $(HOST_OUT) \
        $(HOST_COMMON_OUT_ROOT)
clean:
        @for dir in $(dirs_to_clean) ; do \
            echo "Cleaning $$dir..."; \
            rm -rf $$dir; \
        done
        @echo "Clean."; \

所以要知道會刪除哪些資料就要知道這些參數的定義

        $(PRODUCT_OUT) 
        $(TARGET_COMMON_OUT_ROOT) 
        $(HOST_OUT) 
        $(HOST_COMMON_OUT_ROOT)

可以從envsetup.mk知道

以下是結果
TARGET_COMMON_OUT_ROOT = out/target/common
PRODUCT_OUT := $(TARGET_PRODUCT_OUT_ROOT)/$(TARGET_DEVICE)  = out/target/product/imx51_bbg
HOST_OUT = out/host/linux-x86
HOST_COMMON_OUT_ROOT = out/host/common

怎麼知道envsetup.mk有跟main.mk有關系呢

main.mk會include config.mk
./main.mk:55:include $(BUILD_SYSTEM)/config.mk

config.mk會include envsetup.mk
./config.mk:122:include $(BUILD_SYSTEM)/envsetup.mk

而BUILD_SYSTEM就是build/core

透過Facebook分享

2010年12月30日 星期四

build e2fsprogs for mkfs under arm platform

download source : http://sourceforge.net/projects/e2fsprogs/

設定環境變數
執行arm-setupenv.sh
內容為

#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=/home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
export PATH=/home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin:$PATH

follow

mkfs.ext4 for ARM (Android)

LDFLAGS=-static ./configure --host=arm-none-linux-gnueabi

make

可以build成功

查看一下版本 - 4.1.2
nelsonchung@ubuntu:~/Develop$ arm-none-linux-gnueabi-gcc -v
Reading specs from /home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.1.2/specs
Target: arm-none-linux-gnueabi
Configured with: /usr/src/redhat/BUILD/cross-mlib/source/gcc-4.1.2/configure --target=arm-none-linux-gnueabi --host=i686-host_pc-linux-gnu --prefix=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi --with-sysroot=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot --enable-threads --enable-shared --disable-libssp --disable-libgomp --disable-libmudflap --enable-languages=c,c++ --enable-__cxa_atexit --disable-nls
Thread model: posix
gcc version 4.1.2

可以在misc找到mke2fs

--
使用buildroot-2010.11產生出來的cross-compile

. arm-buildroot-setupenv.sh

內容為
#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=/home/nelsonchung/Develop/buildroot-2010.11/output/staging/usr/bin/arm-linux-
export PATH=/home/nelsonchung/Develop/buildroot-2010.11/output/staging/usr/bin:$PATH

LDFLAGS=-static ./configure --host=arm-linux

make

產生以下error
CC llseek.c
llseek.c: In function '_llseek':
llseek.c:65: error: expected declaration specifiers or '...' before '_llseek'
llseek.c:65: error: expected declaration specifiers or '...' before 'fd'
llseek.c:65: error: expected declaration specifiers or '...' before 'offset_high'
llseek.c:66: error: expected declaration specifiers or '...' before 'offset_low'
llseek.c:66: error: expected declaration specifiers or '...' before 'result'
llseek.c:67: error: expected declaration specifiers or '...' before 'origin'
llseek.c:67: error: storage class specified for parameter '_syscall5'
llseek.c:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
llseek.c:91: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
llseek.c:138: error: old-style parameter declarations in prototyped function definition
llseek.c:62: error: parameter name omitted
llseek.c:62: error: parameter name omitted
llseek.c:63: error: parameter name omitted
llseek.c:63: error: parameter name omitted
llseek.c:63: error: parameter name omitted
llseek.c:114: error: expected '{' at end of input
make[2]: *** [llseek.o] Error 1
make[2]: Leaving directory `/home/nelsonchung/Develop/e2fsprogs-1.41.14/lib/ext2fs'
make[1]: *** [all-libs-recursive] Error 1
make[1]: Leaving directory `/home/nelsonchung/Develop/e2fsprogs-1.41.14'
make: *** [all] Error 2

查一下版本-4.3.5
nelsonchung@ubuntu:~/Develop/buildroot-2010.11/output/staging/usr/bin$ arm-linux-gcc -v
Using built-in specs.
Target: arm-unknown-linux-uclibcgnueabi
Configured with: /home/nelsonchung/Develop/buildroot-2010.11/output/toolchain/gcc-4.3.5/configure --prefix=/home/nelsonchung/Develop/buildroot-2010.11/output/staging/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-unknown-linux-uclibcgnueabi --enable-languages=c --with-sysroot=/home/nelsonchung/Develop/buildroot-2010.11/output/staging --with-build-time-tools=/home/nelsonchung/Develop/buildroot-2010.11/output/staging/usr/arm-unknown-linux-uclibcgnueabi/bin --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libssp --disable-multilib --disable-tls --enable-shared --with-gmp=/home/nelsonchung/Develop/buildroot-2010.11/output/toolchain/gmp --with-mpfr=/home/nelsonchung/Develop/buildroot-2010.11/output/toolchain/mpfr --disable-nls --enable-threads --disable-decimal-float --with-float=soft --with-abi=aapcs-linux --with-arch=armv4t --with-tune=arm920t --disable-largefile --with-pkgversion='Buildroot 2010.11' --with-bugurl=http://bugs.buildroot.net/
Thread model: posix
gcc version 4.3.5 (Buildroot 2010.11)


修改位於
./lib/blkid/llseek.c
./lib/ext2fs/llseek.c

(改天寫完記得要出patch)

make

error message

make[2]: Entering directory `/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck'
LD e2fsck
../lib/libext2fs.a(tdb.o): In function `ext2fs_tdb_transaction_commit':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/lib/ext2fs/tdb.c:2119: warning: the use of OBSOLESCENT `utime' is discouraged, use `utimes'
profile.o: In function `profile_create_node':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:1088: undefined reference to `__strdup'
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:1094: undefined reference to `__strdup'
profile.o: In function `skip_over_nonblanks':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:639: undefined reference to `__ctype_b_loc'
profile.o: In function `skip_over_blanks':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:626: undefined reference to `__ctype_b_loc'
profile.o: In function `parse_line':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:681: undefined reference to `__ctype_b_loc'
profile.o: In function `strtoul':
/home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../arm-none-linux-gnueabi/sysroot/usr/include/stdlib.h:342: undefined reference to `__strtoul_internal'
profile.o: In function `strtol':
/home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../arm-none-linux-gnueabi/sysroot/usr/include/stdlib.h:336: undefined reference to `__strtol_internal'
profile.o: In function `get_dirlist':
/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck/profile.c:300: undefined reference to `__ctype_b_loc'
profile.o: In function `stat':
/home/nelsonchung/Develop/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/../arm-none-linux-gnueabi/sysroot/usr/include/sys/stat.h:436: undefined reference to `__xstat'
collect2: ld returned 1 exit status
make[2]: *** [e2fsck] Error 1
make[2]: Leaving directory `/home/nelsonchung/Develop/e2fsprogs-1.41.14/e2fsck'
make[1]: *** [all-progs-recursive] Error 1
make[1]: Leaving directory `/home/nelsonchung/Develop/e2fsprogs-1.41.14'
make: *** [all] Error 2


透過Facebook分享

找尋含有A字串在B檔案的目錄路徑並顯示出來

  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串


find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH"


./system/netd/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./system/bluetooth/brcm_patchram_plus/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
./system/bluetooth/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/libs/audioflinger/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./frameworks/base/core/jni/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio-qsd8k/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio-qsd8k/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/msm7k/libaudio/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/alsa_sound/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./hardware/alsa_sound/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/glib/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/hcidump/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/bluez/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH),true)
./external/bluetooth/bluez/common/Android.mk:ifeq ($(BOARD_HAVE_BLUETOOTH_BCM),true)
./external/bluetooth/bluez/common/Android.mk: -DBOARD_HAVE_BLUETOOTH_BCM


  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串的目錄路徑



find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH" | sed -e 's/\/[^/]*$//'


./system/netd
./system/bluetooth/brcm_patchram_plus
./system/bluetooth
./frameworks/base/libs/audioflinger
./frameworks/base/libs/audioflinger
./frameworks/base/libs/audioflinger
./frameworks/base/core/jni
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio
./hardware/msm7k/libaudio
./hardware/alsa_sound
./hardware/alsa_sound
./external/bluetooth/glib
./external/bluetooth/hcidump
./external/bluetooth/bluez
./external/bluetooth/bluez/common
./external/bluetooth/bluez/common


  • 找尋當目錄下所有Android.mk含有BOARD_HAVE_BLUETOOTH字串的目錄路徑



find . -type f -name "Android.mk" -print0 | xargs -0 grep "BOARD_HAVE_BLUETOOTH" | sed -e 's/\/[^/]*$//' | uniq


./system/netd
./system/bluetooth/brcm_patchram_plus
./system/bluetooth
./frameworks/base/libs/audioflinger
./frameworks/base/core/jni
./hardware/msm7k/libaudio-qsd8k
./hardware/msm7k/libaudio
./hardware/alsa_sound
./external/bluetooth/glib
./external/bluetooth/hcidump
./external/bluetooth/bluez
./external/bluetooth/bluez/common


透過Facebook分享

Gnu make: $< and $@的用法

Follow 

4.12.1 Syntax of Static Pattern Rules

我們可以簡化makefile的內容

一個makefile的內容如下

objects = main.o Eye.o Nose.o Ear.o Mouse.o Face.o

all: $(objects)
gcc $(objects) -o main

$(objects): %.o: %.c
gcc -c $< -o $@

clean:
rm main.o Eye.o Nose.o Ear.o Mouse.o Face.o main

藍色部份第一行中, %稱為stem
gnu make會替我們match出符合的.o檔的file name
然後交給gcc去作compile
$<: 能夠找出prerequisites的name
$@: 則能夠找出target的name

make之後你可以得到以下結果
gcc -c main.c -o main.o
gcc -c Eye.c -o Eye.o
gcc -c Nose.c -o Nose.o
gcc -c Ear.c -o Ear.o
gcc -c Mouse.c -o Mouse.o
gcc -c Face.c -o Face.o
gcc main.o Eye.o Nose.o Ear.o Mouse.o Face.o -o main


是使用git作source control
你也可以使用git log -p來查看差異


透過Facebook分享

2010年12月29日 星期三

刪除由git建出的branch

請使用git branch -D branchname

ex.
git branch
列出有三個分支A, B, C
假設你位於A要刪除C
git branch -D C

如果你位於A又要刪掉A呢
git branch -D A
這時候會出現error message
error: Cannot delete the branch 'C' which you are currently on.
所以你需要先切換到B
git checkout B
在刪除A
git branch -D A

透過Facebook分享

整合branch A上的改變到branch B by using git merge

man git-merge手冊上說明

有兩個branch:master and topic

想要把topic上3次的commit - A, B, C都commit到master上?該怎麼辦呢

原本狀況

                        A---B---C topic
                       /
               D---E---F---G master

想要的結果
                        A---B---C topic
                        /               \
               D---E---F---G---H master

1. 將所在的branch切換到master
git checkout master

2. 進行merge
git merge topic

就ok嚕


透過Facebook分享

The Introduction of Android GPS Interface from Zerget

架構
上層 <-> 底層
AP -> GpsStatus-> LocationManager->IGpsStatusListener

AP level透過Listener得知底層GPS的status

IGpsStatusListener透過Binder會跟底層作溝通 - 就是所謂的callback function實做方式

JNI定義與上層溝通的function並透過signal的方式通知

接下來底層的作法
就是要負責開gps com port, parse gps nmea並且設定到gps.h所定義的data structure. 
ex. GpsSvStatus or GpsStauts

所以你是系統開發商
你需要實做底層
也就是上述藍色的部份

透過Facebook分享

Android GPS porting HAL code - Fix GPSStatus and GPSSvStatus issue. 可以看到衛星訊號強度與收訊狀況

AP透過GpsStatus.Listener()監聽底層的資訊
接到GpsStatus.GPS_EVENT_FIRST_FIX後
透過getTimeToFirstFix function抓取資訊
這個資訊會透過LocationManager.getGpsStauts

GPS_EVENT_FIRST_FIX是LocationManager.java會送出,  在OnFirstFix實做

GpsLocationProvider.java告知reportLocation會負責更新getTimeToFirstFix的參數內容
reportLocation: called from native code to update our position.

在jni/android_location_GpsLocationProvider.cpp找到會將init_native 對應到reportLocation

這邊說
上層AP呼叫addGpsStatusListener就會call onSvStatusChanged (會更新mGpsStatus)

看到jni/android_location_GpsLocationProvider.cpp
GpsCallbacks sGpsCallbacks = {
    location_callback,
    status_callback,
    sv_status_callback,
    nmea_callback
};
實際上glgps.cpp只有implement location_callback
其他都沒有implment.
需要自行implement 這兩個function



status_callback,
sv_status_callback

--


在GPS中定義

/** Represents SV information. */
typedef struct {
    /** Pseudo-random number for the SV. */
    int     prn;
    /** Signal to noise ratio. */
    float   snr;
    /** Elevation of SV in degrees. */
    float   elevation;
    /** Azimuth of SV in degrees. */
    float   azimuth;
} GpsSvInfo;


/** Represents SV status. */
typedef struct {
        /** Number of SVs currently visible. */
        int         num_svs;


        /** Contains an array of SV information. */
        GpsSvInfo   sv_list[GPS_MAX_SVS];


        /** Represents a bit mask indicating which SVs
         * have ephemeris data.
         */
        uint32_t    ephemeris_mask;


        /** Represents a bit mask indicating which SVs
         * have almanac data.
         */
        uint32_t    almanac_mask;


        /**
         * Represents a bit mask indicating which SVs
         * were used for computing the most recent position fix.
         */
        uint32_t    used_in_fix_mask;
} GpsSvStatus;

需要填寫GpsSvStatus

最後透過sv_status_callback回傳資料給android gps interface


接下來要解釋一下上述結構的定義
以及跟GPGSA and GPGSV的關係


在GpsSvStatus中
num_svs:實收的衛星數目. 這個會影響android gps interface要收集多少資料
used_in_fix_mask:填寫目前fix的衛星id. 此部份可以經由GPGSA的第3到14個位置中取得.
ephemeris_mask and almanac_mask: 沒有特別設定
據Tommy and Richard的說法, 這個是衛星所發出的訊號, 會經由gps firmware解析之後output出nmea data.
會定義這兩個, 我猜測android給予一般系統廠或是gps module廠有不同的實做內容而做的開關.


sv_list是一個GpsSvInfo的structure.
有下列四個資訊
prn:衛星id編號
snr:衛星訊號
elevation:仰角
azimuth:方位角
以上資訊可以透過GPGSV取得




參考文章有說明 nmea format - GPGSA and GPGSV

GPS nmea - GPGSA and GPGSV


填完GpsSvStatus之後

你需要根據目前GPS的狀態設定GpsStatus

gps.h內定義
/** GPS status event values. */
typedef uint16_t GpsStatusValue;
// IMPORTANT: Note that the following values must match
// constants in GpsLocationProvider.java.
/** GPS status unknown. */
#define GPS_STATUS_NONE             0
/** GPS has begun navigating. */
#define     1
/** GPS has stopped navigating. */
#define GPS_STATUS_SESSION_END      2
/** GPS has powered on but is not navigating. */
#define GPS_STATUS_ENGINE_ON        3
/** GPS is powered off. */
#define GPS_STATUS_ENGINE_OFF       4

所以我在成功開com port後 將status設成GPS_STATUS_ENGINE_ON, 透過callback回傳
讀取到gps nmea後送出GPS_STATUS_SESSION_BEGIN. 

最後感謝Zerget分享的資訊


透過Facebook分享

vimdiff 比較檔案之間的差異

使用vimdiff 可以比較兩到四個檔案之間的差異

vimdiff file1 file2 file3 file4
依照這種方式可以比對到四個檔案之多

預設使用垂直的方式比對
如果有些字會被遮到
可以使用-o更換成水平方式

vimdiff -o file1 file2

default顏色比對效果不明顯
可以參考

Change vimdiff color

修改比對顏色


比對時需要切換到不同的檔案
可以使用
ctrl+w w
ctrl先按住 w按兩次


Reference:
http://man.chinaunix.net/newsoft/vi/doc/diff.html

透過Facebook分享

2010年12月27日 星期一

GPS nmea - GPGSA and GPGSV

$GPGSA
第三到第十四負責紀錄已經鎖定的衛星訊號ID.
用來畫綠色(已鎖定)及藍色(未鎖定)的衛星.

$GPGSV


$GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00*74
$GPGSV,3,2,11,14,25,170,00,16,57,208,39,18,67,296,40,19,40,246,00*74
$GPGSV,3,3,11,22,42,067,42,24,14,311,43,27,05,244,00,,,,*4D

ex. 傳送的nmea - GPGSV總共有3
之後代表現在是第幾個nmea,
接下來分別為
衛星ID, 高度, 方位, 強度 (第一個總共有四顆衛星, 編號為03, 04, 06, and 13
(第二個總共有四顆衛星, 編號為14, 16, 18, and19)
(第三個總共有三顆衛星, 編號為22, 24, and 27)
*之後接的是checksum

Reference:
http://aprs.gids.nl/nmea/

透過Facebook分享

How to get the source code of alacarte

Ubuntu Gnome
可以用"主選單"這套工具輕易的加入或移除應用程式

ex
新安裝eclipse
想要在"軟體開發"的區域看到就可以使用"主選單"做到

主選單的英文叫做alacarte

如果可以抓到source code不就知道怎麼做到上述的事情

使用 sudo apt-get source alacarte

nelsonchung@ubuntu:~/Develop$ sudo apt-get source alacarte
[sudo] password for nelsonchung:
正在讀取套件清單... 完成
正在重建相依關係        
正在讀取狀態資料... 完成
請注意:'alacarte' 套件是在下列位置被 'Svn' 版本控制系統所維護的:
svn://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/alacarte/
需要下載 240kB 的原始套件檔。
下載:1 http://tw.archive.ubuntu.com/ubuntu/ lucid/main alacarte 0.13.1-0ubuntu1 (dsc) [1,676B]
下載:2 http://tw.archive.ubuntu.com/ubuntu/ lucid/main alacarte 0.13.1-0ubuntu1 (tar) [230kB]
下載:3 http://tw.archive.ubuntu.com/ubuntu/ lucid/main alacarte 0.13.1-0ubuntu1 (diff) [7,830B]
取得 240kB 用了 2s (98.3kB/s)
gpgv: 由 2010年03月29日 (週一) 17時36分14秒 CST 建立的簽章, 使用 DSA 金鑰 ID E4AC208E
gpgv: 無法檢查簽章: 找不到公鑰
dpkg-source: warning: failed to verify signature on ./alacarte_0.13.1-0ubuntu1.dsc
dpkg-source: info: extracting alacarte in alacarte-0.13.1
dpkg-source: info: unpacking alacarte_0.13.1.orig.tar.gz
dpkg-source: info: applying alacarte_0.13.1-0ubuntu1.diff.gz

就可以抓到source嚕

Reference:
http://ubuntuforums.org/showthread.php?t=361962


透過Facebook分享

SL410 安裝Ubuntu 10.04 - 運行時 畫面會有閃動

原本安裝windows xp不會
安裝Ubuntu 10.04卻會有類似更新畫面的閃動
頻率挺頻繁的十幾分鐘一次 (估計值)

後來把電池移除
只用Ac adapter供電
就很少發生
一天一次(估計值)

透過Facebook分享

Android GPS porting HAL code - try to fix GPSStatus.nmea issue

AP declared nmeaListener = new GpsStatus.NmeaListener() to read the information of callback from JNI( Android GPS Interface Level, or called HAL)

HAL need to follow gps.h to implement callback function - gps_nmea_callback

You can follow this information from gps.h

/** Callback for reporting NMEA sentences. */
typedef void (* gps_nmea_callback)(GpsUtcTime timestamp, const char* nmea, int length);

/** GPS callback structure. */
typedef struct {
        gps_location_callback location_cb;
        gps_status_callback status_cb;
        gps_sv_status_callback sv_status_cb;
        gps_nmea_callback nmea_cb;
} GpsCallbacks;

First one is timestamp.
Second on is nmea that you open gps com port and read that information.
Third is the length of nmea.

mm
and 
make snod
generate new system.img

Run GPSDemo application then I can see the nmea on GPSDemo.

I post the information on android group developers.
http://groups.google.com/group/android-developers/browse_thread/thread/3bb4dd9070451df2?pli=1

透過Facebook分享

Gnu make - implicit rule 概念

預設你在makefile內不編輯rule的話
gnu make會根據你所定義的target and prerequisites作自動編輯

source code download 

以此範例說明
解壓縮完
下make

nelsonchung@nelsonchung-aspireone:~/ebooks/gnumake/DoTest$ make
gcc -c main.c
gcc -c Eye.c
gcc -c Nose.c
gcc -c Ear.c
gcc -c Mouse.c
cc    -c -o Face.o Face.c
gcc main.o Eye.o Nose.o Ear.o Mouse.o -o main
nelsonchung@nelsonchung-aspireone:~/ebooks/gnumake/DoTest$

藍色部份


因為在makefile裡面沒有特地去寫rule

nelsonchung@nelsonchung-aspireone:~/ebooks/gnumake/DoTest$ cat makefile
all: main.o Eye.o Nose.o Ear.o Mouse.o Face.o
gcc main.o Eye.o Nose.o Ear.o Mouse.o -o main

main.o: main.c
gcc -c main.c
Eye.o: Eye.h
gcc -c Eye.c
Nose.o: Nose.h
gcc -c Nose.c
Ear.o: Ear.h
gcc -c Ear.c
Mouse.o: Mouse.h
gcc -c Mouse.c
Face.o: Face.c

clean:
rm main.o Eye.o Nose.o Ear.o Mouse.o Face.o main

所以gnu make會根據你現在要編譯的是.c, .cpp, .p or other files去啟動相對應的compiler


Reference:
Gnu make 文件第十章
10 Using Implicit Rules


透過Facebook分享