Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D168C47258 for ; Thu, 25 Jan 2024 12:03:44 +0000 (UTC) Subject: Re: [yocto] etherlab To: Ross Burton ,yocto@lists.yoctoproject.org From: "Daniele Lugli" X-Originating-Location: Reggio Calabria, Calabria, IT (176.246.57.111) X-Originating-Platform: Windows Opera 106 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 25 Jan 2024 04:03:36 -0800 References: <8427A41F-3094-415A-AFAA-461D1C660184@arm.com> In-Reply-To: <8427A41F-3094-415A-AFAA-461D1C660184@arm.com> Message-ID: <27265.1706184216103968266@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="hOhbAMHHuIWazzF8sYl2" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 25 Jan 2024 12:03:44 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62289 --hOhbAMHHuIWazzF8sYl2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I would like to have autotools available but to decide myself how to use th= em. Here is mytest-image.bb: # Adapted from the meta-intel layer require recipes-core/images/core-image-minimal.bb # Skip processing of this recipe if linux-intel-rt is not explicitly specif= ied as the # PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying # to build multiple virtual/kernel providers. python () { if d.getVar("PREFERRED_PROVIDER_virtual/kernel") !=3D "linux-intel-rt": raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-= intel-rt to enable it") } DESCRIPTION =3D "Small image capable of booting a device with a test suite = and \ tools for real-time use. It includes the full meta-toolchain, development \ headers and libraries to form a standalone SDK." DEPENDS +=3D " linux-intel-rt linux-libc-headers" IMAGE_FEATURES +=3D "dev-pkgs tools-sdk tools-debug eclipse-debug tools-pro= file tools-testapps debug-tweaks" #IMAGE_FEATURES +=3D "keyboard" non disponibile #IMAGE_FEATURES +=3D "ldconfig" non disponibile #IMAGE_FEATURES +=3D "x11-sato" IMAGE_INSTALL +=3D "rt-tests hwlatdetect kernel-dev kernel-devsrc" IMAGE_INSTALL +=3D "keymaps" IMAGE_INSTALL +=3D "vim" IMAGE_INSTALL +=3D "emacs" IMAGE_INSTALL +=3D "nano" IMAGE_INSTALL +=3D "cmake" # 240118 IMAGE_INSTALL:append =3D " kernel-dev" IMAGE_INSTALL:append =3D " kernel-devsrc" IMAGE_INSTALL:append =3D " kernel-modules" IMAGE_INSTALL +=3D "simple-rt" IMAGE_INSTALL +=3D "italian" IMAGE_INSTALL +=3D "ethercat-userspace" IMAGE_INSTALL +=3D "ethercat-kernel" LICENSE =3D "MIT" Here is ethercat-kernel.bb: LICENSE =3D "GPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM =3D "file://COPYING;md5=3D59530bdf33659b29e73d4adb9f9f6552= \ file://COPYING.LESSER;md5=3D4fbd65380cdd255951079008b364516c \ file://devices/e1000/LICENSE;md5=3De2643b73e47fa4b29cdfad24ee42bed6" DEPENDS +=3D "pkgconfig-native" RDEPENDS:${PN} +=3D "bash" SRC_URI =3D "git://gitlab.com/etherlab.org/ethercat.git;protocol=3Dhttps;br= anch=3Dmaster" # Modify these as desired PV =3D "1.6.0-rc1+git${SRCPV}" SRCREV =3D "420e6150f55b71b97a84c64831f4928e0859a0e9" S =3D "${WORKDIR}/git" inherit autotools inherit module EXTRA_OECONF =3D "--sysconfdir=3D/etc --enable-generic --disable-igb --disa= ble-8139too --with-linux-dir=3D${STAGING_KERNEL_BUILDDIR}" EXTRA_OEMAKE +=3D "-f Makefile" #do_configure() { # sh ./bootstrap # sh ./configure --sysconfdir=3D/etc --disable-8139too --disable-igb --with= -linux-dir=3D${STAGING_KERNEL_BUILDDIR} #} #do_compile() { # make all # make modules #} #do_install() { # make modules_install # make install # depmod #} FILES:${PN} +=3D "${datadir}/*" Here is my local.conf (#comments removed): MACHINE ?=3D "intel-corei7-64" DISTRO ?=3D "poky" EXTRA_IMAGE_FEATURES ?=3D "debug-tweaks" USER_CLASSES ?=3D "buildstats" PATCHRESOLVE =3D "noop" BB_DISKMON_DIRS ??=3D "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ HALT,${TMPDIR},100M,1K \ HALT,${DL_DIR},100M,1K \ HALT,${SSTATE_DIR},100M,1K \ HALT,/tmp,10M,1K" CONF_VERSION =3D "2" PREFERRED_PROVIDER_virtual/kernel =3D "linux-intel-rt" EXTRA_IMAGE_FEATURES:append =3D " tools-sdk dev-pkgs " WKS_FILE =3D "image-installer.wks.in" IMAGE_FSTYPES:append =3D " ext4" IMAGE_TYPEDEP:wic =3D "ext4" INITRD_IMAGE_LIVE=3D"core-image-minimal-initramfs" do_image_wic[depends] +=3D "${INITRD_IMAGE_LIVE}:do_image_complete" do_rootfs[depends] +=3D "virtual/kernel:do_deploy" IMAGE_BOOT_FILES:append =3D "\ ${KERNEL_IMAGETYPE} \ microcode.cpio \ ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \ ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/= BOOT/bootx64.efi', '', d)} \ ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/= BOOT/grub.cfg;EFI/BOOT/grub.cfg', '', d)} \ ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;E= FI/BOOT/bootx64.efi', '', d)} \ ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/= loader/loader.conf;loader/loader.conf ', '', d)} \ ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/= loader/entries/boot.conf;loader/entries/boot.conf', '', d)} " Thank you -- Daniele Lugli General Logic srl Viale Curreno, 41 10133 Torino Italy tel +39 329 3933041 www.general-logic.com ( http://www.general-logic.com/ ) www.linkedin.com/in/daniele- lugli ( http://www.linkedin.com/in/daniele-lug= li ) --hOhbAMHHuIWazzF8sYl2 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable I would like to have autotools available but to decide myself how to use th= em.

