Skip to content

Commit

Permalink
fixing pi-gen paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ampledata committed Aug 16, 2024
1 parent ed36171 commit 63c7a1f
Show file tree
Hide file tree
Showing 48 changed files with 83 additions and 243 deletions.
1 change: 0 additions & 1 deletion .github/workflows/node-red-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- name: Create package structure
run: |
mkdir -p .debpkg/home/node-red/.node-red
ls -alR
cp shared_files/node-red/aryaos_flows.json .debpkg/home/node-red/.node-red/flows.json
# create DEBIAN directory if you want to add other pre/post scripts
mkdir -p .debpkg/DEBIAN
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/pi-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@ jobs:
uses: xom9ikk/dotenv@v2.3.0
with:
path: pi-gen/

- name: Echo env variables
run: env

- name: Build AryaOS image
uses: usimd/pi-gen-action@v1
env:
SHARED_FILES: ${{ env.SHARED_FILES }}
with:
pi-gen-dir: pi-gen-src
# Disable the renaming of the first user during the first boot. This make it so
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#


sync:
rsync -va ../aryaos kelp.local:~/src/SNS/

mkdocs:
pip install -r docs/requirements.txt
mkdocs serve
3 changes: 0 additions & 3 deletions pi-gen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ pi-gen:
git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git
touch ./pi-gen/stage2/SKIP_IMAGES ./pi-gen/stage2/SKIP_NOOBS

copy:
rsync -va ../../aryaos kelp.local:~/src/SNS/

sync: copy

skip:
Expand Down
4 changes: 2 additions & 2 deletions pi-gen/config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# shellcheck disable=SC2034
AOS_FLAVOR="AryaOS"
IMG_NAME="aryaos-2.0.0-beta01"
IMG_NAME="aryaos"
PI_GEN_RELEASE="AryaOS: The Operating System for Modern Situational Awareness."
TARGET_HOSTNAME="aryaos"
FIRST_USER_NAME="pi"
Expand All @@ -36,4 +36,4 @@ APT_PROXY="http://172.17.2.88:3142"
DUMP1090_RECEIVER_SERIAL="stx:1090:0"
DUMP978_RECEIVER_SERIAL="stx:978:0"
COMITUP_WEB_PORT="9080"
SHARED_FILES="../shared_files"
export SHARED_FILES="${STAGE_DIR}/../../shared_files"
4 changes: 2 additions & 2 deletions pi-gen/stage07-air/01-files/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# limitations under the License.
#

install -v -m 600 files/blacklist-rtl-sdr.conf "${ROOTFS_DIR}/etc/modprobe.d/"
install -v -m 600 files/flightaware-apt-repository_1.2_all.deb "${ROOTFS_DIR}/tmp/flightaware-apt-repository_1.2_all.deb"
install -v -m 600 "${SHARED_FILES}/air/blacklist-rtl-sdr.conf" "${ROOTFS_DIR}/etc/modprobe.d/"
install -v -m 600 "${SHARED_FILES}/air/flightaware-apt-repository_1.2_all.deb" "${ROOTFS_DIR}/usr/src/flightaware-apt-repository_1.2_all.deb"
2 changes: 1 addition & 1 deletion pi-gen/stage07-air/02-install-repos/00-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# limitations under the License.
#

dpkg -i /tmp/flightaware-apt-repository_1.2_all.deb
dpkg -i /usr/src/flightaware-apt-repository_1.2_all.deb
apt update
22 changes: 12 additions & 10 deletions pi-gen/stage07-air/04-aryaair/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@
# limitations under the License.
#

install -v -m 755 files/99-aryaos-recorder.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"
install -v -m 755 "${SHARED_FILES}/aryaos/99-aryaos-recorder.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"

# dump1090-fa
install -v -m 644 files/dump1090-fa.service "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 644 files/dump978-fa.service "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 644 "${SHARED_FILES}/air/dump1090-fa.service" "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 644 "${SHARED_FILES}/air/dump978-fa.service" "${ROOTFS_DIR}/lib/systemd/system/"

# readsb
install -v -m 755 files/readsb-install.sh "${ROOTFS_DIR}/home/pi/"
install -v -m 755 files/tar1090-install.sh "${ROOTFS_DIR}/home/pi/"
install -v -m 755 files/readsb-set-location.sh "${ROOTFS_DIR}/usr/local/bin/"
install -v -m 755 files/readsb-gain.sh "${ROOTFS_DIR}/usr/local/bin/"
install -v -m 755 files/run_readsb.sh "${ROOTFS_DIR}/usr/local/sbin/"
install -v -m 644 files/readsb_3.14.1621_arm64.deb "${ROOTFS_DIR}/home/pi/"
install -v -m 755 "${SHARED_FILES}/air/readsb-install.sh" "${ROOTFS_DIR}/usr/src/"
install -v -m 755 "${SHARED_FILES}/air/tar1090-install.sh" "${ROOTFS_DIR}/usr/src/"

install -v -m 755 files/89-skyaware.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"
install -v -m 755 "${SHARED_FILES}/air/readsb-set-location.sh" "${ROOTFS_DIR}/usr/local/bin/"
install -v -m 755 "${SHARED_FILES}/air/readsb-gain.sh" "${ROOTFS_DIR}/usr/local/bin/"
install -v -m 755 "${SHARED_FILES}/air/run_readsb.sh" "${ROOTFS_DIR}/usr/local/sbin/"

install -v -m 644 "${SHARED_FILES}/air/readsb_3.14.1621_arm64.deb" "${ROOTFS_DIR}/usr/src/"

install -v -m 755 "${SHARED_FILES}/air/89-skyaware.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"
6 changes: 4 additions & 2 deletions pi-gen/stage07-air/04-aryaair/01-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ DUMP978_RECEIVER_SERIAL="stx:978:0"
sed --follow-symlinks -i -E -e "s/driver=rtlsdr /driver=rtlsdr,serial=$DUMP978_RECEIVER_SERIAL /" /etc/default/dump978-fa


cd /usr/src
wget https://github.com/snstac/aircot/releases/latest/download/aircot_latest_all.deb
apt install -f ./aircot_latest_all.deb

Expand All @@ -33,12 +34,13 @@ apt install -f ./adsbcot_latest_all.deb

# readsb
# bash /home/pi/readsb-install.sh
dpkg -i /home/pi/readsb_3.14.1621_arm64.deb
dpkg -i /usr/src/readsb_3.14.1621_arm64.deb

READSB_RECEIVER_SERIAL="stx:1090:0"
sed --follow-symlinks -i -E -e "s/RECEIVER_OPTIONS.*/RECEIVER_OPTIONS=\"--device $READSB_RECEIVER_SERIAL --device-type rtlsdr --gain -10 --ppm 0\"/" /etc/default/readsb

# tar1090
bash /home/pi/tar1090-install.sh
bash /usr/src/tar1090-install.sh


# Disable everything
Expand Down
9 changes: 5 additions & 4 deletions pi-gen/stage07-air/04-aryaair/02-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -14,6 +16,5 @@
# limitations under the License.
#

# readsb
install -v -m 644 files/readsb.service "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 755 files/89-skyaware.conf "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"
install -v -m 644 "${SHARED_FILES}/air/readsb.service" "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 755 "${SHARED_FILES}/air/89-skyaware.conf" "${ROOTFS_DIR}/etc/lighttpd/conf-enabled/"
3 changes: 0 additions & 3 deletions pi-gen/stage07-air/04-aryaair/files/99-aryaos-recorder.conf

This file was deleted.

26 changes: 0 additions & 26 deletions pi-gen/stage07-air/04-aryaair/files/readsb.service

This file was deleted.

14 changes: 7 additions & 7 deletions pi-gen/stage08-sea/00-install/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash -e
# AryaOS 00-run.sh
# Configures pi image for AIS-catcher install, including serial settings.
# 00-run.sh Configures pi image for AIS-catcher install, including serial settings.
#
# Copyright Sensors & Signals LLC https://www.snstac.com/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,8 +16,7 @@
# limitations under the License.
#

# AIS-catcher
install -v -m 644 files/AIS-catcher_0.58.1_arm64.deb "${ROOTFS_DIR}/home/pi/"
install -v -m 644 files/ais-catcher.default.conf "${ROOTFS_DIR}/etc/default/ais-catcher"
install -v -m 644 files/ais-catcher.service "${ROOTFS_DIR}/lib/systemd/system/"
install -v -m 644 "${SHARED_FILES}/sea/AIS-catcher_0.58.1_arm64.deb" "${ROOTFS_DIR}/usr/src/"
install -v -m 644 "${SHARED_FILES}/sea/ais-catcher.default.conf" "${ROOTFS_DIR}/etc/default/ais-catcher"
install -v -m 644 "${SHARED_FILES}/sea/ais-catcher.service" "${ROOTFS_DIR}/lib/systemd/system/"

3 changes: 2 additions & 1 deletion pi-gen/stage08-sea/00-install/01-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@


# AIS-catcher
dpkg -i /home/pi/AIS-catcher_0.58.1_arm64.deb
dpkg -i /usr/src/AIS-catcher_0.58.1_arm64.deb
id aiscatcher || useradd --system aiscatcher
usermod -a -G plugdev aiscatcher
usermod -a -G dialout aiscatcher

# aiscot
cd /usr/src
wget https://github.com/snstac/aiscot/releases/latest/download/aiscot_latest_all.deb
apt install -f ./aiscot_latest_all.deb
Binary file not shown.
21 changes: 0 additions & 21 deletions pi-gen/stage08-sea/00-install/files/ais-catcher.default.conf

This file was deleted.

4 changes: 2 additions & 2 deletions pi-gen/stage09-uas/00-install/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
#


rsync -va files/docker-uas-broker "${ROOTFS_DIR}/home/pi/"
rsync -va files/docker-uas-sensor "${ROOTFS_DIR}/home/pi/"
rsync -va "${SHARED_FILES}/uas/docker-uas-broker" "${ROOTFS_DIR}/home/pi/"
rsync -va "${SHARED_FILES}/uas/docker-uas-sensor" "${ROOTFS_DIR}/home/pi/"
4 changes: 3 additions & 1 deletion pi-gen/stage09-uas/00-install/01-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 63c7a1f

Please sign in to comment.