public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, daniel.bovensiepen@siemens.com,
	florian.bezdeka@siemens.com,
	Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH v3 1/7] u-boot: make KCFLAGS and HOSTCFLAGS configurable
Date: Fri, 17 Mar 2023 14:21:00 +0100	[thread overview]
Message-ID: <20230317132106.1111258-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20230317132106.1111258-1-felix.moessbauer@siemens.com>

For more complex u-boot configurations, custom compiler flags are
required to e.g. inject more include paths or set the bits per long.
This patch adds the bitbake variables KCFLAGS and HOSTCFLAGS which are
forwarded and exported in the rules file.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/recipes-bsp/u-boot/files/debian/rules.tmpl | 5 ++++-
 meta/recipes-bsp/u-boot/u-boot-custom.inc       | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/files/debian/rules.tmpl b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
index 806b01fe..a29ec9b1 100755
--- a/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
+++ b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
@@ -3,7 +3,7 @@
 # Debian rules for custom U-Boot build
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2018-2021
+# Copyright (c) Siemens AG, 2018-2023
 #
 # SPDX-License-Identifier: MIT
 
@@ -12,6 +12,9 @@ export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
 SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
 endif
 
+export KCFLAGS=${KCFLAGS}
+export HOSTCFLAGS=${HOSTCFLAGS}
+
 override_dh_auto_build:
 	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG}
 	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index 876eb361..1e9744b1 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -26,8 +26,11 @@ python() {
 
 DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
 
+KCFLAGS ?= ""
+HOSTCFLAGS ?= ""
+
 TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl"
-TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN"
+TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN KCFLAGS HOSTCFLAGS"
 
 U_BOOT_TOOLS_PACKAGE ?= "0"
 U_BOOT_CONFIG_PACKAGE ?= "0"
-- 
2.30.2


  reply	other threads:[~2023-03-17 13:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 13:20 [PATCH v3 0/7] Add BSP for StarFiveTech VisionFive2 Risc-V board Felix Moessbauer
2023-03-17 13:21 ` Felix Moessbauer [this message]
2023-03-17 14:42   ` [PATCH v3 1/7] u-boot: make KCFLAGS and HOSTCFLAGS configurable Jan Kiszka
2023-03-17 13:21 ` [PATCH v3 2/7] starfive-visionfive2: package u-boot Felix Moessbauer
2023-03-17 13:21 ` [PATCH v3 3/7] starfive-visionfive2: package opensbi firmware Felix Moessbauer
2023-03-17 13:21 ` [PATCH v3 4/7] starfive-visionfive2: add BSP kernel Felix Moessbauer
2023-03-17 13:21 ` [PATCH v3 5/7] starfive-visionfive2: create u-boot-spl firmware Felix Moessbauer
2023-03-17 13:21 ` [PATCH v3 6/7] starfive-visionfive2: create u-boot-spl FIT image Felix Moessbauer
2023-03-17 13:21 ` [PATCH v3 7/7] starfive-visionfive2: add machine Felix Moessbauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230317132106.1111258-2-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=daniel.bovensiepen@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox