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

[actions] rpi changes #7928

Merged
merged 63 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
53d36c9
rpi changes
dimitre May 3, 2024
7ad92a6
act back
dimitre May 3, 2024
ff7ce13
remove armv6l
dimitre May 3, 2024
884f708
new tests
dimitre May 3, 2024
ef4e8ec
changes
dimitre May 3, 2024
ac6924c
test
dimitre May 3, 2024
9d8a3dd
liblaplack-dev
dimitre May 3, 2024
e3392ae
more test
dimitre May 3, 2024
ebc3d4f
Merge branch 'openframeworks:master' into rpiact
dimitre May 3, 2024
f1e9a01
libdir
dimitre May 3, 2024
ad79a1b
adjustments
dimitre May 3, 2024
ce4dd16
more
dimitre May 3, 2024
44205ea
test
dimitre May 3, 2024
3f26382
up
dimitre May 3, 2024
f8f10bf
revert test
dimitre May 3, 2024
e341c98
updates
dimitre May 4, 2024
e5572ba
one more
dimitre May 4, 2024
6e54f91
up
dimitre May 4, 2024
4b016e4
up
dimitre May 4, 2024
2ea7e2f
up
dimitre May 4, 2024
4570238
up
dimitre May 4, 2024
81cd65c
test
dimitre May 4, 2024
4350393
up;
dimitre May 4, 2024
ead7d4e
one more
dimitre May 4, 2024
df19f22
rm lapack
dimitre May 4, 2024
bdf7891
up
dimitre May 4, 2024
ea70205
update scripts to armv6l as default
dimitre May 5, 2024
f53576a
openCv LDFLAGS lblas llapack
dimitre May 6, 2024
99e5b5d
update
dimitre May 6, 2024
3058727
update
dimitre May 6, 2024
e5be9db
update
dimitre May 6, 2024
0a83293
update
dimitre May 6, 2024
31decf5
update
dimitre May 6, 2024
a071fc1
update
dimitre May 6, 2024
6dfe78a
update
dimitre May 6, 2024
7221afb
update
dimitre May 6, 2024
296c1f8
update
dimitre May 6, 2024
78fe7f1
update
dimitre May 6, 2024
cb42f5b
update
dimitre May 6, 2024
eb1b532
update
dimitre May 6, 2024
06a23e1
update
dimitre May 6, 2024
97284ad
update
dimitre May 6, 2024
dc8f24f
update
dimitre May 6, 2024
3a4ee0f
update
dimitre May 6, 2024
df467ae
up
dimitre May 6, 2024
794eb1e
up
dimitre May 6, 2024
7731fff
up
dimitre May 6, 2024
df88754
up
dimitre May 6, 2024
712e897
up
dimitre May 6, 2024
52f79b3
up
dimitre May 6, 2024
001c185
up
dimitre May 6, 2024
a609094
up
dimitre May 6, 2024
8cd8e1c
up
dimitre May 6, 2024
ce49a3b
now only one action for rpi
dimitre May 6, 2024
fcca9c7
up
dimitre May 6, 2024
89567f1
updates
dimitre May 6, 2024
36daa10
ok
dimitre May 6, 2024
a3b9d4e
okk
dimitre May 6, 2024
ff40bee
rename
dimitre May 6, 2024
477acf9
revert some
dimitre May 6, 2024
7109e18
remove linuxarmv6l/install & build
dimitre May 6, 2024
1ceccde
minimal install.sh
dimitre May 6, 2024
04776c4
unsecure
dimitre May 6, 2024
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
51 changes: 0 additions & 51 deletions .github/workflows/build-linux-arm.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/build-rpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: build-rpi

# make the action not run on the local repo if the branch is also in a pull request to OF/OF
on:
push:
if: github.event_name == 'push' && github.event.pull_request == null
paths-ignore:
- '**/*.md'
- 'examples/**'
pull_request:
if: github.event_name == 'pull_request' && github.repository == 'openframeworks/openFrameworks'
paths-ignore:
- '**/*.md'
- 'examples/**'

env:
ccache: ccache

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
rpi-build:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- { libs: armv6l, multistrap_arch: armhf, suffix: arm-linux-gnueabihf, alladdons: 1 }
- { libs: aarch64, multistrap_arch: arm64, suffix: aarch64-linux-gnu, alladdons: 1 }
env:
ARCH: ${{matrix.cfg.libs}}
MULTISTRAP_ARCH: ${{matrix.cfg.multistrap_arch}}
ALLADDONSEXAMPLE: ${{matrix.cfg.alladdons}}
steps:
- name: Cache Packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: multistrap unzip gcc-${{matrix.cfg.suffix}} g++-${{matrix.cfg.suffix}}
version: 1.0

