LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 797|回复: 8

请教一个编译问题

[复制链接]
发表于 2007-7-5 15:50:16 | 显示全部楼层 |阅读模式
烦劳高手帮我看看一个bashrc文件
export PSI=CSB655:
export TITLE="CSB655 Platform"
if [ "UMONTOP"=="" ]
then
        export UMONTOP=../../umon_main
fi
. $UMONTOP/host/bin/umon_setup


我用.bashrc命令运行,可是提示最后一行参数错误.
我看不太懂,希望高手指点
发表于 2007-7-5 22:28:51 | 显示全部楼层
关编译什么事?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 08:37:14 | 显示全部楼层
编译时找不到UMONTOP=../../umon_main目录下的文件哦
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 08:46:30 | 显示全部楼层
这是我在编译bootloader中出现的问题,就想知道
最后一行
. $UMONTOP/host/bin/umon_setup
参数错误是什么意思
回复 支持 反对

使用道具 举报

发表于 2007-7-6 08:47:14 | 显示全部楼层
这叫编译吗? .bashrc 的最后一句是想要执行一个脚本,而这个脚本在你的机器上不存在。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 09:56:50 | 显示全部楼层
是这个脚本吗?/host/bin/umon_setup
#!/bin/bash
#
# umon_setup:
# This script is a startup script used by bash shell environments.
# The purpose is to establish a basic environment for working on a
# micromonitor port.  The intent is that this script be called by a
# bashrc file that does some target-specific setup prior to this
# script starting up.  An example bashrc follows:
#
##### Begin example bashrc:
#
#    PS1=WALNUT_EVAL:
#         export EDITOR=vi
#    export TITLE="IBM WALNUT EvalBoard Monitor Development"
#    export UMONTOP=D:/els/umon
#    . $UMONTOP/tools/bin/umon_profile
#
##### End example bashrc
#
# Hard assumptions (you gotta have these):
#
# * Shell variables:
#        -UMONTOP: Full path of umon top-level-directory (i.e. D:/els/umon)
#
# * The common cygwin paths have been set in the system environment.
#   When bash starts up, it automatically converts C: pathing to
#   /cygdrive/c syntax.
#
# Soft assumptions (not required, but handy):
# * Shell variables:
#        -TITLE: Set to some string that will be put on the window's label bar
#                        (used by the 'title' tool below).
#

if [ "$UMONTOP" = "" ]
then
        while [ "$UMONTOP" = "" ]
        do
                printf "Enter full path of uMON top-level-directory: "
                read tmp
                if [ "$tmp" != "" ]
                then
                        export UMONTOP=$tmp
                fi
        done
fi

BIN=$UMONTOP/host/bin

export MAKE_MODE=UNIX

alias lf='ls -Cp'
alias r='fc -e -'

# If a user wants to add some customization to the startup, then
# define a script/executable with the EXT_UMON_SETUP shell variable...
if [ "$EXT_UMON_SETUP" != "" ]
then
        . $EXT_UMON_SETUP
fi

if [ "$UMONTOP" != "" ]
then
        if [ -f $BIN/title.exe ] || [ -f $BIN/title ]
        then
                $BIN/title
        fi
        export tools=$UMONTOP/host
        export target=$UMONTOP/target
        export cpu=$target/cpu
        export zlib=$target/zlib
        export com=$target/common
        export misc=$target/misc
        export make=$target/make
        export flash=$target/flash
        export dev=$target/dev
fi
这个是他的内容了,看的费劲哦
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 10:01:39 | 显示全部楼层
脚本是存在的啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 10:02:33 | 显示全部楼层
小弟刚接触,望各位大虾赐教
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-6 10:04:21 | 显示全部楼层
我是按这个步骤做的:
Follow these steps:
1. Build the host-based tools (see instructions in umon_main/host/README).

2. Change directory (cd) to the directory the port-specific code was
   installed to (anywhere on your machine, say C:/els/umon_ports/csb337).

3. Start off by establishing the environment with the bashrc file.
   First edit the file and set the UMONTOP shell variable to the
   hard-coded full path of this main directory (i.e. export
   UMONTOP=C:/els/umon/umon_main).  Then close and save that file
   and issue the command:

   . bashrc

   Yes, you type "DOT SPACE bashrc".  Putting the "DOT SPACE" before
   running the bashrc script will make all environment variables created
   by that script accessible to the calling shell.
到第三步就挂了
回复 支持 反对

使用道具 举报

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

本版积分规则

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