基于mini2440开发板 Web服务器

嵌入式学习--arm开发板网页控制灯 学习要求:移植Webserver(Web服务器)到开发板。源代码可以到相关网站下载。(编写测试程序,例:通过cgi实现远程控制(模拟控制,如控制led1灯)。 开发板:友善之臂mini2440 解: 注意:以下的服务器端与客户端在同一局域网内 网页控制 (1)在ubuntu系统中,打开终端,使用命令“arm-linux-gcc 2_2_wangyekongzhi.c -o web_le... 阅读详情

http://www.boa.org/
下载Boa源码,将其解压并进入源码目录的src子目录
    # tar -zxvf boa-0.94.13.tar.gz
    # cd boa-0.94.13/src
2.生成Makefile文件
    # ./configure
    
修改Makefile文件,
a.找到CC=gcc,将其改成CC = arm-linux-gcc,
b.找到CPP = gcc –E,将其改成CPP = arm-linux-gcc –E,
保存退出。
3.运行make进行编译,得到的可执行程序为boa,并将调试信息剥去
    # make
    # arm-linux-strip boa

(如果make: yacc:命令未找到
解决方法:apt-get install bison

如果lex  boa_lexer.l
make: lex: Command not found
make: *** [lex.yy.c] Error 127

解决方法:apt-get install flex

如果util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token
make: *** [util.o] Error 1
解决方法:
修改 src/compat.h
找到
#define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
修改成
#define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff
然后
debian:/home/a/sss/boa-0.94.13/src# make clean
debian:/home/a/sss/boa-0.94.13/src# make)

4.编写boa.conf

# Boa v0.94 configuration file
# File format has not changed from 0.93
# File format has changed little from 0.92
# version changes are noted in the comments
#
# The Boa configuration file is parsed with a lex/yacc or flex/bison
# generated parser.  If it reports an error, the line number will be
# provided; it should be easy to spot.  The syntax of each of these
# rules is very simple, and they can occur in any order.  Where possible
# these directives mimic those of NCSA httpd 1.3; I saw no reason to 
# introduce gratuitous differences.
# $Id: boa.conf,v 1.25 2002/03/22 04:33:09 jnelson Exp $
# The "ServerRoot" is not in this configuration file.  It can be compiled
# into the server (see defines.h) or specified on the command line with
# the -c option, for example:
#
# boa -c /usr/local/boa

# Port: The port Boa runs on.  The default port for http servers is 80.
# If it is less than 1024, the server must be started as root.
Port 80
# Listen: the Internet address to bind(2) to.  If you leave it out,
# it takes the behavior before 0.93.17.2, which is to bind to all
# addresses (INADDR_ANY).  You only get one "Listen" directive,
# if you want service on multiple IP addresses, you have three choices:
#    1. Run boa without a "Listen" directive
#       a. All addresses are treated the same; makes sense if the addresses
#          are localhost, ppp, and eth0.
#       b. Use the VirtualHost directive below to point requests to different
#          files.  Should be good for a very large number of addresses (web
#          hosting clients).
#    2. Run one copy of boa per IP address, each has its own configuration
#       with a "Listen" directive.  No big deal up to a few tens of addresses.
#       Nice separation between clients.
# The name you provide gets run through inet_aton(3), so you have to use dotted
# quad notation.  This configuration is too important to trust some DNS.
#Listen 192.68.0.5


#  User: The name or UID the server should run as.
# Group: The group name or GID the server should run as.
User 0
Group 0

# ServerAdmin: The email address where server problems should be sent.
# Note: this is not currently used, except as an environment variable
# for CGIs.

#ServerAdmin root@localhost

# ErrorLog: The location of the error log file. If this does not start
# with /, it is considered relative to the server root.
# Set to /dev/null if you don't want errors logged.
# If unset, defaults to /dev/stderr

ErrorLog /3w/log/boa/error_log
# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
#  is somewhat experimental and might fail under heavy load.
# "Usual libc implementations of printf will stall the whole
#  process if the receiving end of a pipe stops reading."
#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log"

# AccessLog: The location of the access log file. If this does not
# start with /, it is considered relative to the server root.
# Comment out or set to /dev/null (less effective) to disable 
# Access logging.

AccessLog /3w/log/boa/access_log
# Please NOTE: Sending the logs to a pipe ('|'), as shown below,
#  is somewhat experimental and might fail under heavy load.
# "Usual libc implementations of printf will stall the whole
#  process if the receiving end of a pipe stops reading."
#AccessLog  "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log"

# UseLocaltime: Logical switch.  Uncomment to use localtime 
# instead of UTC time
#UseLocaltime

# VerboseCGILogs: this is just a logical switch.
#  It simply notes the start and stop times of cgis in the error log
# Comment out to disable.

#VerboseCGILogs

# ServerName: the name of this server that should be sent back to 
# clients if different than that returned by gethostname + gethostbyname 

ServerName www.watch.com

# VirtualHost: a logical switch.
# Comment out to disable.
# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A'
# become /var/www/IP-A.
# Example: http://localhost/ becomes /var/www/127.0.0.1
#
# Not used until version 0.93.17.2.  This "feature" also breaks commonlog
# output rules, it prepends the interface number to each access_log line.
# You are expected to fix that problem with a postprocessing script.

#VirtualHost 

# DocumentRoot: The root directory of the HTML documents.
# Comment out to disable server non user files.

DocumentRoot /3w/www

# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is recieved.

UserDir public_html

# DirectoryIndex: Name of the file to use as a pre-written HTML
# directory index.  Please MAKE AND USE THESE FILES.  On the
# fly creation of directory indexes can be _slow_.
# Comment out to always use DirectoryMaker

DirectoryIndex index.html

# DirectoryMaker: Name of program used to create a directory listing.
# Comment out to disable directory listings.  If both this and
# DirectoryIndex are commented out, accessing a directory will give
# an error (though accessing files in the directory are still ok).

#DirectoryMaker /usr/lib/boa/boa_indexer

# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker
# has been commented out, the the on-the-fly indexing of Boa can be used
# to generate indexes of directories. Be warned that the output is 
# extremely minimal and can cause delays when slow disks are used.
# Note: The DirectoryCache must be writable by the same user/group that 
# Boa runs as.

# DirectoryCache /var/spool/boa/dircache

# KeepAliveMax: Number of KeepAlive requests to allow per connection
# Comment out, or set to 0 to disable keepalive processing

KeepAliveMax 1000

# KeepAliveTimeout: seconds to wait before keepalive connection times out

KeepAliveTimeout 10

# MimeTypes: This is the file that is used to generate mime type pairs
# and Content-Type fields for boa.
# Set to /dev/null if you do not want to load a mime types file.
# Do *not* comment out (better use AddType!)

MimeTypes /etc/mime.types

# DefaultType: MIME type used if the file extension is unknown, or there
# is no file extension.

DefaultType text/plain

# CGIPath: The value of the $PATH environment variable given to CGI progs.

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

# SinglePostLimit: The maximum allowable number of bytes in 
# a single POST.  Default is normally 1MB.

# AddType: adds types without editing mime.types
# Example: AddType type extension [extension ...]

# Uncomment the next line if you want .cgi files to execute from anywhere
#AddType application/x-httpd-cgi cgi

# Redirect, Alias, and ScriptAlias all have the same semantics -- they
# match the beginning of a request and take appropriate action.  Use
# Redirect for other servers, Alias for the same server, and ScriptAlias
# to enable directories for script execution.

# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example: Redirect /bar http://elsewhere/feh/bar

# Aliases: Aliases one path to another.
# Example: Alias /path1/bar /path2/foo

Alias /doc /usr/doc

# ScriptAlias: Maps a virtual path to a directory for serving scripts
# Example: ScriptAlias /htbin/ /www/htbin/

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


5.cp boa 到开发板的/bin目录下,在开发板/etc目录下建boa目录,cp boa.conf到板子的/etc/boa目录。

6.创建日志文件所在目录/3w/log/boa,创建HTML文档的主目录/3w/www (由于我的mini2440开发板/var目录下的文件在重启之后总是会复原,所我再根目录下新建了一个/3w目录)

7.cp mime.types文件到开发板/etc目录

8.将已经编写好的index.html,music.flv , Clear_Skin_1.swf , FLVPlayer_Progressive.swf 保存至/3w/www。

9.运行boa:
#/bin/boa
现在通过其他机器就可以访问了。
http://10.21.10.76

mini2440 Boa CGI “Segmentation Fault” 问题解决 移植了Boa到mini2440,测试CGI的时候就发现了很多问题: 问题1 :网页多了很多乱码 http://topic.youkuaiyun.com/u/20111222/16/d768197b-a82a-4f85-af2a-dcbacd619e6e.html 在Fedora9下arm-linux-gcc -o helloworld hellow 阅读详情

相关推荐

远程WEB控制MP3播放器设计(基于mini2440)

网上有很多 基于mini2440的MP3播放器设计的资料,多是按键控制,这里博主做了些轻微改动,利用远程WEB来控制MP3播放,具体怎么实现,下面会给出,大家先看看效果: WEB界面: 后台运行: 因为不是什么课程设计报告,博主就不阐述的那么详细,这个设计主要有三部分组成: 1、WEB控制端(就是浏览器); 2、WEB服务器端(将mini2440开发板作为服务器,其中移植

知秋一叶 3107

linux下boa服务器的搭建

linux下boa服务器的搭建:CGI:通用网关接口(Common Gateway Interface)是一个Web服务器主机提供信息服务的标准接口。通过CGI接口,Web服务器就能够获取客户端提交的信息,转交给服务器端的CGI程序进行处理,最后返回结果给客户端。组成CGI通信系统的是两部分:一部分是html页面,就是在用户端浏览器上显示的页面。另一部分则是运行在服务器上的Cgi程序。c...

weixin_30823683的博客 434

Mini2440 DM9000裸机驱动与TFTP文件传输

Mini2440开发板是一款广泛用于嵌入式系统教学和开发的平台,基于三星S3C2440处理器,拥有丰富的外设接口和扩展功能,是学习ARM架构的良好选择。DM9000是以太网控制器,常与Mini2440开发板配合使用,为设备提供网络通信能力。DM9000是一款单芯片的快速以太网控制器,支持IEEE802.3协议,具有MAC和PHY功能。它通过并行接口与Mini2440开发板相连,方便开发者实现数据包的发送与接收。DM9000的应用简化了硬件设计复杂性,降低了开发成本和周期。

weixin_35826166的博客 758

linux-2.6.32在mini2440开发板上移植(21)之WebServer服务器移植

编者:其实也就是构建个WebServer服务器,只不过这里是以boa+cgic来实现的 1、移植boa软件 所用的软件为boa-0.94.13.tar.gz 先进行解压到当前目录 #tar -zxvf  boa-0.94.13.tar.gz cd /boa-0.94.13 /src  #./configure 修改Makefile 修改31,32行 CC=arm-linux-gcc CPP=a...

weixin_34159110的博客 149

apache2 + php5

apache2 + php5 下载后,直接安装即可。

mini2440上做的web服务器

mini2440上自己开发的web服务器的软件,可以很方便的移植到其他开发板,里面有很详细的代码,

mini2440 httpd使用(busybox自带)

httpd使用(busybox自带) by HYH | 2018 年 1 月 20 日 下午 4:17 一.说明 1.该功能需要busybox自带httpd。busybox自带的httpd的参数如下: 2.httpd可配置文件帮助(见源码:networking/httpd.c): * httpd.conf has the following format:** H:/s...

A7264143的博客 1047

mini2440客户端/服务器模式控制LED灯!

本代码是基于友善之臂的mini2440开发板的,不能保证其他的开发板可以使用。 其中led.c是服务端 client.c是客户端 使用流程: 先将服务端拷到开发板上 然后运行 ./led 然后在本地上运行./client 192.xxx.xxx.xxx(开发板的IP) 注意:使用前,需要先关闭友善之臂缺省编译后的led!

基于boa服务器的web控制mini2440的GPIO口

win7 系统  虚拟机:ubuntu12.04 开发板:mini2440 上一篇已经详细的讲解了如何配置boa服务器,在这里我们就要利用boa服务器带来的便利,利用web控制开发板上的GIPO口,这里控制led为例。 首先了解下cgi编程 CGI通用网关接口是一个Web服务器主机提供信息服务的标准接口。通过CGI接口,Web服务器就能够获取客户端提交的信息,转交给服务器端

rwzhou1的专栏 1878

基于linux-2.6.29在mini2440上移植boa服务器的详细步骤

这是整理的一份关于boa服务器移植的详细步骤,我已经将它移植在linux2.6.29中并在mini2440上的得到实现,希望对做嵌入式web开发的您有所帮助。

【Dify精讲】第2章:后端服务架构深度剖析

Dify后端采用Flask应用工厂模式实现模块化开发,通过蓝图架构将API分为控制台、Web应用和服务接口三大模块。其设计亮点包括:1) 应用工厂模式支持多环境配置和独立测试;2) 蓝图分层管理实现API模块化,各模块职责清晰;3) 严格遵循RESTful原则设计API接口;4) 使用Flask-RESTful扩展简化API开发。这种架构既保持了Flask的灵活性,又实现了企业级应用的可维护性,是Flask项目架构的优秀实践案例。

wiyi9891的专栏 2126

移植thttpd web服务器

移植thttpd web服务器到友善之臂mini2440开发板上(CPU是s3c2440)1. 环境硬件环境:Host:X86PC        Target:davinci DM6446 (TI) 软件环境:Host:Federo (linux2.6.15)(完全安装)Target:arm-linux                kernel:linux-2.6.1

dancesky的专栏 742

EtherCAT APWR报文实战:从站地址配置(0x0010)的初始化流程与报文解析

本文详细解析了EtherCAT APWR报文在从站地址配置(0x0010寄存器)中的初始化流程与实战应用。通过类比物业分配门牌号,生动解释了APWR报文如何高效批量配置从站地址,并深入探讨了0x0010寄存器的特殊作用、初始化步骤及常见问题排查方法。文章结合IgH主站的三从站配置案例,提供了报文解析技巧和调试建议,帮助工程师快速掌握EtherCAT网络配置的核心技术。

weixin_28744423的博客 410

基于mini2440的boa服务器移植

win7 系统 开发板:mini2440 虚拟机:ubuntu12.04 准备工作:确保主机与开发板之间能够正常通信,即能够ping通,具体的操作课参考我上一篇随笔。 1.首先从http://www.boa.org/下载boa的源码,并将其加压出来 2.生成makefile 进入到boa的src文件夹内,运行./configure 修改Makefile文件,如下所示: 然后...

