1. 程式人生 > >boa-0.94.13 移植到 ARM

boa-0.94.13 移植到 ARM

<!-- /* Font Definitions */ @font-face {font-family:宋體; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:新宋體; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"DejaVu Sans Mono"; mso-font-alt:"MS Gothic"; mso-font-charset:128; mso-generic-font-family:modern; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"/@宋體"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@新宋體"; panose-1:2 1 6 9 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:modern; mso-font-pitch:fixed; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"DejaVu Sans"; mso-font-alt:"MS Gothic"; mso-font-charset:128; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"/@DejaVu Sans"; mso-font-charset:128; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:"/@DejaVu Sans Mono"; mso-font-charset:128; mso-generic-font-family:modern; mso-font-pitch:auto; mso-font-signature:0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:none; mso-hyphenate:none; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"DejaVu Sans"; mso-font-kerning:.5pt; mso-fareast-language:#00FF;} p.MsoHeader, li.MsoHeader, div.MsoHeader {margin:0cm; margin-bottom:.0001pt; mso-pagination:no-line-numbers; mso-hyphenate:none; tab-stops:center 249.3pt right 498.6pt; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"DejaVu Sans"; mso-font-kerning:.5pt; mso-fareast-language:#00FF;} p.MsoBodyText, li.MsoBodyText, div.MsoBodyText {margin-top:0cm; margin-right:0cm; margin-bottom:6.0pt; margin-left:0cm; mso-pagination:none; mso-hyphenate:none; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"DejaVu Sans"; mso-font-kerning:.5pt; mso-fareast-language:#00FF;} a:link, span.MsoHyperlink {mso-style-parent:""; color:navy; mso-ansi-language:#00FF; mso-fareast-language:#00FF; mso-bidi-language:#00FF; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} span.SourceText {mso-style-name:"Source Text"; mso-style-parent:""; font-family:"DejaVu Sans Mono"; mso-ascii-font-family:"DejaVu Sans Mono"; mso-fareast-font-family:"DejaVu Sans Mono"; mso-hansi-font-family:"DejaVu Sans Mono"; mso-bidi-font-family:"DejaVu Sans Mono";} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:2.0cm 2.0cm 2.0cm 2.0cm; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->

boa-0.94.13 porting to ARM

Table of Contents

1. 程式移植

2. 配置

3. 測試

1. 程式移植

<1> 解壓原始碼,配置

[email protected]:~/work/boa_porting/boa-0.94.13$ src/configure

[email protected]:~/work/boa_porting/boa-0.94.13$ vim Makefile

CC = arm-linux-gcc

CPP = arm-linux-gcc -E

<2> 編譯

[email protected]:~/work/boa_porting/boa-0.94.13$ make

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o y.tab.o y.tab.c

src/boa_grammar.y:30:19: error: parse.h: No such file or directory

# 出錯,修改標頭檔案包含路徑。

y.tab.c: In function 'yyparse':

[email protected]:~/work/boa_porting/boa-0.94.13$ vim src/boa_grammar.y

flex src/boa_lexer.l

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o lex.yy.o lex.yy.c

src/boa_lexer.l:28:19: error: parse.h: No such file or directory

# 出錯,修改標頭檔案包含路徑。

[email protected]:~/work/boa_porting/boa-0.94.13$ vim src/boa_lexer.l

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o util.o src/util.c

src/util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token

# 去掉其中的 ”##”

make: *** [util.o] Error 1

[email protected]:~/work/boa_porting/boa-0.94.13$ vim src/compat.h

[email protected]:~/work/boa_porting/boa-0.94.13$ make

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o util.o src/util.c

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o sublog.o src/sublog.c

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o timestamp.o src/timestamp.c

arm-linux-gcc -o boa y.tab.o lex.yy.o alias.o boa.o buffer.o cgi.o cgi_header.o config.o escape.o get.o hash.o ip.o log.o mmap_cache.o pipe.o queue.o read.o request.o response.o select.o signals.o util.o sublog.o timestamp.o -g

arm-linux-gcc -g -O2 -pipe -Wall -I. -c -o index_dir.o src/index_dir.c

arm-linux-gcc -o boa_indexer index_dir.o escape.o -g

# 編譯成功

[email protected]:~/work/boa_porting/boa-0.94.13$ file boa

boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped

[email protected]:~/work/boa_porting/boa-0.94.13$ arm-linux-strip boa

[email protected]:~/work/boa_porting/boa-0.94.13$ file boa

boa: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped

2. 配置

<1> 配置 boa.conf ,如下

Port 80

User 0

Group 0

ErrorLog /var/boa_error_log

DocumentRoot / var/ www

UserDir public_html

DirectoryIndex index.html

DirectoryMaker /usr/lib/boa/boa_indexer

KeepAliveMax 1000

KeepAliveTimeout 10

MimeTypes /etc/mime.types

DefaultType text/plain

CGIPath /bin:/usr/bin:/usr/local/bin

Alias /doc /usr/doc

ScriptAlias /cgi-bin/ / var/ www/cgi-bin/

<2> 配置開發板環境

建立目錄

[email protected]:~/rootfs$ mkdir etc/boa

[email protected]:~/rootfs$ mkdir /var/ www

[email protected]:~/rootfs$ mkdir /var/ www/cgi-bin

拷貝檔案

[email protected]:~/rootfs$ cp /home/furtherchan/work/boa_porting/boa-0.94.13/boa.conf ./etc

[email protected]:~/rootfs$ cp -v /home/furtherchan/work/boa_porting/boa-0.94.13/boa ./bin

[email protected]:~/rootfs$ cp /etc/mime.types ./etc

3. 測試

<1> 程式

# include < stdio . h > # include < stdlib . h > int main ( void ) { printf ( "Content-type: text/html/n/n" ); printf ( "<html>/n" ); printf ( "<head><title>CGI test </title></head>/n" ); printf ( "<body>/n" ); printf ( "<h1>Hello,world.</h1>/n" ); printf ( "<body>/n" ); printf ( "</html>/n" ); exit ( 0 ); }

[email protected]:~/rootfs/www/cgi-bin$ arm-linux-gcc -o hello hello.c

<2> 開啟網頁

http:// 板子 IP/cgi_bin/hello

相關推薦

boa-0.94.13移植到uclinux arm s3c4510b的過程

   正在移植boa-0.94.13到uclinux上,幾點筆記,大家分享。    編譯一個linux下的c系統,包含詞法和語法分析模組,Linux上用bison和flex。 yacc是一個文法分析器的生成器,bison即是yacc的GNU版本.Lex和YACC是用於構

boa-0.94.13 移植ARM

<!-- /* Font Definitions */ @font-face {font-family:宋體; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134;

luvcview-0.2.4移植

微軟雅黑 -shared local ble fix efi soft win proto 1.luvcview運行依賴SDL多媒體庫,下載SDL源碼包,交叉編譯SDLtar –xzvf SDL-1.2.14.tar.gzcd SDL-1.2.14vi build

Hbase-0.94.27 install on Ubuntu

1 Basic Prerequisites 1.1 jdk 安裝配置看Hadoop配置 1.2 Hadoop 1.0.1/Hadoop 1.2.1 一個不相容就換另外一個版本 在啟動./start-hbase.sh前先啟動Hadoop服務 2  安裝 2.1 H

法甲-卡瓦尼戴帽內馬爾傳射 巴黎4-0摩納哥13連勝

11月29日訊息,@北京商報從度小滿金融人士處獲悉,百度正式拿到准許經營證券期貨的許可證。據許可證顯示,機構名稱為北京百度百盈科技有限公司(下稱“百度百盈”),證券期貨業務經營範圍為基金銷售。而今年8月22日,根據北京證監局官網顯示,證監局已核准百度百盈證券投資基金銷售業務資格。 企查查資訊顯示,百度百盈成

springboot 2.0 教程-13-mybatis增強mybatis-plus

閱讀原文:https://blog.bywind.cn/articles/2018/11/28/1543373589258.html 視訊教程:https://www.bilibili.com/video/av35595465 課程原始碼:https://github.com/ibywind/s

The required dependency 'apt (>= 1.0.1ubuntu2.13)' is not installed

使用Ubuntu系統的時候,系統提示升級,從14.04升級到16.04時,提示“The required dependency ‘apt (>= 1.0.1ubuntu2.13)’ is not installed”,該提示指的是沒有安裝所需的依賴。 apt版本太低了,應該滿足>

Mysql 8.013章 SQL語句的語法 (第2節)

文章目錄 13.2 資料操作語句(DML) 13.2.1 CALL語法 13.2.2 DELETE語法 13.2.2.1 單表語法 13.2.2.2 多表語法 13.2.2.3 相關介紹

Taro 1.2.0 beta 13 釋出,多端統一開發框架

   Taro 1.2.0 beta 13 釋出了,Taro 是一套遵循 React 語法規範的多端統一開發框架,支援用 React 的方式編寫一次程式碼,生成能執行在微信小程式/百度智慧小程式/支付寶小程式、H5 與 React Native 等端的應用。 更新內容如下: B

HBase 0.94.3的HRegion名字

2013-01-10 周海漢 2013.1.10 HBase 可以通過Region server的60030埠看到各區域的資訊。 Region Name Start Key End Key Metrics -RO

基於SDL-1.2.13ARM環境下的編譯

一:SDL是什麼? SDL(Simple DirectMedia Layer)是一個自由的跨平臺的多媒體開發包,適用於 遊戲、遊戲SDK、演示軟體、模擬器、MPEG播放器和其他應用軟體。 二:基於ARM平臺的SDL編譯     主機環境:ubuntu 10.04.4 LTS

ALSA音訊庫的移植 ARM 交叉編譯 環境變數

alsa 是在LINUX出現比較晚的音訊處理庫,主要是針對原有的OSS的庫進行改進.效能更好,支援多個播放源等.但相應的,增加的程式設計的複雜性.   舊的oss是採用標準檔案IO介面,裝置打開採用open,聲音播錄是採用資料IO介面(read/write),裝置的引數

HBase 0.94.8 split 原始碼分析

1. 發起 hbase split1.1 HBaseAdmin.split /** * Split a table or an individual region. * Asynchronous operation. * * @param tabl

編譯FFmpeg4.0.1並移植到Android app中使用(最詳細的FFmpeg-Android編譯教程)

1.搭建編譯環境 1.安裝ubuntu14.04,安裝完成後執行以下命令 apt-get update apt-get install yasm apt-get install pkg-config 2.下載ndk 我用的是ndk r14b,附上下載地址:https://dl

Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli)...

當使用Docker來構建專案的時候,可能會出現一下異常: [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project springb: Exc

物聯網倉儲系統(四)—環境搭建—BOA 伺服器和 SQLite3 移植

一、專案環境介紹:1、Ubuntu 12.04 發行版2、GCC 交叉編譯工具鏈(版本 4.5.1)3、U-boot-2010.034、FS4412 開發板(ARM Cortex-A9 核心)5、FS_

SpringBoot2.013)整合Redis詳解及踩過的坑(Could not get a resource from the pool)

SpringBoot2.0整合Redis 首先安裝的過程就不提了。上一個專案的redis是配置在Windows下的,整合很簡單,也沒有做什麼配置。這次為了進行測試,裝在了linux下。在SpringBoot整合的過程中遇到了一些小坑,分享一下。 po

NCNN移植ARM爬坑日誌-caffe2ncnn 五

首先要確認.prototxt和.caffemodel檔案是新版caffe檔案,詳情看爬坑一 進入ncnn-master/build/tools/caffe #./caffe2ncnn deploy.prototxt alexnet.caffemodel alexnet.pa

關於移植arm程式到x86遇到的struct對齊問題

簡單記錄: 1、 arm 32位 enum型別大小是1位元組 x86 enum型別是4位元組 2、 X86上 #pragma pack(push, 1)//是按1位元組對齊 typedef struct {     UCHAR ucA;//1     UCHAR ucB;/

iTop4412 3.0.15核心移植到linux4.4.34(一)

打算借linux移植學習核心啟動過程,及4412各外設驅動原理 移植時,先修改一些config,然後解決編譯出現的問題 System Type-->Multiple platform selection [*]ARMv7 based platforms(Cortex-