1. Beaglebone开发环境的搭建
http://bbs.eeworld.com.cn/thread-323132-1-2.html
2. BeagleBone开发软件安装过程
http://bbs.eeworld.com.cn/thread-326034-1-2.html
还有一个关于U-Boot的操作手册,虽然讲的还算详细,但是个人感觉实际用处不是很大,有兴趣的可以看看。
1 AM335x U-Boot User's Guide
http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User's_Guide 2. AM335x PSP User Guide 有关于启动模式的一些配置介绍
http://processors.wiki.ti.com/index.php/AM335x_PSP_User%27s_Guide
U-Boot# saveenv
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
居然要保存到Nand,BeagleBone这个小板没有Nand啊,悲剧。。。。
查看了一下u-boot的源码,确实把环境变量放在Nand中,怎么办????
u-boot-2011.09-psp04.06.00.03\include\configs\am335x_evm.h的第19行
#define CONFIG_NAND_ENV
终于挂上NFS了,记录如下。首先感谢sblpp和zhdphao两位坛友的帮助!
<!--[if !supportLists]-->1.
<!--[endif]-->在BeagleBone的文件系统中挂载NFS文件系统
开发环境搭建的时候在PC上要运行setup.sh,主要就是安装一些文件和配置。
主要需要这些文件:
#sudo apt-get install xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev uboot-mkimage autoconf automake
<!--[if !supportLists]-->1)
安装完后,需要修改/etc/exports文件
#gedit /etc/exports
增加nfs文件目录/mnt/nfs *(rw,sync,no_root_squash)
<!--[if !supportLists]-->2)
#/etc/init.d/nfs-kernel-server restart //重启NFS服务
到这里只能说PC端的NFS server搭建好了,在BeagleBone上还无法挂载NFS系统,会报错的:
mount: wrong fs type, bad option, bad superblock on 192.168.1.104:/home
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
怎么办呢?这个在sblpp的大作中已经说的很明白了,还要在beagleBone上安装两个文件:
nfs-utils-client_1.1.2-2.1_armv7a.ipk 和 portmap_6.0-r3.1_armv7a.ipk
一定要注意是在BeagleBone上安装!!!
<!--[if !supportLists]-->1)
root@beaglebone:/# opkg install ./portmap_6.0-r3.1_armv7a.ipk
Installing portmap (6.0-r3.1) to root...
Configuring portmap.
Adding system startup for /etc/init.d/portmap.
<!--[if !supportLists]-->2)
<!--[endif]-->root@beaglebone:/# opkg install ./nfs-utils-client_1.1.2-2.1_armv7a.ipk
Installing nfs-utils-client (1.1.2-2.1) to root...
Configuring nfs-utils-client.
如何把这两个文件拷贝到BeagleBone里面去的呢?我是这么做的:
BeagleBone启动的时候,已经在PC上虚拟出了一个U盘,我直接把这两个文件拷贝到这个U盘里,然后在BeagleBone上建立了一个脚本文件sd.sh,内容如下:
mkdir /home/sd
mount -t vfat /dev/mmcblk0p1 /home/sd
这个时候在/home/sd下就有所需要的东西了
root@beaglebone:/home#./sd.sh
root@beaglebone:/home# cd sd
root@beaglebone:/home/sd# ls
Docs info.txt Drivers
LICENSE.txt nfs-utils-client_1.1.2-2.1_armv7a.ipk uImage
MLO portmap_6.0-r3.1_armv7a.ipk
README.htm u-boot.img
<!--[if !supportLists]-->2.
<!--[endif]-->通过NFS文件系统启动BeagleBone
在没有实现上面功能的时候,其实我已经尝试这从NFS根文件系统启动BeagleBone,并已经成功实现,条条大路通罗马,呵呵
主要步骤:
在BeagleBone启动的时候,敲回车,使得启动停在uboot部分
U-Boot 2011.09-00000-gf63b270-dirty (Nov 14 2011 - 10:37:14)
I2C: ready
DRAM: 256 MiB
No daughter card present
NAND: HW ECC Hamming Code selected
nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x10, Chip ID: 0x10
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment
Net: cpsw
Hit any key to stop autoboot: 0
U-Boot#
然后依次输入:
U-Boot# mmc rescan
U-Boot# setenv ipaddr 192.168.1.103
U-Boot# setenv serverip 192.168.1.104
U-Boot# setenv bootargs console=ttyO0,115200n8 root=/dev/nfs nfsroot=192.168.1.104:/mnt/nfs ip=192.168.1.103:192.168.1.104:192.168.1.1:255.255.255.0::eth0ff
U-Boot# run mmc_load_uimage
U-Boot#bootm 0x80007fc0
系统启动:
[ 4.293236] IP-Config: Complete: [ 4.296636] device=eth0, addr=192.168.1.103, mask=255.255.255.0, gw=192.168.1.1, [ 4.304648] host=192.168.1.103, domain=, nis-domain=(none), [ 4.310965] bootserver=192.168.1.104, rootserver=192.168.1.104, rootpath= [ 4.417566] VFS: Mounted root (nfs filesystem) on device 0:15. [ 4.424250] Freeing init memory: 240K grep: /proc/mounts: No such file or directory grep: /proc/mounts: No such file or directory Populating /dev using udev: /etc/init.d/S10udev: line 79: can't create /proc/sys/kernel/hotplug: nonexistent directory 到这就挂载成功了! |