Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BSP Patch Project

Overview

This project provides scripts and instructions for building and patching firmware for Microchip LAN9662 and LAN8651 devices, including setup and deployment using TFTP.

Table of Contents

Hardware

Mein Logo

Hardware Devicetree and Kernel Driver description

LAN865x Driver and Device Tree modifications

Prerequisites

  • Linux: CMake version < 4.x.x, other tools as per Microchip BSP Getting Started
  • Windows: Python 3, py3tftp
  • Board: LAN9662 PCB8291, LAN9851 Click Board

Setup on Linux Build Machine

This scripts are ment meant more as a How-To then to be executed

  1. Install required tools
    lan865x_build_tool_setup.sh

  2. Rebuild default firmware for PCB8291
    lan865x_build_first.sh

  3. Patch sources for LAN9851 Click Board
    lan865x_build_second.sh

See Microchip BSP Docs for detailed setup.

TFTP Server Setup (Windows)

  1. Install py3tftp

    pip install py3tftp
  2. Allow UDP port 69 in Firewall

    New-NetFirewallRule -DisplayName "TFTP-UDP-69-Temp" -Direction Inbound -Action Allow -Protocol UDP -LocalPort 69
  3. Start py3tftp on port 69

    py3tftp --host 0.0.0.0 --port 69
  4. Ensure brsdk_standalone_arm.ext4.gz is in the working directory.

Programming LAN9662 Board

  1. Enter UBoot Mode during startup

  2. 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
  3. 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

File Overlay and Customization

  • Place custom scripts/configurations in mscc-brsdk-source-2024.09/board/mscc/common/rootfs_overlay
  • Example: S99myconfig.sh for 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

or compiled as a loadable module you must start the driver with

  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
  

IP Address Assignement

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

TestRig

Test Rig

iperf3 Test

iperf3 client running on LAN992 for TCP test
iperf3

iperf3 server running on Ubuntu Mini PC
iperf3

Troubleshooting

  • 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.

Resources


For further improvement, consider adding a project logo, badges (build status, license), and contribution guidelines.

About

Build and patch material for LAN8651 10BASE-T1S on the Microchip LAN9662 (PCB8291): Buildroot/kernel configs, driver, device tree, TFTP/U-Boot flashing and an iperf3 test rig.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages