QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1474|回复: 3

请教关于嵌入式系统应用程序加载的问题

[复制链接]
发表于 2004-5-26 16:11:18 | 显示全部楼层 |阅读模式
Linux下应用程序加载前是不是要有一段程序来做准备:
#! /bin/sh
#set -x
echo "eLinuxBSP RootDisk ver 0.3.6"
# Mount the /proc file system
mount -t proc proc /proc
# turn on flushing of buffers etc
update
# Tell the world things from /proc
echo > /proc/cpuinfo
# make some writable bits of filesystem
echo "Creating writable /tmp"
mount -t tmpfs -o size=32m none /tmp

#For PCMCIA support
mount -t tmpfs -o size=1m none /var
/bin/mkdir /var/lib
/bin/mkdir /var/run
/bin/mkdir /var/lib/pcmcia
/bin/mkdir /tmp/dev

# display the big penguin to cover the small one
lcdhcoff
cp /bitmap/penguin.bin /dev/fbdir/0

# start device drivers here
insmod /drivers/usb.o
insmod /drivers/hwb.o
insmod /drivers/cs89x0.o MAC=00:50:04:8B:04:30
insmod /drivers/i2c-aa.o
insmod /drivers/i2c-ssi.o
insmod /drivers/ssiDAC3550a.o

ln -s /dev/sound/dsp /dev/dsp

regread 0x0021B804
if [ $? -eq 2 ]
then
  echo "Corsica"
  insmod /drivers/digi.o
  ln -s /dev/digi /dev/touchpanel
  ln -s /dev/digi /dev/tpanel
#  ln -s /dev/spi /dev/ts
#  ln -s /dev/spi /dev/tsraw
#  ln -s /dev/spi /dev/h3600_ts
  ln -s /dev/digi /dev/h3600_tsraw
else
  echo "MX1"
  insmod /drivers/asp.o       
  ln -s /dev/PenDevice /dev/touchpanel
  ln -s /dev/PenDevice /dev/tpanel
#  ln -s /dev/PenDevice /dev/ts
#  ln -s /dev/PenDevice /dev/tsraw
#  ln -s /dev/PenDevice /dev/h3600_ts
  ln -s /dev/PenDevice /dev/h3600_tsraw
fi

ln -s /dev/fbdir/0 /dev/fb
ln -s /dev/fbdir/0 /dev/fb0
# as we are using inverted mode, we better clear the screen first
# before that, we need to issue a dummy ls command
ls /
clear


# configure network
ifconfig lo 127.0.0.1
ifconfig eth0 10.193.100.220
ftphost 10.193.100.221


# mount flash disk
mount /dev/fdisk /mnt/fdisk
if mount | grep /mnt/fdisk > /dev/null; then
if test -z `ls /mnt/fdisk/autorun 2> /dev/null | sed 's/ //'`; then
   echo "No autorun script found in FLASH disk"
else
   echo "Start autorun script in FLASH disk in 2 seconds,"
   echo "press CTRL-C to abort ...."
   sleep 2
   sh /mnt/fdisk/autorun
fi
else
echo "Cannot mount FLASH disk"
fi

ls/
clear
deamon
# start up the logins (on serial ports)
# finished
echo "/etc/init.d/rcS done."
加载你的应用程序
# Fall through to a shell prompt
exit 0
麻烦告知我这段程序的具体含义,多谢。本人是菜鸟的说。 :-)
发表于 2004-5-30 23:20:39 | 显示全部楼层
这是启动信息
什么硬件系统,什么os?
回复

使用道具 举报

 楼主| 发表于 2004-5-31 00:41:14 | 显示全部楼层
arm ,Linux系统
回复

使用道具 举报

发表于 2004-5-31 08:58:09 | 显示全部楼层
eLinuxBSP RootDisk ver 0.3.6
打印信息已经显示了吗?!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-21 22:22 , Processed in 0.093311 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表