- uses: actions/checkout@v4

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.cfg.libs }}

- name: Download libs
run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}};
- name: Install dependencies
run: ./scripts/ci/linuxrpi/install.sh;
- name: Build
run: ./scripts/ci/linuxrpi/build.sh;

1 change: 1 addition & 0 deletions addons/ofxOpenCv/addon_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ linuxaarch64:
ADDON_LIBS_EXCLUDE = libs/opencv/%
ADDON_INCLUDES_EXCLUDE = libs/opencv
ADDON_INCLUDES_EXCLUDE += libs/opencv/%
ADDON_LDFLAGS = -lblas -llapack

msys2:
ADDON_PKG_CONFIG_LIBRARIES = opencv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ include $(OF_SHARED_MAKEFILES_PATH)/config.linux.common.mk
# Note: Leave a leading space when adding list items with the += operator
################################################################################

#c++ 17 support - comment out two lines below to use c++11
PLATFORM_CFLAGS += -std=c++17
PLATFORM_LDFLAGS += -lstdc++fs
PLATFORM_CXXVER = -std=c++17


PLATFORM_LDFLAGS += -lstdc++fs
PLATFORM_LDFLAGS += -no-pie
# PLATFORM_LDFLAGS += -nostartfiles
Expand Down Expand Up @@ -98,40 +104,35 @@ ifeq ($(CROSS_COMPILING),1)
ifdef MAKEFILE_DEBUG
$(info detected cross compiling $(CROSS_COMPILING))
endif
ifdef TOOLCHAIN_ROOT
#You have specified TOOLCHAIN_ROOT with an environment variable
else
TOOLCHAIN_ROOT = /opt/cross/bin
endif

ifdef GCC_PREFIX
#You have specified GCC_PREFIX with an environment variable
else
GCC_PREFIX = aarch64-linux-gnu
endif

PLATFORM_CXX = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-g++
PLATFORM_CC = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-gcc
PLATFORM_AR = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-ar
PLATFORM_LD = $(TOOLCHAIN_ROOT)/bin/$(GCC_PREFIX)-ld
PLATFORM_CXX = /usr/bin/$(GCC_PREFIX)-g++
PLATFORM_CC = /usr/bin/$(GCC_PREFIX)-gcc
PLATFORM_AR = /usr/bin/$(GCC_PREFIX)-ar
PLATFORM_LD = /usr/bin/$(GCC_PREFIX)-ld

SYSROOT=$(RPI_ROOT)

PLATFORM_CFLAGS += --sysroot=$(SYSROOT)

PLATFORM_HEADER_SEARCH_PATHS += $(SYSROOT)/usr/include/c++
PLATFORM_HEADER_SEARCH_PATHS += $(TOOLCHAIN_ROOT)/lib/gcc/$(GCC_PREFIX)/$(GCC_VERSION)/include

PLATFORM_LIBRARY_SEARCH_PATHS += $(SYSROOT)/usr/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(SYSROOT)/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(TOOLCHAIN_ROOT)/lib/gcc/$(GCC_PREFIX)/$(GCC_VERSION)
PLATFORM_LIBRARY_SEARCH_PATHS += /usr/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += /lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack

PLATFORM_LDFLAGS += --sysroot=$(SYSROOT)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/opt/vc/lib
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/usr/lib/arm-linux-gnueabihf/pulseaudio

PKG_CONFIG_LIBDIR=$(SYSROOT)/usr/lib/pkgconfig:$(SYSROOT)/usr/lib/$(GCC_PREFIX)/pkgconfig:$(SYSROOT)/usr/share/pkgconfig
PLATFORM_LDFLAGS += -lblas -llapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)/pulseaudio
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas

PKG_CONFIG_LIBDIR += /usr/lib/pkgconfig:/usr/lib/$(GCC_PREFIX)/pkgconfig:/usr/share/pkgconfig

endif
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ PLATFORM_CFLAGS += -std=c++17
PLATFORM_LDFLAGS += -lstdc++fs
PLATFORM_CXXVER = -std=c++17

PLATFORM_CFLAGS += -march=armv6
# PLATFORM_CFLAGS += -march=armv6
PLATFORM_CFLAGS += -marm

PLATFORM_CFLAGS += -mfpu=vfp
PLATFORM_CFLAGS += -mfloat-abi=hard
PLATFORM_CFLAGS += -fPIC
Expand Down Expand Up @@ -169,6 +171,7 @@ ifeq ($(USE_PI_LEGACY), 0)
PLATFORM_LIBRARIES += GLESv2
PLATFORM_LIBRARIES += GLESv1_CM
PLATFORM_LIBRARIES += EGL
# FIXME: update to what is possible now.
else ifneq (,$(wildcard $(RPI_ROOT)/opt/vc/lib/libGLESv2.so))
PLATFORM_LIBRARIES += GLESv2
PLATFORM_LIBRARIES += GLESv1_CM
Expand All @@ -178,10 +181,10 @@ else
PLATFORM_LIBRARIES += brcmEGL
endif

