Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pthreads was missing at least for aarch64 #78

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.dockerignore
.gitignore
Dockerfile
*.yml
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM balenalib/raspberrypi400-64-debian

WORKDIR /PCA9685

COPY . .

RUN apt update
RUN apt install cmake build-essential

RUN mkdir build

WORKDIR /PCA9685/build

RUN cmake ..

RUN make

RUN make install

# ola deps
RUN apt install ola libola-dev

# audio deps
# RUN apt install libasound2 libasound2-dev libfftw3-3 libfftw3-dev

# demo deps
# RUN apt install libncurses5-dev

RUN make examples

CMD ["sleep", "7200"]
9 changes: 5 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
project(examples)
# build the examples
add_subdirectory(olaclient)
add_subdirectory(PCA9685demo)
add_subdirectory(quickstart)
add_subdirectory(audio)
#add_subdirectory(PCA9685demo)
#add_subdirectory(quickstart)
#add_subdirectory(audio)

add_custom_target(examples)
add_dependencies(examples olaclient PCA9685demo quickstart audio)
add_dependencies(examples olaclient)
# PCA9685demo quickstart audio)
4 changes: 4 additions & 0 deletions examples/olaclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ target_link_libraries(olaclient PCA9685)
target_link_libraries(olaclient ola)
target_link_libraries(olaclient olacommon)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(olaclient Threads::Threads)

install(TARGETS olaclient DESTINATION bin)
install(FILES olaclient.service DESTINATION /etc/systemd/system)

Expand Down
20 changes: 20 additions & 0 deletions svc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: my-service
spec:
selector:
app: pca9685
type: NodePort
ports:
-
port: 9090
nodePort: 30000
name: my-port-9090

-
port: 7890
nodePort: 30001
name: my-port-9010


8 changes: 8 additions & 0 deletions system-dependency-note/MicroOs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Some changes are needed to the system

i2c-dev must be loaded on boot


echo "i2c-dev" > /etc/modules-load.d/i2c-dev.conf
echo "i2c-bcm2708" > /etc/modules-load.d/i2c-bcm2708.conf

44 changes: 44 additions & 0 deletions test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pca9685
labels:
app: pca9685
spec:
replicas: 1
selector:
matchLabels:
app: pca9685
template:
metadata:
labels:
app: pca9685
spec:
nodeName: tanis02
containers:
- name: pca9685
resources:
limits:
memory: "512Mi"
cpu: "400m"
image: nargetdev/pca9685:v0.0.0
securityContext:
privileged: true
imagePullPolicy: Always
command:
- "/PCA9685/build/examples/olaclient/olaclient"
- name: ola
image: nargetdev/ola:v0.1.2
imagePullPolicy: Always
securityContext:
privileged: true
resources:
limits:
memory: "512Mi"
cpu: 400m
# ports:
# - containerPort: 9090
# - containerPort: 9010
# - containerPort: 7890
# - containerPort: 6454
# - containerPort: 5568