This project provides scripts and instructions for building and patching firmware for Microchip LAN9662 and LAN8651 devices, including setup and deployment using TFTP.
- Hardware
- Hardware (DTS) and Kernel Driver description
- Prerequisites
- Setup on Linux Build Machine
- TFTP Server Setup (Windows)
- Programming LAN9662 Board
- File Overlay and Customization
- TestRig
- Troubleshooting
- Resources
- LAN9662 Part Number: EV09D37A
- LAN8651 Two Wire ETH Click
- Adaptor Pi 2 Click Shield
LAN865x Driver and Device Tree modifications
- Linux: CMake version < 4.x.x, other tools as per Microchip BSP Getting Started
- Windows: Python 3,
py3tftp - Board: LAN9662 PCB8291, LAN9851 Click Board
This scripts are ment meant more as a How-To then to be executed
-
Install required tools
lan865x_build_tool_setup.sh -
Rebuild default firmware for PCB8291
lan865x_build_first.sh -
Patch sources for LAN9851 Click Board
lan865x_build_second.sh
See Microchip BSP Docs for detailed setup.
-
Install py3tftp
pip install py3tftp
-
Allow UDP port 69 in Firewall
New-NetFirewallRule -DisplayName "TFTP-UDP-69-Temp" -Direction Inbound -Action Allow -Protocol UDP -LocalPort 69
-
Start py3tftp on port 69
py3tftp --host 0.0.0.0 --port 69
-
Ensure
brsdk_standalone_arm.ext4.gzis in the working directory.
-
Enter UBoot Mode during startup
-
Set up network and download firmware
setenv ipaddr 169.254.35.123 setenv netmask 255.255.0.0 tftp 169.254.87.46:brsdk_standalone_arm.ext4.gz unzip ${loadaddr} ${mmc_unzip_loadaddr} run mmc_format run mmc_boot0_upd; run mmc_boot1_upd boot
-
Configure PLCA during runtime
ethtool --set-plca-cfg eth2 enable on node-id 0 node-cnt 8 ethtool --get-plca-cfg eth2 ip addr add dev eth2 192.168.10.11/24 ip link set eth2 up ifconfig
- Place custom scripts/configurations in
mscc-brsdk-source-2024.09/board/mscc/common/rootfs_overlay - Example:
S99myconfig.shfor auto-configuration#!/bin/sh echo "Start Custom-Configuration..." > /tmp/bootlog.txt ethtool --set-plca-cfg eth2 enable on node-id 0 node-cnt 8 ip link set eth0 down ip link set eth1 down ip link set eth2 down ip addr flush dev eth0 ip addr flush dev eth1 ip addr flush dev eth2 ip addr add 169.254.35.112/16 dev eth0 ip addr add 192.168.178.20/24 dev eth1 ip addr add 192.168.0.5/24 dev eth2 ip link set eth0 up ip link set eth1 up ip link set eth2 up
ip link set eth0 down
ip link set eth1 down
modprobe lan865x_t1s
ethtool --set-plca-cfg eth2 enable on node-id 0 node-cnt 8
ethtool --get-plca-cfg eth2
ip addr flush dev eth0
ip addr flush dev eth1
ip addr flush dev eth2
ip addr add 169.254.35.112/16 dev eth0
ip addr add 192.168.178.20/24 dev eth1
ip addr add 169.254.35.110/16 dev eth2
ip link set eth2 up
ping 169.254.35.184
ip link set eth0 up
ip link set eth1 up
| Hardware Port | interface | IP | Description |
|---|---|---|---|
| Left Port | eth0 | 169.254.35.112/16 | AutoIP Adressing |
| Right Port: | eth1 | 192.168.178.20/24 | typical FritzBox IP |
| T1S Port: | eth2 | 192.168.0.5/24 | typical DHCP IP |
For using the SSH, you must first access the board via terminal console and set an password with "passwd"
Then an SSH Daemon is available on all interfaces
An MQTT Broker with Anonymous Acccess is available on all Interfaces at Port 1883
iperf3 client running on LAN992 for TCP test

iperf3 server running on Ubuntu Mini PC

- CMake version: Ensure you use CMake < 4.x.x.
- Tool installation: Run scripts line by line to diagnose errors.
- TFTP: Verify firewall and correct port usage.
- Board networking: Check cable and IP configuration.
For further improvement, consider adding a project logo, badges (build status, license), and contribution guidelines.

