Skip to content

Commit

Permalink
Update files
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoreeq committed Jan 6, 2022
1 parent 902450b commit 127801c
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
openwrt-imagebuilder-*
release
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Turn IoT devices into decentralized network nodes.

* Customizable firmware based on [OpenWrt](https://openwrt.org)
* Turns your device to an [Yggdrasil Network](https://yggdrasil-network.github.io) node
* Supports 802.11s wireless mesh (if there is hardware support)
* Supports 802.11s wireless peer to peer connections (if there is hardware support)
* Wireguard and GRE tunneling
* L2TP/PPPoE/PPTP support
* 3G/LTE USB dongles support
Expand All @@ -19,21 +19,15 @@ Turn IoT devices into decentralized network nodes.

Yggdrasil Network is a peer-to-peer IPv6 network with link-local peer discovery, automatic end-to-end encryption, distributed IP address allocation, and DHT-based routing information exchange.

## How to install on a Raspberry Pi
## Supported devices

Flash the downloaded firmware to the SD card (i.e. /dev/mmcblk0 or /dev/sdb):
This firmware can be installed on any device supported by OpenWrt with at least 16MB flash size and 64MB RAM.

```
gunzip -c openwrt-21.02.1-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz | sudo dd of=/dev/mmcblk0 bs=2M status=progress
```

## Usage
Support for 802.11s wireless peer to peer connections depends on a wireless driver. Most up to date open source drivers work (ath9k, mt76).

Connect your device to a home network and find an IP address of a device called `HyperModem` (it connects via DHCP).
## Installation and usage

Login to the web interface (i.e. http://192.168.1.100) and set the root password.

Configure physical links, install extra OpenWrt packages, do whatever you want with your own *Popura HyperModem ™* mesh node.
Search the OpenWrt website for detailed instructions for your device.

## How to build

Expand All @@ -48,17 +42,22 @@ Run the `build.sh` script with your parameters:

```
# Raspberry Pi 1
TARGET=bcm27xx SUBTARGET=bcm2708 PROFILE=rpi ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2708 PROFILE=rpi FILES="../files/rpi" ./build.sh
# Raspberry Pi 2
TARGET=bcm27xx SUBTARGET=bcm2709 PROFILE=rpi-2 ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2709 PROFILE=rpi-2 FILES="../files/rpi" ./build.sh
# Raspberry Pi 3
TARGET=bcm27xx SUBTARGET=bcm2710 PROFILE=rpi-3 ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2710 PROFILE=rpi-3 FILES="../files/rpi" ./build.sh
# Raspberry Pi 4
TARGET=bcm27xx SUBTARGET=bcm2711 PROFILE=rpi-4 ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2711 PROFILE=rpi-4 FILES="../files/rpi" ./build.sh
```

If you want extra OpenWrt packages, specify them in the `EXTRA_PACKAGES` parameter.
Images also include custom files from the `files` directory.
By default, images include custom files from the `files/generic` directory. Customize that path with the `FILES` parameter.

## Disclaimer

This project is Free (as in freedom) Software based on the stable OpenWrt firmware release.
*Use at your own risk.*
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TARGET=${TARGET:-"bcm27xx"}
SUBTARGET=${SUBTARGET:-"bcm2711"}
PROFILE=${PROFILE:-"rpi-4"}
EXTRA_PACKAGES=${EXTRA_PACKAGES}
FILES=${FILES:-"../files/generic"}

OPENWRT_MIRROR=https://downloads.openwrt.org
OPENWRT_VERSION="21.02.1"
Expand All @@ -27,7 +28,7 @@ if [ ! -d $builder_directory ]; then
fi

cd $builder_directory
make image FILES="../files" PROFILE="$PROFILE" PACKAGES="$PACKAGES"
make image FILES="$FILES" PROFILE="$PROFILE" PACKAGES="$PACKAGES"

echo -e "\n\nSuccess! Your HyperModem firmware:\n"
ls $PWD/bin/targets/$TARGET/$SUBTARGET/*
37 changes: 37 additions & 0 deletions files/asus_rt-ac51u/etc/uci-defaults/98-wireless
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

# 2.4G
uci -q batch << EOF
set wireless.radio1.disabled='0'
set wireless.radio1.channel='11'
set wireless.default_radio1.ssid='OpenWrt'
set wireless.default_radio1.encryption='psk2'
set wireless.default_radio1.key='hypermodem'
set wireless.default_radio1.network='mesh'
set wireless.mesh=wifi-iface
set wireless.mesh.device='radio1'
set wireless.mesh.mode='mesh'
set wireless.mesh.network='mesh'
set wireless.mesh.encryption='none'
set wireless.mesh.mesh_id='meshnet'
set wireless.mesh.mesh_fwding='0'
set wireless.mesh.mesh_rssi_threshold='0'
EOF

# 5G
uci -q batch << EOF
set wireless.radio0.disabled='0'
set wireless.radio0.channel='36'
set wireless.default_radio0.ssid='OpenWrt'
set wireless.default_radio0.encryption='psk2'
set wireless.default_radio0.key='hypermodem'
set wireless.default_radio0.network='mesh'
set wireless.mesh5=wifi-iface
set wireless.mesh5.device='radio0'
set wireless.mesh5.mode='mesh'
set wireless.mesh5.network='mesh'
set wireless.mesh5.encryption='none'
set wireless.mesh5.mesh_id='meshnet'
set wireless.mesh5.mesh_fwding='0'
set wireless.mesh5.mesh_rssi_threshold='0'
EOF
11 changes: 11 additions & 0 deletions files/asus_rt-ac51u/etc/uci-defaults/99-hypermodem
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

uci -q batch << EOF
set system.@system[0].hostname='HyperModem'
EOF

# Create an isolated network for Yggdrasil peerings only
uci -q batch << EOF
set network.mesh=interface
set network.mesh.proto='none'
EOF
13 changes: 0 additions & 13 deletions files/etc/uci-defaults/99-hypermodem

This file was deleted.

11 changes: 11 additions & 0 deletions files/generic/etc/uci-defaults/99-hypermodem
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

uci -q batch << EOF
set system.@system[0].hostname='HyperModem'
EOF

# Create an isolated network for Yggdrasil peerings only
uci -q batch << EOF
set network.mesh=interface
set network.mesh.proto='none'
EOF
6 changes: 6 additions & 0 deletions files/rpi/etc/uci-defaults/97-network
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

uci -q batch << EOF
set network.lan.proto='dhcp'
set dhcp.lan.ignore='1'
EOF
11 changes: 11 additions & 0 deletions files/rpi/etc/uci-defaults/99-hypermodem
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

uci -q batch << EOF
set system.@system[0].hostname='HyperModem'
EOF

# Create an isolated network for Yggdrasil peerings only
uci -q batch << EOF
set network.mesh=interface
set network.mesh.proto='none'
EOF
21 changes: 21 additions & 0 deletions release_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
TARGET=ath79 SUBTARGET=generic PROFILE=tplink_archer-c7-v2 ./build.sh
TARGET=ath79 SUBTARGET=generic PROFILE=tplink_archer-c7-v4 ./build.sh
TARGET=ath79 SUBTARGET=generic PROFILE=tplink_archer-c7-v5 ./build.sh
TARGET=ath79 SUBTARGET=generic PROFILE=tplink_tl-wr1043n-v5 ./build.sh
TARGET=ath79 SUBTARGET=generic PROFILE=tplink_tl-wr1043nd-v4 ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2708 PROFILE=rpi FILES="../files/rpi" ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2709 PROFILE=rpi-2 FILES="../files/rpi" ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2710 PROFILE=rpi-3 FILES="../files/rpi" ./build.sh
TARGET=bcm27xx SUBTARGET=bcm2711 PROFILE=rpi-4 FILES="../files/rpi" ./build.sh
TARGET=sunxi SUBTARGET=cortexa7 PROFILE=xunlong_orangepi-pc FILES="../files/rpi" ./build.sh
TARGET=sunxi SUBTARGET=cortexa7 PROFILE=xunlong_orangepi-zero FILES="../files/rpi" ./build.sh
TARGET=ramips SUBTARGET=mt7620 PROFILE=asus_rt-ac51u FILES="../files/asus_rt-ac51u" ./build.sh
TARGET=ramips SUBTARGET=mt7621 PROFILE=asus_rt-ac57u ./build.sh
TARGET=x86 SUBTARGET=64 PROFILE=generic ./build.sh

[ -d ./release ] || mkdir ./release

for ib_dir in openwrt-imagebuilder-*.Linux-x86_64; do
cp -r $ib_dir/bin/targets ./release
done

0 comments on commit 127801c

Please sign in to comment.