From 865f4c034eb4aa9bf0ecfb7b1eedaf8477adbdf0 Mon Sep 17 00:00:00 2001 From: Hannes Feldt <feldt@astron.nl> Date: Fri, 13 Jun 2025 08:55:12 +0200 Subject: [PATCH] add disto config and revert back to original disk layout --- conf/distro/halibut.conf | 71 +++++++++++++++++++ kas-pypcc-rpi.yml | 4 +- recipes-extended/images/update-image.bbappend | 5 -- .../images/update-image/rpi/emmcsetup.lua | 0 .../images/update-image/rpi/sw-description | 52 -------------- recipes/python3-halibut-ipconfig_git.bb | 2 +- wic/image-halibutpi.wks | 6 +- 7 files changed, 77 insertions(+), 63 deletions(-) create mode 100644 conf/distro/halibut.conf delete mode 100644 recipes-extended/images/update-image.bbappend delete mode 100644 recipes-extended/images/update-image/rpi/emmcsetup.lua delete mode 100644 recipes-extended/images/update-image/rpi/sw-description diff --git a/conf/distro/halibut.conf b/conf/distro/halibut.conf new file mode 100644 index 0000000..45b7751 --- /dev/null +++ b/conf/distro/halibut.conf @@ -0,0 +1,71 @@ +DISTRO = "halibut" +DISTRO_NAME = "LOFAR Halibut" +DISTRO_VERSION = "1.0.0" +DISTRO_CODENAME = "scarthgap" +SDK_VENDOR = "-halibutsdk" +SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${METADATA_REVISION}', 'snapshot')}" +SDK_VERSION[vardepvalue] = "${SDK_VERSION}" + +MAINTAINER = "Halibut Maintainers <feldt@astron.nl>" + +TARGET_VENDOR = "-halibut" + +LOCALCONF_VERSION = "2" + +# Override these in halibut based distros +HALIBUT_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot" +HALIBUT_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet" + +DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}" + +PREFERRED_VERSION_linux-yocto ?= "6.6%" +PREFERRED_VERSION_linux-yocto-rt ?= "6.6%" + +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" +SDKPATHINSTALL = "/opt/${DISTRO}/${SDK_VERSION}" + +DISTRO_EXTRA_RDEPENDS += "${HALIBUT_DEFAULT_EXTRA_RDEPENDS}" +DISTRO_EXTRA_RRECOMMENDS += "${HALIBUT_DEFAULT_EXTRA_RRECOMMENDS}" + +TCLIBCAPPEND = "" + +PACKAGE_CLASSES ?= "package_ipk" + +SANITY_TESTED_DISTROS ?= " \ + poky-4.3 \n \ + poky-5.0 \n \ + ubuntu-20.04 \n \ + ubuntu-22.04 \n \ + ubuntu-23.04 \n \ + fedora-38 \n \ + fedora-39 \n \ + centosstream-8 \n \ + debian-11 \n \ + debian-12 \n \ + opensuseleap-15.4 \n \ + almalinux-8.8 \n \ + almalinux-9.2 \n \ + rocky-9 \n \ + " + +# QA check settings - a little stricter than the OE-Core defaults +# (none currently necessary as we now match OE-Core) +#WARN_TO_ERROR_QA = "X" +#WARN_QA_remove = "${WARN_TO_ERROR_QA}" +#ERROR_QA_append = " ${WARN_TO_ERROR_QA}" + +require conf/distro/include/no-static-libs.inc +require conf/distro/include/yocto-uninative.inc +require conf/distro/include/security_flags.inc +INHERIT += "uninative" + +BB_SIGNATURE_HANDLER ?= "OEEquivHash" +BB_HASHSERVE ??= "auto" + +INIT_MANAGER ?= "systemd" + +# We need debug symbols so that SPDX license manifests for the kernel work +KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc" + +# Enable creation of SPDX manifests by default +INHERIT += "create-spdx" diff --git a/kas-pypcc-rpi.yml b/kas-pypcc-rpi.yml index a2b79a6..a107f29 100644 --- a/kas-pypcc-rpi.yml +++ b/kas-pypcc-rpi.yml @@ -5,7 +5,7 @@ header: version: 14 machine: raspberrypi4-64 -distro: poky +distro: halibut target: - core-image-full-cmdline - update-image @@ -86,7 +86,7 @@ local_conf_header: DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" - IMAGE_INSTALL:append = "python3-pypcc python3-halibut-ipconfig vcgencmd dtc i2c-tools swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev kernel-module-i2c-gpio" + IMAGE_INSTALL:append = "nano pv bzip2 python3-pypcc python3-halibut-ipconfig vcgencmd dtc i2c-tools swupdate swupdate-www libgpiod libgpiod-tools libgpiod-dev kernel-module-i2c-gpio" IMAGE_FSTYPES = "tar.bz2 ext4 ext4.gz wic.bz2 wic.bmap" SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ubifs" IMAGE_BOOT_FILES:append = "halibut.dtbo;overlays/halibut.dtbo" diff --git a/recipes-extended/images/update-image.bbappend b/recipes-extended/images/update-image.bbappend deleted file mode 100644 index d79c6ae..0000000 --- a/recipes-extended/images/update-image.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" - -SRC_URI = " \ - file://sw-description \ - " \ No newline at end of file diff --git a/recipes-extended/images/update-image/rpi/emmcsetup.lua b/recipes-extended/images/update-image/rpi/emmcsetup.lua deleted file mode 100644 index e69de29..0000000 diff --git a/recipes-extended/images/update-image/rpi/sw-description b/recipes-extended/images/update-image/rpi/sw-description deleted file mode 100644 index aa16d09..0000000 --- a/recipes-extended/images/update-image/rpi/sw-description +++ /dev/null @@ -1,52 +0,0 @@ -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"; - } - ); - }; - }; - } -} diff --git a/recipes/python3-halibut-ipconfig_git.bb b/recipes/python3-halibut-ipconfig_git.bb index 661f5a8..ced0627 100644 --- a/recipes/python3-halibut-ipconfig_git.bb +++ b/recipes/python3-halibut-ipconfig_git.bb @@ -12,7 +12,7 @@ BB_STRICT_CHECKSUM = "0" #PV = "0.0.1+git${SRCPV}" FILESEXTRAPATHS:prepend := "${THISDIR}:${THISDIR}/files:" SRC_URI = " \ - git://git.astron.nl/lofar2.0/halibut-ipconfig.git;branch=L2SS-2336-set_ip;rev=a8452d6dd8b495ab8c152327a9cb7f257c04ef5d \ + git://git.astron.nl/lofar2.0/halibut-ipconfig.git;branch=L2SS-2336-set_ip;rev=7e197db1ec1058d4946f71522fc8b789522d3b25 \ file://files/lofar.rules \ " S = "${WORKDIR}/git" diff --git a/wic/image-halibutpi.wks b/wic/image-halibutpi.wks index f1594d3..1fb7dae 100644 --- a/wic/image-halibutpi.wks +++ b/wic/image-halibutpi.wks @@ -2,7 +2,7 @@ # long-description: Creates a partitioned SD card image for use with # Raspberry Pi. Boot files are located in the first vfat partition. -part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label bootfs --active --align 4096 --size 256 -part --ondisk mmcblk0 --fstype=ext4 --label pypcc --align 4096 --size 8G +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 256 part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 4G -part --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root1 --align 4096 --size 4G +part --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root2 --align 4096 --size 4G +part --ondisk mmcblk0 --fstype=ext4 --label data --align 4096 --size 4G -- GitLab