Chinaunix首页 | 论坛 | 博客
  • 博客访问: 563717
  • 博文数量: 109
  • 博客积分: 2300
  • 博客等级: 大尉
  • 技术积分: 810
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-02 13:11
文章分类

全部博文(109)

文章存档

2012年(1)

2011年(17)

2010年(62)

2009年(29)

我的朋友

分类: 嵌入式

2010-05-30 18:47:52

The boot up procedure for DM365-IPNC
1. RBL (Rom Boot Loader), for more details, see DM365 datasheet section 3.2
2. UBL (User Boot Loader). The RBL can only load 30KB program from NAND or other storage, and user program usually is much larger than this, 
that's why it's needed.
3. . Full source code is provided with the kit.
4. MontaVista Pro 5.0 Kernel
5. Load root file system from NAND, which is in cramfs format. You can add/delete files using cramfs tools on Linux machine.
6. /etc/inittab says for boot up initialization, goes to /etc/init.d/rcS, at the end of its content:
DVEVMDIR=/opt/ipnc
# Load the dsplink and cmem kernel modules
cd $DVEVMDIR
$DVEVMDIR//av_capture_load.sh
cd /dev
ln -s rtc0 rtc
cd $DVEVMDIR
mount -t jffs2 /dev/mtdblock4 /mnt/nand
sleep 1
./system_server &
$DVEVMDIR/loadkmodules.sh
$DVEVMDIR/loadmodules_ipnc.sh
ifconfig lo 127.0.0.1
killall -12 system_server
# Start the demo application
cd $DVEVMDIR
$DVEVMDIR/autorun.sh
6.1 Load some kernel modules used by AV_SERVER application.
content of av_capture_load.sh
#!/bin/sh
./av_capture_unload.sh 2>/dev/null
./csl_load.sh
./drv_load.sh
insmod cmemk.ko phys_start=0x83800000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672
insmod edmak.ko
insmod irqk.ko
insmod dm365mmap.ko
6.1.1 content of csl_load.sh
#!/bin/sh
module="csl"
./csl_unload.sh 2>/dev/null
# invoke insmod with all arguments we got
insmod ./$module.ko || exit 1
# retrieve major number
major=$(awk '$2=="csl" {print $1}' /proc/devices)
rm -f /dev/${module}[0-9]
mknod /dev/${module}0 c $major 0
mknod /dev/${module}1 c $major 1
mknod /dev/${module}2 c $major 2
mknod /dev/${module}3 c $major 3
mknod /dev/${module}4 c $major 4
mknod /dev/${module}5 c $major 5
mknod /dev/${module}6 c $major 6
mknod /dev/${module}7 c $major 7
mknod /dev/${module}8 c $major 8
mknod /dev/${module}9 c $major 9
6.1.2 content of drv_load.sh
#./drv_unload.sh 2>/dev/null
insmod ./drv.ko
if [ ! -f /dev/dev_i2c ]
then
    major=$(awk '$2=="dev_i2c" {print $1}' /proc/devices)
    mknod /dev/dev_i2c c ${major} 0
fi
if [ ! -f /dev/dev_dma ]
then
    major=$(awk '$2=="dev_dma" {print $1}' /proc/devices)
    mknod /dev/dev_dma c ${major} 0
fi
6.2 Load TI Davinci Drivers. content of loadkmodules.sh
# insmod - insert kernel modules - ANR
#modules (.ko) - /home/anand/home1/filesys2/root/modules/
#
#insmod list as follows,
#
#init.d modules
#/opt/ipnc/modules/init.d_ins/checkroot.sh
/opt/ipnc/modules/init.d_ins/mountall.sh
/opt/ipnc/modules/init.d_ins/ifupdown start
/opt/ipnc/modules/init.d_ins/hotplug start
/opt/ipnc/modules/init.d_ins/portmap start
/opt/ipnc/modules/init.d_ins/inetd start
#
#Kernel modules
#other
insmod /opt/ipnc/modules/crc-ccitt.ko
insmod /opt/ipnc/modules/libcrc32c.ko
insmod /opt/ipnc/modules/deadline-iosched.ko
insmod /opt/ipnc/modules/cfq-iosched.ko
insmod /opt/ipnc/modules/i2c-emac.ko cmdline="`cat /proc/cmdline`"
insmod /opt/ipnc/modules/sbull.ko
#cripto
insmod /opt/ipnc/modules/crc32c.ko
insmod /opt/ipnc/modules/deflate.ko
insmod /opt/ipnc/modules/des.ko
insmod /opt/ipnc/modules/md5.ko
insmod /opt/ipnc/modules/sha1.ko
#fs
insmod /opt/ipnc/modules/nls_ascii.ko
insmod /opt/ipnc/modules/nls_utf8.ko
insmod /opt/ipnc/modules/exportfs.ko
insmod /opt/ipnc/modules/nfsd.ko
#driver
#
#net
insmod /opt/ipnc/modules/loop.ko
insmod /opt/ipnc/modules/tun.ko
insmod /opt/ipnc/modules/slhc.ko
insmod /opt/ipnc/modules/netconsole.ko
insmod /opt/ipnc/modules/ppp_generic.ko
insmod /opt/ipnc/modules/ppp_synctty.ko
insmod /opt/ipnc/modules/ppp_async.ko
insmod /opt/ipnc/modules/ppp_deflate.ko
insmod /opt/ipnc/modules/davinci_emac.ko
#mmc
insmod /opt/ipnc/modules/mmc_core.ko
insmod /opt/ipnc/modules/mmc_block.ko
insmod /opt/ipnc/modules/davinci-mmc.ko
#usb
insmod /opt/ipnc/modules/usbcore.ko
insmod /opt/ipnc/modules/musb_hdrc.ko
insmod /opt/ipnc/modules/usbmon.ko
#insmod /opt/ipnc/modules/g_file_storage.ko
#scsi
insmod /opt/ipnc/modules/scsi_transport_iscsi.ko
insmod /opt/ipnc/modules/libiscsi.ko
insmod /opt/ipnc/modules/iscsi_tcp.ko
6.3 mount ramdisk. content of loadmodues_ipnc.sh
#!/bin/sh
umount /mnt/ramdisk 2>/dev/null
rmmod sbull.ko 2>/dev/null
insmod sbull.ko
sleep 1
mkdosfs -v /dev/sbulla 2>/dev/null
mkdir /mnt/ramdisk 2>/dev/null
mount -t vfat /dev/sbulla /mnt/ramdisk 2>/dev/null

6.4 start BOA webserver. content of autorun.sh
sleep 1
./boa -c /etc &
阅读(2678) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~