File imx93-devicetree.spec of Package imx93-devicetree
#
# spec file for package imx93-devicetree
#
# 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: imx93-devicetree
Version: 2025.02.23
Release: 0
Summary: Device trees for the NXP i.MX93 based boards
License: GPL-2.0-only
Group: System/Boot
URL: https://github.com/torvalds/linux.git
Source: imx93-devicetree-%{version}.tar.xz
Source100: get-from-git.sh
Patch0: 0001-arm64-dts-freescale-add-i.MX93-11x11-FRDM-board-supp.patch
Patch1: 0001-arm64-dts-freescale-Enable-i.MX93-11x11-FRDM-board-H.patch
Patch2: 0002-imx93-FRDM-move-terminal-interface-to-uart2.patch
Patch3: 0003-imx93-FRDM-add-LTE-modem-uart.patch
Patch4: 0004-imx93-FRDM-partially-configure-and-disable-ethernet-interfaces.patch
BuildRequires: dtc
BuildArch: noarch
%description
This package provides device tree files for NXP i.MX93 based boards.
%prep
%setup -q
%autopatch -p1
%build
SRCDIR=`pwd`
mkdir pp
PPDIR=`pwd`/pp
export DTC_FLAGS="-R 4 -p 0x1000 -@ -H epapr"
for dts in arch/arm64/boot/dts/freescale/imx93*dts; do
target=$(basename ${dts%*.dts})
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $dts -o $PPDIR/$target.dts
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $dts) -o $PPDIR/$target.dtb $PPDIR/$target.dts
done
%install
install -m 755 -d %{buildroot}%{_datadir}/%{name}
for dtb in pp/*.dtb; do
install -m 644 $dtb %{buildroot}%{_datadir}/%{name}/
done
%files
%defattr(-,root,root)
%license COPYING
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*dtb
%changelog