PLATFORM_LIBRARIES += openmaxil
PLATFORM_LIBRARIES += bcm_host
PLATFORM_LIBRARIES += vcos
PLATFORM_LIBRARIES += vchiq_arm
# PLATFORM_LIBRARIES += openmaxil
# PLATFORM_LIBRARIES += bcm_host
# PLATFORM_LIBRARIES += vcos
# PLATFORM_LIBRARIES += vchiq_arm
PLATFORM_LIBRARIES += pcre
PLATFORM_LIBRARIES += rt
PLATFORM_LIBRARIES += X11
Expand All @@ -205,10 +208,8 @@ endif
################################################################################

# Broadcom hardware interface library
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/opt/vc/include
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/opt/vc/include/IL
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/opt/vc/include/interface/vcos/pthreads
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/opt/vc/include/interface/vmcs_host/linux
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/userland/host_applications/linux/libs/bcm_host/include
PLATFORM_HEADER_SEARCH_PATHS += $(RPI_ROOT)/userland
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work for people working with the device itself ( as opposed to building in the CI )?
ie: does userland exist for Pi device users?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. maybe I should put back the includes with /opt/vc in armv6l
easy to do

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and enclose this in ifdef CROSS_COMPILE


##########################################################################################
# PLATFORM LIBRARY SEARCH PATH
Expand Down Expand Up @@ -269,19 +270,19 @@ endif

PLATFORM_CFLAGS += --sysroot=$(SYSROOT)

PLATFORM_HEADER_SEARCH_PATHS += $(SYSROOT)/usr/include/c++
PLATFORM_HEADER_SEARCH_PATHS += $(TOOLCHAIN_ROOT)/lib/gcc/$(GCC_PREFIX)/$(GCC_VERSION)/include

PLATFORM_LIBRARY_SEARCH_PATHS += $(SYSROOT)/usr/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(SYSROOT)/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(TOOLCHAIN_ROOT)/lib/gcc/$(GCC_PREFIX)/$(GCC_VERSION)
PLATFORM_LIBRARY_SEARCH_PATHS += /usr/lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += /lib/$(GCC_PREFIX)
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas
PLATFORM_LIBRARY_SEARCH_PATHS += $(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack

PLATFORM_LDFLAGS += --sysroot=$(SYSROOT)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/opt/vc/lib
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(SYSROOT)/usr/lib/arm-linux-gnueabihf/pulseaudio

PKG_CONFIG_LIBDIR=$(SYSROOT)/usr/lib/pkgconfig:$(SYSROOT)/usr/lib/$(GCC_PREFIX)/pkgconfig:$(SYSROOT)/usr/share/pkgconfig
PLATFORM_LDFLAGS += -lblas -llapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/lib/$(GCC_PREFIX)
PLATFORM_LDFLAGS += -Xlinker -rpath-link=/usr/lib/$(GCC_PREFIX)/pulseaudio
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/lapack
PLATFORM_LDFLAGS += -Xlinker -rpath-link=$(RPI_ROOT)/usr/lib/$(GCC_PREFIX)/blas

PKG_CONFIG_LIBDIR += /usr/lib/pkgconfig:/usr/lib/$(GCC_PREFIX)/pkgconfig:/usr/share/pkgconfig

endif
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ ifdef ${ccache}
$(info 💿 Using CCACHE - compile.core.mk )
CXX := ${ccache} $(CXX)
CC := ${ccache} $(CXX)
endif
endif

$(info 💾 CXX = $(CXX))
$(info 💾 CC = $(CC))

################################################################################
# CFLAGS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,65 +119,67 @@ endif

.PHONY: all Debug Release after clean CleanDebug CleanRelease help force

# $(info MAKEFLAGS XXX = ${MAKEFLAGS})
JOBS = -j2

Release:
@echo Compiling OF library for Release
@$(MAKE) -j -C $(OF_ROOT)/libs/openFrameworksCompiled/project/ Release PLATFORM_OS=$(PLATFORM_OS) ABIS_TO_COMPILE_RELEASE="$(ABIS_TO_COMPILE_RELEASE)"
@$(MAKE) $(JOBS) -C $(OF_ROOT)/libs/openFrameworksCompiled/project/ Release PLATFORM_OS=$(PLATFORM_OS) ABIS_TO_COMPILE_RELEASE="$(ABIS_TO_COMPILE_RELEASE)"
@echo
@echo
@echo Compiling $(APPNAME) for Release
ifndef ABIS_TO_COMPILE_RELEASE
@$(MAKE) -j ReleaseABI
@$(MAKE) $(JOBS) ReleaseABI
else
@$(foreach abi,$(ABIS_TO_COMPILE_RELEASE),$(MAKE) -j ReleaseABI ABI=$(abi) &&) echo
@$(foreach abi,$(ABIS_TO_COMPILE_RELEASE),$(MAKE) $(JOBS) ReleaseABI ABI=$(abi) &&) echo
endif



Debug:
@echo Compiling OF library for Debug
$(MAKE) -j -C $(OF_ROOT)/libs/openFrameworksCompiled/project/ Debug PLATFORM_OS=$(PLATFORM_OS) ABIS_TO_COMPILE_DEBUG="$(ABIS_TO_COMPILE_DEBUG)"
$(MAKE) $(JOBS) -C $(OF_ROOT)/libs/openFrameworksCompiled/project/ Debug PLATFORM_OS=$(PLATFORM_OS) ABIS_TO_COMPILE_DEBUG="$(ABIS_TO_COMPILE_DEBUG)"
@echo
@echo
@echo Compiling $(APPNAME) for Debug
ifndef ABIS_TO_COMPILE_DEBUG
@$(MAKE) -j DebugABI
@$(MAKE) $(JOBS) DebugABI
else
@$(foreach abi,$(ABIS_TO_COMPILE_DEBUG),$(MAKE) DebugABI ABI=$(abi) &&) echo
endif

ReleaseNoOF:
@echo Compiling $(APPNAME) for Release
ifndef ABIS_TO_COMPILE_RELEASE
@$(MAKE) -j ReleaseABI
@$(MAKE) $(JOBS) ReleaseABI
else
@$(foreach abi,$(ABIS_TO_COMPILE_RELEASE),$(MAKE) ReleaseABI ABI=$(abi) &&) echo
endif

DebugNoOF:
@echo Compiling $(APPNAME) for Debug
ifndef ABIS_TO_COMPILE_DEBUG
@$(MAKE) -j DebugABI
@$(MAKE) $(JOBS) DebugABI
else
@$(foreach abi,$(ABIS_TO_COMPILE_DEBUG),$(MAKE) DebugABI ABI=$(abi) &&) echo
endif

ReleaseABI: $(TARGET)
ifneq ($(strip $(PROJECT_ADDONS_DATA)),)
@$(MAKE) -j copyaddonsdata PROJECT_ADDONS_DATA="$(PROJECT_ADDONS_DATA)"
@$(MAKE) $(JOBS) copyaddonsdata PROJECT_ADDONS_DATA="$(PROJECT_ADDONS_DATA)"
endif
@$(MAKE) -j afterplatform BIN_NAME=$(BIN_NAME) ABIS_TO_COMPILE="$(ABIS_TO_COMPILE_RELEASE)" RUN_TARGET=$(RUN_TARGET) TARGET=$(TARGET)
@$(MAKE) $(JOBS) afterplatform BIN_NAME=$(BIN_NAME) ABIS_TO_COMPILE="$(ABIS_TO_COMPILE_RELEASE)" RUN_TARGET=$(RUN_TARGET) TARGET=$(TARGET)
@$(PROJECT_AFTER)

DebugABI: $(TARGET)
ifneq ($(strip $(PROJECT_ADDONS_DATA)),)
@$(MAKE) -j copyaddonsdata PROJECT_ADDONS_DATA="$(PROJECT_ADDONS_DATA)"
@$(MAKE) $(JOBS) copyaddonsdata PROJECT_ADDONS_DATA="$(PROJECT_ADDONS_DATA)"
endif
@$(MAKE) -j afterplatform BIN_NAME=$(BIN_NAME) ABIS_TO_COMPILE="$(ABIS_TO_COMPILE_DEBUG)" RUN_TARGET=$(RUN_TARGET) TARGET=$(TARGET)
@$(MAKE) $(JOBS) afterplatform BIN_NAME=$(BIN_NAME) ABIS_TO_COMPILE="$(ABIS_TO_COMPILE_DEBUG)" RUN_TARGET=$(RUN_TARGET) TARGET=$(TARGET)
@$(PROJECT_AFTER)

all:
$(MAKE) -j Debug
$(MAKE) $(JOBS) Debug

run:
ifeq ($(PLATFORM_RUN_COMMAND),)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ PLATFORM_PKG_CONFIG_LIBRARIES += openal
# PLATFORM_PKG_CONFIG_LIBRARIES += openssl
PLATFORM_PKG_CONFIG_LIBRARIES += libcurl


ifeq ($(CROSS_COMPILING),1)
ifeq "$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); pkg-config --exists glfw3 && echo 1)" "1"
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
Expand Down
Loading