Skip to content
Snippets Groups Projects
Commit cf0d7e6a authored by Hannes Feldt's avatar Hannes Feldt
Browse files

Merge branch 'L2SS-2039-automate_build' into 'main'

Resolve L2SS-2039 "Automate build"

Closes L2SS-2039

See merge request !3
parents 1bb679b5 ae34237c
No related branches found
No related tags found
1 merge request!3Resolve L2SS-2039 "Automate build"
Pipeline #124543 skipped
default:
image: ghcr.io/siemens/kas/kas
cache:
paths:
- $CI_BUILDS_DIR/meta-pypcc/build/
- $CI_BUILDS_DIR/meta-pypcc/layers/
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/meta-pypcc/meta-pypcc
stages:
- build
run_build:
stage: build
when: manual
script:
- cd "$CI_BUILDS_DIR/meta-pypcc"
- kas build meta-pypcc/kas-pypcc-rpi.yml
- mkdir meta-pypcc/artifacts
- cp build/tmp/deploy/images/raspberrypi4-64/core-image-full-cmdline-raspberrypi4-64.rootfs.wic.* meta-pypcc/artifacts/
- cp build/tmp/deploy/images/raspberrypi4-64/update-image-raspberrypi4-64.rootfs.swu meta-pypcc/artifacts/
artifacts:
paths:
- artifacts/*
\ No newline at end of file
...@@ -33,7 +33,7 @@ kas chrpath rpcgen diffstat lz4 bc build-essential cpio gawk git python3 texinfo ...@@ -33,7 +33,7 @@ kas chrpath rpcgen diffstat lz4 bc build-essential cpio gawk git python3 texinfo
```sh ```sh
git clone https://git.astron.nl/lofar2.0/meta-pypcc.git git clone https://git.astron.nl/lofar2.0/meta-pypcc.git
kas meta-pypcc/kas-pypcc-rpi.yml kas build meta-pypcc/kas-pypcc-rpi.yml
``` ```
## How To ## How To
......
...@@ -86,27 +86,18 @@ local_conf_header: ...@@ -86,27 +86,18 @@ local_conf_header:
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
IMAGE_INSTALL:append = "python3-pypcc dtc i2c-tools spidev-test swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev libiio-iiod" IMAGE_INSTALL:append = "python3-pypcc vcgencmd dtc i2c-tools swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev kernel-module-i2c-gpio"
#kernel-module-hwmon-max6620 kernel-module-input-gpio-decoder
IMAGE_FSTYPES = "tar.bz2 ext4 ext4.gz wic.bz2 wic.bmap" IMAGE_FSTYPES = "tar.bz2 ext4 ext4.gz wic.bz2 wic.bmap"
SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ubifs" SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ubifs"
# BBFILES_DYNAMIC += " \
# raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \
# raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bbappend \
# "
# IMAGE_BOOT_FILES:append = "ccd.dtbo;overlays/ccd.dtbo"
# IMAGE_BOOT_FILES:append = "apsct.dtbo;overlays/apsct.dtbo;"
rpi-specific: | rpi-specific: |
RPI_USE_U_BOOT = "1" RPI_USE_U_BOOT = "1"
ENABLE_I2C = "1" ENABLE_I2C = "1"
ENABLE_UART = "1" ENABLE_UART = "1"
ENABLE_SPI_BUS = "1" ENABLE_DWC2_HOST = "1"
CMDLINE_ROOT_PARTITION = "/dev/mmcblk0p3" CMDLINE_ROOT_PARTITION = "/dev/mmcblk0p3"
#KERNEL_MODULE_AUTOLOAD:rpi += "" KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708 i2c-gpio"
RPI_EXTRA_CONFIG = "dtoverlay=disable-bt\ndtoverlay=disable-wifi\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=2,i2c_gpio_sda=17,i2c_gpio_scl=27\ndtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=2,i2c_gpio_sda=10,i2c_gpio_scl=9\ndtoverlay=i2c-gpio,bus=5,i2c_gpio_delay_us=2,i2c_gpio_sda=5,i2c_gpio_scl=6\ndtparam=i2c_vc=on" RPI_EXTRA_CONFIG = "dtoverlay=disable-bt\ndtoverlay=disable-wifi\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=2,i2c_gpio_sda=17,i2c_gpio_scl=27\ndtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=2,i2c_gpio_sda=10,i2c_gpio_scl=9\ndtoverlay=i2c-gpio,bus=5,i2c_gpio_delay_us=2,i2c_gpio_sda=5,i2c_gpio_scl=6\ndtparam=i2c_vc=on"
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch" LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
WKS_FILE = "image-halibutpi.wks" WKS_FILE = "image-halibutpi.wks"
SWUPDATE_IMAGES = "core-image-full-cmdline" SWUPDATE_IMAGES = "core-image-full-cmdline"
LINUX_KERNEL_TYPE = "preempt-rt" LINUX_KERNEL_TYPE = "preempt-rt"
# IMAGE_FSTYPES = "rpi-sdimg ext4.gz"
# PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
diff --git a/pypcc/opcuaserv/i2client.py b/pypcc/opcuaserv/i2client.py
index 7aaabacf806b0e0570bffa34f7471594df6e4edf..7e2cf378e6437e9cbb8ffb5983d98edce4d17a66 100644
--- a/pypcc/opcuaserv/i2client.py
+++ b/pypcc/opcuaserv/i2client.py
@@ -1,6 +1,6 @@
#This is the OPC-UA side of the pipes to I2Cserver
-from multiprocessing import Queue
+from queue import Queue
from pypcc.queuetypes import *
SUMMARY = "LOFAR 2.0 Hardware Translator: Monitor and control devices via OPC-UA"
DESCRIPTION = "LOFAR 2.0 Hardware Translator running on CCD and APSPU to monitor and control I2C devices via OPC-UA."
HOMEPAGE = "https://git.astron.nl/lofar2.0/pypcc"
BUGTRACKER = "https://git.astron.nl/lofar2.0/pypcc/-/issues"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e69695c29b07eeb2a832d4a7e1f1e86b"
BB_STRICT_CHECKSUM = "0"
# http checkout not working atm. rev should be removed
#SRCREV = "${AUTOREV}"
#PV = "0.0.1+git${SRCPV}"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI = " \
git://git.astron.nl/lofar2.0/pypcc.git;branch=master;rev=650e2b6bd44b751405a7543a9484fab90f70abe9 \
file://6483a22a6810c5f47e7b50d44fa77c3918546670.patch \
"
S = "${WORKDIR}/git"
FILES:${PN} += "\
${systemd_unitdir}/system/*.service \
${systemd_unitdir}/system/multi-user.target.wants/pitr.service \
"
DEPENDS += "python3-setuptools-scm-native"
inherit setuptools3_legacy systemd
RDEPENDS:${PN} += "\
initscripts \
bash \
rpi-gpio i2c-tools \
python3 \
python3-smbus \
python3-smbus2 \
python3-numpy \
python3-pyyaml \
python3-asyncua \
python3-pylibi2c \
python3-recordclass \
python3-logstash-async \
"
#SYSTEMD_AUTO_ENABLE = "enable"
SYSTEMD_SERVICE:${PN} = "\
pitr.service \
recvtr.service \
apscttr.service \
apsputr.service \
unb2tr.service \
ccdtr.service \
"
do_package_qa() {
}
do_install:append () {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/bin/pitr.service ${D}${systemd_unitdir}/system/pitr.service
install -m 0644 ${S}/bin/recvtr.service ${D}${systemd_unitdir}/system/recvtr.service
install -m 0644 ${S}/bin/apscttr.service ${D}${systemd_unitdir}/system/apscttr.service
install -m 0644 ${S}/bin/apsputr.service ${D}${systemd_unitdir}/system/apsputr.service
install -m 0644 ${S}/bin/unb2tr.service ${D}${systemd_unitdir}/system/unb2tr.service
install -m 0644 ${S}/bin/ccdtr.service ${D}${systemd_unitdir}/system/ccdtr.service
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
ln -sf ../pitr.service ${D}${systemd_unitdir}/system/multi-user.target.wants/pitr.service
}
DESCRIPTION = "This package build vcgencmd from the raspberrypi utils repository"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://../LICENCE;md5=4c01239e5c3a3d133858dedacdbca63c"
COMPATIBLE_MACHINE = "^rpi$"
SRCBRANCH = "master"
SRCREV = "33aa4da93d8da90d5075e8cd48e72cc90048b9f3"
# Use the date of the above commit as the package version. Update this when
# SRCREV is changed.
PV = "20250106"
SRC_URI = "\
git://github.com/raspberrypi/utils.git;protocol=https;branch=${SRCBRANCH} \
"
S = "${WORKDIR}/git/vcgencmd"
inherit cmake pkgconfig
ASNEEDED = ""
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \
-DVMCS_INSTALL_PREFIX=${exec_prefix} \
"
EXTRA_OECMAKE:append:aarch64 = " -DARM64=ON "
CFLAGS:append = " -fPIC -Wno-unused-but-set-variable"
do_install:append () {
rm -rf ${D}${datadir}/bash-completion
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment