pc机与开发板之间的挂接.doc_第1页
pc机与开发板之间的挂接.doc_第2页
pc机与开发板之间的挂接.doc_第3页
pc机与开发板之间的挂接.doc_第4页
pc机与开发板之间的挂接.doc_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

PC机与开发板之间的挂接一、PC机挂接开发板-1. 执行PC机linux相关命令rootlocalhost root# ifconfig eth0 15rootlocalhost root# ifconfig eth0 downrootlocalhost root# ifconfig eth0 15 uprootlocalhost root# vi /etc/exportsrootlocalhost root# /etc/init.d/portmap restart停止 portmapper: 确定 启动 portmapper: 确定 rootlocalhost root# /etc/init.d/nfs restart关闭 NFS mountd: 确定 关闭 NFS 守护进程: 确定 Shutting down NFS quotas: 确定 关闭 NFS 服务: 确定 启动 NFS 服务: 确定 Starting NFS quotas: 确定 启动 NFS 守护进程: 确定 启动 NFS mountd: 确定 挂接rootlocalhost /# mount -o nolock -t nfs 15:/home/sinosys/rootfs /mnt/testrootlocalhost /# lsbin boot dev etc home initrd lib lost+found misc mnt opt proc root sbin tftpboot tmp usr varrootlocalhost /# cd /tmp/rootlocalhost tmp# lsjd_sockV4 orbit-root samba ssh-XXEkhJQ9 VMwareTools-7.8.4-126130.tar.gzmakewhatistD5uVJ orbit-sinosys ssh-XX8WogpK ssh-XXfdqEj2 vmware-tools-distribU-Boot 1.2.0 (Aug 2 2009 - 01:13:33)DRAM: 64 MBCFG_CMD_NANDNAND: 64 MBIn: serialOut: serialErr: serialHit any key to stop autoboot: 0 NAND read: device 0 offset 196608, size 30408704 . 30408704 bytes read: OK# Booting image at 31000000 . Image Name: Linux-2.6.13 Created: 2008-11-11 1:32:07 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1311912 Bytes = 1.3 MB Load Address: 30008000 Entry Point: 30008000 Verifying Checksum . OKOKStarting kernel .Uncompressing Linux. done, booting the kernel.Linux version 2.6.13 (rootlocalhost.localdomain) (gcc version 3.4.1) #4 Tue Nov 11 09:32:03 CST 2008CPU: ARM920Tid(wb) 41129200 revision 0 (ARMv4T)Machine: SBC2440Memory policy: ECC disabled, Data cache writebackCPU S3C2440A (id 0x32440001)BUG: mapping for 0x19000000 at 0xd0000000 overlaps vmalloc spaceS3C2440: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHzS3C2410 Clocks, (c) 2004 Simtec ElectronicsCPU0: D VIVT write-back cacheCPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 setsCPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 setsBuilt 1 zonelistsKernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200 irq: clearing subpending status 00000002PID hash table entries: 512 (order: 9, 8192 bytes)timer tcon=00500000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57Console: colour dummy device 80x30Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)Memory: 64MB = 64MB totalMemory: 61952KB available (2134K code, 566K data, 92K init)Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okNET: Registered protocol family 16S3C2440: Initialising architectureS3C2440: IRQ SupportS3C2440: Clock Support, UPLL 48.000 MHzSCSI subsystem initializedusbcore: registered new driver hubS3C2410 DMA Driver, (c) 2003-2004 Simtec ElectronicsDMA channel 0 at c4800000, irq 33DMA channel 1 at c4800040, irq 34DMA channel 2 at c4800080, irq 35DMA channel 3 at c48000c0, irq 36NetWinder Floating Point Emulator V0.97 (double precision)devfs: 2004-01-31 Richard Gooch (rgoochatnf.csiro.au)devfs: boot_options: 0x1yaffs Nov 6 2008 18:37:36 Installing. Initializing Cryptographic APIS3C2410 RTC, (c) 2004 Simtec Electronicss3c2410-rtc s3c2410-rtc: rtc disabled, re-enablings3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440io scheduler noop registeredio scheduler anticipatory registeredio scheduler deadline registeredio scheduler cfq registeredRAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizeloop: loaded (max 8 devices)nbd: registered device at major 43Cirrus Logic CS8900A driver for Linux (Modified for SMDK2410)eth0: CS8900A rev E at 0xd0000300 irq=53, no eeprom , addr: 08: 0:3E:26:0A:5BS3C24XX NAND Driver, (c) 2004 Simtec Electronicss3c2440-nand: mapped registers at c4880000s3c2440-nand: timing: Tacls 9ns, Twrph0 39ns, Twrph1 9nsNAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)NAND_ECC_NONE selected by board driver. This is not recommended !Scanning device for bad blocksCreating 3 MTD partitions on NAND 64MiB 3,3V 8-bit:0x00000000-0x00030000 : bootloader0x00030000-0x00200000 : kernel0x00200000-0x00500000 : roots3c2410-ohci s3c2410-ohci: S3C24XX OHCIs3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000hub 1-0:1.0: USB hub foundhub 1-0:1.0: 2 ports detectedInitializing USB Mass Storage driver.usbcore: registered new driver usb-storageUSB Mass Storage support registered.usbcore: registered new driver usbhiddrivers/usb/input/hid-core.c: v2.01:USB HID core drivermice: PS/2 mouse device common for all micei2c /dev entries drivers3c2440-i2c s3c2440-i2c: slave address 0x10s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHzs3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapterNET: Registered protocol family 2IP route cache hash table entries: 1024 (order: 0, 4096 bytes)TCP established hash table entries: 4096 (order: 3, 32768 bytes)TCP bind hash table entries: 4096 (order: 2, 16384 bytes)TCP: Hash tables configured (established 4096 bind 4096)TCP reno registeredTCP bic registeredNET: Registered protocol family 1NET: Registered protocol family 17VFS: Mounted root (cramfs filesystem) readonly.Mounted devfs on /devFreeing init memory: 92Kinit started: BusyBox v1.10.3 (2009-06-09 11:18:15 CST)starting pid 210, tty : /etc/init.d/rcS-mount all-Starting mdev.*Sinosys Web_server 2440 rootfsLove Linu!*starting pid 214, tty : -/bin/login(none) login: rootPassword: login214: root login on consoleProcessing /etc/profile. Set search library path in /etc/profileSet user path in /etc/profileSet PS1 in /etc/profileDonerootlocalhost# ifconfigrootlocalhost# ifconfig eth0 192.168.3.ifconfig: bad address 192.168.3rootlocalhost# ifconfig eth0 rootlocalhost# ifconfig lo rootlocalhost# ifconfigeth0 Link encap:Ethernet HWaddr 08:00:3E:26:0A:5B inet addr: Bcast:55 Mask: UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:13 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2344 (2.2 KiB) TX bytes:0 (0.0 B) Interrupt:53 Base address:0x300 lo Link encap:Local Loopback inet addr: Mask: UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)rootlocalhost# ping 15.PING 15 (15): 56 data bytes64 bytes from 15: seq=0 ttl=64 time=2.706 ms64 bytes from 15: seq=1 ttl=64 time=0.994 ms64 bytes from 15: seq=2 ttl=64 time=1.039 ms64 bytes from 15: seq=3 ttl=64 time=0.991 ms- 15 ping statistics -4 packets transmitted, 4 packets received, 0% packet lossround-trip min/avg/max = 0.991/1.432/2.706 msrootlocalhost# mount -o nolock 15:/home/sinosys/rootfs /tmprootlocalhost# cd /tmp/rootlocalhost# lsbin dev home linuxrc proc sbin tmp varboot etc lib mnt root sys usrrootlocalhost# 二、设置启动开发板时自动将pc机的文件系统(/home/sinosys/rootfs)挂接到开发板系统上,设置是在开发板上进行。Pc机linux的ip地址15开发板的ip地址-U-Boot 1.2.0 (Aug 2 2009 - 01:13:33)DRAM: 64 MBCFG_CMD_NANDNAND: 64 MBIn: serialOut: serialErr: serialHit any key to stop autoboot: 0 SMDK2440 # printenvbootargs=noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200 bootdelay=1baudrate=115200ethaddr=08:00:3e:26:0a:5bipaddr=5netmask=bootcmd=nand read 0x31000000 0x30000 0x1d00000;bootm 0x31000000bootdelay=3serverip=stdin=serialstdout=serialstderr=serialEnvironment size: 330/65532 bytesSMDK2440 # setenv bootargs console=ttySAC0,115200 root=/dev/nfs nfsroot=15:/home/sinosys/rootfs ip=:eth0SMDK2440 # printenvbootdelay=1baudrate=115200ethaddr=08:00:3e:26:0a:5bipaddr=5netmask=bootcmd=nand read 0x31000000 0x30000 0x1d00000;bootm 0x31000000bootdelay=3serverip=stdin=serialstdout=serialstderr=serialbootargs=console=ttySAC0,115200 root=/dev/nfs nfsroot=15:/home/sinosys/rootfs ip=:eth0Environment size: 367/65532 bytesSMDK2440 # saveenvSaving Environment to NAND.Erasing Nand.Writing to Nand. doneSMDK2440 #rootlocalhost mnt# vi /etc/exportsrootlocalhost mnt#rootlocalhost mnt# cd /home/sinosys/kernel-2.6.13rootlocalhost kernel-2.6.13# lsarch crypto include lib mm REPORTING-BUGS System.mapconfig_2440_webserver Documentation init MAINTAINERS net scripts usrCOPYING drivers ipc Makefile ramdisk.img security vmlinuxCREDITS fs kernel Makefile README sound web_server.configrootlocalhost kernel-2.6.13# make modules CHK include/linux/version.hmake1: arch/arm/kernel/asm-offsets.s is up to date.make1: include/asm-arm/mach-types.h is up to date.make1: * drivers/char 中断make: * drivers 中断bash: 2660: 2 tcsetattr: 被中断的系统调用 rootlocalhost kernel-2.6.13# make menucofnigmake: * No rule to make target menucofnig. Stop.rootlocalhost kernel-2.6.13# make menuconfigscripts/kconfig/mconf arch/arm/Kconfig# using defaults found in .config# * End of Linux kernel configuration.* Execute make to build the kernel or try make help. rootlocalhost kernel-2.6.13# make modules CHK include/linux/version.h SPLIT include/linux/autoconf.h - include/config/* SYMLINK include/asm-arm/arch - include/asm-arm/arch-s3c2410make1: arch/arm/kernel/asm-offsets.s is up to date.make1: include/asm-arm/mach-types.h is up to date. Building modules, stage 2. MODPOSTrootlocalhost kernel-2.6.13# make modules_installWarning: you may need to install module-init-toolsSee .uk/docs/post-halloween-2.6.txtif -r System.map -a -x /sbin/depmod ; then /sbin/depmod -ae -F System.map 2.6.13; firootlocalhost kernel-2.6.13# cd /lib/rootlocalhost lib# lscpp libcrypto.so.4 libnss_db.so.1.0.0 libpthread-0.10.soevms libcrypt.so.1 libnss_db.so.2 libpthread.so.0i686 libc.so.6 libnss_db.so.2.0.0 libpwdb.so.0iptables libdb2.so.3 libnss_dns-2.3.2.so libpwdb.so.0.62kbd libdb-3.1.so libnss_dns.so.2 libresolv-2.3.2.sold-2.3.2.so libdb-3.2.so libnss_files-2.3.2.so libresolv.so.2ld-linux.so.2 libdb-3.3.so libnss_files.so.2 librt-2.3.2.sold-lsb.so.1 libdb-4.0.so libnss_hesiod-2.3.2.so librt.so.1libacl.so libdb.so.3 libnss_hesiod.so.2 libSegFault.solibacl.so.1 libdl-2.3.2.so libnss_ldap-2.3.1.so libssl.so.0.9.6blibacl.so.1.0.3 libdl.so.2 libnss_ldap.so.2 libssl.so.0.9.7alibanl-2.3.2.so libe2p.so.2 libnss_nis-2.3.2.so libssl.so.2libanl.so.1 libe2p.so.2.3 libnss_nisplus-2.3.2.so libssl.so.4libattr.so libext2fs.so.2 libnss_nisplus.so.2 libss.so.2libattr.so.1 libext2fs.so.2.4 libnss_nis.so.2 libss.so.2.0libattr.so.1.0.1 libgcc_s-3.2.2-20030225.so.1 libnss_winbind.so libtermcap.so.2libBrokenLocale-2.3.2.so libgcc_s.so.1 libnss_winbind.so.2 libtermcap.so.2.0.8libBrokenLocale.so.1 libiw.so.25 libnss_wins.so libthread_db-1.0.solibc-2.3.2.so liblvm-10.so libnss_wins.so.2 libthread_db.so.1libcap.so liblvm-10.so.1 libpamc.so.0 libutil-2.3.2.solibcap.so.1 liblvm-10.so.1.0 libpamc.so.0.75 libutil.so.1libcap.so.1.10 libm-2.3.2.so libpam_misc.so.0 libuuid.so.1libcom_err.so.2 libm.so.6 libpam_misc.so.0.75 libuuid.so.1.2libcom_err.so.2.0 libnsl-2.3.2.so libpam.so.0 lsblibcrypt-2.3.2.so libnsl.so.1 libpam.so.0.75 moduleslibcrypto.so.0.9.6b libnss_compat-2.3.2.so libpcre.so.0 securitylibcrypto.so.0.9.7a libnss_compat.so.2 libpcre.so.0.0.1 tlslibcrypto.so.2 libnss_db.so.1 libproc.so.2.0.11rootlocalhost lib# cd modules/rootlocalhost modules# ls2.4.20-8 2.6.13rootlocalhost modules# cd 2.6.13/rootlocalhost 2.6.13# lsbuild modules.dep modules.ieee1394map modules.parportmap modules.pnpbiosmap sourcekernel modules.generic_string modules.isapnpmap modules.pcimap modules.usbmaprootlocalhost 2.6.13# cd /home/rootlocalhost home# cd sinosys/rootlocalhost sinosys# lsaa.IAB busybox-1.10.3.tar.bz2 rootfs.tar.gz u-boot-1.2.0-web.POaa.IAD helloworld rootfs_web.cramfs u-boot-1.2.0-web.PRaa.IMB helloworld.tar.bz2 src u-boot-1.2.0-web.PRIaa.IMD kernel-2.6.13 u-boot-1.2.0 u-boot-1.2.0-web.PSaa.PFI kernel-2.6.13.tar.gz u-boot1.2.0 u-boot1.2.0-WebServeraa.PO linux-2.6.26 u-boot-1.2.0.tar.bz2 u-boot1.2.0-WebServer.tar.gzaa.PR linux-2.6.26-original.tar.bz2 u-boot-1.2.0.tar.gz u-boot-1.2.0-web.WK3aa.PRI mkcramfs u-boot-1.2.0-web.IAB uboot-clear.tar.gzaa.PS mkimage u-boot-1.2.0-web.IAD usraa.WK3 mkrootfs u-boot-1.2.0-web.IMBarm-linux-gcc-3.4.1.tgz pax_global_header u-boot-1.2.0-web.IMDbusybox-1.10.3 rootfsrootlocalhost sinosys# makemake -C /lib/modules/2.6.13/build M=/home/sinosys modulesmake1: Entering directory /home/sinosys/kernel-2.6.13 CC M /home/sinosys/hello.o Building modules, stage 2. MODPOST CC /home/sinosys/hello.mod.o LD M /home/sinosys/hello.komake1: Leaving directory /home/sinosys/kernel-2.6.13rootlocalhost sinosys# ls -l总用量 312752-rwxr-r- 1 sinosys sinosys 2842624 8月 1 10:44 aa.IAB-rwxr-r- 1 sinosys sinosys 28088 8月 1 10:43 aa.IAD-rwxr-r- 1 sinosys sinosys 802816 8月 1 10:44 aa.IMB-rwxr-r- 1 sinosys sinosys 8168 8月 1 10:43 aa.IMD-rwxr-r- 1 sinosys sinosys 1812 8月 1 10:43 aa.PFI-rwxr-r- 1 sinosys sinosys 776 8月 1 10:43 aa.PO-rwxr-r- 1 sinosys sinosys 141848 8月 1 10:43 aa.PR-rwxr-r- 1 sinosys sinosys 917384 8月 1 10:43 aa.PRI-rwxr-r- 1 sinosys sinosys 6146244 8月 1 10:43 aa.PS-rwxr-r- 1 sinosys sinosys 11379 8月 1 11:04 aa.WK3-rwxr-r- 1 sinosys sinosys 52842664 2007-01-15 arm-linux-gcc-3.4.1.tgzdrwxr-xr-x 31 root root 4096 8月 4 12:07 busybox-1.10.3-r-xr-r- 1 sinosys sinosys 1860680 2008-06-26 busybox-1.10.3.tar.bz2-r-xr-r- 1 sinosys sinosys 339 2008-09-04 hello.c-rw-r-r- 1 root root 2140 8月 5 11:31 hello.ko-rw-r-r- 1 root root 507 8月 5 11:31 hello.mod.c-rw-r-r- 1 root root 1380 8月 5 11:31 hello.mod.o-rw-r-r- 1 root root 1296 8月 5 11:31 hello.odrwxr-xr-x 2 sinosys sinosys 4096 8月 1 14:41 helloworld-rwxr-r- 1 sinosys sinosys 441 6月 5 03:11 helloworld.tar.bz2drwxrwxrwx 19 root root 4096 8月 5 11:28 kernel-2.6.13-rwxr-r- 1 sinosys sinosys 74968816 2月 23 19:13

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论