移植memtester到android平台

來源:互聯網
上載者:User

標籤:

硬體能進入系統,首要就是測試記憶體的穩定性,需要一款記憶體測試載入器。

一般都是選擇memtester這款linux軟體,如下:http://pyropus.ca/software/memtester/

把memtester解壓到android/external/下(此文預設讀者已有Android SDK)

-----------------------------------------------------------------------------------------------------------------------------

移植:

1:分別把conf-ld和conf-cc檔案中的"cc"(一般在檔案首行)替換成“arm-linux-androideabi-gcc”

2:編寫Android.mk,代碼如下:

1 LOCAL_PATH := $(call my-dir)2 include $(CLEAR_VARS)3 LOCAL_SRC_FILES := memtester.c tests.c4 LOCAL_MODULE := memtester
5 LOCAL_C_INCLUDES := $(LOCAL_PATH)6 include $(BUILD_EXECUTABLE)

Line 1:返回當前路徑;Line 2:清除LOCAL_XXX變數;Line 3:編譯模組源碼檔案;

Line 4:模組輸出名字;Line 5:額外的C標頭檔;Line 6 生產可執行檔(亦可是庫,根據變數而定)。

Line 1 2 3 4 6是Android.mk最基本的模板。

到此移植完成!

-----------------------------------------------------------------------------------------------------------------------------

編譯:

cd android,source build/envsetup.sh,lunch對應的平台

mmm  android/external/memtester-xxx ("xxx"為你的memtester版本)

最終在/system/bin產生可執行檔memtester!

 

移植memtester到android平台

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.