Added script and firmware files

This commit is contained in:
Carl Vargklint 2025-01-21 20:20:15 +01:00
parent 2a9eb5f035
commit 3ead3cc338
6 changed files with 11151 additions and 0 deletions

View File

@ -0,0 +1,13 @@
### LibreSDR B210 Mini Firmware and documentation
## Getting started
# Requirements:
-
- This repo with install.sh: ensures all proper libraries at least on Fedora and Ubuntu.
## Locations:
- /usr/lib/ettus/ - Firmware location

BIN
firmware/libresdr_b210.bin Normal file

Binary file not shown.

BIN
firmware/usrp_b200_fpga.bin Normal file

Binary file not shown.

11082
firmware/usrp_b200_fw.hex Normal file

File diff suppressed because it is too large Load Diff

BIN
firmware/usrp_b210_fpga.bin Normal file

Binary file not shown.

56
install.sh Normal file
View File

@ -0,0 +1,56 @@
#!/bin/bash
# Names of packages under different distros
PACKAGES_DEBIAN="uhd-host libuhd* uhd-soapysdr"
PACKAGES_RHEL="uhd-tools uhd-devel uhd soapy-uhd"
if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root. Exiting." >&2
exit 1
fi
# Function to determine the Linux distribution
detect_distro() {
if [[ -f /etc/os-release ]]; then
. /etc/os-release
DISTRO_ID=$ID
elif command -v lsb_release >/dev/null 2>&1; then
DISTRO_ID=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
elif [[ -f /etc/debian_version ]]; then
DISTRO_ID="debian"
elif [[ -f /etc/fedora-release ]]; then
DISTRO_ID="fedora"
else
DISTRO_ID="unknown"
fi
echo "$DISTRO_ID"
}
# Check distro version to install correct packages
DISTRO_ID=$(detect_distro)
case "$DISTRO_ID" in
debian|ubuntu|pop|linuxmint|elementary)
apt install -y $PACKAGES_DEBIAN
;;
fedora|rhel|centos)
yum install -y $PACKAGES_RHEL
;;
esac
exit 1
# Ensuring Environment variables
#export UHD_IMAGES_DIR=/usr/lib/ettus/ # User specific alternative
echo "UHD_IMAGES_DIR=/usr/lib/ettus/" >> /etc/environment # Ensure env across multiple installs on multiple users.
source /etc/environment
# Copying Firmware files
mkdir /usr/lib/ettus/ # Create the library folder
cp -r ./firmware/* /usr/lib/ettus/ # Copy firmware files
chown -r root:root /usr/lib/ettus/ # Ensure root owns the files
chmod -r 776 /usr/lib/ettus/ # This makes only root able to change the folder and file content
uhd_image_loader --download --args type=b200