<nobr id="zkazv"></nobr>

      午夜精品一区二区三区成人,中文字幕av一区二区,亚洲AVAV天堂AV在线网阿V,肥臀浪妇太爽了快点再快点,国产网友愉拍精品视频手机,国产精品无码a∨麻豆,久久中文字幕一区二区,a级国产乱理伦片在线观看al
      首頁 新聞 工控搜 論壇 廠商論壇 產品 方案 廠商 人才 文摘 下載 展覽
      中華工控網首頁
        P L C | 變頻器與傳動 | 傳感器 | 現場檢測儀表 | 工控軟件 | 人機界面 | 運動控制
        D C S | 工業以太網 | 現場總線 | 顯示調節儀表 | 數據采集 | 數傳測控 | 工業安全
        電 源 | 嵌入式系統 | PC based | 機柜箱體殼體 | 低壓電器 | 機器視覺
      英貝德科技移植PPP大揭秘:PPP撥號在ARM2410平臺上的移植
      深圳市盈鵬飛科技有限公司
      收藏本文     查看收藏
      PPP撥號在ARM2410平臺上的移植
       
      本次PPP移植是在三星arm2410的平臺上進行的,所用的工作環境為:
      Kernel: 2.4.18
      Sysvinit:2.86
      Tinylogin:1.4
      Glibc: 2.2.5 +GCC:3.3 
      PPP: 2.4.1
      U-boot:1.1.3
      Busybox :1.00
      Sysvinit:2.86
      一、具體操作步驟
       
       
      首先編譯內核支持 PPP:
      $make menuconfig                    
      $make ARCH=arm CROSS_COMPILE=/../arm-linux- zImage
      $./mkimage2410 uImage                
      其中mkimage2410、mkimage等文件來自u-boot1.1.3 需要根據你的路徑修改mkimage2410的內容,指定mkimage文件的位置。
       
      第二步,制作文件系統:
      1. 編譯Busybox
      $make menuconfig    
       Build options ---->
              [*] Build BusyBox as a static binary (no shared libs)
               [*] Do you want to build BusyBox with a Cross Compiler?          
                 (/usr/local/arm/3.3/bin/arm-linux-) Cross Compiler prefix
      $make
      $make PREFIX=/../rootfs/ install
      注意:Busybox的README中說用make busybox 命令來編譯busybox,但是這樣做好像有點問題,有時不能成功,其實直接敲入make就行了。
       
      2. 編譯System V init
      $cd src
      $make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
      $make PREFIX=/../rootfs install
       
      3. 編譯 Tinylogin
      $make CROSS=/../arm-linux- PREFIX=/../rootfs/ all
      $make PREFIX=/../rootfs install
       
      4.交叉編譯 PPP:
      $export CROSS_COMPILE=/../arm-linux-
      $export CC=/../arm-linux-gcc        
      $make
      這樣就在目錄: /../ppp-2.4.1/pppd,/../ppp-2.4.1/pppdump,/../ppp-2.4.1/pppstats and /../ppp-2.4.1/chat下得到了可執行程序pppd,pppdump,pppstats 和 chat.
      將它們復制到 /../rootfs/usr/sbin 目錄下
       
      移到文件系統根目錄
      #mkdir etc dev
      #cd dev
      #mknod 600 console 5 1
      #mknod ppp c 108 0
      #cd ..
       
       
      配制/etc目錄下的文件和文件夾,如: inittab fstab host.conf rc.d以便內核能夠正確啟動文件系統。
       
       
      最后,從/../3.3/lib目錄下選出所需要的庫文件放到文件系統根目錄rootfs/lib下面.
      $su
      #mkdir tmp/initrd
      #dd if=/dev/zero of=images/initrd.img bs=1k count=8192
      #/sbin/mke2fs –F –v –m0 images/initrd.img
      #mount –o loop images/initrd.img tmp/initrd
      #cp –av rootfs/* tmp/initrd
      #umount tmp/initrd
      #exit
      $gzip –9 < images/initrd.img > images/initrd.bin
       
      這樣,就得到了我們所需要的uImage 和initrd.bin.將U-boot燒到板子上并設置好環境變量后就能通過tftp下載kernel 和ramdisk到目標板上運行了。
       
       
       
       
       
       
       
       
       
       
      二、撥號腳本配置:
      當然,要正確連上GPRS網還需要配置PPP撥號的腳本和配置PPP設備。
      1GPRS撥號腳本如下:
      # File:
      # /etc/ppp/gprs
      #
      # Description:
      # This file holds the serial cable and IrDA pppd options for GPRS phones
       
      # Tell the ppp-daemon to accept mangled data
      receive-all
       
      # Give some debug info
      debug
      kdebug 7
       
      # Print out all the option values which have been set.
      dump
       
      # Serial device to which terminal is connected;
      # with serial port (COM1 in Windows) use /dev/ttyS0
      # and with IrDA use /dev/ircomm0.
      #/dev/ircomm0 # IrDA
      /dev/ttyS1
       
       
      # Serial port line speed
      115200
       
      # Turn off waiting of carrier detect or flow control signal
      # With IrDA it should be disabled with nocrtscts option.
      -crtscts # serial cable
      #nocrtscts # IrDA
      # Ignore carrier detect signal from the modem
      local
       
      # To keep pppd on the terminal
      nodetach
       
      # Accept the peer's idea of our local IP address
      ipcp-accept-local
      # Accept the peer's idea of its (remote) IP address
      ipcp-accept-remote
       
      # IP addresses:
      # - accept peers idea of our local address and set address peer as 10.0.0.1
      # (any address would do, since IPCP gives 0.0.0.0 to it)
      # - if you use the 10. network at home or something and pppd rejects it,
      # change the address to something else
      0.0.0.0:0.0.0.0
       
      -chap
      #-pap
       
      # pppd must not propose any IP address to the peer!
      #noipdefault
       
      # No ppp compression
      novj
      novjccomp
       
      papcrypt
      nodeflate
       
      #No ppp magic number
      nomagic
       
      # no asyn cmap
      asyncmap 0
       
      # Add default route
      defaultroute
       
      # Connect script
      connect /etc/ppp/gprs-connect-chat
       
      # Disconnect script
      disconnect /etc/ppp/gprs-disconnect-chat
       
      2.下面是options文件:
      # File:
      # /etc/ppp/options
      #
      receive-all
      nopcomp
      noaccomp
      nomagic
      debug
      # Mobile is connected to the first serial port
      /dev/ttyS1
      115200
      connect '/usr/sbin/chat -e -f /etc/ppp/gprs-connect-chat -v'
      disconnect '/usr/sbin/chat -e -f /etc/ppp/chat-disconnect -v'
      modem
      noauth
      noccp
      novj
      novjccomp
      defaultroute
      noipdefault
      user foo
      lock
       
      3GPRS連接腳本:(注意移動夢網接入點是CMNET,號碼是*99***1#,帶有引號的AT命令一定要用單引號包含整個命令。)
      #!/bin/sh
      #
      # File:
      # /etc/ppp/chat-gprs-connect
      #
      # Description:
      # chat script to open Sonera GPRS service with GPRS phones. If ppp
      # negotiation stalls, try restarting the phone. To try with other GPRS
      # operator setting, change the PDP contex setting. The settings work with
      # all Ericsson models, but Nokia 8310 does not suppor QoS parameters with
      # AT commands, so just delete those lines and it'll work.
      #
      # Set PDP context CID=1, protocol=IP, APN=internet:
      # AT+CGDCONT=1,"IP","internet","",0,0
      #
      # Set CID=1 QoS requirements from the network, not supported by 8310:
      # AT+CGQREQ=1,0,0,0,0,0
      #
      # Set CID=1 minimum acceptable QoS parameters, not supported by 8310:
      # AT+CGQMIN=1,0,0,0,0,0
      #
      # 'Call' CID=1 (activate PDP context one, perform GPRS attach):
      # ATD*99***1#
      #
      # ogin:-BREAK-ogin: \
      # TIMEOUT 5 \
      # assword: \
      # SAY "\nLogged in OK...\n" \
      # The actual chat script:
      exec chat \
      TIMEOUT 5 \
      ECHO ON \
      ABORT '\nBUSY\r' \
      ABORT '\nERROR\r' \
      ABORT '\nNO ANSWER\r' \
      ABORT '\nNO CARRIER\r' \
      ABORT '\nNO DIALTONE\r' \
      ABORT '\nRINGING\r\n\r\nRINGING\r' \
      '' AT \
      TIMEOUT 5 \
      SAY "Press CTRL-C to close the connection at any stage!" \
      SAY "\ndefining PDP context...\n" \
      OK AT+IPR=115200 \
      OK 'AT+CGDCONT=1,"IP","CMNET"' \
      OK 'AT+CGCLASS="B"' \
      OK AT+CGACT=1,1 \
      OK ATD*99***1# \
      TIMEOUT 60 \
      SAY "\nwaiting up to 2 mintues for connect...\n"\
      CONNECT "" \
      SAY "\nConnected. now logging in...\n" \
      SAY "\nIf the following ppp negotiations fail,\n" \
      SAY "try restarting the phone.\n"
       
      4pap-secrets文件:
      # File:
      #/etc/ppp/pap-secrets
      # Secrets for authentication using PAP
      # client server secret IP addresses
      ####### redhat-config-network will overwrite this part!!! (begin) ##########
      ####### redhat-config-network will overwrite this part!!! (end) ############
      foo * "" *
       
      5chap-secrets文件(這個文件好像可以不要)
      # File:
      # /etc/ppp/chap-secrets
      # Secrets for authentication using CHAP
      # client server secret IP addresses
      ####### redhat-config-network will overwrite this part!!! (begin) ##########
      ####### redhat-config-network will overwrite this part!!! (end) ############
      其它什么ip-up,ip-down文件都不是必需的。gprs, pap-secrets, gprs-connect-chat, options 這四個文件都不能少。
      GPRS斷開腳本gprs-disconnect-chat我正在調試,現在還沒有通過。目前只能用kill來斷開。
       
      三、GPRS的開機自動登錄和斷線自動重連
      在有些應用中需要PPP在開機的時候能自動撥上GPRS網,并且在斷線之后能自動進行重撥。此功能可以用一個簡單的shell腳本來實現。
      編輯一名為ppp的shell腳本如下:
      #!/bin/sh
      export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
      export LD_LIBRARY_PATH="/usr/local/lib:/usr/lib:/lib"
      trap "echo 'PPPD:Do not interrupt me!'" INT
      trap "echo 'PPPD:Help! Do not kill me!'" TERM
      while(ps -ax | grep 'pppd' )
             do sleep 10
             pppd file /etc/ppp/gprs
              sleep 8
             trap "echo 'PPPD:Do not interrupt me!'" INT
             trap "echo 'PPPD:Help! Do not kill me!'" TERM
      done
       
      然后在inittab文件中加入項目:
      ::once:/etc/ppp/ppp 1>>/etc/ppp/info
       
          這樣,就實現了開機自動登錄和斷線自動重連的功能。此時撥號信息不會在終端輸出而是記錄在/etc/ppp/info文件中,要了解撥號信息可以要此文件中查看。要終止PPP連接可輸入:kill –9 27
       
       
      總結:嵌入式linux下應用程序的移植,實際上是一個系統平臺轉換的過程。最好能先在宿主機(X86)上對程序源文件進行從頭到尾的編譯、連接,讓它首先在宿主機上跑起來。弄清每一個步驟及其工作的具體內容,在向目標板移植的過程中一定要保證交叉編譯,其它文件配置和操作步驟跟宿主機上幾乎完全一樣。
       
       
       

       

      狀 態: 離線

      公司簡介
      產品目錄

      公司名稱: 深圳市盈鵬飛科技有限公司
      聯 系 人: 李希崗
      電  話: 0086-13602511395
      傳  真: 0755-82523175,82523176-819
      地  址: 深圳市福田區福明路40號,雷圳大廈12A06
      郵  編: 518033
      主  頁:
       
      該廠商相關技術文摘:
      WINCE下如何添加CPL應用程序
      Wince sqlite3移植
      EAC-C925開機畫面實現手冊
      英貝德推出單板機產品軟件升級解決方案(WinCE篇)
      EP9315電路設計要點
      Linux下創建和使用RamDisk的技巧
      AT91SAM9263在人機界面方面的應用
      詳解WinCE下USB Host驅動開發(2)
      詳解WinCE下USB Host驅動開發(1)
      WinCE驅動中設備中斷的處理
      Linux內核學習之BogoMIPS值的計算
      更多文摘...
      立即發送詢問信息在線聯系該技術文摘廠商:
      用戶名: 密碼: 免費注冊為中華工控網會員
      請留下您的有效聯系方式,以方便我們及時與您聯絡

      關于我們 | 聯系我們 | 廣告服務 | 本站動態 | 友情鏈接 | 法律聲明 | 不良信息舉報
      工控網客服熱線:0755-86369299
      版權所有 中華工控網 Copyright©2022 Gkong.com, All Rights Reserved

      主站蜘蛛池模板: 久久综合九色综合欧洲98| 动漫AV纯肉无码AV电影网| 国产精品人成视频免| 亚洲最大天堂在线看视频| 四虎永久精品免费视频| 丰满的少妇被猛烈进入白浆 | 国产精品一亚洲av日韩| 亚洲国产成人AⅤ片在线观看| 67194熟妇在线直接进入| 亚洲人成网站77777在线观看| 制服丝袜美腿一区二区| 亚洲情A成黄在线观看动漫尤物 | 日韩有码精品中文字幕| 深夜视频国产在线观看| 亚洲日本欧洲二区精品| 亚洲国产一区二区精品专| 欧美福利电影A在线播放| 国产一区二区三区导航| 亚洲精中文字幕二区三区| 精品激情视频一区二区三区| 国产一区二区三区小说| 国产精品福利中文字幕| AV在线亚洲欧洲日产一区二区| 自拍第一区视频在线观看| 国产日韩一区二区四季| 在线观看美女网站大全免费| 亚洲精品一区二区天堂| 无码精品人妻一区二区三区中| 亚洲欧洲国产综合一区二区| 玩弄漂亮少妇高潮白浆| 午夜福利免费区在线观看| 亚洲一区二区精品偷拍| 中文字幕无码不卡在线| 国产中文字幕在线一区| 99在线小视频| 亚洲日韩性欧美中文字幕| 久久男人av资源站| 亚洲第一综合天堂另类专| 亚洲AV午夜电影在线观看| 国产精品日本一区二区不卡视频| 四川丰满少妇无套内谢|