weixin_30795127的博客 153

RTX 50系列显卡选购指南:从Stable Diffusion到深度学习,哪款最适合你的AI需求?

本文深入分析了RTX 50系列显卡如何满足不同的AI应用需求。针对Stable Diffusion图像生成,强调显存容量是关键;对于大语言模型本地推理,需平衡算力与显存;而深度学习训练则更看重算力效率。文章对比了RTX 5090、5080、5070等型号的核心规格与适用场景,并提供了从入门到专业的实战配置建议,帮助用户根据自身AI工作负载精准选择最具性价比的显卡。

linux6sysadmin的博客 689

STM32实战指南:TFTLCD液晶屏驱动与ILI9341应用解析

本文详细解析了STM32驱动TFTLCD液晶屏的实战技巧,重点介绍了ILI9341控制器的硬件连接、寄存器操作及性能优化方法。通过8080并行接口时序分析、GRAM操作优化和DMA传输应用,帮助开发者高效实现液晶屏驱动,适用于工业控制、智能家居等场景。

weixin_26873711的博客 232

基于mini2440嵌入式linux上整合一套Domoticz智能家居系统(一)前言

最近想为自家做一套智能家居系统,手上有闲置的mini2440开发板还有一块STM32F107芯片的金牛开发板,想把它们利用起来。整体构架思路是: 1、使用Mosquitto在mini2440上做MQTT代理服务器; 2、使用Domoticz做Web平台; 3、用STM32F107的开发板做MQTT的客户端,用来跟其他电器接口; 4、当然,mini2440上也有可以用的GPIO可以利用起来。(

sqshining的专栏 1690

DeepBSA实战指南:从安装到基因组分析的全流程解析

本文详细解析了DeepBSA工具从安装到基因组分析的全流程,特别介绍了其简化生物信息学分析的'一键式'操作和独家深度学习算法。通过实战案例展示了DeepBSA在信噪比处理和QTL定位上的优势,并提供了Linux和Windows系统的安装避坑指南、数据预处理技巧以及算法选择建议,帮助用户高效完成基因组分析。

weixin_28732953的博客 437

嵌入式web服务器boa移植全过程(含图解过程)

移植平台:mini2440(arm9 s3c2440)开发板 ,内核2.6.29   一、boa下载和安装: 1、修改编译安装文件: 1)在www.boa.org下载boa-0.94.13.tar.gz 并解压 2)在src目录下运行./configure生成Makefile。 3)生成Makefile文件,修改 CC = arm-linux-g

