alt tag

Commotion-Router

This new, CMake-based build system only works for Barrier Breaker-based images, which are not yet fully functional. Use the 1.1 branch to use the old buildsystem for creation of Attitude Adjustment-based v1.1 images.

Commotion is an open source “device-as-infrastructure” communication platform that integrates users’ existing cell phones, Wi-Fi enabled computers, and other wireless-capable devices to create community- and metro-scale, peer-to-peer communications networks.

Commotion software exists for multiple platforms; this repository contains the build system for the OpenWRT router firmware distribution of the Commotion Wireless project. This repo builds the following other Commotion projects in order to create installation images for turning select wireless routers into Commotion nodes. It contains only the scripts and default files needed to download OpenWRT and add Commotion's packages to the OpenWRT build system. These scripts are written with CMake and wrap the OpenWRT ImageBuilder and [SDK] (http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk). Those Commotion packages are defined in the packages directory of the Commotion Feed repo (https://github.com/opentechinstitute/commotion-feed.git). Package source code can be found in the repositories (PKG_SOURCE_URL) and branches (PKG_VERSION) specified in their respective Commotion Feed Makefiles.

If you would like to know more about setting up a mesh network check out the Commotion Construction Kit at https://commotionwireless.net/docs/cck

The Commotion Daemon

https://github.com/opentechinstitute/commotiond.git

The commotion daemon is an embedded daemon and library that provides a common interface for managing wireless mesh networks.

LuCI Commotion

https://github.com/opentechinstitute/luci-commotion

