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

Merge branch 'pypcc-swupdate-layout' into 'main'

Pypcc initial image layout

See merge request !1
parents e9ec76f9 6d7213d3
No related branches found
No related tags found
1 merge request!1Pypcc initial image layout
Showing
with 516 additions and 51 deletions
.idea
README.md 0 → 100644
# meta-halibat
## PyPCC CCD/APCST Image Layout boogaloo
The image used by Paulus / Gijs is mbr formatted created by flashing a self expanding image. These images
are modified in place to be extended to accommodate swupdate / halibut in the future while not altering
the original content expect for shrinking of the root filesystem. This is to allow to shortcut validation
of the image functionality.
This poses the limitation that only four primary partitions can be used. The layout is shown below:
```
├─loop0p1 vfat FAT32 bootfs 924E-9841
├─loop0p2 ext4 1.0 rootfs 30e7848d-9db8-4b2f-8010-798ddfb304b0
├─loop0p3 ext4 1.0 root b85dc2ce-24ec-4f90-acc0-83eaa527263f
└─loop0p4 ext4 1.0 root1 d2999147-f756-4ab7-8a49-1f2f2dd3a173
```
Limitations:
1. The `wks` file has been updated to reflect this layout but boot partition will incorrectly point to partition two
even though its specified that the rootfs should be partition three.
2. The partition label that needs to be used is fixed as `root`.
3. It currently wasn't successful to install swupdate on the rootfs partition from Paulus/Gijs.
4. It currently wasn't successful to alter the bootfs partition to the point where our own root partition would boot.
## Dependencies
```
kas chrpath rpcgen diffstat lz4 bc build-essential cpio gawk git python3 texinfo wget gdisk libssl-dev
```
## Installation / Setup
```sh
git clone https://git.astron.nl/lofar2.0/meta-pypcc.git
kas meta-pypcc/kas-pypcc-rpi.yml
```
## How To
1. [Inspect and modify system images](#inspect-and-modify-system-images)
2. [Bitbake show recipes and bb file](#bitbake-show-recipes-and-related-bb-file)
3. [Flash the raspberrypi cm4](#flash-the-raspberrypi-cm4)
#### Inspect and modify system images
```sh
sudo modprobe loop
bzcat -d build/tmp/deploy/images/raspberrypi4-64/core-image-full-cmdline-raspberrypi4-64.wic.bz2 > raspberry.wic
sudo losetup --find --show --partscan raspberry.wic
lsblk -f # shows new partitions from image on loop device
# You can now mount these to inspect there content
# To detach run losetup -d with the correct loop device as shown below
sudo losetup -d loop${X}
```
#### Bitbake show recipes and related bb file
```sh
kas shell meta-halibut/kas-pypcc-rpi.yml
bitbake-layers show-recipes
# To show related bb file
bitbake -e ${RECIPE_NAME} | grep ^FILE=
```
#### Bitbake show recipe (r)depends
For this you need a tool called `bb-depends-dot`.
```sh
git clone https://github.com/thomastrapp/bb-depends-dot.git
cd bb-depends-dot/build
cmake ..
make -j 120
```
Afterward, you can use the `.dot` file from `bitbake -g`
```sh
bitbake -g linux-raspberrypi
./bb-depends-dot -d task-depends.dot linux-raspberrypi
```
#### Flash the raspberrypi cm4
1. First turn the raspberrypi off.
2. Flip the rpiboot switch on the board to the bottom position and reset the pi.
3. Connect usb cable via programming port to laptop / pc.
4. Run `rpiboot`, might need root permissions.
5. run `lsblk -f` to identify the pi block device.
6. `kas shell meta-halibut/kas-halibut-rpi.yml`
7. `sudo bmaptool copy tmp/deploy/images/raspberrypi4-64/core-image-full-cmdline-raspberrypi4-64.rootfs.wic.bz2 /dev/{REPLACE_ME}`
8. `sudo eject /dev/${REPLACE_ME}`
9. Turn rpiboot switch to top position and reset.
## References
1. [Yocto cheatsheet](https://low-level.wiki/yocto/cheatsheet.html)
2. [kas documentation](https://kas.readthedocs.io/en/latest/userguide/getting-started.html)
3. [Raspberrypi CM4 pinout](https://atctwo.net/projects/pinout/index.html)
4. [BCM2711 alt functions](https://elinux.org/RPi_BCM2711_GPIOs)
...@@ -4,14 +4,23 @@ BBPATH .= ":${LAYERDIR}" ...@@ -4,14 +4,23 @@ BBPATH .= ":${LAYERDIR}"
# We have recipes directories, add to BBFILES # We have recipes directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes/*.bb" BBFILES += "${LAYERDIR}/recipes/*.bb"
BBFILES += "${LAYERDIR}/recipes/*/*.bb" BBFILES += "${LAYERDIR}/recipes/*/*.bb"
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "pypcc"
BBFILE_PATTERN_pypcc := "^${LAYERDIR}/"
BBFILE_PRIORITY_pypcc = "20"
BBFILES_DYNAMIC += " \
raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \
raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bbappend \
"
BBFILE_COLLECTIONS += "meta-halibut"
BBFILE_PATTERN_meta-halibut := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-halibut = "5"
BB_VERBOSE_LOGS = "True" BB_VERBOSE_LOGS = "True"
# This should only be incremented on significant changes that will # This should only be incremented on significant changes that will
# cause compatibility issues with other layers # cause compatibility issues with other layers
LAYERVERSION_meta-halibut = "1" LAYERVERSION_pypcc = "1"
LAYERSERIES_COMPAT_meta-halibut = "styhead scarthgap" LAYERSERIES_COMPAT_pypcc = "styhead scarthgap"
LAYERDEPENDS_pypcc = "swupdate"
\ No newline at end of file
saveenv
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
if env exists rpipart;then echo Booting from mmcblk0p${rpipart};else setenv rpipart 3;echo rpipart not set, default to ${rpipart};fi
load mmc 0:${rpipart} ${kernel_addr_r} boot/@@KERNEL_IMAGETYPE@@
setenv bootargs "${bootargs} root=/dev/mmcblk0p${rpipart}"
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
COMPATIBLE = "raspberrypi3 raspberrypi4 raspberrypi4-64"
# Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
header: header:
version: 8 version: 14
machine: raspberrypi4-64 machine: raspberrypi4-64
distro: poky distro: poky
target: target:
- core-image-full-cmdline - core-image-full-cmdline
- update-image
repos: repos:
meta-halibut:
meta-raspberrypi: meta-raspberrypi:
url: https://github.com/agherzan/meta-raspberrypi url: https://github.com/agherzan/meta-raspberrypi
...@@ -22,7 +25,7 @@ repos: ...@@ -22,7 +25,7 @@ repos:
meta-swupdate-boards: meta-swupdate-boards:
url: https://github.com/sbabic/meta-swupdate-boards url: https://github.com/sbabic/meta-swupdate-boards
path: layers/meta-swupdate-boards path: layers/meta-swupdate-boards
branch: master commit: f6ad60520eb35b2b86a719bafff0cc78fff84507
poky: poky:
url: https://git.yoctoproject.org/git/poky url: https://git.yoctoproject.org/git/poky
...@@ -42,12 +45,12 @@ repos: ...@@ -42,12 +45,12 @@ repos:
meta-python: meta-python:
meta-networking: meta-networking:
meta-perl: meta-perl:
#
# meta-qt5: # meta-qt5:
# url: https://github.com/meta-qt5/meta-qt5/ # url: https://github.com/meta-qt5/meta-qt5/
# path: layers/meta-qt5 # path: layers/meta-qt5
# branch: scarthgap # branch: scarthgap
meta-pypcc:
bblayers_conf_header: bblayers_conf_header:
standard: | standard: |
POKY_BBLAYERS_CONF_VERSION = "2" POKY_BBLAYERS_CONF_VERSION = "2"
...@@ -79,18 +82,31 @@ local_conf_header: ...@@ -79,18 +82,31 @@ local_conf_header:
CORE_IMAGE_EXTRA_INSTALL:append = "openssh" CORE_IMAGE_EXTRA_INSTALL:append = "openssh"
MACHINE_FEATURES:remove = "alsa bluetooth " MACHINE_FEATURES:remove = "alsa bluetooth "
DISTRO_FEATURES:remove = "3g alsa bluetooth nfc opengl pulseaudio" DISTRO_FEATURES:remove = "3g alsa bluetooth nfc opengl pulseaudio"
DISTRO_FEATURES:append = "swupdate" DISTRO_FEATURES:append = "swupdate systemd usrmerge"
IMAGE_INSTALL:append = "halibut swupdate" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
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"
#kernel-module-hwmon-max6620 kernel-module-input-gpio-decoder
IMAGE_FSTYPES = "tar.bz2 ext4 ext4.gz wic.bz2 wic.bmap"
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"
RPI_EXTRA_CONFIG = "dtoverlay=disable-bt\ndtoverlay=disable-wifi" ENABLE_SPI_BUS = "1"
CMDLINE_ROOT_PARTITION = "/dev/mmcblk0p3"
#KERNEL_MODULE_AUTOLOAD:rpi += ""
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"
# PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv" SWUPDATE_IMAGES = "core-image-full-cmdline"
# SWUPDATE_IMAGES = "core-image-full-cmdline uImage" LINUX_KERNEL_TYPE = "preempt-rt"
# IMAGE_FSTYPES = "rpi-sdimg ext4.gz" # IMAGE_FSTYPES = "rpi-sdimg ext4.gz"
# PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"
# LINUX_KERNEL_TYPE = "preempt-rt"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI = " \
file://sw-description \
"
\ No newline at end of file
software =
{
version = "0.1.0";
@@MACHINE@@ = {
hardware-compatibility: [ "1.0"];
stable : {
copy1 : {
images: (
{
filename = "core-image-full-cmdline-@@MACHINE@@.rootfs.ext4.gz";
type = "raw";
compressed = "zlib";
device = "/dev/mmcblk0p3";
sha256 = "$swupdate_get_sha256(core-image-full-cmdline-@@MACHINE@@.rootfs.ext4.gz)";
}
);
bootenv: (
{
name = "rpipart";
value = "3";
},
{
name = "ustate";
value = "1";
}
);html
};
copy2 : {
images: (
{
filename = "core-image-full-cmdline-@@MACHINE@@.rootfs.ext4.gz";
type = "raw";
compressed = "zlib";
device = "/dev/mmcblk0p4.";
sha256 = "$swupdate_get_sha256(core-image-full-cmdline-@@MACHINE@@.rootfs.ext4.gz)";
}
);
bootenv: (
{
name = "rpipart";
value = "4";
},
{
name = "ustate";
value = "1";
}
);
};
};
}
}
rootfs=`swupdate -g`
if [ $rootfs == '/dev/mmcblk0p3' ];then
selection="-e stable,copy2"
else
selection="-e stable,copy1"
fi
if [ -e /media/etc/swupdate.cfg ];then
CFGFILE="/media/etc/swupdate.cfg"
else
CFGFILE="/etc/swupdate.cfg"
fi
SWUPDATE_ARGS="-H @MACHINE@:1.0 ${selection} -p 'reboot' -f ${CFGFILE}"
# Automatically generated file; DO NOT EDIT.
# Swupdate Configuration
#
CONFIG_HAVE_DOT_CONFIG=y
#
# Swupdate Settings
#
#
# General Configuration
#
CONFIG_CURL=y
# CONFIG_CURL_SSL is not set
CONFIG_SYSTEMD=n
CONFIG_SCRIPTS=y
CONFIG_HW_COMPATIBILITY=y
CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
#
# Socket Paths
#
CONFIG_SOCKET_CTRL_PATH=""
CONFIG_SOCKET_PROGRESS_PATH=""
CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
# CONFIG_MTD is not set
CONFIG_LUA=n
CONFIG_LUAPKG="lua"
# CONFIG_FEATURE_SYSLOG is not set
#
# Build Options
#
CONFIG_CROSS_COMPILE=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_WERROR is not set
# CONFIG_NOCLEANUP is not set
# CONFIG_BOOTLOADER_EBG is not set
CONFIG_UBOOT=y
# CONFIG_BOOTLOADER_NONE is not set
# CONFIG_BOOTLOADER_GRUB is not set
CONFIG_UBOOT_FWENV="/etc/fw_env.config"
CONFIG_UBOOT_NEWAPI=y
CONFIG_UBOOT_DEFAULTENV="/etc/u-boot-initial-env"
# CONFIG_SSL_IMPL_NONE is not set
CONFIG_SSL_IMPL_OPENSSL=y
# CONFIG_SSL_IMPL_MBEDTLS is not set
CONFIG_DOWNLOAD=y
# CONFIG_DOWNLOAD_SSL is not set
CONFIG_CHANNEL_CURL=y
CONFIG_HASH_VERIFY=y
# Enable to update images with verified source
#CONFIG_SIGNED_IMAGES=y
#CONFIG_ENCRYPTED_IMAGES=y
CONFIG_SURICATTA=n
#
# Features
#
CONFIG_SURICATTA_SSL=y
# CONFIG_SURICATTA_STATE_CHOICE_NONE is not set
CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER=y
CONFIG_SURICATTA_STATE_BOOTLOADER="ustate"
#
# Server
#
CONFIG_SURICATTA_HAWKBIT=y
# CONFIG_SURICATTA_GENERAL is not set
CONFIG_WEBSERVER=y
CONFIG_MONGOOSE=y
# CONFIG_MONGOOSEIPV6 is not set
CONFIG_MONGOOSESSL=n
CONFIG_GUNZIP=y
CONFIG_MONGOOSE_WEB_API_V2=y
# CONFIG_ZSTD is not set
#
# Parser Features
#
CONFIG_LIBCONFIG=y
CONFIG_PARSERROOT=""
CONFIG_JSON=y
# CONFIG_LUAEXTERNAL is not set
# CONFIG_SETSWDESCRIPTION is not set
#
# Image Handlers
#
CONFIG_RAW=y
# CONFIG_RDIFFHANDLER is not set
CONFIG_LUASCRIPTHANDLER=y
CONFIG_SHELLSCRIPTHANDLER=y
# CONFIG_HANDLER_IN_LUA is not set
CONFIG_ARCHIVE=y
CONFIG_REMOTE_HANDLER=y
# CONFIG_SWUFORWARDER_HANDLER is not set
CONFIG_BOOTLOADERHANDLER=y
# CONFIG_UCFWHANDLER is not set
globals :
{
verbose = true;
loglevel = 5;
syslog = true;
// public-key-file = "@PUBKEY@";
};
download :
{
retries = 3;
timeout = 1800;
};
identify : (
{ name = "raspberryPI"; value = "1.0"; }
);
suricatta :
{
enable = true;
tenant = "default";
id = "@TARGETID@";
url = "@PROTOCOL@://@HOSTNAME@:@PORT@";
polldelay = 60;
nocheckcert = true;
retry = 4;
retrywait = 200;
loglevel = 10;
userid = 0;
groupid = 0;
targettoken = "@TARGETTOKEN@";
};
webserver :
{
document_root = "/www";
userid = 0;
groupid = 0;
timeout = 20;
};
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://09-swupdate-args \
file://swupdate.cfg \
file://defconfig \
"
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/halibut"
BUGTRACKER = "https://git.astron.nl/lofar2.0/halibut/-/issues"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
SRC_URI = " \
git://gitlab.com/systerel/S2OPC.git;protocol=https;branch=S2OPC_Toolkit_1.5.1;tag=S2OPC_Toolkit_1.5.1;destsuffix=deps/s2opc-src;nobranch=1 \
git://git.astron.nl/lofar2.0/halibut.git;branch=L2SS-1516-port-pypcc-to-s2opc;rev=f3125335f3e73cb366185513d4b32a9424320277 \
"
S = "${WORKDIR}/git"
SRCREV_FORMAT = "halibut"
DEPENDS:append = "\
expat \
mbedtls \
"
inherit cmake
OECMAKE_CXX_FLAGS:append:toolchain-gcc = " -ffile-prefix-map=${WORKDIR}= -fdebug-prefix-map=${WORKDIR}= "
EXTRA_OECMAKE = " -DENABLE_TESTING=OFF -DENABLE_SAMPLES=OFF -DS2OPC_CRYPTO_MBEDTLS=OFF -DFETCHCONTENT_BASE_DIR=${WORKDIR}/deps/ -DCMAKE_BUILD_TYPE=Release -G Ninja"
INSANE_SKIP:${PN} += "/usr/bin/hwtr"
do_package_qa() {
}
#FILES:${PN} += "${datadir}"
COMPATIBLE_HOST = "(aarch64|x86_64).*-linux"
SUMMARY = "File support for asyncio."
HOMEPAGE = "None"
AUTHOR = "None <Tin Tvrtkovic <tinchester@gmail.com>>"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
PYPI_PACKAGE = "aiofiles"
SRC_URI[sha256sum] = "22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c"
inherit pypi python_hatchling python_setuptools_build_meta
SUMMARY = "aiosqlite provides a friendly, async interface to sqlite databases."
HOMEPAGE = "https://github.com/omnilib/aiosqlite"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c422eaa1f23d09f8203dc0af3e2d54"
PYPI_PACKAGE = "aiosqlite"
DEPENDS:append = "\
python3-flit-core \
"
SRC_URI[sha256sum] = "6d35c8c256637f4672f843c31021464090805bf925385ac39473fb16eaaca3d7"
inherit pypi python_setuptools_build_meta
# BBCLASSEXTEND = "native nativesdk"
SUMMARY = "OPC UA / IEC 62541 Client and Server for Python >= 3.7 and pypy3"
HOMEPAGE = "http://freeopcua.github.io/"
SECTION = "devel/python"
LICENSE = "LGPL-3.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02"
PYPI_PACKAGE = "asyncua"
SRC_URI[sha256sum] = "d5edac9234fd7f1ed6a923fad1bd709bd0fd3f8a0d41637d645666620375173f"
inherit pypi setuptools3
RDEPENDS:${PN} += "\
python3 python3-dateutil python3-cryptography python3-aiofiles python3-aiosqlite \
python3-pyopenssl python3-pytz python3-sortedcontainers python3-typing-extensions \
"
SUMMARY = "Python logging handler for sending log events asynchronously to Logstash."
HOMEPAGE = "https://github.com/eht16/python-logstash-async"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3182001001c4ca30ab9518729301ca63"
PYPI_PACKAGE = "python-logstash-async"
SRC_URI[sha256sum] = "acbbac8355d556d12cd7d89fd05da6ea7c1d548bff1f9ebda8721e4b3a751379"
inherit pypi setuptools3
# BBCLASSEXTEND = "native nativesdk"
SUMMARY = "Linux userspace i2c operation library"
HOMEPAGE = "https://github.com/amaork/libi2c"
AUTHOR = "Amaork <amaork <amaork@gmail.com>>"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e634287ae62a4f8c6004aca72b94fc28"
PYPI_PACKAGE = "pylibi2c"
SRC_URI[sha256sum] = "7f7b9e8d1c7adf79ba8c5fdccbcb5c116e4c0f873fcf99b48f78bb765bec09e4"
DEPENDS += "python3-setuptools-scm-native"
inherit pypi python_setuptools_build_meta
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"
SRC_URI = " \
git://git.astron.nl/lofar2.0/pypcc.git;branch=master;rev=650e2b6bd44b751405a7543a9484fab90f70abe9 \
"
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-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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment