🚀 Implémenter le MOCHAbin de GlobalScale dans Armbian 📖 Introduction Le MOCHAbin de GlobalScale Technologies est une carte de développement basée sur le SoC Marvell Armada 7040 (quad-core ARM Cortex-A72 @ 1.4GHz). C’est l’évolution de l’ESPRESSObin avec des capacités réseau avancées : WiFi 6, 5G, et connectivité Multi-Gigabit.
Ce guide explique comment ajouter le support du MOCHAbin dans le framework de build Armbian.
🎯 Spécifications du MOCHAbin 💻 Caractéristiques matérielles
Composant
Spécification
🔧 SoC
Marvell Armada 7040
⚡ CPU
4x ARM Cortex-A72 @ 1.4 GHz
💾 RAM
4GB ou 8GB DDR4
🌐 Réseau
4x GbE + 1x WAN PoE
📡 SFP
1x SFP + 1x SFP+ (10GbE)
💿 Stockage
M.2 SATA + SATA + eMMC
📶 Sans fil
WiFi 6 (802.11ax) + Bluetooth 5
📱 Cellulaire
Support 4G/5G via M.2
🔌 Expansion
PCIe + Mini-PCIe
🔍 État actuel du support ✅ Support Mainline Linux Le support du MOCHAbin a été intégré dans le kernel Linux mainline avec le fichier Device Tree armada-7040-mochabin.dts.
⚠️ Support Armbian Actuellement, le MOCHAbin n’est pas officiellement supporté par Armbian. Il existe une discussion sur le forum Armbian pour ajouter le support du MOCHAbin, mais aucune configuration officielle n’est disponible.
🛠️ Étapes pour ajouter le MOCHAbin à Armbian 1️⃣ Prérequis 1 2 3 4 5 6 7 git clone https://github.com/armbian/build.git cd buildsudo apt-get update sudo apt-get install -y git
2️⃣ Créer la configuration de la carte Créez le fichier de configuration pour le MOCHAbin :
1 2 nano config/boards/mochabin.conf
Contenu du fichier mochabin.conf :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 BOARD_NAME="GlobalScale MOCHAbin" BOARDFAMILY="mvebu64" BOARD_MAINTAINER="votre-github-id" BOOTCONFIG="mvebu_mochabin-88f7040_defconfig" KERNEL_TARGET="current,edge" FULL_DESKTOP="no" BOOT_LOGO="desktop" BOOT_FDT_FILE="marvell/armada-7040-mochabin.dtb" SERIALCON="ttyS0:115200n8" MODULES="ahci mv_xor mvneta mvpp2" MODULES_CURRENT="ahci mv_xor mvneta mvpp2" PACKAGE_LIST_BOARD="ethtool" BOARD_FIRMWARE_INSTALL="-full"
3️⃣ Vérifier le Device Tree Le Device Tree du MOCHAbin doit être présent dans le kernel Linux :
1 2 3 4 5 ls -la cache/sources/linux-mainline/*/arch/arm64/boot/dts/marvell/ | grep mochabin
4️⃣ Configuration U-Boot (optionnel) Si U-Boot nécessite une configuration spécifique :
1 2 3 4 mkdir -p patch/u-boot/u-boot-mvebu64/
5️⃣ Ajouter la famille de carte (si nécessaire) Si la famille mvebu64 n’existe pas encore, créez-la :
1 2 3 4 5 ls config/sources/families/nano config/sources/families/mvebu64.conf
Contenu de mvebu64.conf :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ARCH=arm64 BOOTSCRIPT="boot-mvebu.cmd:boot.cmd" BOOTENV_FILE="mvebu.txt" UBOOT_TARGET_MAP=";;flash-image.bin u-boot.bin" BOOTDELAY=3 BOOTBRANCH='tag:v2024.01' ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware' ATFDIR='arm-trusted-firmware' ATFBRANCH='tag:v2.10' ATF_PLAT="a70x0" ATF_TARGET_MAP='USE_COHERENT_MEM=0 LOG_LEVEL=20 CLOCKSPRESET=CPU_1400_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 BL33=$UBOOT_PATH/u-boot.bin all fip;;build/a70x0/release/flash-image.bin' KERNELSOURCE='https://github.com/torvalds/linux' KERNELBRANCH='branch:linux-6.6.y' LINUXFAMILY=mvebu64
6️⃣ Compilation Lancez la compilation pour le MOCHAbin :
1 2 3 4 5 6 7 8 9 10 11 12 ./compile.sh ./compile.sh \ BOARD=mochabin \ BRANCH=current \ RELEASE=noble \ BUILD_MINIMAL=yes \ BUILD_DESKTOP=no \ KERNEL_CONFIGURE=no \ TMPDIR=/tmp/armbian-build
7️⃣ Options de compilation avancées 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ./compile.sh \ BOARD=mochabin \ BRANCH=edge \ RELEASE=bookworm \ KERNEL_CONFIGURE=yes ./compile.sh \ BOARD=mochabin \ BRANCH=current \ RELEASE=noble \ BUILD_DESKTOP=yes \ DESKTOP_ENVIRONMENT=xfce ./compile.sh \ BOARD=mochabin \ BRANCH=current \ RELEASE=noble \ BUILD_MINIMAL=yes \ CLEAN_LEVEL="" \ KERNEL_ONLY=no \ INSTALL_HEADERS=yes
📋 Configuration Device Tree spécifique 🔧 Personnalisation du DTS Si vous devez modifier le Device Tree pour des besoins spécifiques :
1 2 3 mkdir -p patch/kernel/mvebu64-current/nano patch/kernel/mvebu64-current/mochabin-custom.patch
Exemple de patch pour activer des fonctionnalités :
1 2 3 4 5 6 7 8 @@ -XX,X +XX,X @@ +// Ajoutez vos modifications ici +&spi0 { + status = "okay"; +};
🌐 Configuration réseau 📡 Configuration des interfaces Ethernet Le MOCHAbin dispose de plusieurs interfaces réseau qui doivent être configurées :
1 2 3 4 5 6 7 8 9 10 11 auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.1.1 netmask 255.255.255.0 auto lan1 lan2 lan3 lan4
🔧 Configuration SFP/SFP+ 1 2 3 4 5 6 apt-get install ethtool sfputil ethtool -m eth2 ethtool -m eth3
🚨 Problèmes courants et solutions ❌ Erreur : Device Tree non trouvé 1 2 3 4 5 6 BOOT_FDT_FILE="marvell/armada-7040-mochabin.dtb" KERNEL_CONFIGURE=yes
❌ Erreur : U-Boot ne démarre pas 1 2 3 4 5 6 7 git clone https://github.com/pali/mvebu64boot cd mvebu64bootmake ./mvebu64boot -t -b u-boot.bin /dev/ttyUSB0
❌ Erreur : Interfaces réseau non détectées 1 2 3 4 5 6 modprobe mvpp2 modprobe mvneta MODULES_CURRENT="mvpp2 mvneta mv_xor ahci"
📦 Création d’une Pull Request 🎯 Contribuer au projet Armbian Une fois votre configuration testée et fonctionnelle :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 git checkout -b add-mochabin-support git add config/boards/mochabin.conf git add config/sources/families/mvebu64.conf git commit -m "Add GlobalScale MOCHAbin board support - Add board configuration for MOCHAbin - Based on Marvell Armada 7040 SoC - Support for 4GB and 8GB RAM variants - Multi-gigabit networking support - Tested with kernel 6.6.x" git push origin add-mochabin-support
📋 Checklist pour la PR
✅ Configuration de la carte testée et fonctionnelle
✅ Device Tree présent dans le kernel mainline
✅ Documentation ajoutée
✅ Support pour multiples variantes (4GB/8GB)
✅ Maintainer déclaré avec GitHub ID
✅ Tests effectués sur matériel réel
✅ Screenshots / logs de boot fournis
🔗 Ressources complémentaires 📚 Documentation
🌐 Liens utiles
🛠️ Outils de développement 1 2 3 4 5 6 7 8 9 git clone https://github.com/pali/mvebu64boot git clone https://github.com/u-boot/u-boot git clone https://github.com/ARM-software/arm-trusted-firmware
💡 Cas d’usage du MOCHAbin 🏠 Applications
🌐 Routeur/Firewall performant : 10GbE + 5G/LTE
🔒 VPN Gateway : OpenVPN, WireGuard
📦 NAS distribué : Cubbit, NextCloud
🐳 Plateforme Docker : Container hosting
📡 Point d’accès WiFi 6 : AP Controller
🔍 IDS/IPS : Suricata, Snort
📊 Network Monitoring : PRTG, Zabbix
1 2 3 4 5 6 7 iperf3 -c server_ip -t 60
🎯 Conclusion L’ajout du support MOCHAbin dans Armbian permet de bénéficier :
✅ Écosystème Armbian : Mises à jour, outils, communauté
✅ Kernel récent : Support mainline Linux
✅ Personnalisation : Build framework flexible
✅ Support communautaire : Forums, documentation
✅ Images optimisées : Pour serveur ou desktop
Le MOCHAbin est une excellente plateforme pour les applications réseau avancées, et son intégration dans Armbian facilite grandement son déploiement et sa maintenance.
📝 Exemple de session de build 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 mkdir ~/armbian-mochabincd ~/armbian-mochabingit clone https://github.com/armbian/build.git cd build./compile.sh \ BOARD=mochabin \ BRANCH=current \ RELEASE=noble \ BUILD_MINIMAL=yes \ KERNEL_CONFIGURE=no \ TMPDIR=/tmp/armbian-build ls -lh output/images/sudo dd if =output/images/Armbian_*.img of=/dev/sdX bs=4M status=progress sync
💾 Flasher Armbian depuis U-Boot sur MOCHAbin 📋 Méthodes disponibles
TFTP - Flasher via réseau (recommandé)
USB - Flasher depuis clé USB
UART - Flasher via console série (lent)
🌐 Méthode 1 : Flash via TFTP (Recommandé) Prérequis Sur votre PC Linux :
1 2 3 4 5 sudo apt-get install tftpd-hpa sudo nano /etc/default/tftpd-hpa
Contenu de /etc/default/tftpd-hpa :
1 2 3 4 TFTP_USERNAME="tftp" TFTP_DIRECTORY="/srv/tftp" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="--secure"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 sudo mkdir -p /srv/tftp sudo chmod 777 /srv/tftp cd output/images/unxz Armbian_*.img.xz sudo cp Armbian_*.img /srv/tftp/armbian-mochabin.img sudo systemctl restart tftpd-hpa sudo systemctl status tftpd-hpa sudo ip addr add 192.168.1.10/24 dev eth0
Depuis U-Boot 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 sudo screen /dev/ttyUSB0 115200 Hit any key to stop autoboot: Marvell>> setenv ipaddr 192.168.1.100 setenv serverip 192.168.1.10 setenv netmask 255.255.255.0 ping ${serverip} tftp 0x10000000 armbian-mochabin.img mmc dev 1 mmc write 0x10000000 0 0x200000 mmc dev 0 mmc write 0x10000000 0 0x200000 reset
Notes importantes pour TFTP 1 2 3 4 5 6 7 8 9 10 11 ls -lh /srv/tftp/armbian-mochabin.img
💿 Méthode 2 : Flash via USB Prérequis Préparer une clé USB :
1 2 3 4 5 6 7 8 9 10 sudo mkfs.ext2 /dev/sdc1 sudo mount /dev/sdc1 /mnt sudo cp output/images/Armbian_*.img /mnt/armbian.img sudo umount /mnt sudo eject /dev/sdc
Depuis U-Boot 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Marvell>> usb start usb storage usb part ext2ls usb 0:1 / ext2size usb 0:1 /armbian.img ext2load usb 0:1 0x10000000 /armbian.img mmc dev 1 mmc write 0x10000000 0 0x200000 reset
🔌 Méthode 3 : Flash via UART (mvebu64boot) Prérequis Sur votre PC :
1 2 3 4 5 6 7 git clone https://github.com/pali/mvebu64boot cd mvebu64bootmake sudo cp mvebu64boot /usr/local/bin/
Utilisation 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ./mvebu64boot -t -b /path/to/flash-image.bin /dev/ttyUSB0
Note : Cette méthode flash uniquement le bootloader, pas l’image complète.
🔧 Méthode 4 : Flash partiel (Boot + Rootfs) Flash en deux étapes Étape 1 : Flash le bootloader 1 2 3 4 5 6 7 8 9 10 11 12 13 Marvell>> tftp 0x10000000 u-boot-mochabin.bin sf probe sf erase 0 0x400000 sf write 0x10000000 0 ${filesize} mmc dev 0 mmc write 0x10000000 0 0x800
Étape 2 : Flash le rootfs 1 2 3 4 5 6 7 8 Marvell>> tftp 0x10000000 rootfs.ext4 mmc dev 0 mmc write 0x10000000 0x10000 0x1F0000
📦 Méthode 5 : Flash par parties (pour grosses images) Si votre image est trop grosse pour la RAM :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Marvell>> setenv ipaddr 192.168.1.100 setenv serverip 192.168.1.10 mmc dev 0 mmc erase 0 0x800000 tftp 0x10000000 armbian-mochabin.img.part1 mmc write 0x10000000 0 0x100000 tftp 0x10000000 armbian-mochabin.img.part2 mmc write 0x10000000 0x100000 0x100000 tftp 0x10000000 armbian-mochabin.img.part3 mmc write 0x10000000 0x200000 0x100000
Préparer les parties sur le PC :
1 2 3 4 5 split -b 128M armbian-mochabin.img armbian-mochabin.img.partsudo cp armbian-mochabin.img.part* /srv/tftp/
🔍 Vérifications après flash Vérifier l’intégrité 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Marvell>> mmc dev 0 mmc read 0x10000000 0 100 md 0x10000000 mmc part
Premier boot après flash 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Marvell>> reset mmc dev 0 run bootcmd mmc dev 0 ext4load mmc 0:1 0x02080000 /boot/Image ext4load mmc 0:1 0x01000000 /boot/dtb/marvell/armada-7040-mochabin.dtb ext4load mmc 0:1 0x06000000 /boot/uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rw" booti 0x02080000 0x06000000 0x01000000
🚨 Dépannage Erreur : “TFTP timeout” 1 2 3 4 5 6 7 8 9 10 11 12 ping ${serverip} sudo systemctl status tftpd-hpa sudo ufw allow 69/udp tftp 192.168.1.10 tftp> get test.txt
Erreur : “MMC: no card present” 1 2 3 4 5 6 7 8 9 mmc rescan mmc list mmc dev 1 mmc info
Erreur : “USB device not found” 1 2 3 4 5 6 7 8 usb reset usb start usb tree
Mémoire insuffisante 1 2 3 4 5 6 7 8 bdinfo tftp 0x20000000 armbian-mochabin.img
📊 Script automatique de flash TFTP Créer un script U-Boot 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 setenv ipaddr 192.168.1.100 setenv serverip 192.168.1.10 setenv netmask 255.255.255.0 echo "Testing network..." ping ${serverip} echo "Downloading image..." tftp 0x10000000 armbian-mochabin.img echo "Erasing MMC..." mmc dev 0 mmc erase 0 0x800000 echo "Writing to MMC..." mmc write 0x10000000 0 0x400000 echo "Done! Rebooting..." reset
Utiliser le script
🎯 Résumé - Commandes Flash rapide TFTP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 sudo apt-get install tftpd-hpa sudo mkdir -p /srv/tftp sudo cp armbian.img /srv/tftp/ sudo systemctl restart tftpd-hpa sudo ip addr add 192.168.1.10/24 dev eth0 setenv ipaddr 192.168.1.100 setenv serverip 192.168.1.10 ping ${serverip} tftp 0x10000000 armbian.img mmc dev 0 mmc write 0x10000000 0 0x400000 reset tftp 0x10000000 armbian.img mmc dev 1 mmc write 0x10000000 0 0x400000 reset
💡 Conseils ✅ Bonnes pratiques
🔒 Sauvegardez toujours avant de flasher
🧪 Testez d’abord sur SD avant eMMC
📊 Vérifiez la taille de l’image vs RAM disponible
🌐 Utilisez un câble Ethernet de qualité
⚡ Assurez-vous que l’alimentation est stable
⚠️ Précautions
❌ Ne débranchez JAMAIS pendant le flash
❌ Ne flashez pas sur le mauvais périphérique
❌ N’utilisez pas 0x0 comme adresse de destination MMC
❌ Ne flashez pas moins de blocs que nécessaire
📏 Calcul des blocs 1 2 3 4 5 6 7 8 9 10 11 12 printenv filesize
🔗 Ressources
🔧 Démarrer le MOCHAbin depuis U-Boot 🎯 Accéder à U-Boot 1️⃣ Connexion console série 1 2 3 4 5 6 7 8 9 ls /dev/ttyUSB*sudo screen /dev/ttyUSB0 115200 sudo minicom -D /dev/ttyUSB0 -b 115200
2️⃣ Interrompre le démarrage automatique
Allumez le MOCHAbin
Appuyez sur n’importe quelle touche dès que vous voyez :1 Hit any key to stop autoboot: 3
Vous obtenez le prompt U-Boot :
📋 Boot depuis carte SD/eMMC Si votre image Armbian est flashée correctement, U-Boot devrait démarrer automatiquement avec :
Démarrage manuel depuis carte SD (mmcblk0) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Marvell>> mmc dev 0 mmc info mmc part setenv kernel_addr_r 0x02080000 setenv fdt_addr_r 0x01000000 setenv ramdisk_addr_r 0x06000000 ext4load mmc 0:1 ${kernel_addr_r} /boot/Image ext4load mmc 0:1 ${fdt_addr_r} /boot/dtb/marvell/armada-7040-mochabin.dtb ext4load mmc 0:1 ${ramdisk_addr_r} /boot/uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 rw" booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
Démarrage depuis eMMC (mmcblk1) 1 2 3 4 5 6 7 8 9 10 11 12 Marvell>> mmc dev 1 mmc info ext4load mmc 1:1 ${kernel_addr_r} /boot/Image ext4load mmc 1:1 ${fdt_addr_r} /boot/dtb/marvell/armada-7040-mochabin.dtb ext4load mmc 1:1 ${ramdisk_addr_r} /boot/uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk1p1 rootwait rootfstype=ext4 rw" booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
💾 Boot depuis SATA/M.2 SSD 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Marvell>> scsi scan scsi device ext4load scsi 0:1 ${kernel_addr_r} /boot/Image ext4load scsi 0:1 ${fdt_addr_r} /boot/dtb/marvell/armada-7040-mochabin.dtb ext4load scsi 0:1 ${ramdisk_addr_r} /boot/uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/sda1 rootwait rootfstype=ext4 rw" booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
🌐 Boot via réseau (TFTP) Prérequis
Serveur TFTP configuré sur votre réseau
Fichiers de boot disponibles sur le serveur TFTP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Marvell>> setenv ipaddr 192.168.1.100 setenv serverip 192.168.1.10 setenv netmask 255.255.255.0 setenv gatewayip 192.168.1.1 ping ${serverip} tftp ${kernel_addr_r} Image tftp ${fdt_addr_r} armada-7040-mochabin.dtb tftp ${ramdisk_addr_r} uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/nfs nfsroot=192.168.1.10:/nfs/rootfs,v3 ip=dhcp" booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
🔍 Commandes U-Boot utiles 1 2 3 4 5 6 7 8 9 10 11 12 version bdinfo printenv printenv bootcmdprintenv bootargs
Gestion de la mémoire 1 2 3 4 5 6 7 8 9 10 mmc list mmc dev 0 mmc info mmc part scsi scan scsi info scsi part
Gestion du réseau 1 2 3 4 5 6 7 8 9 10 11 net list setenv ipaddr 192.168.1.100 setenv netmask 255.255.255.0 setenv gatewayip 192.168.1.1 ping 192.168.1.1 dhcp
Gestion des fichiers 1 2 3 4 5 6 7 8 9 ext4ls mmc 0:1 /boot ext4ls mmc 0:1 /boot/dtb/marvell ext4size mmc 0:1 /boot/Image ext4load mmc 0:1 ${kernel_addr_r} /boot/Image
💾 Sauvegarder la configuration U-Boot Créer un script de boot personnalisé 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Marvell>> setenv bootdelay 3 setenv baudrate 115200 setenv bootcmd_mmc 'mmc dev 0; ext4load mmc 0:1 ${kernel_addr_r} /boot/Image; ext4load mmc 0:1 ${fdt_addr_r} /boot/dtb/marvell/armada-7040-mochabin.dtb; ext4load mmc 0:1 ${ramdisk_addr_r} /boot/uInitrd; setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 rw; booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}' setenv bootcmd 'run bootcmd_mmc' saveenv
Restaurer les paramètres par défaut 1 2 3 4 5 6 7 8 9 10 Marvell>> env default -asaveenv reset
🔧 Dépannage depuis U-Boot Vérifier que les fichiers existent 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Marvell>> ext4ls mmc 0:1 /boot ext4ls mmc 0:1 /boot/dtb/marvell
Vérifier les adresses mémoire 1 2 3 4 5 6 7 8 9 Marvell>> bdinfo printenv kernel_addr_r printenv fdt_addr_r printenv ramdisk_addr_r
Tester le Device Tree 1 2 3 4 5 6 7 8 9 Marvell>> ext4load mmc 0:1 ${fdt_addr_r} /boot/dtb/marvell/armada-7040-mochabin.dtb fdt addr ${fdt_addr_r} fdt print / fdt print /model
Boot en mode debug 1 2 3 4 5 6 7 Marvell>> setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 rw debug ignore_loglevel earlyprintk" booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
🔄 Mettre à jour U-Boot depuis Linux Une fois le système démarré, vous pouvez mettre à jour U-Boot :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 sudo dd if =/dev/mmcblk0 of=/root/backup-uboot.img bs=1M count=4 dpkg-deb -x linux-u-boot-mochabin-current_*.deb /tmp/uboot find /tmp/uboot -name "u-boot*" sudo dd if =/tmp/uboot/usr/lib/linux-u-boot-*/u-boot.bin of=/dev/mmcblk0 bs=512 seek=1 conv=notrunc sudo sync sudo reboot
📊 Script de boot automatique complet Créez un fichier boot.cmd optimisé :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 setenv autoload no setenv ethaddr 00:50:43:01:02:03 setenv kernel_addr_r 0x02080000 setenv fdt_addr_r 0x01000000 setenv ramdisk_addr_r 0x06000000 setenv fdtfile marvell/armada-7040-mochabin.dtb setenv bootdev mmc setenv bootpart 0:1 setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 rw quiet loglevel=1 setenv load_kernel 'ext4load ${bootdev} ${bootpart} ${kernel_addr_r} /boot/Image' setenv load_fdt 'ext4load ${bootdev} ${bootpart} ${fdt_addr_r} /boot/dtb/${fdtfile}' setenv load_initrd 'ext4load ${bootdev} ${bootpart} ${ramdisk_addr_r} /boot/uInitrd' setenv bootcmd 'run load_kernel; run load_fdt; run load_initrd; booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}' saveenv run bootcmd
Compiler le script :
1 mkimage -C none -A arm64 -T script -d boot.cmd boot.scr
🎯 Résumé - Commandes essentielles 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 mmc dev 0 ext4load mmc 0:1 0x02080000 /boot/Image ext4load mmc 0:1 0x01000000 /boot/dtb/marvell/armada-7040-mochabin.dtb ext4load mmc 0:1 0x06000000 /boot/uInitrd setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rw" booti 0x02080000 0x06000000 0x01000000 run bootcmd saveenv reset
🔗 Ressources
Note importante : Toutes ces commandes sont exécutées depuis le prompt U-Boot (Marvell>>), pas depuis le système Linux !Note importante : Flasher via U-Boot efface toutes les données ! Sauvegardez d’abord !
Tags: #MOCHAbin #Armbian #Marvell #Armada7040 #GlobalScale #Networking #Build
Catégories: Tutoriels, Développement, Systèmes Embarqués, Réseau