The Commotion LuCI web interface extensions provide an easy to understand interface that allows a new user to quickly configure a node to their needs. This repository contains multiple components:

  • Commotion basic configuration menus
  • Commotion LuCI theme
  • Commotion local apps portal: The application suite allows for developers to easily advertise applications over a commotion mesh using mdns, users to easily find applications through the router app advertising interface, and node owners to easily manage and customize their application portals to better support community application support.
  • Commotion debug helper: The debugging helper creates custom, downloadable informational debugging documents for offline debugging, or to send to network maintainers. Each of these new tools needs testing to find errors as well as to ensure their usability.
  • Commotion dashboard helper: The dashboard helper reports statistics to an external dashboard.
  • Commotion splash page and settings: A custom captive portal/splash screen and an interface for customizing it, built around nodogsplash (https://github.com/nodogsplash/nodogsplash).

Commotion Service Manager

https://github.com/opentechinstitute/commotion-service-manager

The service manager discovers and verifies announcements of applications hosted on the network, and loads them into the apps portal.

Libserval

https://github.com/opentechinstitute/serval-dna

Serval's key management library allows transparent encryption and authentication of messages.

How to use this repository to compile Commotion Router images

This repository contains a system of CMake files that download the OpenWRT ImageBuilder, extract, and run it with a pre-populated configuration. ImageBuilder is a standalone tool that creates OpenWRT firmware image files out of a set of package files. It supports automatic dependency resolution and downloading of packages, and can build images for many different target platforms.

Additionally, these CMake files can optionally build all of the Commotion Router packages using the OpenWRT SDK, a pre-built cross-compiler toolchain for the OpenWRT Linux operating system.

In order to use the CMake files in this repository, you can run them like any other CMake project. You can use either the command-line interface or, if available, the CMake GUI.

Requirements

  • A modern Linux system.
  • CMake >= v3.0.2.
  • git
  • zlib
  • svn
  • awk
  • ccache
  • gcc
  • ncurses
  • libssl
  • xsltproc

On a Debian-based system, including Ubuntu or Mint, you can simply type sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc cmake to install the packages above. Additional packages may be required if you encounter errors during the build process (e.g., sudo apt-get install libxml-parser-perl).

Building on OSX is ill-advised, as such requires a large number of dependencies and, most difficultly, a case-sensitive filesystem. Here is how to determine if you are, but unless you installed OSX yourself and use no Adobe programs (they require case-insensitive), your filesystem is case-insensitive. It is likely quicker to configure a Linux virtual machine and use that instead. If you do have a case-sensitive filesystem, you can proceed, but YMMV.

With the command-line interface

The Commotion Router buildsystem provides a number of options for configuring your build targets.

Option Type Description Default
COMMOTION_VERSION String Branch of Commotion to build master
COMMOTION_RELEASE String Commotion release nickname grumpy_cat
DEBUG Bool Create verbose Makefile output False
SKIP_MD5 Bool Skip MD5 checking of downloaded ImageBuilder False
CONFIG String Commotion Router target ubnt
BUILD_IMAGES Bool Toggle building of images True
BUILD_PACKAGES Bool Toggle building of packages True
USE_LOCAL Bool Use locally built packages when building images False
JOBS String Number of parallel compile jobs 2
DL_DIR Filepath Custom download directory CMAKE_CURRENT_BINARY_DIR

The CONFIG value must correspond to the name of a directory under config/ inside the repository. See below in order to find out how to create new configurations. The Commotion version and release strings specified must correspond to the repository structure in http://downloads.commotionwireless.net/router/.

For example, to build an image with the default options, clone the repository and run the following inside.

mkdir build
cd build
cmake ..
make

The ImageBuilder will be downloaded and configured to for the ubnt target. Resulting images will be located in build/bin. To build for version 1.0 of release foo with target bar, with debugging turned on and MD5 checking off, you would run the following (this is just an example and will not complete):

mkdir build
cd build
cmake -DCOMMOTION_VERSION:String=1.0 -DCOMMOTION_RELEASE:String=foo -DCONFIG:String=bar -DDEBUG:Bool=True -DSKIP_MD5:Bool=True ..
make

With the cmake-gui

You can build with the GUI similarly to above, except that all the configuration values will be present in the GUI.

mkdir build
cd build
cmake-gui ..

Select the options you want, then click "Configure" and then "Generate." After the GUI has generated the Makefiles, you can subsequently run make.

Create your own build configurations

Specific build configurations are contained within the 'configs' directory. To create a new configuration, just create a directory with the desired configuration name. For instance, the existence of the 'configs/ubnt' directory will cause 'ubnt' to show up in the list of available configurations in cmake-gui, and 'ubnt' is what you would provide to cmake on the commandline for the CONFIG option.

A valid configuration directory contains its own CMakeLists.txt file that defines, at minimum, the variables TARGET, SUBTARGET, and PROFILE. Below is the contents of a valid 'configs/ubnt/CMakeLists.txt':

SET(TARGET "ar71xx" PARENT_SCOPE)
SET(SUBTARGET "generic" PARENT_SCOPE)
SET(PROFILE "UBNT" PARENT_SCOPE)

This is CMake syntax for setting the variables TARGET, SUBTARGET, and PROFILE to 'ar71xx', 'generic', and 'UBNT' respectively. 'PARENT_SCOPE' is a necessary CMake option for making sure this information is available to the buildsystem. To learn more about what TARGET, SUBTARGET, and PROFILE mean, and how to figure out which ones to pick, see the OpenWRT ImageBuilder documentation.

Additionally, you may define a PACKAGES variable to add additional packages to this particular configuration. If you are adding more than one, it must be provided as a semicolon-delmited list. For instance, to add the packages 'foo' and 'bar':

SET(PACKAGES "foo;bar" PARENT_SCOPE)

You may remove packages instead by prepending the package name with a minus sign.

Optionally, the configuration may provide a 'files' directory as well. For example, you might have a directory 'configs/ubnt/files' which contains a file 'configs/ubnt/files/etc/hosts'. That file would be copied to '/etc/hosts' in the built image; any file or directory is copied directly into the root filesystem of the router image as the last step. This is useful for providing custom configuration files, and any file in here overwrites any equivalent default configuration files provided by the Commotion buildsystem or any packages.

Installation Instructions (Ubiquiti Devices):

http://commotionwireless.net/docs/cck/installing-configuring/install-ubiquiti-router

Install & Recover with TFTP (Ubiquiti Devices):

http://commotionwireless.net/docs/cck/installing-configuring/install-and-recover-tftp

Installation Instructions (Other Devices):

Specific installation instructions for non-Ubiquiti devices can be found in the OpenWRT Table of Hardware



ALT标记

Commotion-Router

这种新的基于CMake的构建系统仅适用于基于障碍断层的图像,该图像尚未完全实现。使用1.1分支使用旧的构建系统来创建基于态度调整的v1.1图像。

Commotion是一个开源的设备为基础设施通信平台,集成了用户现有的手机,支持Wi-Fi的计算机和其他无线设备,以创建社区和城域规模的对等 - 对等通信网络。

对于多个平台,存在Commotion软件;该存储库包含Commotion Wireless项目的 OpenWRT 路由器固件分发的构建系统。此repo构建以下其他Commotion项目,以创建将选择的无线路由器转换为Commotion节点的安装映像。它仅包含下载OpenWRT所需的脚本和默认文件,并将Commotion的软件包添加到OpenWRT构建系统。这些脚本使用 CMake 编写,并包装 OpenWRT ImageBuilder 和[SDK]( http://wiki.openwrt.org/ doc / howto / getting.firmware.sdk )。这些Commotion包在Commotion Feed repo的packages目录中定义( https://github.com/opentechinstitute/commotion-feed .git )。软件包源代码可以在它们各自的Commotion Feed Makefile中指定的资源库(PKG_SOURCE_URL)和分支(PKG_VERSION)中找到。

如果您想了解更多关于设置网状网络的信息,请查看运动构建工具包, https://commotionwireless.net/docs / cck

Commotion守护进程

https://github.com/opentechinstitute/commotiond.git

commotion守护进程是一个嵌入式守护程序和库,为管理无线网状网络提供了一个通用接口。

LuCI Commotion

https://github.com/opentechinstitute/luci-commotion

Commotion LuCI 网络界面扩展提供了一个易于理解的界面,允许新用户快速配置节点以满足他们的需求。此存储库包含多个组件:

  • Commotion基本配置菜单
  • Commotion LuCI主题
  • Commourse本地应用程序门户:应用程序套件允许开发人员使用mdns轻松地通过通勤网格广告应用程序,用户可以通过路由器应用程序广告界面轻松查找应用程序,节点所有者可轻松管理和自定义其应用程序门户网站支持社区应用程序支持。 Commotion debug helper:调试帮助程序为离线调试创建自定义的可下载的信息调试文档,或发送给网络维护人员。这些新工具中的每一个都需要测试来查找错误,并确保其可用性。
  • Commotion dashboard helper:仪表板帮助器将统计信息报告给外部仪表板。
  • Commotion启动页面和设置:自定义强制门户/启动屏幕和用于定制它的界面,围绕nodogsplash构建( https:// github .com / nodogsplash / nodogsplash )。

运动服务经理

https://github.com/opentechinstitute/commotion-service-manager

服务管理器发现并验证在网络上托管的应用程序的通知,并将其加载到应用程序门户中。

Libserval

https://github.com/opentechinstitute/serval-dna

Serval的密钥管理库允许对邮件进行透明加密和验证。

How to use this repository to compile Commotion Router images

该存储库包含一个下载OpenWRT ImageBuilder的CMake文件系统,解压缩并使用预先填充的配置运行它。 ImageBuilder是一个独立的工具,可以从一组程序包文件中创建OpenWRT固件映像文件。它支持自动依赖解析和软件包下载,并可以为许多不同的目标平台构建图像。

此外,这些CMake文件可以选择使用OpenWRT SDK(预制的)构建所有Commotion路由器软件包 OpenWRT Linux操作系统的交叉编译工具链。

为了使用该存储库中的CMake文件,可以像任何其他CMake项目一样运行它们。您可以使用命令行界面,也可以使用CMake GUI。

要求

  • 现代Linux系统。
  • CMake> = v3.0.2。
  • git
  • zlib
  • svn
  • awk
  • ccache
  • gcc
  • ncurses
  • libssl
  • xsltproc
在基于Debian的系统中,包括Ubuntu或Mint,您可以直接键入 sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc cmake 以安装上面的包。如果您在构建过程中遇到错误(例如, sudo apt-get install libxml-parser-perl ),则可能需要其他软件包。

基于OSX是不明智的,因此需要大量的依赖关系,最难的是区分大小写的文件系统。以下是如何确定您是否,但是除非您自己安装OSX并且不使用Adobe程序(它们不区分大小写),否则文件系统不区分大小写。配置一个Linux虚拟机可能更快,并且使用它。如果您有一个区分大小写的文件系统,可以继续,但 YMMV

使用命令行界面

Commotion路由器构建系统提供了许多配置您的构建目标的选项。

Option Type Description Default
COMMOTION_VERSION String Branch of Commotion to build master
COMMOTION_RELEASE String Commotion release nickname grumpy_cat
DEBUG Bool Create verbose Makefile output False
SKIP_MD5 Bool Skip MD5 checking of downloaded ImageBuilder False
CONFIG String Commotion Router target ubnt
BUILD_IMAGES Bool Toggle building of images True
BUILD_PACKAGES Bool Toggle building of packages True
USE_LOCAL Bool Use locally built packages when building images False
JOBS String Number of parallel compile jobs 2
DL_DIR Filepath Custom download directory CMAKE_CURRENT_BINARY_DIR

CONFIG值必须与存储库中config /内的目录的名称相对应。请参阅下文以了解如何创建新配置。指定的Commotion版本和发行版字符串必须与 http://downloads.commotionwireless.net/router/ 中的存储库结构对应。

例如,要使用默认选项构建映像,请克隆存储库并在其中运行以下内容。

mkdir build
cd build
cmake ..
make

ImageBuilder将被下载并配置为ubnt目标。结果图像将位于build / bin 中。要使用目标栏构建版本1.0的版本foo,打开调试并关闭MD5,您将运行以下操作(这只是一个例子,不会完成):

mkdir build
cd build
cmake -DCOMMOTION_VERSION:String=1.0 -DCOMMOTION_RELEASE:String=foo -DCONFIG:String=bar -DDEBUG:Bool=True -DSKIP_MD5:Bool=True ..
make

用cmake-gui

您可以使用与上述类似的GUI进行构建,但所有配置值都将出现在GUI中。

mkdir build
cd build
cmake-gui ..

选择所需的选项,然后单击配置,然后单击生成。 GUI生成Makefile后,可以运行 make

创建自己的构建配置

特定的构建配置包含在’configs’目录中。要创建新配置,只需创建一个具有所需配置名称的目录。例如,configs / ubnt目录的存在将导致ubnt显示在cmake-gui中的可用配置列表中,’ubnt’是您在命令行中为CONFIG选项提供的cmake 。

有效的配置目录包含自己的CMakeLists.txt文件,它至少定义了变量TARGET,SUBTARGET和PROFILE。以下是有效的configs / ubnt / CMakeLists.txt的内容:

SET(TARGET "ar71xx" PARENT_SCOPE)
SET(SUBTARGET "generic" PARENT_SCOPE)
SET(PROFILE "UBNT" PARENT_SCOPE)

这是分别将变量TARGET,SUBTARGET和PROFILE设置为’ar71xx’,’generic’和’UBNT’的CMake语法。 ‘PARENT_SCOPE’是一个必要的CMake选项,用于确保此信息可用于构建系统。要了解更多关于TARGET,SUBTARGET和PROFILE意味着什么,以及如何找出哪些选择,请参阅 OpenWRT ImageBuilder文档

另外,您可以定义一个PACKAGES变量,以便为此特定配置添加附加包。如果要添加多个,则必须以分号分隔列表的形式提供。例如,要添加包foo和bar:

SET(PACKAGES "foo;bar" PARENT_SCOPE)

您可以删除包,而不要使用减号预先包装包名称。

可选地,该配置也可以提供文件目录。例如,您可能有一个目录’configs / ubnt / files’,其中包含一个文件’configs / ubnt / files / etc / hosts’。该文件将被复制到内置映像中的/ etc / hosts中;任何文件或目录将直接复制到路由器映像的根文件系统中作为最后一步。这对于提供自定义配置文件非常有用,此处的任何文件将覆盖Commotion构建系统或任何软件包提供的任何等效的默认配置文件。

安装说明(Ubiquiti Devices):

http://commotionwireless.net/docs/cck/installing-configuring/install-ubiquiti路由器

< rule =evenoddd =M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-。 45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22 -2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z / path> 安装&amp;使用TFTP(Ubiquiti Devices)恢复:

http://commotionwireless.net/docs/cck/installing-configuring/install -and-recover-tftp

安装说明(其他设备):

有关非Ubiquiti设备的具体安装说明,请参见 OpenWRT硬件表




相关问题推荐