2011年7月15日 星期五

Mobilygen SDK7rc15 to SDK9rc1

1. 相關步驟參考 [Mobilygen SDK 整合步驟]

2. 差異步驟:

2.1 在mboot方面,Makefile中"LOCAL_CFLAGS"要加入{-mabi=apcs-gnu -mcpu=arm9e},不然再make時會出現function沒有定� #7��問題。

2.2 在kernel設定方面:
2.2.1 加入 "General setup" -> "POSIX Message Queues" for LED control.
2.2.2 加入 "Kernel Features" -> "Use the ARM EABI to compile the kernel" for new toolchain.
2.2.3 移除 "Floating point emulation",新版toolchain啟用hardware floating.
2.2.4 注意 "Device Drivers" -> "Memory Technology Device..." -> "Command line partition table parsing" 必須是"M"
2.2.5 加入 "Device Drivers" -> "Misc devices" -> "Cadence PWM Component AMBA Driver" for PIR
2.2.6 移除 "Device Drivers" -> "I2C support" -> "I2C Hardware Bus support" -> "Master/Slave I2C..." for I2C bus by GPIO
2.2.7 加入 "Device Drivers" -> "I2C support" -> "I2C Hardware Bus support" -> "GPIO-based bitbanging I2C" for I2C bus by GPIO
2.2.8 注意 "Device Drivers" -> "Watchdog Timer Support" -> "DW Watchdog for Maxim SOC chips" 必須是"M"
2.2.9 注意 "Device Drivers" -> "USB Support" -> "Maxim Merlin USB controller" -> "Synopsys DWC USB core" 必須是"M"
2.2.10 注意 "Device Drivers" -> "MMC/SD/SDIO card support" -> "Enable Design Ware Mobile..." 必須是"M"
2.2.11 移除 "Kernel hacking"中Debug的相關設定,不然kernel&modules會很大
2.2.12 其餘設定,可以比照sdk7rc15(9)

2.3 在qhal方面,因為sdk9rc1會產生出多種版 #C的qhal.ko,而且再make時所參照的kernel source並不是我們所使用的,所以必須先使用sdk9rc1原始方式先產生出所要版本的程式碼,然後再使用一般modules make方式再make一次,不然會發生insmod時無法載入的錯誤。

2.4 在Mercury方面,因為新版在RTSP有加入SRTP的定義,所以必須在Makefile中加入相關設定。(參照sdk9rc1中RtpRtspServer Makefile相關設定。

3. 經驗總結:

3.1 在有問題時,先使用工具程式檢查檔案格式是否相同。如file/modinfo/{CROSS}-objdump -x/{CROSS}-readelf
3.2 要檢查Makefile,檢查是否有新增或移除的設定,才能確保sdk所產生的obj檔能跟我們修改後的obj檔一致。