● Mount usb file system (U disk)
1 select kernel arotmount support in filesystem, select vfat dos support.
2 cat /proc/partitions to find major & minor
3 mknod /dev/sda b major minor
4 mount –t vfat(msdos) /dev/sdc /cdrom
● setenv bootcmd tftp 20008000\; tftp 21000000 ramdisk \; go 20008000
● 支持U盘须选SCSI,文件系统中选DOS支持以及Patition支持和Automount 支持,USB中选mass storage支持
● 在配置时注意general选项中的Bootlin应该是31M! (针对的是版本2.4.19)
● 建立NFS过程:在超级终端中:ifconfig eth0 172.17.1.55 up mount 172.17.100.106:/ /mnt,这时的主机防火墙要打开
●串口: ./ser1 /dev/ttyS2 9600 2000 “R6M0012$”
●LINUX驱动的编写:
1. /user/local/arm/2.96.3/bin/arm-linux-gcc –Wall –DMODULE –D__KERNEL__ -I /usr/src/arm/linux-2.4.19/include –c wwarm.c
2. mknod /dev/mem_dev c 30 0
3 insmod ./wwarm.o 4 rmmod wwarm
●使能AT91RM9200的其他串口:将AT91US3.C中的AT91RM9200DK_REGISTER_US0/2/3合并到US1中即可(对于版本2.4.19)
●zImage: cp.b 20000000 c020000 560000 ramdisk: cp.b 20000000 c02c0000 560000 flash盘MTD: 00100020---00184020 对于2.4.26版本修改在:/drivers/at91/mtd/at91_dataflash.c▼
● 作RAMDISK: gunzip -v ramdisk.gz(把原有的解开,先把扩展名改为gz,或者用winrar解开,解开后的名字为ramdisk-rmk7),然后 mount –o loop ramdisk-rmk7 ./ramdk,建立RAMDISK文件过程如下:
dd if="/dev/zero" of="rootfs" bs="1k" count="4096"
mke2fs –m o –N 2000 ./rootfs
mount –t ext2 –o loop ./rootfs ./ramdk
然后把解开的拷贝到ramdk目录中,进行添加和修改
Umount ramdk
Gzip –v9 rootfs
最后生成rootfs.gz
● 执行后台程序,在后面加上&,查看系统进程ps ,终止进程 kill [pid]
● Eraseall –j /dev/mtd/1
Mount –t jffs2 /dev/mtdblock/1 /mnt/AT45DB642/
Mount
Df
● 2.4.26对串口的支持,修改/include/asm-arm/arch/at91rm9200dk.h 然后把AT91C_UART_MAP改正即可
● I got the vt100 from my Mandrake x86 linux /usr/share/terminfo/v ,copy it to my target /etc/terminfo/v, and “export TERMINFO="/etc/terminfo"”,then “top” works.
● Loader.bin
u-boot.bin
tftp 20008000 zImage
tftp 21100000 ramdisk
● bootbat:
LD_LIBRARY_PATH = /lib
Export LD_LIBRARY_PATH
/sbin/ifconfig eth0 172.17.100.104 up
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 hw ether 80:80:80:80:00:04
/sbin/ifconfig eth0 eth0 up
Mknod /dev/dram_mem_api c 53 0
Mkdir /mnt/dd
Insmod /mnt/AT445DB642/dramOp.o
/mnt/AT45DB642/mainApp
● flash 盘中需要三个文件: 1 bootbat 2 dramOp.o 3 mainApp
● /usr/local/arm/2.95.3/bin/arm-linux-gcc –g –o mainApp mainApp.c -lpthread
● Make at91rm9200dk_config
Make oldconfig
Make xconfig
Make clean
Make dep
Make zImage
● cd arm26
tar zxvf linux-2.4.26.tar.gz
cd linux-2.4.26
zcat ../patch-2.4.26-vrs1.gz | patch –p1
cd ..
tar zcvf patch-2.4.gz 2.4.26vrs1-at91-26042004.patch.gz
cd linux-2.4.26
zcat ../patch-2.4.gz |patch –p1
● 对于2.4.26
Zimage = cp.b c0200000 20008000 100000
Ramdisk = cp.b c02c0000 21100000 560000
Bootcmd = tftp; run zimage; run ramdisk ; go 0x20008000
Kernel command line : mem="32M" console="ttyS0",115200 initrd="0x21100000",6000000=/dev/ram rw
● UBOOT修改:/net/net.c 在其中的netloop()函数的if( eth_init(bd) < 0)后面加上:printf(“return here !!!\n”); return 0;
● 在/common/main.c中
/* added by dailzh 2003-12-3 */
/* 加上或修改 */
Setenv(“ethaddr”)
Ipaddr
Serverip
Ver
Auther
bootcmd
● 因为在 /common/cmd_mem.c中有函数do_mem_cp,如果没有定义 CONFIG_HAS_DATAFLASH则只能打印” copy to dataflash…”所以在/include /command.h中要把这个宏定义上
文章评论(0条评论)
登录后参与讨论