cai_caiyi的博客 1万+

手把手教您国内安装 Claude Code 并配置自定义大模型(包含New-API中转和可视化管理工具的使用)

国内免魔法畅用 Claude Code!手把手教你 Windows 安装、配置文件写法、对接阿里百炼 / DeepSeek / 智谱✨,附完整参数、正确命令、三方工具管理方案,新手一次成功!✅

XiaoqiangClub的博客 3782

ZYNQ microblaze boot.bin固化步骤

一,ZYNQ移植软核的原理FPGA规模巨大而且功能复杂,因此设计的每一个部分都从头开始是不切实际的。一种解决的办法是:对于较为通用的部分可以重用现有的功能模块,而把主要的时间和资源用在设计中的那些全新的、独特的部分。这就像是你在开发应用程序的时候就不用直接去写驱动物理硬件的代码,而是直接调用Windows提供的API就行了。

wangjie36的博客 2781

通过Web远程浏览Mini6410上的摄像头

注:在确保有虚拟机有交叉编译器,开发板系统能跑起来的情况下进行 第一步:在虚拟机上创建Webcamera文件夹,并下载mjpg-streamer-mini2440项目源代码 mkdir -p /opt/Webcamera svn checkout http://mjpg-streamer-mini2440.googlecode.com/svn/trunk/ mjpg-streamer-min

guozhiyuan20095318的专栏 2925

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

mini2440基于boa服务器通过WEB控制GPIO

本文是基于BOA服务器,通过CGI(通用网管接口)控制开发板的GPIO。CGI通用网关接口是一个Web服务器主机提供信息服务的标准接口。通过CGI接口,Web服务器就能够获取客户端提交的信息,转交给服务器端的CGI程序进行处理,最后返回结果给客户端。 在这里以控制LED为例。 1.客户端控制界面 采用CGI将浏览器端的控制信息传到boa服务器端,index.html文

林风专栏 4711

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

移植appweb 5.0到arm平台 mini2440

需要向嵌入式中移植web服务器,jing uo

xiaominthere的专栏 3222

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

上一篇: linux nfs挂载问题
下一篇: 奇模和偶模概念
ly0303521
博客等级 码龄17年 135粉丝 90原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值