Skip to content

Commit

Permalink
introduction subpackage radio
Browse files Browse the repository at this point in the history
It's possible to simulate via opensource cars with
webcams, radios devices and even digital tvs, here
another extension to QM.

Signed-off-by: Douglas Schilling Landgraf <[email protected]>
  • Loading branch information
dougsland committed Jan 1, 2025
1 parent ef5463d commit 09b6ef8
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SPECFILE=rpm/qm.spec
SPECFILE_SUBPACKAGE_KVM=rpm/kvm/qm-kvm.spec
SPECFILE_SUBPACKAGE_SOUND=rpm/sound/sound.spec
SPECFILE_SUBPACKAGE_VIDEO=rpm/video/video.spec
SPECFILE_SUBPACKAGE_RADIO=rpm/radio/radio.spec
SPECFILE_SUBPACKAGE_TTY7=rpm/tty7/tty7.spec
SPECFILE_SUBPACKAGE_INPUT=rpm/input/input.spec
SPECFILE_SUBPACKAGE_IMG_WINDOWMANAGER=rpm/windowmanager/windowmanager.spec
Expand Down Expand Up @@ -133,6 +134,16 @@ video_subpackage: clean dist ## - Creates a local RPM package, usefu
--define="version ${VERSION}" \
${SPECFILE_SUBPACKAGE_VIDEO}

.PHONY: radio_subpackage
radio_subpackage: clean dist ## - Creates a local RPM package, useful for development
mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES}
tools/version-update -v ${VERSION}
cp ./rpm/v${VERSION}.tar.gz ${RPM_TOPDIR}/SOURCES
rpmbuild -ba \
--define="_topdir ${RPM_TOPDIR}" \
--define="version ${VERSION}" \
${SPECFILE_SUBPACKAGE_RADIO}

.PHONY: tty7_subpackage
tty7_subpackage: clean dist ## - Creates a local RPM package, useful for development
mkdir -p ${RPM_TOPDIR}/{RPMS,SRPMS,BUILD,SOURCES}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Drop-in configuration for Podman to mount bind /dev/radioX Stereo Radio
#
# In a typical vehicle system, radio is connected to car's onboard computer via a CAN bus
# (Controller Area Network), which transmits signals from the radios to the car’s system for real-time
# processing.
#
# However, it's possible to create a simulation environment using traditional hardware and open-source
# software, eliminating the need for actual car radio or CAN bus integration. By using open-source
# tools like Podman containers and radio processing libraries, virtual
# radios can be simulated.
#
# "/dev/radio0:/dev/radio0", # Stereo Radio
#
# Camera System Layout (Top-Down View)
#
# ┌─────────────────────────────┐
# │ /dev/radio0 │
# │ (Stereo Radio) │
# └────────────┬────────────────┘
# │
# ┌─────────────────────┴────────────────────────────────┐
# │ Vehicle Body (Top View) │
# │ │
# └──────────────────────────────────────────────────────┘
#
[containers]
devices = [
"/dev/radio0:/dev/radio0"
]
29 changes: 29 additions & 0 deletions rpm/radio/radio.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Name: qm-mount-bind-radio
Version: 0.6.8
Release: 1%{?dist}
Summary: Drop-in configuration for QM containers to mount bind /dev/radio
License: GPL-2.0-only
URL: https://github.com/containers/qm
Source0: %{url}/archive/v%{version}.tar.gz

BuildArch: noarch
Requires: qm = %{version}-%{release}

%description
This subpackage installs a drop-in configuration for QM containers to mount bind `/dev/radio`.

%prep
%autosetup -Sgit -n qm-%{version}

%install
install -d %{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d
install -m 644 etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf \
%{buildroot}%{_sysconfdir}/qm/containers/containers.conf.d/

%files
%{_sysconfdir}/qm/containers/containers.conf.d/qm_dropin_mount_bind_radio.conf

%changelog
* Fri Jul 21 2023 RH Container Bot <[email protected]>
- Added radio mount bind drop-in configuration.

2 changes: 2 additions & 0 deletions tools/version-update
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/kvm/q
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ros2/rolling/ros2_rolling.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/sound/sound.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/video/video.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/radio/radio.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/tty7/tty7.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/input/input.spec"
sed -i "s/Version: ${PREV_VERSION}$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ttyUSB0/ttyUSB0.spec"
Expand All @@ -71,6 +72,7 @@ sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/kvm/qm-kvm.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/ros2/rolling/ros2_rolling.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/sound/sound.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/video/video.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/radio/radio.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/tty7/tty7.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/input/input.spec"
sed -i "s/Version: 0$/Version: ${VERSION}/g" "${BASEDIR}/rpm/img_tempdir/img_tempdir.spec"
Expand Down

0 comments on commit 09b6ef8

Please sign in to comment.