Here is mytest-image.bb:

# Adapted from the meta-intel layer
 
require recipes-core/images/core-image= -minimal.bb
 
# Skip processing of this recipe if li= nux-intel-rt is not explicitly specified as the
# PREFERRED_PROVIDER for virtual/kerne= l. This avoids errors when trying
# to build multiple virtual/kernel pro= viders.
python () {
    if d.getVar("PREFERRED_P= ROVIDER_virtual/kernel") !=3D "linux-intel-rt":
        raise bb.p= arse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt t= o enable it")
}
 
DESCRIPTION =3D "Small image capable o= f booting a device with a test suite and \
tools for real-time use. It includes t= he full meta-toolchain, development \
headers and libraries to form a standa= lone SDK."
 
DEPENDS +=3D " linux-intel-rt linux-li= bc-headers"
 
IMAGE_FEATURES +=3D "dev-pkgs tools-sd= k tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
 
#IMAGE_FEATURES +=3D "keyboard" non di= sponibile
#IMAGE_FEATURES +=3D "ldconfig" non di= sponibile
#IMAGE_FEATURES +=3D "x11-sato"=
 
IMAGE_INSTALL +=3D "rt-tests hwlatdete= ct kernel-dev kernel-devsrc"
IMAGE_INSTALL +=3D "keymaps"
IMAGE_INSTALL +=3D "vim"
IMAGE_INSTALL +=3D "emacs"
IMAGE_INSTALL +=3D "nano"
IMAGE_INSTALL +=3D "cmake"
 
# 240118
IMAGE_INSTALL:append =3D " kernel-dev"=
IMAGE_INSTALL:append =3D " kernel-devs= rc"
IMAGE_INSTALL:append =3D " kernel-modu= les"
 
IMAGE_INSTALL +=3D "simple-rt"<= /div>
IMAGE_INSTALL +=3D "italian"
IMAGE_INSTALL +=3D "ethercat-userspace= "
IMAGE_INSTALL +=3D "ethercat-kernel"
 
LICENSE =3D "MIT"

He= re is ethercat-kernel.bb:

