File imx-mkimage.spec of Package imx-mkimage

#
# spec file for package imx-mkimage
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name:           imx-mkimage
Version:        4622115
Release:        0
Summary:        NXP make bootLoader image
License:        GPL-2.0-only
Group:          System/Boot
URL:            https://github.com/nxp-imx/imx-mkimage
Source0:        imx-mkimage-%{version}.tar.xz
Patch0:         0001-No-static.patch
Patch1:         0001-Hard-code-build-info.patch
BuildArch:      noarch
ExclusiveArch:  aarch64
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  zlib
BuildRequires:  openssl
BuildRequires:  firmware-imx
BuildRequires:  firmware-ele-imx
BuildRequires:  imx-atf = 28affcae-slfo.1.1_14.1
BuildRequires:  uboot-imx = de16f4f17-slfo.1.1_48.1
BuildRequires:  imx93-devicetree

%description
NXP make bootloader image

%prep
%setup -q
%autopatch -p1

%build
make
cd iMX93

cp %{_datadir}/firmware-imx/*bin .
cp %{_datadir}/firmware-ele-imx/*img .
cp %{_datadir}/uboot-imx/*bin .
cp %{_datadir}/imx93-devicetree/imx93-11x11-frdm.dtb .
cp %{_datadir}/imx-atf/bl31-imx93.bin bl31.bin

INJECTED="0x80200000 --data imx93-11x11-frdm.dtb a55 0x83000000"

make -f soc.mak UBOOT_LOAD_ADDR="${INJECTED}" flash_singleboot

%install
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true

install -m 755 -d %{buildroot}%{_datadir}/%{name}
install -D -m 644 iMX93/flash.bin %{buildroot}%{_datadir}/%{name}/flash-FRDM-iMX93.bin

%files
%defattr(-,root,root)
%license LICENSE
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*.bin

%changelog
openSUSE Build Service is sponsored by