Compare commits
12 Commits
2d0d0d689d
...
666a180c5d
Author | SHA1 | Date |
---|---|---|
wpetit | 666a180c5d | |
wpetit | 8e2fd0834a | |
lseys | 315c86d3cd | |
lseys | 4a1df86d06 | |
lseys | 992f8903c8 | |
lseys | ec3ded9054 | |
lseys | 95494b5278 | |
lseys | 46b5a4950e | |
wpetit | a1583dd076 | |
wpetit | 5a3eeca071 | |
Jenkins | 4af7147a1a | |
wpetit | bec89173c1 |
|
@ -23,6 +23,7 @@ pipeline {
|
||||||
|
|
||||||
stage('Update emissary release') {
|
stage('Update emissary release') {
|
||||||
when {
|
when {
|
||||||
|
branch 'master'
|
||||||
expression {
|
expression {
|
||||||
return params.emissaryRelease != 'latest'
|
return params.emissaryRelease != 'latest'
|
||||||
}
|
}
|
||||||
|
@ -60,7 +61,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build and release') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
|
@ -80,6 +81,9 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Release') {
|
stage('Release') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
usernamePassword([
|
usernamePassword([
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -15,8 +15,8 @@ BIN_DIR_NAME_SUFFIX ?=
|
||||||
|
|
||||||
IMAGEBUILDER_URL ?= https://downloads.openwrt.org/releases/$(OPENWRT_VERSION)/targets/$(OPENWRT_TARGET)/openwrt-imagebuilder-$(OPENWRT_VERSION)-$(OPENWRT_TARGET_DASHED).Linux-x86_64.tar.xz
|
IMAGEBUILDER_URL ?= https://downloads.openwrt.org/releases/$(OPENWRT_VERSION)/targets/$(OPENWRT_TARGET)/openwrt-imagebuilder-$(OPENWRT_VERSION)-$(OPENWRT_TARGET_DASHED).Linux-x86_64.tar.xz
|
||||||
|
|
||||||
IMAGEBUILDER_ARCHIVE_PATH := tmp/imagebuilder-$(OPENWRT_VERSION)-$(OPENWRT_TARGET_DASHED).tar.xz
|
IMAGEBUILDER_ARCHIVE_PATH ?= tmp/imagebuilder-$(OPENWRT_VERSION)-$(OPENWRT_TARGET_DASHED).tar.xz
|
||||||
IMAGEBUILDER_DIR_PATH := $(PWD)/imagebuilder/$(OPENWRT_VERSION)/$(OPENWRT_TARGET)
|
IMAGEBUILDER_DIR_PATH ?= $(PWD)/imagebuilder/$(OPENWRT_VERSION)/$(OPENWRT_TARGET)
|
||||||
IMAGEBUILDER_CUSTOM_PACKAGES_DIR_PATH := $(IMAGEBUILDER_DIR_PATH)/packages
|
IMAGEBUILDER_CUSTOM_PACKAGES_DIR_PATH := $(IMAGEBUILDER_DIR_PATH)/packages
|
||||||
IMAGEBUILDER_CUSTOM_FILES_DIR_PATH := $(IMAGEBUILDER_DIR_PATH)/files
|
IMAGEBUILDER_CUSTOM_FILES_DIR_PATH := $(IMAGEBUILDER_DIR_PATH)/files
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,13 @@ install/ # Tâches Make d'installation spécifiques aux différentes cibles d
|
||||||
misc/ # Fichiers spécifiques aux différentes cibles de construction
|
misc/ # Fichiers spécifiques aux différentes cibles de construction
|
||||||
targets/ # Tâches Make de définition des différentes cibles de construction
|
targets/ # Tâches Make de définition des différentes cibles de construction
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tutoriels
|
## Tutoriels
|
||||||
|
|
||||||
- [Premiers pas](./tutorials/first-steps.md)
|
- [Premiers pas](./tutorials/first-steps.md)
|
||||||
- [Compiler un firmware](./tutorials/firmware-compilation.md)
|
- [Compiler un firmware](./tutorials/firmware-compilation.md)
|
||||||
- [Flasher une borne](./tutorials/device-flashing.md)
|
- [Flasher une borne](./tutorials/device-flashing.md)
|
||||||
|
|
||||||
|
## Fiches matériel
|
||||||
|
|
||||||
|
- [Banana Pi](./hardware/bananapi.md)
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
# BananaPi
|
||||||
|
|
||||||
|
![banana-rpi3](./../img/bpi-r3-case.jpg)
|
||||||
|
|
||||||
|
## Caractéristiques
|
||||||
|
|
||||||
|
- MediaTek MT7986(Filogic 830) Quad core ARM Cortex A53
|
||||||
|
- Wifi 6 2.4G/5G(MT7976C)
|
||||||
|
- 2G DDR RAM
|
||||||
|
- 8G eMMC flash
|
||||||
|
- 128MB Nand flash
|
||||||
|
- 2x 2.5GbE network port
|
||||||
|
- 1x M.2 Key B USB inerface
|
||||||
|
- 1x M.2 KEY M PCIe inerface
|
||||||
|
- 1x USB2.0 interface
|
||||||
|
- 1x Wan port (gigabit)
|
||||||
|
- 4x LAN port (gigabit)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Par défaut la borne est sans OS, donc impossible de flasher selon la méthode conventionnel.
|
||||||
|
|
||||||
|
bpi fournit un soft permettant de prendre un .img et de le mettre en place dans une carte SD.
|
||||||
|
|
||||||
|
### Installation bpi-tools
|
||||||
|
|
||||||
|
Il est conseillé d'installer pv auparavant pour plus de commodité. (disponibilité ubunut et manjaro validé)
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
apt-get install pv
|
||||||
|
```
|
||||||
|
|
||||||
|
Installer bpi-tools sur votre machine, si vous ne pouvez accéder à l'url via curl, ce rendre sur le repo bpi-tools et le faire manuellement.
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installation firmware avec emissary
|
||||||
|
|
||||||
|
Dans notre exemple nous partons d'une image openwrt avec emissary nommé: ```openwrt-22.03.2-emissary-v2023.08.02-bec8917-bcm27xx-bcm2711-rpi-4-squashfs-factory.img```
|
||||||
|
|
||||||
|
1. télécharger l'image depuis la [forge cadoles](https://forge.cadoles.com/arcad/emissary-firmware/releases)
|
||||||
|
Une fois téléchargé vous avez un .gz.</br>
|
||||||
|
2. extraire : ```gunzip openwrt-**-emissary-***-****-**-**-rpi-4-squashfs-factory.img.gz```
|
||||||
|
3. Ce placer dans le dossier contenant le fichier .img
|
||||||
|
4. Brancher la SDcard à votre machine. Pour valider/vérifier son appelation vous pouvez utiliser ```dmesg``` et observer les dernières lignes. (en générale /dev/sda)
|
||||||
|
5. Valider le chemin d'accès à la SDcard ( /dev/sd...)
|
||||||
|
6. Lancer la copie sur SDcard avec bpi-copy.
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
sudo bpi-copy openwrt-22.03.2-emissary-v2023.08.02-bec8917-bcm27xx-bcm2711-rpi-4-squashfs-factory.img /dev/sda
|
||||||
|
```
|
||||||
|
|
||||||
|
vous aurez un résultat ressemblant à :
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
==============================================================
|
||||||
|
jeu. 03 août 2023 10:09:12 CEST
|
||||||
|
*** start COPY (blue led on ) .....
|
||||||
|
umount device: /dev/sda
|
||||||
|
umount /dev/sda1
|
||||||
|
umount /dev/sda2
|
||||||
|
==============================================================
|
||||||
|
IMGFILE=openwrt-22.03.2-emissary-v2023.08.02-bec8917-bcm27xx-bcm2711-rpi-4-squashfs-factory.img
|
||||||
|
==============================================================
|
||||||
|
img
|
||||||
|
8+1 enregistrements lus
|
||||||
|
8+1 enregistrements écrits
|
||||||
|
90475842 octets (90 MB, 86 MiB) copiés, 0,130052 s, 696 MB/s
|
||||||
|
86,3MiO 0:00:00 [ 648MiO/s] [ <=> ]
|
||||||
|
0+1381 enregistrements lus
|
||||||
|
0+1381 enregistrements écrits
|
||||||
|
*** end COPY (blue led off) .....
|
||||||
|
jeu. 03 août 2023 10:09:18 CEST
|
||||||
|
==============================================================
|
||||||
|
RUNTIME 0:6
|
||||||
|
OK!! You can remove the BOOTDISK /dev/sda now!!
|
||||||
|
```
|
||||||
|
|
||||||
|
Une fois finie, retirer la carte SD, vous pouvez dès à présent la placer dans votre boitier de destination.
|
||||||
|
|
||||||
|
Une fois la carte flashé, vérifier que le switch à tout ces jumpers vers le haut, (sélection du boot), insérer la carte SD, puis brancher la borne.
|
||||||
|
|
||||||
|
Vous pourrez vous brancher sur un port LAN du boitier qui délivrera du dhcp afin d'utiliser ssh pour y accéder.
|
||||||
|
|
||||||
|
### OS pour banana-bpi fournit par bpi
|
||||||
|
|
||||||
|
Installation d'openwrt fait pour bpi-r3, pour cela flasher une carte SD avec le fichier ```bananapi_bpi-r3-sdcard.img.gz``` fournit par openwrt [sur leur site page download](https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/). Sinon aller dans les téléchargement et ce rendre à l'emplacement suivant :
|
||||||
|
|
||||||
|
![img](./../img/bpi-r3-download.png)
|
||||||
|
|
||||||
|
### Flasher la carte avec le firware Openwrt de bpi
|
||||||
|
|
||||||
|
1. télécharger l'image depuis le liens précédent. Une fois téléchargé vous avez un .gz.</br>
|
||||||
|
2. extraire : ```gunzip bananapi_****.img.gz```
|
||||||
|
3. Ce placer dans le dossier contenant le fichier .img
|
||||||
|
4. Brancher la SDcard à votre machine. Pour valider/vérifier son appelation vous pouvez utiliser dmesg et observer les dernières lignes. (en générale sda)
|
||||||
|
5. Valider le chemin d'accès à la SDcard (souvent /dev/sd...)
|
||||||
|
6. Lancer la copie sur SDcard avec bpi-copy.
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
sudo bpi-copy bananapi_bpi-r3-sdcard.img /dev/sda
|
||||||
|
```
|
||||||
|
|
||||||
|
Une fois la carte flashé, vérifier que le switch à tout ces jumpers vers le haut, (sélection du boot), insérer la carte SD, puis brancher la borne.
|
||||||
|
|
||||||
|
Votre carte réseau doit être paramétré ainsi :
|
||||||
|
|
||||||
|
- dans le réseau 192.168.1.0/24
|
||||||
|
- sur la passerelle 192.168.1.1
|
||||||
|
|
||||||
|
Brancher votre câble RJ45 sur le port VLAN1, et connectez vous en ssh.(temps de boot moins de 30 secondes)
|
||||||
|
|
||||||
|
```Shell
|
||||||
|
ssh root@192.168.1.1
|
||||||
|
```
|
||||||
|
|
||||||
|
pour la première connexion il n'y a pas de mot de passe.
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
### Comment sélectionner le boot système ?
|
||||||
|
|
||||||
|
Il y a un switch de quatre jumper à manipuler pour sélectionner le choix de boot. Par défaut ils sont tous en haut, définissant le boot sur la carte microSD.
|
||||||
|
|
||||||
|
![switch](./../img/bpi-r3-switch.png)
|
||||||
|
|
||||||
|
### Quels sont les noms des périphériques réseau ?
|
||||||
|
|
||||||
|
Par défaut les périphériques réseau sont ainsi disposé et nommé:
|
||||||
|
|
||||||
|
![Lan](./../img/bpi-r3-lan-pic.jpg)
|
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -7,7 +7,12 @@ L'ensemble des cibles de construction préconfigurés sont disponibles dans le r
|
||||||
Par exemple:
|
Par exemple:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Pour le routeur Linksys WRT1200AC...
|
# Télécharger localement les dernières archive du projet emissary
|
||||||
|
make download-emissary-release
|
||||||
|
|
||||||
|
# Puis...
|
||||||
|
|
||||||
|
# ... pour le routeur Linksys WRT1200AC
|
||||||
make linksys-wrt1200ac
|
make linksys-wrt1200ac
|
||||||
|
|
||||||
# ... ou pour le routeur Linksys WRT1900AC
|
# ... ou pour le routeur Linksys WRT1900AC
|
||||||
|
@ -16,6 +21,7 @@ make linksys-wrt1900ac
|
||||||
# ... ou pour le routeur Linksys WRT3200ACM
|
# ... ou pour le routeur Linksys WRT3200ACM
|
||||||
make linksys-wrt3200acm
|
make linksys-wrt3200acm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Créer une nouvelle cible de construction
|
## Créer une nouvelle cible de construction
|
||||||
|
|
||||||
Dans ce tutoriel, nous allons voir comment créer une nouvelle cible de construction pour un nouvel appareil, ici un [Banana Pi R3](https://wiki.banana-pi.org/Banana_Pi_BPI-R3).
|
Dans ce tutoriel, nous allons voir comment créer une nouvelle cible de construction pour un nouvel appareil, ici un [Banana Pi R3](https://wiki.banana-pi.org/Banana_Pi_BPI-R3).
|
||||||
|
@ -57,7 +63,15 @@ Dans ce tutoriel, nous allons voir comment créer une nouvelle cible de construc
|
||||||
- `EMISSARY_ARCH`: Architecture du binaire Emissary à déployer dans le firmware
|
- `EMISSARY_ARCH`: Architecture du binaire Emissary à déployer dans le firmware
|
||||||
- `OPENWRT_PROFILE`: "Profil" OpenWRT associé à l'appareil
|
- `OPENWRT_PROFILE`: "Profil" OpenWRT associé à l'appareil
|
||||||
|
|
||||||
3. Lancer la compilation du firmware
|
3. Préparation.
|
||||||
|
|
||||||
|
Lancer la commande suivante pour télécharger (ou mettre à jours) les bon tar.gz nécessaire à la construction du firmware. Si cette commande n'a pas été lancée au moins une fois, vous ne pourrez pas construire le/les firmware.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
make download-emissary-release
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Lancer la compilation du firmware
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
make bpi-r3
|
make bpi-r3
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v2023.6.25-42d49eb
|
v2023.8.25-a1ec5b8
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
install-bpi-r3-network-config:
|
||||||
|
mkdir -p files/etc/config
|
||||||
|
cp misc/bpi-r3/uci/network files/etc/config/network
|
|
@ -0,0 +1,24 @@
|
||||||
|
config interface 'lan'
|
||||||
|
option type 'bridge'
|
||||||
|
option proto 'static'
|
||||||
|
option ipaddr '192.168.1.1'
|
||||||
|
option netmask '255.255.255.0'
|
||||||
|
list ports 'lan1'
|
||||||
|
list ports 'lan2'
|
||||||
|
list ports 'lan3'
|
||||||
|
list ports 'lan4'
|
||||||
|
list ports 'sfp2'
|
||||||
|
option ip6assign '60'
|
||||||
|
|
||||||
|
config interface 'wan'
|
||||||
|
option type 'bridge'
|
||||||
|
list ports 'eth1'
|
||||||
|
list ports 'wan'
|
||||||
|
option proto 'dhcp'
|
||||||
|
|
||||||
|
config device
|
||||||
|
config interface 'loopback'
|
||||||
|
option device 'lo'
|
||||||
|
option proto 'static'
|
||||||
|
option ipaddr '127.0.0.1'
|
||||||
|
option netmask '255.0.0.0'
|
|
@ -8,7 +8,7 @@ ARG https_proxy=
|
||||||
# Install dev environment dependencies
|
# Install dev environment dependencies
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive &&\
|
RUN export DEBIAN_FRONTEND=noninteractive &&\
|
||||||
apt-get update -y &&\
|
apt-get update -y &&\
|
||||||
apt-get install -y --no-install-recommends curl ca-certificates build-essential wget unzip tar git jq gawk python3 rsync file
|
apt-get install -y --no-install-recommends curl ca-certificates build-essential wget unzip tar git jq gawk python3 rsync file python3-distutils
|
||||||
|
|
||||||
# Add LetsEncrypt certificates
|
# Add LetsEncrypt certificates
|
||||||
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
|
@ -0,0 +1,12 @@
|
||||||
|
all: bpi-r3
|
||||||
|
|
||||||
|
bpi-r3:
|
||||||
|
$(MAKE) \
|
||||||
|
OPENWRT_VERSION="snapshot" \
|
||||||
|
IMAGEBUILDER_URL=https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-imagebuilder-mediatek-filogic.Linux-x86_64.tar.xz \
|
||||||
|
ADDITIONAL_INSTALL="install-bpi-r3-network-config" \
|
||||||
|
ADDITIONAL_OPENWRT_PACKAGES="block-mount kmod-fs-ext4 kmod-usb-storage kmod-usb2" \
|
||||||
|
OPENWRT_TARGET="mediatek/filogic" \
|
||||||
|
EMISSARY_ARCH="arm64" \
|
||||||
|
OPENWRT_PROFILE="bananapi_bpi-r3" \
|
||||||
|
build
|
Loading…
Reference in New Issue