Tools and documentation to aid in modifying the ADI ADALM Pluto firmware

Overview

Pluto firmware modifications

This repository contains tools and documentation to aid in modifying the ADI ADALM Pluto firmware.

Extraction of the Pluto firmware image

This describes how to extract the individual components of the pluto.frm firmware image. It can be useful if only some of the components are going to be modified, since it saves us from having to build the rest from source.

Assuming we have the file pluto.frm in the same directory as the extract_data_dts.py script included in this repository, we can create a directory build to extract the components of the FIT image. This needs dtc, which is often included in a package called device-tree-compiler in Linux distributions.

mkdir build
cd build
dtc -O dts ../pluto.frm | ../extract_data_dts.py /dev/stdin

This will extract the data files inside the FIT image. The filenames of the extracted files are chosen according to the description field in the corresponding node of the FDT tree. The files need to be renamed according to the filenames expected by the pluto.its file.

for file in zynq-pluto*; do mv $file $file.dtb; done
mv FPGA system_top.bit
mv Linux zImage
mv Ramdisk rootfs.cpio.gz

Now we can replace some of these files as required with our modifications, and build the FIT image and .frm file as described in the ADI Wiki. This requires mkimage, which is usually contained in the package uboot-tools in Linux distributions.

cd ..
mkdir new_frm
cd new_frm
wget https://raw.githubusercontent.com/analogdevicesinc/plutosdr-fw/master/scripts/pluto.its
mkimage -f pluto.its pluto.itb
md5sum pluto.itb | cut -d ' ' -f 1 > pluto.frm.md5
cat pluto.itb pluto.frm.md5 > pluto.frm
You might also like...
This repository contains all the code and files needed to simulate the notspot quadrupedal robot using Gazebo and ROS.
This repository contains all the code and files needed to simulate the notspot quadrupedal robot using Gazebo and ROS.

Notspot robot simulation - Python version This repository contains all the files and code needed to simulate the notspot quadrupedal robot using Gazeb

This allows you to record keyboard and mouse input, and play it back using pynput.

Record and Play with Python! This allows you to record keyboard and mouse input, and play it back (with looping) using pynput. It allows for automatio

Example code and projects for FeatherS2 and FeatherS2 Neo
Example code and projects for FeatherS2 and FeatherS2 Neo

FeatherS2 & FeatherS2 Neo This repo is a collection of code, firmware, and files

This is the remake of the program PYOBD. It works on Python3 and all new libraries. It was tested on Linux, Windows, and it should work on MAC too.
This is the remake of the program PYOBD. It works on Python3 and all new libraries. It was tested on Linux, Windows, and it should work on MAC too.

This is the remake of the program PYOBD. It works on Python3 and all new libraries. It was tested on Linux, Windows, and it should work on MAC too. You just need an ELM327 USB or bluetooth device and a PC(laptop preferably).

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.
This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

This repository hosts the code for Stanford Pupper and Stanford Woofer, Raspberry Pi-based quadruped robots that can trot, walk, and jump.

I made this so I can control my Tapo L510 light bulb and Govee H6159 light strip using the PyP100 module and the Govee public API

TAPO-And-Govee-Controller I made this so I can control my Tapo L510 light bulb and Govee H6159 light strip using the PyP100 module and the Govee publi

It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history.
It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history.

HWLogger It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history. Sample Usage Run HW

An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and display it on a FeatherS2 in an OLED display.
An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and display it on a FeatherS2 in an OLED display.

CircuitPython IoT Trivia ESP32-S2 OLED Version An IoT Trivia app that shows you how to take a JSON web API such as the opentdb.com API and stream and

Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation
Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation

🤖 RoboCop 🤖 Small Robot, with LIDAR and DepthCamera. Using ROS for Maping and Navigation Made by Clemente Donoso, 📍 Chile 🇨🇱 RoboCop Lateral Fron

