Skip to content

Commit acee8b3

Browse files
authored
fix: cs cannot be built on Armbian, so let's not depend on it (#288)
1 parent dafb6f6 commit acee8b3

File tree

6 files changed

+37
-1
lines changed

6 files changed

+37
-1
lines changed

bin/build.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ is_ubuntu_arm() {
9999
fi
100100
}
101101

102+
is_armbian() {
103+
if grep -q "Armbian" /etc/os-release; then
104+
echo "1"
105+
else
106+
echo "0"
107+
fi
108+
}
109+
102110
### Get avail mem
103111
get_avail_mem() {
104112
grep "MemTotal" /proc/meminfo | awk '{print $2}'
@@ -136,7 +144,8 @@ clone_cstreamer() {
136144
[[ -n "${CROWSNEST_UNATTENDED}" ]] || CROWSNEST_UNATTENDED="0"
137145
if { [[ "$(is_raspberry_pi)" = "0" ]] ||
138146
[[ "$(is_pi5)" = "1" ]] ||
139-
[[ "$(is_ubuntu_arm)" = "1" ]]; } &&
147+
[[ "$(is_ubuntu_arm)" = "1" ]] ||
148+
[[ "$(is_armbian)" = "1" ]]; } &&
140149
[[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then
141150
printf "Device is not supported! Cloning camera-streamer ... [SKIPPED]\n"
142151
return

libs/core.sh

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ function check_apps {
9797
## Avoid dependency check if non rpi sbc
9898
if [[ "$(is_raspberry_pi)" = "1" ]] &&
9999
[[ "$(is_ubuntu_arm)" = "0" ]] &&
100+
[[ "$(is_armbian)" = "0" ]] &&
100101
[[ "$(is_pi5)" = "0" ]]; then
101102
if [[ -x "${BASE_CN_PATH}/${cstreamer}" ]]; then
102103
log_msg "Dependency: '${cstreamer##*/}' found in ${cstreamer}."

libs/hwhandler.sh

+8
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,11 @@ is_ubuntu_arm() {
185185
echo "0"
186186
fi
187187
}
188+
189+
is_armbian() {
190+
if grep -q "Armbian" /etc/os-release; then
191+
echo "1"
192+
else
193+
echo "0"
194+
fi
195+
}

libs/init_stream.sh

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function construct_streamer {
2929
[mM]ulti | camera-streamer)
3030
if [[ "$(is_raspberry_pi)" = "1" ]] &&
3131
[[ "$(is_ubuntu_arm)" = "0" ]] &&
32+
[[ "$(is_armbian)" = "0" ]] &&
3233
[[ "$(is_pi5)" = "0" ]]; then
3334
MULTI_INSTANCES+=( "${cams}" )
3435
else

libs/versioncontrol.sh

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ versioncontrol() {
4444
local cur_ver avail_ver
4545
if [[ "$(is_raspberry_pi)" = "1" ]] &&
4646
[[ "$(is_ubuntu_arm)" = "0" ]] &&
47+
[[ "$(is_armbian)" = "0" ]] &&
4748
[[ "$(is_pi5)" = "0" ]]; then
4849
pushd "${BASE_CN_PATH}"/bin/camera-streamer &> /dev/null || exit 1
4950
avail_ver="($(git describe --tags --always))"

tools/libs/core.sh

+16
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ is_ubuntu_arm() {
8585
fi
8686
}
8787

88+
is_armbian() {
89+
if grep -q "Armbian" /etc/os-release; then
90+
echo "1"
91+
else
92+
echo "0"
93+
fi
94+
}
95+
8896
is_speederpad() {
8997
if grep -q "Ubuntu 20.04." /etc/os-release &&
9098
[[ "$(uname -rm)" = "4.9.191 aarch64" ]]; then
@@ -129,6 +137,14 @@ shallow_cs_dependencies_check() {
129137
fi
130138
status_msg "Checking if device is not running Ubuntu ..." "0"
131139

140+
msg "Checking if device is not running Armbian ...\n"
141+
if [[ "$(is_armbian)" = "1" ]]; then
142+
status_msg "Checking if device is not running Armbian ..." "3"
143+
msg "This device is running Armbian therefore camera-streeamer cannot be installed ..."
144+
return 1
145+
fi
146+
status_msg "Checking if device is not running Armbian ..." "0"
147+
132148
msg "Checking for required kernel module ...\n"
133149
SHALLOW_CHECK_MODULESLIST="bcm2835_codec"
134150
if [[ "$(test_load_module ${SHALLOW_CHECK_MODULESLIST})" = "0" ]]; then

0 commit comments

Comments
 (0)