Re: [問題] Samsung 2442 Porting linux 的問題

看板LinuxDev作者 (阿拉斯加鱈魚堡..)時間16年前 (2009/03/05 23:34), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串3/3 (看更多)
各位大大~ 我成功了..關鍵在於fxxkboss大大所說的..要將machine number設定到r1暫存器.. 我抓Android kernel 2.6.25回來自己build成zImage.. 然後在arch/arm/tools/mach-types裡面找到了一行 s3c2440 ARCH_S3C2440 S3C2440 362 接著將之前的cp_mem()改寫成: void cp_mem() { unsigned long *dst; unsigned long *src; int (*f)(void *); dst=(unsigned long *)0x30030000; src=(unsigned long *)0x10000; while (src < (unsigned long *)0x200000) { *dst = *src; dst++; src++; } cleanup_before_linux(); putstr("image ready, any key continue\n"); getc(); f=(int *)0x30030000; asm("mov r0, #0x0"); asm("ldr r1, =0x16A");//r1 = 362 f(0); } 把start_vector.bin燒到0x0..把zImage燒到0x10000.. 就出現了以下的開機畫面.. Hello Any key to continue Yes image ready, any key continue Uncompressing Linux........................... done, booting the kernel. Linux version 2.6.25 (root@eddie-ubuntu-platform) (gcc version 4.2(Sou CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177 Machine: SMDK2440 Warning: bad configuration page, trying to continue Memory policy: ECC disabled, Data cache writeback CPU S3C2440A (id 0x32440001) S3C244X: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz S3C24XX Clocks, (c) 2004 Simtec Electronics CLOCK: Slow mode (2.116 MHz), fast, MPLL on, UPLL on CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064 Kernel command line: root=/dev/hda1 ro init=/bin/bash console=ttySAC0 (以下省略) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.87.158.99 ※ 編輯: BlueAlaska 來自: 219.87.158.99 (03/05 23:35) ※ 編輯: BlueAlaska 來自: 219.87.158.99 (03/05 23:36) ※ 編輯: BlueAlaska 來自: 220.138.128.72 (03/06 09:44) ※ 編輯: BlueAlaska 來自: 220.138.128.72 (03/06 09:44)

03/06 10:53, , 1F
恭喜恭喜,也很感謝你的分享,雖然我沒有用過 lol
03/06 10:53, 1F

03/06 10:54, , 2F
cool,值得m一個:P
03/06 10:54, 2F
文章代碼(AID): #19h_3gKY (LinuxDev)
文章代碼(AID): #19h_3gKY (LinuxDev)