2011年4月2日 星期六

android porting note

kernel porting

s3c6410

android kernel-2.6.32

machine ID error

Uncompressing Linux.........................................................................................

Error: unrecognized/unsupported machine ID (r1 = 0x000009d8).

Available machine support:

ID (hex) NAME
0000065a SMDK6410

Please check your kernel config and/or bootloader.

Refer linux-kernel2.6.32/include/asm/mach-types.h
#define MACH_TYPE_SMDK6410 1626 ==> 0x65A

u-boot wasMINI6410 # bdinfo
arch_number = 0x000009D8
env_t = 0x00000000
boot_params = 0x50000100
DRAM bank = 0x00000000
-> start = 0x50000000
-> size = 0x10000000
ethaddr = 08:90:90:90:90:90
ip_addr = 192.168.2.230
baudrate = 115200 bps

為了麻煩不改變u-boot machine ID 直接改kernel include/asm/mach-type.h,將smdk6410 與 mini6410 的板號直接對調 rebuild 即可。

P.S 有些u-boot 可以直接餵 machine id 在 u-boot 的環境變數即可。mini6410 應該是沒有support。

File systems->Miscellaneous->yaffs2*.



drivers/misc/pmem.c:441: error: conflicting types for 'phys_mem_access_prot'
/home/joe/project/mini6410/android/diff/android_pure_kernel/arch/arm/include/asm/pgtable.h:322: note: previous declaration of 'phys_mem_access_prot' was here

他要call 的是static 的function

這只是名稱有重複使用跟宣告了,把phys_mem_access_prot改個名字就可以了! 我給他改成pmem_access_prot

build kernel 看過程內容 V=1


arm-linux-ld: no machine record defined
arm-linux-ld: no machine record defined
arm-linux-ld: no machine record defined

因為沒完整移植mach-部份,倒置config 沒選擇正確的CPU會出現的錯誤


android 2.2 building

編譯完成後,所有的檔案會再 out/target/product/generic 底下, 會有3個產物 ramdisk.img, system.img, userdata.img, 這3個檔案都有對應的目錄,將其所有內容複製到同一資料夾再給予開機格式掛載即可。

注意原始建立出來的 dev 目錄底下是沒有任何node的 必須至少建立一個console

sudo mknode console c 5 1





沒有留言:

張貼留言