LICENSE =3D "GPL-2.0-only & LGPL-2= .1-only"
LIC_FILES_CHKSUM =3D "file://COPYING;m= d5=3D59530bdf33659b29e73d4adb9f9f6552 \
          &nb= sp;         file://COPYING.LESSER;md5=3D4fbd65380cdd255= 951079008b364516c \
          &nb= sp;         file://devices/e1000/LICENSE;md5=3De2643b73= e47fa4b29cdfad24ee42bed6"
 
DEPENDS +=3D "pkgconfig-native"=
RDEPENDS:${PN} +=3D "bash"
 
SRC_URI =3D "git://gitlab.com/etherlab= .org/ethercat.git;protocol=3Dhttps;branch=3Dmaster"
 
# Modify these as desired
PV =3D "1.6.0-rc1+git${SRCPV}"<= /div>
SRCREV =3D "420e6150f55b71b97a84c64831= f4928e0859a0e9"
 
S =3D "${WORKDIR}/git"
 
inherit autotools
inherit module
 
EXTRA_OECONF =3D "--sysconfdir=3D/etc = --enable-generic --disable-igb --disable-8139too --with-linux-dir=3D${STAGI= NG_KERNEL_BUILDDIR}"
EXTRA_OEMAKE +=3D "-f Makefile"=
 
#do_configure() {
# sh ./bootstrap
# sh ./configure --sysconfdir=3D/etc --disable-8139too --disable-igb --w= ith-linux-dir=3D${STAGING_KERNEL_BUILDDIR}
#}
 
#do_compile() {
# make all
# make modules
#}
 
#do_install() {
# make modules_install
# make install
# depmod
#}
 
FILES:${PN} +=3D "${datadir}/*"=

Here is my local.conf (#comments removed):

MACHINE ?=3D "intel-corei7-64"<= /div>

DISTRO ?=3D "poky"

EXTRA_IMAGE_FEATURES ?=3D "debug-tweak= s"

USER_CLASSES ?=3D "buildstats"<= /div>

PATCHRESOLVE =3D "noop"
 
BB_DISKMON_DIRS ??=3D "\
    STOPTASKS,${TMPDIR},1G,1= 00K \
    STOPTASKS,${DL_DIR},1G,1= 00K \
    STOPTASKS,${SSTATE_DIR},= 1G,100K \
    STOPTASKS,/tmp,100M,100K= \
    HALT,${TMPDIR},100M,1K \=
    HALT,${DL_DIR},100M,1K \=
    HALT,${SSTATE_DIR},100M,= 1K \
    HALT,/tmp,10M,1K"=
 
CONF_VERSION =3D "2"
 
PREFERRED_PROVIDER_virtual/kernel =3D = "linux-intel-rt"
 
EXTRA_IMAGE_FEATURES:append =3D " tool= s-sdk dev-pkgs "
 
WKS_FILE =3D "image-installer.wks.in"<= /span>
IMAGE_FSTYPES:append =3D " ext4"
IMAGE_TYPEDEP:wic =3D "ext4"
INITRD_IMAGE_LIVE=3D"core-image-minima= l-initramfs"
do_image_wic[depends] +=3D "${INITRD_I= MAGE_LIVE}:do_image_complete"
do_rootfs[depends] +=3D "virtual/kerne= l:do_deploy"
IMAGE_BOOT_FILES:append =3D "\<= /div>
      ${KERNEL_IMAGETYP= E} \
      microcode.cpio \<= /span>
      ${IMGDEPLOYDIR}/$= {IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \
      ${@bb.utils.conta= ins('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi'= , '', d)} \
      ${@bb.utils.conta= ins('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI= /BOOT/grub.cfg', '', d)} \
      ${@bb.utils.conta= ins('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;EFI/BOOT/bootx64.e= fi', '', d)} \
      ${@bb.utils.conta= ins('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/loader.con= f;loader/loader.conf ', '', d)} \
      ${@bb.utils.conta= ins('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/entries/bo= ot.conf;loader/entries/boot.conf', '', d)} "
 
 
Thank you
 
--
Daniele Lugli
General Logic srl
Viale Curreno, 41
10133 Torino
Italy
tel +39 329 3933041
--hOhbAMHHuIWazzF8sYl2--