Comments
  • Problem recreating rootfs.cpio

    Problem recreating rootfs.cpio

    Hi, This repo looks very useful, but I have not been able to get a working frm or dfu image from it once I have extracted rootfs.cpio to a directory (once itself is extracted from rootfs.cpio.gz) and then recreating it, even without making any changes to its content.

    The problem I have seems to be when recreating rootfs.cpio as I have tested the the rest of the process by not extracting rootfs.cpio and that appears to work properly.

    I also attempted to recreate rootfs.cpio as root so as to preserve the ownership of its contents.

    Assuming pluto.frm is in the repo root (as your per your example commands) and with that as the cwd, The commands below also assume that pluto.its is in the repo root.

    Extraction,

    #!/usr/bin/bash
    #extract.sh
    
    rm -rf build/
    mkdir build
    cd build
    
    dtc -O dts ../pluto.frm | ../extract_data_dts.py /dev/stdin
    
    for file in zynq-pluto*; do mv $file $file.dtb; done
    mv FPGA system_top.bit
    mv Linux zImage
    mv Ramdisk rootfs.cpio.gz
    
    gzip -d rootfs.cpio.gz
    mkdir rootfs
    cd rootfs
    cpio -idv < ../rootfs.cpio
    #cpio --no-absolute-filenames -idv < ../rootfs.cpio
    cd ..
    cd ..
    

    Compression,

    #!/usr/bin/bash
    #compress.sh
    
    rm build/rootfs.cpio
    
    cd build/rootfs
    find . -print -depth | cpio -ov > ../rootfs.cpio
    #find . -depth -print | cpio -ov > ../rootfs.cpio
    #find . -depth -print | cpio --no-absolute-filenames -ov > ../rootfs.cpio
    #find . -print | cpio -ov > ../rootfs.cpio
    
    #find . -depth -print0 | cpio --null -ov > ../rootfs.cpio
    
    cd ..
    gzip rootfs.cpio
    
    cd ..
    

    Assembly,

    #!/usr/bin/bash
    #assemble.sh
    rm -rf new_frm/
    mkdir new_frm
    cd new_frm
    
    cp ../pluto.its .
    
    mkimage -f pluto.its pluto.itb
    
    cp pluto.itb pluto.itb.tmp
    dfu-suffix -a pluto.itb.tmp -v 0x0456 -p 0xb673
    mv pluto.itb.tmp pluto.dfu
    
    md5sum pluto.itb | cut -d ' ' -f 1 > pluto.frm.md5
    cat pluto.itb pluto.frm.md5 > pluto.frm
    
    cd ..
    

    If either pluto.dfu (loaded to ram) or pluto.frm are loaded (to flash) the pluto just hangs.

    #!/usr/bin/bash
    #download_and_test.sh
    
    ipaddr=192.168.2.1
    
    if [ ! -f new_frm/pluto.dfu ] ; then
        echo no file to upload
        exit
    fi
    
    ssh_cmd()
    {
        sshpass -v -p analog ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oCheckHostIP=no root@${ipaddr} "$1" 2>/dev/null
        if [ "$?" -ne "0" ] ; then
    	echo ssh command $1 failed
    	exit
        fi
    }
    ssh_cmd "device_reboot ram"
    
    lines=0
    attempt=0
    while [ "${lines}" -le "8" -a "${attempt}" -le "10" ] 
    do
        lines=$(sudo dfu-util -l -d 0456:b673,0456:b674 | wc -l)
        if [ "${lines}" -le "8" ] ; then
    	sleep 1
        fi
        ((attempt++))
    done
    
    # -R resets/terminates the dfu after we are done
    sudo dfu-util -R -d 0456:b673,0456:b674 -D new_frm/pluto.dfu -a firmware.dfu
    

    Are you able to offer some way of solving the problem ?

    Thanks and regards, Deon

    opened by DeonMarais64 2
Owner
Daniel Estévez
Daniel Estévez
Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at

Alternative firmware for ESP8266/ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability

Theo Arends 59 Dec 26, 2022
Monitor an EnvisaLink alarm module running Honeywell firmware, and set a Nest device to Home/Away depending on whether the alarm is Disarmed/Away.

Nestalarm Monitor an EnvisaLink alarm module running Honeywell firmware, and set a Nest device to Home/Away depending on whether the alarm is Disarmed

null 1 Dec 30, 2021
Brogrammer-keyboard - FIrmware for the Brogrammer Keyboard v1.0

Brogrammer Keyboard Firmware The package contains the firmware that runs on the Brogrammer Keyboard v1.0 See https://imgur.com/a/oY5QZ14 This keyboard

Devin Hartleben 1 Apr 21, 2022
Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands

Unofficial Playdate reverse-engineering notes/tools - covers file formats, server API and USB commands ⚠️ This documentation is unofficial and is not

James 106 Dec 31, 2022
[unmaintained] WiFi tools for linux

Note: This project is unmaintained. While I would love to keep up the development on this project, it is difficult for me for several reasons: I don't

Rocky Meza 288 Dec 13, 2022
A raspberrypi tools for python

raspberrypi-tools how to install: first clone this project: git clone https://github.com/Ardumine/rpi-tools.git then go to the folder cd rpi-tools and

null 1 Jan 4, 2022
This application works with serial communication. Use a simple gui to send and receive serial data from arduino and control leds and motor direction

This application works with serial communication. Use a simple gui to send and receive serial data from arduino and control leds and motor direction

ThyagoKZKR 2 Jul 18, 2022
A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost.

distance sensor cube timer A rubiks cube timer using a distance sensor and a raspberry pi 4, and possibly the pi pico to reduce size and cost. How to

null 3 Feb 21, 2022
Hook and simulate global keyboard events on Windows and Linux.

keyboard Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.

BoppreH 3.2k Dec 30, 2022
A module for cross-platform control of the mouse and keyboard in python that is simple to install and use.

PyUserInput PyUserInput is a group project so we've moved the project over to a group organization: https://github.com/PyUserInput/PyUserInput . That

Paul Barton 1k Dec 27, 2022