Compare commits

...

13 Commits

Author SHA1 Message Date
b0e9d61731 feat: use emissary 2023.8.25-stable.1853.3d7a094
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2023-08-25 18:59:44 +00:00
f0601b2028 feat: use emissary 2023.8.25-stable.1802.612f18a
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 18:06:34 +00:00
4edf42183f feat: use emissary 2023.8.25-stable.1652.077964c
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 16:59:31 +00:00
f6fd4979d8 ci: do not pull before updating emissary release version
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 10:59:11 -06:00
fca8010604 feat: use emissary v2023.8.25-14eecbf
Some checks failed
arcad/emissary-firmware/pipeline/head There was a failure building this commit
2023-08-25 15:36:04 +00:00
4c6226f47e feat: use emissary v2023.8.25-c51ac0a
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 15:14:08 +00:00
357af4b7cf feat: use emissary v2023.8.25-61ac5e8
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 15:05:04 +00:00
f2993c3667 feat: use emissary v2023.8.25-929394c
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 15:01:23 +00:00
5a3eeca071 ci: limit release to master branch
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-25 07:55:09 -06:00
4af7147a1a feat: use emissary v2023.8.25-a1ec5b8
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2023-08-25 13:29:53 +00:00
bec89173c1 doc: add missing command
Some checks reported errors
arcad/emissary-firmware/pipeline/head Something is wrong with the build of this commit
2023-08-02 06:41:25 -06:00
6f646ce7b7 doc: add firmware compilation tutorial
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2023-07-31 13:25:47 -06:00
9d0064ccfb feat: use emissary v2023.6.25-42d49eb
All checks were successful
arcad/emissary-firmware/pipeline/head This commit looks good
2023-06-25 17:51:13 +00:00
4 changed files with 89 additions and 9 deletions

7
Jenkinsfile vendored
View File

@ -23,6 +23,7 @@ pipeline {
stage('Update emissary release') {
when {
branch 'master'
expression {
return params.emissaryRelease != 'latest'
}
@ -52,7 +53,6 @@ pipeline {
echo '${params.emissaryRelease}' > emissary_release.txt
git add emissary_release.txt
git commit -m "feat: use emissary ${params.emissaryRelease}"
git pull --rebase
git push origin \$(git rev-parse HEAD):${env.GIT_BRANCH}
"""
}
@ -60,7 +60,7 @@ pipeline {
}
}
stage('Build and release') {
stage('Build') {
steps {
script {
withCredentials([
@ -80,6 +80,9 @@ pipeline {
}
stage('Release') {
when {
branch 'master'
}
steps {
withCredentials([
usernamePassword([

View File

@ -1,5 +1,13 @@
# Documentation
## Structure du projet
```shell
doc/ # Documentation technique
install/ # Tâches Make d'installation 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
```
## Tutoriels
- [Premiers pas](./tutorials/first-steps.md)

View File

@ -1,16 +1,85 @@
# Compiler un firmware
> TODO
## Compiler un firmware préconfiguré
L'ensemble des cibles de construction préconfigurés sont disponibles dans le répertoire `targets/`.
Par exemple:
```shell
# Exemple: construire un firmware OpenWRT
# Télécharger localement les dernières archive du projet emissary
make download-emissary-release
# Pour le routeur Linksys WRT1200AC
# Puis...
# ... pour le routeur Linksys WRT1200AC
make linksys-wrt1200ac
# Pour le routeur Linksys WRT1900AC
# ... ou pour le routeur Linksys WRT1900AC
make linksys-wrt1900ac
# Pourt le router Linksys WRT3200ACM
# ... ou pour le routeur Linksys WRT3200ACM
make linksys-wrt3200acm
```
```
## 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).
### Créer la nouvelle tâche Make
1. Dans le répertoire `targets/`, créer le fichier `bananapi.mk`
```shell
touch targets/bananapi.mk
```
2. Éditer le fichier `targets/bananapi.mk` pour créer la nouvelle tâche Make
```makefile
# On ajoute notre nouvelle tâche "bpi-r3" en dépendance de la tâche
# principale "all"
all: bpi-r3
# On créait une nouvelle tâche "bpi-r3" permettant de construire le
# firmware pour notre BananaPi 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="" \
OPENWRT_TARGET="mediatek/filogic" \
EMISSARY_ARCH="arm64" \
OPENWRT_PROFILE="bananapi_bpi-r3" \
build
```
**Explication des variables**
- `OPENWRT_VERSION`: Version d'OpenWRT à utiliser. _Normalement prédéfinie par le fichier `Makefile` principal mais ill est ici nécessaire de surcharger la variable car il n'existe à ce jour pas de version stable d'OpenWRT pour la BananaPi R3._
- `IMAGEBUILDER_URL`: URL à utiliser pour télécharger le "builder" OpenWRT. _Normalement prédéfinie par le fichier `Makefile` principal mais ill est ici nécessaire de surcharger la variable car il n'existe à ce jour pas de version stable d'OpenWRT pour la BananaPi R3._
- `ADDITIONAL_INSTALL`: Tâches Make d'installation supplémentaires à exécuter. Voir section suivante.
- `OPENWRT_TARGET`: "Cible" OpenWRT associée à l'appareil
- `EMISSARY_ARCH`: Architecture du binaire Emissary à déployer dans le firmware
- `OPENWRT_PROFILE`: "Profil" OpenWRT associé à l'appareil
3. Lancer la compilation du firmware
```shell
make bpi-r3
```
Les fichiers du firmware seront générés dans le répertoire `bin/snapshot/mediatek/filogic/bananapi_bpi-r3/`
> 🛈 **Comment trouver les valeurs des variables `OPENWRT_TARGET` et `OPENWRT_PROFILE` ?**
>
> Après avoir trouvé votre appareil sur la [liste de compatibilité d'OpenWRT](https://openwrt.org/toh/start), rechercher l'URL de téléchargement du fichier du firmware, qui devrait ressembler à `https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img.gz`.
>
> La valeur de `OPENWRT_TARGET` est la chaîne comprenant les 2 répertoires juste après `targets/`, ici `mediatek/filogic`.
>
> La valeur de `OPENWRT_PROFILE` est la chaîne comprise entre la cible OpenWRT et le type/extension dans le nom de fichier, ici `bananapi_bpi-r3`.
### Personnaliser votre firmware
Afin de personnaliser votre firmware, vous pouvez déclarer des nouvelles tâches Make dans le répertoire `install/` et ensuite les référencer dans la variable `ADDITIONAL_INSTALL`.
Vous pouvez prendre exemple sur le ficher `install/raspberrypi.mk` qui par exemple déploie des fichiers de configuration UCI par défaut ainsi que des scripts [`uci-defaults`](https://openwrt.org/docs/guide-developer/uci-defaults).

View File

@ -1 +1 @@
v2023.6.23-4217850
2023.8.25-stable.1853.3d7a094