Skip to content

Commit 1f4583f

Browse files
committed
use libremesh.data.js + minor fixes
1 parent 7019328 commit 1f4583f

12 files changed

Lines changed: 174 additions & 73 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ import { generateSidebarItems, getFiles } from './sidebar'
55
const isFork = process.env.IS_FORK === '1'
66
const baseUrl = isFork && '/libremesh.github.io' || ''
77

8-
const libremesh = {
9-
stable_version: '2024.1',
10-
stable_branch_openwrt: ['23.05'],
11-
oldstable_version: '2020.4',
12-
oldstable_branch_openwrt: ['19.07'],
13-
}
14-
158
const packages = await getFiles('docs/packages/*/index.md');
169
const profiles = await getFiles('docs/profiles/packages/*/index.md');
1710
const communities = await getFiles('docs/profiles/communities/*/index.md');
@@ -81,7 +74,7 @@ function nav(): DefaultTheme.NavItem[] {
8174
items: [
8275
{ text: 'v2024.1', link: '/news/2023-10-07' },
8376
{ text: 'v2020.4', link: '/news/2025-05-04' },
84-
{ text: 'Latest Articles', link: '/news' },
77+
{ text: 'Latest Articles', link: '/news/' },
8578
{ text: 'Changelog', link: 'changelog'},
8679
{ text: 'Issues', link: 'https://github.com/libremesh/lime-packages/issues'},
8780
]
@@ -196,8 +189,8 @@ function sidebarReference(): DefaultTheme.SidebarItem[] {
196189
{ text: 'Default protocols',
197190
collapsed: true,
198191
items: [
199-
{ text: 'Batman-adv', link: 'protocols/batman-adv'},
200-
{ text: 'Babeld', link: 'protocols/babeld'},
192+
{ text: 'Batman-adv', link: 'network/protocols/batman-adv'},
193+
{ text: 'Babeld', link: 'network/protocols/babeld'},
201194
]},
202195
{ text: 'lime-files', items: [
203196
{ text: 'System', link: 'system' },

docs/build/buildroot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Refers to the OpenWrt wiki [Build system setup](https://openwrt.org/docs/guide-d
1515
for the package list of other Linux distributions.
1616

1717
### Debian/Ubuntu/Mint
18-
```
18+
```sh
1919
sudo apt update
2020
sudo apt install build-essential clang flex bison g++ gawk \
2121
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \

docs/build/lime-sdk.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
aside: false
33
---
44
# lime-sdk cooker
5+
6+
[[toc]]
7+
58
LibreMesh **software development kit** uses the [OpenWRT](https://openwrt.org) SDK and ImageBuilder to generate (**cook**) LibreMesh packages and firmware. If you want to create your own LibreMesh flavor because you need some specific configuration or you just want to have control over your binaries, the cooker is your friend!
69

710
Basic usage example for cooking a libremesh using bmx7 routing protocol firmware for device Alix Board 2d2 using remote repositories (no compilation required). Recommended for most people:

docs/getting-started.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
outline: deep
3-
---
4-
51
# Getting Started
62

73
## Installation
@@ -19,25 +15,33 @@ Read the OpenWrt's [`8/64 warning`](https://openwrt.org/supported_devices/864_wa
1915
:::
2016

2117
::: warning CAUTION
22-
Ensure to have read the OpenWrt's wiki page for of your device.
23-
Read the installation instruction and ensure to have the necessary hardware equipment - if needed on your device - to install the firmware, like an [USB-UART/Serial adapter](https://openwrt.org/docs/guide-user/installation/generic.flashing.serial) and/or an
18+
Ensure to have read the OpenWrt's wiki page of your device.
19+
Read the installation instruction and ensure to have the necessary hardware equipment - if needed - to install the firmware, like an [USB-UART/Serial adapter](https://openwrt.org/docs/guide-user/installation/generic.flashing.serial) and/or an
2420
[USB-JTAG adapter](https://openwrt.org/docs/techref/hardware/port.jtag)
2521
:::
2622

2723
### Download the firmware
28-
**Download using the Firmware Selector**
24+
---
25+
26+
**Firmware Selector**
2927
The Firmware Selector request a firmware build via an [`ASU`](https://github.com/openwrt/asu) (online ImageBuilder) instance.
3028

3129
https://firmware-selector.libremesh.org
3230

33-
**Download old precompiled versions**
34-
Old releases archive with pre-compiled firmwares via Buildroot are available at:
31+
---
32+
33+
**Precompiled versions**
34+
Old releases archive with pre-compiled firmwares via Buildroot.
3535

3636
https://firmware-libremesh.antennine.org
3737

38+
---
39+
3840
**Build LibreMesh on your host**
3941
Refers the the page [`Build LibreMesh`](/build/) for instructions on how to build LibreMesh on your host.
4042

43+
---
44+
4145
### Install the firmware
4246
Install the firmware on your device following the installation method reported in the [wiki of OpenWrt](https://openwrt.org)
4347
or, if not present, search the instruction in the **`git-commit` message** left from who added the support for that device model. See the [Table of Hardware](https://toh.openwrt.org).
@@ -47,13 +51,13 @@ If your device runs OEM firmware it is adviced to **install OpenWrt first**:
4751
:::
4852

4953
1. Download the latest `stable` firmware for your device from the [`OpenWrt Firmware Selector`](https://firmware-selector.openwrt.org).
50-
Use the `factory` image for first time installation. See the OpenWrt wiki page [Factory Install: First Time Installation](https://openwrt.org/docs/guide-quick-start/factory_installation):
54+
Use the `factory` image for first time installation. See OpenWrt [Factory Install: First Time Installation](https://openwrt.org/docs/guide-quick-start/factory_installation):
5155
2. Check that the OpenWrt device boot and function properly.
5256
Beware that OpenWrt by default doesn't turn on the Wi-Fi.
5357
Turn it on from `LuCi` from the menu `Network` / `Wireless`.
54-
3. Upgrade to LibreMesh using a `sysupgrade` image:
55-
- upload the firmware via the web interface `LuCI` from the menu `System` / `Backup / Flash Firmware`.
56-
- or via ssh using the command `sysupgrade -n firmware.bin`
58+
3. Upgrade to LibreMesh using a `squashfs-sysupgrade.bin` image:
59+
- Upload the firmware via the web interface `LuCI` from the menu `System` / `Backup / Flash Firmware`.
60+
- Or install via ssh using the command `sysupgrade -n firmware.bin`.
5761

5862

5963
## Connecting to the router

docs/guide/packages-selection.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ outline: deep
33
---
44
<script setup>
55
import { data as openwrt } from '/openwrt.data.js'
6+
import { data as libremesh } from '/libremesh.data.js'
67
</script>
78

89
# Packages selection
@@ -37,17 +38,9 @@ For `8/64` devices it should be possible to install a reduced version of the `de
3738
See details of excluded packages at [Flavor Mini](/reference/flavors.md#flavor-mini)
3839
This package list is selectable also by including the network-profile `profile-libremesh-suggested-packages-tiny`.
3940

40-
```
41-
babeld-auto-gw-mode
42-
check-date-http
43-
lime-docs-minimal
44-
lime-hwd-openwrt-wan
45-
lime-proto-anygw
46-
lime-proto-babeld
47-
lime-proto-batadv
48-
shared-state
49-
shared-state-babeld_hosts
50-
```
41+
<ul>
42+
<li v-for="p in libremesh.flavors.mini"><a :href="'/packages/'+p">{{ p }}</a></li>
43+
</ul>
5144

5245
### Excluding packages
5346

docs/libremesh.data.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
export default {
3+
async load() {
4+
// fetch remote data
5+
return {
6+
stable_version: '2024.1',
7+
stable_branch_openwrt: ['23.05'],
8+
oldstable_version: '2020.4',
9+
oldstable_branch_openwrt: ['19.07'],
10+
flavors: {
11+
default: [
12+
"babeld-auto-gw-mode",
13+
"batctl-default",
14+
"check-date-http",
15+
"lime-app",
16+
"lime-debug",
17+
"lime-docs-minimal",
18+
"lime-hwd-ground-routing",
19+
"lime-hwd-openwrt-wan",
20+
"lime-proto-anygw",
21+
"lime-proto-babeld",
22+
"lime-proto-batadv",
23+
"shared-state",
24+
"shared-state-async",
25+
"shared-state-babeld_hosts",
26+
"shared-state-bat_hosts",
27+
"shared-state-nodes_and_links"
28+
],
29+
mini: [
30+
"babeld-auto-gw-mode",
31+
"check-date-http",
32+
"lime-docs-minimal",
33+
"lime-hwd-openwrt-wan",
34+
"lime-proto-anygw",
35+
"lime-proto-babeld",
36+
"lime-proto-batadv",
37+
"shared-state",
38+
"shared-state-babeld_hosts",
39+
"shared-state-nodes_and_links"
40+
]
41+
}
42+
}
43+
}
44+
}

docs/reference/configuration.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,29 @@ The options contained in these files are merged and overwritten from the lowest
2121
├─ lime-node - node configuration
2222
└─ lime-autogen - DO NOT EDIT, autogenerated configuration
2323
```
24-
25-
::: tip Interface specific options
26-
Interface specific options have to be included in `lime-node` or `lime-<MAC>`.
24+
### Sections
25+
The configuration is divided into three main sections:
26+
- `config lime system`
27+
- `config lime network`
28+
- `config lime wifi`
29+
30+
By default followed by radio band specific configurations
31+
- `config lime-wifi-band 2ghz`
32+
- `config lime-wifi-band 5ghz`
33+
34+
Optionally followed by interface specific sections, and protocols specific options
35+
- `config net port1`
36+
- `config wifi radio0` configur
37+
38+
::: tip Interface specific section
39+
Interface specific section have to be included in `lime-node` or `lime-<MAC>`.
2740
:::
2841

42+
Optionally followed by other protocols specific, scripts and uci configs, or hardware_modules
43+
- `config bgp_peer peer1`
44+
- `config generic_uci_config uhttpd_https`
45+
- `config hwd_watchcat periodic_reboot`
46+
2947
### Parametrizable options
3048
Inside `lime-files` the options marked with `Parametrizable with %Mn, %Nn, %H`, can include the templates:
3149
- `%Mn`: replaced by the n'th byte of the **`primary_interface` MAC**

docs/reference/flavors.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
1-
---
2-
outline: deep
3-
---
1+
<script setup>
2+
import { data as libremesh } from '/libremesh.data.js'
3+
</script>
44

55
# Flavors
66

77
## Default flavor
88

99
### Packages list
1010
The LibreMesh default `flavor` contains these packages:
11-
- babeld-auto-gw-mode
12-
- batctl-default
13-
- check-date-http
14-
- lime-app
15-
- lime-debug
16-
- lime-docs
17-
- lime-docs-minimal
18-
- lime-hwd-ground-routing
19-
- lime-hwd-openwrt-wan
20-
- lime-proto-anygw
21-
- lime-proto-babeld
22-
- lime-proto-batadv
23-
- shared-state
24-
- shared-state-babeld_hosts
25-
- shared-state-bat_hosts
26-
- shared-state-nodes_and_links
11+
<ul>
12+
<li v-for="p in libremesh.flavors.default">
13+
<a v-if="!['batctl-default'].includes(p)" :href="'/packages/'+p">{{ p }}</a>
14+
<span v-else>{{ p }}</span>
15+
</li>
16+
</ul>
2717

2818
### Configuration
2919

@@ -85,15 +75,9 @@ The information shared by default depends from shared-state's `publishers` insta
8575
### Packages list
8676
The LibreMesh `mini` flavor contains these packages:
8777

88-
- babeld-auto-gw-mode
89-
- check-date-http
90-
- lime-docs-minimal
91-
- lime-hwd-openwrt-wan
92-
- lime-proto-anygw
93-
- lime-proto-babeld
94-
- lime-proto-batadv
95-
- shared-state
96-
- shared-state-babeld_hosts
78+
<ul>
79+
<li v-for="p in libremesh.flavors.mini"><a :href="'/packages/'+p">{{ p }}</a></li>
80+
</ul>
9781

9882
### Configuration
9983
The configuration is the same as the one of the default flavor.

docs/reference/network/protocols-list.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,12 @@ uci get lime-autogen.network.protocols
4747

4848
```
4949
list protocols batadv:%N1
50-
# list protocols batadv:0
5150
```
5251
If the vlan is `0` tags are disabled and the routing is done on the raw interface.
52+
```
53+
list protocols batadv:0
54+
```
55+
5356
::: tip
5457
See the page about [batman-adv](protocols/batman-adv) for the default configuration.
5558
:::

docs/reference/network/protocols/babeld.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,34 @@ config filter 'denyany'
5858
option type 'redistribute'
5959
option action 'deny'
6060
61+
```
62+
63+
## Examples
64+
65+
---
66+
67+
### ubus
68+
69+
**list commands**
70+
```
71+
ubus -v list babeld
72+
'babeld' @98e57cc3
73+
"add_interface":{"ifname":"String"}
74+
"add_filter":{"ifname":"String","type":"Integer","metric":"Integer"}
75+
"get_info":{}
76+
"get_xroutes":{}
77+
"get_routes":{}
78+
"get_neighbours":{}
79+
```
80+
---
81+
82+
**get_info**
83+
```
84+
ubus call babeld get_info
85+
{
86+
"babeld_version": "babeld-1.13.1-ubus-mod",
87+
"my_id": "22:05:b7:ff:fe:00:04:80",
88+
"host": "openwrt"
89+
}
90+
6191
```

0 commit comments

Comments
 (0)