From patchwork Fri Oct 11 12:01:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Enrico_J=C3=B6rns?= X-Patchwork-Id: 50444 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 F12C3CFD36B for ; Fri, 11 Oct 2024 12:01:49 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) by mx.groups.io with SMTP id smtpd.web10.9807.1728648105496471939 for ; Fri, 11 Oct 2024 05:01:45 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: pengutronix.de, ip: 185.203.201.7, mailfrom: ejo@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1szEKt-0002PC-L3; Fri, 11 Oct 2024 14:01:35 +0200 Received: from [2a0a:edc0:0:1101:1d::5c] (helo=dude06.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1szEKt-0014uK-07; Fri, 11 Oct 2024 14:01:35 +0200 Received: from ejo by dude06.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1szEKs-003RPp-33; Fri, 11 Oct 2024 14:01:34 +0200 From: =?utf-8?q?Enrico_J=C3=B6rns?= To: openembedded-core@lists.openembedded.org Cc: yocto@pengutronix.de, Alexander Kanavin , Richard Purdie , Ahmad Fatoum Subject: [PATCH v9 2/7] barebox-tools: add initial barebox tools support Date: Fri, 11 Oct 2024 14:01:12 +0200 Message-Id: <20241011120117.818804-3-ejo@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241011120117.818804-1-ejo@pengutronix.de> References: <20241011120117.818804-1-ejo@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ejo@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: openembedded-core@lists.openembedded.org 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 ; Fri, 11 Oct 2024 12:01:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/205681 From: Marco Felsch Add initial support to build the barebox tools for the host and the target. Some of the tools are generic barebox utilities (like 'bareboximd' for image meta data inspection or 'bareboxenv' for accessing the barebox environment) some are SoC family-specific specific utilities (like 'imx-usb-loader' or 'omap3-usb-loader'). Signed-off-by: Marco Felsch Signed-off-by: Enrico Jorns --- meta/conf/distro/include/maintainers.inc | 1 + .../barebox/barebox-tools_2024.08.0.bb | 59 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 meta/recipes-bsp/barebox/barebox-tools_2024.08.0.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 0fd6c14658..b529786214 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -55,6 +55,7 @@ RECIPE_MAINTAINER:pn-avahi = "Yi Zhao " RECIPE_MAINTAINER:pn-babeltrace = "Alexander Kanavin " RECIPE_MAINTAINER:pn-babeltrace2 = "Alexander Kanavin " RECIPE_MAINTAINER:pn-barebox = "Enrico Jörns " +RECIPE_MAINTAINER:pn-barebox-tools = "Enrico Jörns " RECIPE_MAINTAINER:pn-baremetal-helloworld = "Alejandro Hernandez " RECIPE_MAINTAINER:pn-base-files = "Anuj Mittal " RECIPE_MAINTAINER:pn-base-passwd = "Anuj Mittal " diff --git a/meta/recipes-bsp/barebox/barebox-tools_2024.08.0.bb b/meta/recipes-bsp/barebox/barebox-tools_2024.08.0.bb new file mode 100644 index 0000000000..ed49ce5373 --- /dev/null +++ b/meta/recipes-bsp/barebox/barebox-tools_2024.08.0.bb @@ -0,0 +1,59 @@ +SUMMARY = "barebox bootloader tools" +HOMEPAGE = "https://barebox.org/" +SECTION = "bootloaders" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=f5125d13e000b9ca1f0d3364286c4192" + +DEPENDS = "bison-native flex-native libusb1" + +SRC_URI = "https://barebox.org/download/barebox-${PV}.tar.bz2" +SRC_URI[sha256sum] = "b08a762da8d63dd18b4f2d9f5d0a8da001b6e608d1b3eff6dcebc6a2e575d535" + +S = "${WORKDIR}/barebox-${PV}" +B = "${WORKDIR}/build" + +inherit pkgconfig + +EXTRA_OEMAKE = " \ + ARCH=sandbox \ + CROSS_COMPILE=${TARGET_PREFIX} -C ${S} O=${B} \ + CROSS_PKG_CONFIG=pkg-config \ + CC='${CC}' \ + LD='${LD}' \ + " + +do_compile:class-target () { + export userccflags="${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" + export userldflags="${TARGET_LDFLAGS}${TOOLCHAIN_OPTIONS}" + oe_runmake targettools_defconfig + oe_runmake scripts +} + +do_compile:class-native () { + oe_runmake hosttools_defconfig + oe_runmake scripts +} + +BAREBOX_TOOLS = " \ + bareboxenv \ + bareboxcrc32 \ + kernel-install \ + bareboximd \ + omap3-usb-loader \ + omap4_usbboot \ + imx/imx-usb-loader \ + " + +BAREBOX_TOOLS_SUFFIX = "" +BAREBOX_TOOLS_SUFFIX:class-target = "-target" + +do_install () { + install -d ${D}${bindir} + + for tool in ${BAREBOX_TOOLS}; do + install -m 0755 scripts/${tool}${BAREBOX_TOOLS_SUFFIX} ${D}${bindir}/${tool##*/} + done +} + +BBCLASSEXTEND = "native nativesdk"