Skip to content
Snippets Groups Projects
Commit a3274abc authored by Stephen D's avatar Stephen D
Browse files

Merge branch 'cross_deb' into 'master'

cross compile debs

See merge request !4
parents 2ea61b26 250e903f
No related branches found
No related tags found
1 merge request!4cross compile debs
Pipeline #4736 passed
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.arm-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
image: "rust:latest" image: "rust:latest"
stages:
- test
- build
before_script: before_script:
- apt-get update - apt-get update
- apt-get install -y protobuf-compiler - apt-get install -y protobuf-compiler gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
- rustup component add rustfmt - rustup component add rustfmt
- rustup component add clippy - rustup component add clippy
- cargo install cargo-deb - cargo install cargo-deb
- rustup target add arm-unknown-linux-musleabihf
- rustup target add aarch64-unknown-linux-gnu
test: test:
stage: test
script: script:
- cargo fmt -- --check - cargo fmt -- --check
- cargo clippy --all-targets --all-features -- -D warnings - cargo clippy --all-targets --all-features -- -D warnings
- cargo test - cargo test
build: build:
stage: build
script: script:
- cargo deb - cargo deb
artifacts: artifacts:
paths: paths:
- target/debian/*.deb - target/debian/*.deb
\ No newline at end of file
# pi zero, and pi one
build_pi_old:
stage: build
script:
- cargo deb --target arm-unknown-linux-musleabihf
artifacts:
paths:
- target/arm-unknown-linux-musleabihf/debian/*.deb
build_pi_modern:
stage: build
script:
- cargo deb --target aarch64-unknown-linux-gnu
artifacts:
paths:
- target/aarch64-unknown-linux-gnu/debian/*.deb
\ No newline at end of file
...@@ -4,7 +4,33 @@ This is a CATS RX-only I-Gate which can use a cheap SDR receiver to decode CATS ...@@ -4,7 +4,33 @@ This is a CATS RX-only I-Gate which can use a cheap SDR receiver to decode CATS
## Debian & Derivatives (Ubuntu, Raspbian, etc.) ## Debian & Derivatives (Ubuntu, Raspbian, etc.)
### Building ### Installing (Prebuilt Packages)
First, install rtl-sdr: `sudo apt install rtl-sdr`
Next, download the .deb file for your system:
[x86\_64](https://gitlab.scd31.com/cats/sdr-igate/builds/artifacts/master/browse/target/debian?job=build)
[Pi Zero/1](https://gitlab.scd31.com/cats/sdr-igate/builds/artifacts/master/browse/target/arm-unknown-linux-musleabihf/debian?job=build_pi_old)
[Pi 2/3/4/5](https://gitlab.scd31.com/cats/sdr-igate/builds/artifacts/master/browse/target/aarch64-unknown-linux-gnu/debian/?job=build_pi_modern)
Once downloaded, the package can be installed with `sudo dpkg -i FILENAME.deb`, where `FILENAME.deb` is the file you downloaded.
The resulting deb package will placed in `target/debian/cats-sdr-igate_VERSION.deb`. The package can be installed with `sudo dpkg -i target/debian/cats-sdr-igate_VERSION.deb`, replacing `VERSION` with whatever version and architecture was built.
### Configuring
The configuration for the I-Gate lives in `/etc/cats-sdr-igate/config.toml`. Make sure to update this before using the utility - most importantly, the callsign must be configured. Optionally, you can remove the entire `[felinet]` section if you don't want to forward packets to the network.
### Running
Start the service with `sudo systemctl start cats-sdr-igate`. If you want it to start automatically at boot, you can run `sudo systemclt enable cats-sdr-igate`.
### Building From Source
You probably don't need to do this unless you're planning to change the code, or if you're having problems with the prebuilt binaries.
To build the software, you will need to install [Rustup](https://rustup.rs/). You'll also need to install some dependencies: To build the software, you will need to install [Rustup](https://rustup.rs/). You'll also need to install some dependencies:
...@@ -22,19 +48,6 @@ git pull ...@@ -22,19 +48,6 @@ git pull
cargo deb cargo deb
``` ```
The resulting deb package will placed in `target/debian/cats-sdr-igate_VERSION.deb`
### Installing
Once built, the package can be installed with `sudo dpkg -i target/debian/cats-sdr-igate_VERSION.deb`, replacing `VERSION` with whatever version and architecture was built.
### Configuring
The configuration for the I-Gate lives in `/etc/cats-sdr-igate/config.toml`. Make sure to update this before using the utility - most importantly, the callsign must be configured. Optionally, you can remove the entire `[felinet]` section if you don't want to forward packets to the network.
### Running
Start the service with `sudo systemctl start cats-sdr-igate`. If you want it to start automatically at boot, you can run `sudo systemclt enable cats-sdr-igate`.
## Other ## Other
...@@ -57,6 +70,6 @@ Copy the `config.example.toml` file to `config.toml`. You can either keep it in ...@@ -57,6 +70,6 @@ Copy the `config.example.toml` file to `config.toml`. You can either keep it in
Make sure you have `rtl-sdr` installed. As a sanity check, verify the `rtl_fm` command exists. Make sure you have `rtl-sdr` installed. As a sanity check, verify the `rtl_fm` command exists.
```bash ```bash
./start.sh cargo run --release
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment