public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Schultschik, Sven" <sven.schultschik@siemens.com>
To: "amikan@ilbers.de" <amikan@ilbers.de>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
	"ibr@ilbers.de" <ibr@ilbers.de>
Subject: Re: edk2 fails with isar 0.10
Date: Wed, 31 Jan 2024 13:07:44 +0000	[thread overview]
Message-ID: <a0216a974a41dd92dfa5025d334c903e4c9849ba.camel@siemens.com> (raw)
In-Reply-To: <5439cc0c-b130-458c-8274-8b45307b934c@ilbers.de>


[-- Attachment #1.1: Type: text/plain, Size: 1008 bytes --]

On Wed, 2024-01-31 at 13:21 +0200, Anton Mikanovich wrote:
> 31/01/2024 12:09, 'Schultschik, Sven' via isar-users wrote:
> Hello Sven,
> 
> Is there any steps to reproduce this issue? (with recipe or layer to
> try).

I attached the recipe and rules file. Hope that's ok.

> I've tried edk2 with GCC5 option outside Isar and it just worked, so
> we 
> need to
> check if it's some kind of Isar issue or recipe itself.

Yes outside of ISAR it just works as expected

> 
> The main difference between 0.9 and 0.10rc1 is sbuild integration
> which 
> makes
> all recipes been built independently. It requires more strict
> dependencies
> handling, because packages will not be shared between recipes.

That was my first thought, but the LTO lib is no extra package so far.
It comes with the gcc compiler. 
When I search for hints I saw that buildroot had changes regarding
support for lto, but I didn't followed the versions and details if it
really matters for this issue yet.



[-- Attachment #1.2: rules.tmpl --]
[-- Type: text/x-makefile, Size: 2193 bytes --]

#!/usr/bin/make -f
#
# Copyright (c) Siemens AG, 2022-2023
#
# Authors:
#  Sven Schultschik <sven.schultschik@siemens.com>
#
# SPDX-License-Identifier: MIT

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
endif

export WORKSPACE=$(shell pwd)
export PACKAGES_PATH=$(WORKSPACE)/edk2:$(WORKSPACE)/edk2-platforms
export ACTIVE_PLATFORM="Platform/StandaloneMm/PlatformStandaloneMmPkg/PlatformStandaloneMmRpmb.dsc"

# https://github.com/tianocore/edk2-platforms/blob/master/Readme.md#if-cross-compiling
ifeq (arm64,$(DEB_TARGET_ARCH))
export TARGET_ARCH = 'AARCH64'
else ifeq ((armhf,$(DEB_TARGET_ARCH))
export TARGET_ARCH = 'ARM'
else ifeq ((amd64,$(DEB_TARGET_ARCH))
export TARGET_ARCH = 'X64'
else ifeq ((i386,$(DEB_TARGET_ARCH))
export TARGET_ARCH = 'IA32'
else
$(error DEB_TARGET_ARCH $(DEB_TARGET_ARCH) unsupported)
endif

export SHELL=/bin/bash

# ENV Vars which should get set by edksetup.sh
export PYTHON_COMMAND=python3
export PYTHONHASHSEED=1
export CONF_PATH=$(WORKSPACE)/edk2/Conf
export EDK_TOOLS_PATH=$(WORKSPACE)/edk2/BaseTools
export PATH=$(WORKSPACE)/edk2/BaseTools/Bin/Linux-$(TARGET_ARCH):$(WORKSPACE)/edk2/BaseTools/BinWrappers/PosixLike::/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# When cross-compiling, or building with a different version of the compiler than
# the default `gcc`, we additionally need to inform the
# build command which toolchain to use. We do this by setting the environment
# variable `{TOOL_CHAIN_TAG}_{TARGET_ARCH}_PREFIX` - in the case above,
# **GCC5_AARCH64_PREFIX**.
# export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
# using export here at TOP Level does not work, because
# GCC5_$(TARGET_ARCH)_PREFIX gets deleted again for what reason ever
# Therefore it is set right before the build command
# export GCC5_$(TARGET_ARCH)_PREFIX=$(DEB_HOST_GNU_TYPE)-

override_dh_auto_build:
	source edk2/edksetup.sh --reconfig

	CFLAGS= LDFLAGS=  make -C edk2/BaseTools

	(export GCC49_$(TARGET_ARCH)_PREFIX=$(DEB_HOST_GNU_TYPE)- && \
		build -p $(ACTIVE_PLATFORM) -b RELEASE -a $(TARGET_ARCH) -t GCC49 -n $(shell nproc))

override_dh_auto_install:

override_dh_auto_test:

%:
	dh $@ --no-parallel

[-- Attachment #1.3: edk2-standalonemm-rpmb-upstream.bb --]
[-- Type: text/plain, Size: 2165 bytes --]

#
# CIP Core, generic profile
#
# Copyright (c) Siemens AG, 2022-2023
#
# Authors:
#  Sven Schultschik <sven.schultschik@siemens.com>
#  Jan Kiszka <jan.kiszka@siemens.com>
#
# SPDX-License-Identifier: MIT
#

HOMEPAGE = "https://github.com/tianocore/edk2"
MAINTAINER = "Sven Schultschik <sven.schultschik@siemens.com>"

inherit dpkg

SRC_URI = " \
    git://github.com/tianocore/edk2.git;protocol=https;branch=${SRC_BRANCH_EDK2};name=edk2;destsuffix=${S}/edk2 \
    git://github.com/tianocore/edk2-platforms.git;protocol=https;branch=${SRC_BRANCH_EDK2_PLAT};name=edk2-platforms;destsuffix=${S}/edk2-platforms \
    git://github.com/google/brotli;protocol=https;branch=${SRC_BRANCH_BROTLI};name=brotli;destsuffix=${S}/brotli \
    git://github.com/openssl/openssl;protocol=https;branch=${SRC_BRANCH_OPENSSL};name=openssl;destsuffix=${S}/openssl \
    file://rules.tmpl \
    "

PV = "202302"

SRC_BRANCH_EDK2 = "master"
#SRCREV_edk2 = " edk2-stable202302"
SRCREV_edk2 = "f80f052277c88a67c55e107b550f504eeea947d3"

SRC_BRANCH_EDK2_PLAT = "master"
# revision closest to edk2 release
SRCREV_edk2-platforms = "4ad557e494d8055f5ea16009d6e565cace6571d6"

SRC_BRANCH_BROTLI = "master"
# according to edk2 submodules
SRCREV_brotli = "f4153a09f87cbb9c826d8fc12c74642bb2d879ea"

SRC_BRANCH_OPENSSL = "OpenSSL_1_1_1-stable"
#SRCREV_openssl = "OpenSSL_1_1_1s"
SRCREV_openssl = "129058165d195e43a0ad10111b0c2e29bdf65980"

S = "${WORKDIR}/git"

DEBIAN_BUILD_DEPENDS = "bash, python3:native, dh-python, uuid-dev:native"

TEMPLATE_FILES = "rules.tmpl"


do_prepare_build() {
    deb_debianize

    rm -rf ${S}/edk2/BaseTools/Source/C/BrotliCompress/brotli
    ln -s ../../../../../brotli ${S}/edk2/BaseTools/Source/C/BrotliCompress/brotli

    rm -rf ${S}/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli
    ln -s ../../../../brotli ${S}/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli

    rm -rf ${S}/edk2/CryptoPkg/Library/OpensslLib/openssl
    ln -s ../../../../openssl ${S}/edk2/CryptoPkg/Library/OpensslLib/openssl

    echo "Build/MmStandaloneRpmb/RELEASE_GCC49/FV/BL32_AP_MM.fd /usr/lib/edk2/" > \
        ${S}/debian/edk2-standalonemm-rpmb.install
}

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 10057 bytes --]

  reply	other threads:[~2024-01-31 13:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 10:09 Schultschik, Sven
2024-01-31 11:21 ` Anton Mikanovich
2024-01-31 13:07   ` Schultschik, Sven [this message]
2024-01-31 15:50     ` Jan Kiszka
2024-02-01 16:35       ` Schultschik, Sven
2024-09-19 16:26         ` 'Schultschik, Sven' via isar-users
2024-09-19 18:23           ` Baurzhan Ismagulov
2024-09-20  9:23             ` 'Schultschik, Sven' via isar-users
2024-09-20  8:46           ` Uladzimir Bely

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=a0216a974a41dd92dfa5025d334c903e4c9849ba.camel@siemens.com \
    --to=sven.schultschik@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.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