File uboot-imx.spec of Package uboot-imx

#
# spec file for package frdm-imx93-u-boot
#
# 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:           uboot-imx
Version:        de16f4f17
Release:        0
Summary:        The U-Boot firmware for the NXP i.MX93 11x11 FRDM board
License:        GPL-2.0-only
Group:          System/Boot
URL:            https://github.com/nxp-imx/uboot-imx
Source0:        uboot-imx-%{version}.tar.xz
BuildArch:      noarch
ExclusiveArch:  aarch64
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch0:         0001-net-phy-motorcomm-Add-support-for-YT8521-PHY.patch
Patch1:         0002-imx-imx93_frdm-Add-basic-board-support.patch
Patch2:         0003-imx-imx91_frdm-Add-basic-board-support.patch
Patch3:         0004-imx-imx93-91-frdm-add-board-version-print.patch
Patch4:         0005-imx93-FRDM-Do-not-use-MM-SP-services.patch
Patch5:         0006-imx93-FRDM-Do-not-modify-loaded-into-the-memory-DTB.patch
Patch6:         allpatch.patch
Patch7:         change-uart.patch
#Patch8:         restore-ethernet-devices.patch
#Patch9:         remap-ethernet-gpio-from-removed-io-expander.patch
#Patch10:        disable-eqos.patch
#Patch11:        update-phy-addresses.patch
#Patch12:        define-temp-mac-address.patch
#Patch13:        declare-target-driver.patch
#Patch14:        clear-phy-address.patch
#Patch15:        set-phy-addr-1.patch
#Patch16:        switch-to-rmii.patch
#Patch17:        set-50mhz-ref.patch
#Patch18:        reduce-mdio-clk.patch
#Patch19:        hack-half-ref-clk.patch
#Patch20:        swap-netclk-config-order.patch
#Patch21:        configure-eqos.patch
#Patch22:        swap-eqos-fec.patch
#Patch23:        eqos-set-50mhz.patch
#Patch24:        increment-phy-node-address.patch
#Patch25:        restore-eqos-reset.patch
#Patch26:        add-reset-io-init.patch
#Patch27:        move-gpio-def.patch
#Patch28:        temp-disable-eqos.patch
#Patch29:        revert-fec-clock-config.patch
Patch30:        0001-LTE-add-modem.patch
Patch31:        0001-LTE-remove-misplaced-space.patch
Patch32:        0002-LTE-remove-contradictory-wake-input-definition.patch
Patch33:        0003-LTE-boot-on-3v8.patch
Patch34:        0004-LTE-temp-hide-modem.patch
Patch35:        0005-LTE-define-dtr-pad.patch
Patch36:        0006-LTE-undefine-dtr-and-baud.patch
BuildRequires:  bc
BuildRequires:  bison
BuildRequires:  dtc
BuildRequires:  flex
BuildRequires:  pkgconfig
# gnutls/gnutls.h required for tools/mkeficapsule.c
BuildRequires:  pkgconfig(gnutls)
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires:  pkgconfig(openssl)
# uuid/uuid.h required for tools/mkeficapsule.c
BuildRequires:  pkgconfig(uuid)
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  swig
Conflicts:      u-boot-loader
Provides:       u-boot-loader

%description
This package provides U-Boot for NXP i.MX93 11x11 FRDM board.

%prep
%setup -q
%autopatch -p1

%build
make imx93_11x11_frdm_defconfig
make %{?_smp_mflags}

%install
export NO_BRP_STRIP_DEBUG=true
export NO_DEBUGINFO_STRIP_DEBUG=true

install -D -m 0644 u-boot.bin %{buildroot}%{_datadir}/%{name}/u-boot.bin
install -D -m 0644 spl/u-boot-spl.bin %{buildroot}%{_datadir}/%{name}/u-boot-spl.bin

%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*

%changelog
openSUSE Build Service is sponsored by