CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M"
改為
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 ip=192.168.0.21:192.168.0.1::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M"
同時,在~/300/src/preview-kit/linux/arch/arm/kernel/head.S中新增了bootloader問題
ENTRY(stext)
LDR r1,=0x56C
安裝tftp
sudo apt-get install tftpd-hpa xinetd
cat /etc/xinetd.conf
sudo vim /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
cd /etc/
jim@jim-ubuntu:/etc/default$ cat tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="no"
OPTIONS="-l -s /var/lib/tftpboot"
jim@jim-ubuntu:/etc/default$ sudo vim tftpd-hpa
jim@jim-ubuntu:/etc/default$ cat tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
jim@jim-ubuntu:/etc/default$ sudo /etc/init.d/tftpd-hpa restart
Restarting HPA's tftpd: in.tftpd.
jim@jim-ubuntu:/etc/default$ netstat -l | grep tftp
udp 0 0 *:tftp *:*
sudo chmod 777 /var/lib/tftpboot
sudo cp /home/jim/300/src/preview-kit/linux/arch/arm/boot/zIamge /var/lib/tftpboot
sudo chmod 777 zImage
把zIMage寫進flash中開機會卡
Starting kernel at 0x80800000...
Uncompressing Linux...
we will gunzip the kernel 1.
................................................................................
done, booting the kernel.
把r1砍掉,在~/300/src/preview-kit/linux/arch/arm/kernel/head.S中
ENTRY(stext)
還是一樣
Starting kernel at 0x80800000...
Uncompressing Linux...
we will gunzip the kernel 1.
................................................................................
done, booting the kernel. 卡住啦
修改.config
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 ip=192.168.0.20:192.168.0.5::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M"
仍卡住同地方
修改.config(最原本的)
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M"
還是一樣!哇哩咧!!!
讀取在arch/arm/configs/中的
littletonl-org_defconfig
重新編譯
arch/arm/mach-pxa/littleton.c: In function 'littleton_irda_transceiver_mode':
arch/arm/mach-pxa/littleton.c:377: error: 'MFP_PIN_GPIO137' undeclared (first use in this function)
arch/arm/mach-pxa/littleton.c:377: error: (Each undeclared identifier is reported only once
arch/arm/mach-pxa/littleton.c:377: error: for each function it appears in.)
make[1]: *** [arch/arm/mach-pxa/littleton.o] Error 1
make: *** [arch/arm/mach-pxa] Error 2
trace code找不到0137這行,只好先讀取別的config
/home/jim/300/src/preview-kit/linux/arch/arm/configs/littletonlv_defconfig
但是!
In file included from include/asm/arch/hardware.h:142,
from include/asm/hardware.h:16,
from include/asm/arch/io.h:9,
from include/asm/io.h:76,
from init/main.c:58:
include/asm/arch/littleton.h:768:2: error: #error "please define MFP pins for your platform!"
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
換成littletonl_old_defconfig試試看
/home/jim/300/src/preview-kit/linux/arch/arm/configs/littletonl_old_defconfig
rch/arm/mach-pxa/littleton.c: In function 'littleton_irda_transceiver_mode':
arch/arm/mach-pxa/littleton.c:377: error: 'MFP_PIN_GPIO137' undeclared (first use in this function)
看來不解決這個MFP_PIN_GPI0137不行了
回過頭來載入
/home/jim/300/src/preview-kit/linux/arch/arm/configs/littletonl_defconfig
載入後觀察一下是怎樣才可以pass的:
編譯訊息如下:
arch/arm/mach-pxa/clock.o
CC arch/arm/mach-pxa/generic.o
arch/arm/mach-pxa/generic.c: In function 'pxa_set_cken':
arch/arm/mach-pxa/generic.c:230: warning: left shift count >= width of type
CC arch/arm/mach-pxa/irq.o
CC arch/arm/mach-pxa/dma.o
CC arch/arm/mach-pxa/time.o
CC arch/arm/mach-pxa/pxa3xx.o
CC arch/arm/mach-pxa/mfp.o
CC arch/arm/mach-pxa/pxa3xx_gpio.o
CC arch/arm/mach-pxa/littleton.o
(等等再來處理)
燒入image後,卡在LCD的地方
turn off/on LCD
Configuring Littleton LCD panel...
qvga_pass_through_mode
qvga_transfer_config()
Console: switching to colour frame buffer device 30x20
用今日最強指令:
find . -name "*" | xargs grep "搜尋字串"
在根目錄找"qvga_transfer_config",發現存在於~/300/src/preview-kit/linux/arch/arm/mach-pxa/littleton.c
旁邊有個函式"vga_transfer_config"
看樣子是不用去動這些所謂的board.c檔案了,乾脆直接修改.config檔
#
# Frame buffer hardware drivers
#
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_PXA=y
CONFIG_FB_PXA_MINILCD=y
# CONFIG_FB_PXA_LCD_QVGA is not set
CONFIG_FB_PXA_LCD_VGA=y
於是就通過了難關~
Configuring Littleton LCD panel...
vga_transfer_mode()
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
最後有留下可用的.config和kernel image(1.7MB)放在
/home/jim/used_data/pxa300/091115_finish_in_home
沒有留言:
張貼留言