add files

This commit is contained in:
Jev
2025-11-06 23:58:42 +01:00
commit b8508a73ff
4 changed files with 219 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
# IOT-GATE-RPI4 Configuration - Debian Buster Migration
## Overview
The original `iotg-rpi4-config_1.3-1_all.deb` package was designed for Debian releases prior to Buster. Starting with Debian Buster, the boot partition structure changed:
- **Pre-Buster**: Boot files at `/boot/` (config.txt, overlays/)
- **Buster+**: Boot files at `/boot/firmware/` (config.txt, overlays/)
## Changes Made
The repackaged version `iotg-rpi4-config_1.3-1buster1_all.deb` includes:
### 1. Script Path Update
**File**: `usr/local/bin/iotg-rpi4-functions`
```bash
# Before
CONFIG=/boot/config.txt
# After
CONFIG=/boot/firmware/config.txt
```
### 2. Overlay Relocation
**Directory structure**:
```
# Before
/boot/overlays/iotg-rpi4/*.dtbo
# After
/boot/firmware/overlays/iotg-rpi4/*.dtbo
```
### 3. Version Update
- Version changed from `1.3-1` to `1.3-1buster1`
## Installation
On Debian Buster or later systems:
```bash
sudo dpkg -i iotg-rpi4-config_1.3-1buster1_all.deb
```
The package will:
1. Install device tree overlays to `/boot/firmware/overlays/iotg-rpi4/`
2. Install configuration utilities to `/usr/local/bin/`
3. Install systemd service for IE module detection
4. Install udev rules for CAN and TTY devices
5. Run the configuration utility in quiet mode
## Usage
After installation, run the configuration utility:
```bash
sudo iotg-rpi4-config
```
This provides an interactive menu to:
- Configure Industrial I/O modules (slots A, B, C, D)
- Enable/disable TPM
- Detect currently installed modules
- Apply configuration changes to `/boot/firmware/config.txt`
## Technical Details
### How It Works
1. The utility detects installed IE modules via GPIO expanders
2. User configures desired module types (CAN, RS232, RS485, Digital I/O)
3. Configuration is written to `/boot/firmware/config.txt` as dtoverlay entries:
```
dtoverlay=iotg-rpi4/iotg-rpi4-ie-a,can
dtoverlay=iotg-rpi4/iotg-rpi4-ie-b,uart
```
4. After reboot, the firmware loads the appropriate overlays
### Compatibility
- Device tree overlay syntax remains unchanged (relative paths)
- All functionality preserved from original package
- Works with Raspberry Pi OS (Debian Buster/Bullseye/Bookworm)
## Repackaging
To repackage again or modify further, use the included script:
```bash
python3 repackage_for_buster.py
```
This automates the extraction, modification, and repackaging process.