2016-12-13 08:07:16 +01:00
|
|
|
#
|
|
|
|
# spec file for package $NAME
|
|
|
|
#
|
2020-11-20 09:06:59 +01:00
|
|
|
# Copyright (c) @YEAR@ SUSE LLC
|
2016-12-13 08:07:16 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2022-03-17 07:01:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-12-13 08:07:16 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-05-02 09:07:06 +02:00
|
|
|
%define srcversion @SRCVERSION@
|
2016-12-13 08:07:16 +01:00
|
|
|
%define patchversion @PATCHVERSION@
|
2017-05-02 09:07:06 +02:00
|
|
|
%define variant @VARIANT@%{nil}
|
2016-12-13 08:07:16 +01:00
|
|
|
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
|
|
|
|
2017-05-02 09:07:06 +02:00
|
|
|
%(chmod +x %_sourcedir/{@SCRIPTS@})
|
|
|
|
|
2016-12-13 08:07:16 +01:00
|
|
|
Name: $NAME
|
|
|
|
Version: @RPMVERSION@
|
|
|
|
%if 0%{?is_kotd}
|
|
|
|
Release: <RELEASE>.g@COMMIT@
|
|
|
|
%else
|
|
|
|
Release: @RELEASE@
|
|
|
|
%endif
|
|
|
|
Summary: Device Tree files for $MACHINES
|
2021-08-03 10:04:33 +02:00
|
|
|
License: GPL-2.0-only
|
2016-12-13 08:07:16 +01:00
|
|
|
Group: System/Boot
|
2022-03-17 07:01:51 +01:00
|
|
|
URL: https://www.kernel.org/
|
2024-01-06 08:08:15 +01:00
|
|
|
%if ! 0%{?is_kotd} || ! %{?is_kotd_qa}%{!?is_kotd_qa:0}
|
2016-12-13 08:07:16 +01:00
|
|
|
$ARCH_RESTRICTIONS
|
2024-01-06 08:08:15 +01:00
|
|
|
%else
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
%endif
|
2016-12-13 08:07:16 +01:00
|
|
|
BuildRequires: cpp
|
2017-05-02 09:07:06 +02:00
|
|
|
BuildRequires: dtc >= 1.4.3
|
2016-12-13 08:07:16 +01:00
|
|
|
BuildRequires: xz
|
|
|
|
Requires: kernel = %version
|
2017-05-02 09:07:06 +02:00
|
|
|
@SOURCES@
|
2016-12-13 08:07:16 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Device Tree files for $MACHINES.
|
|
|
|
|
|
|
|
$SUBPKG_DESC
|
|
|
|
|
|
|
|
%prep
|
2017-05-02 09:07:06 +02:00
|
|
|
# Unpack all sources and patches
|
|
|
|
%setup -q -c -T -a 0 @UNPACK_PATCHES@
|
|
|
|
cd linux-%srcversion
|
|
|
|
%_sourcedir/apply-patches %_sourcedir/series.conf ..
|
|
|
|
|
2016-12-13 08:07:16 +01:00
|
|
|
|
|
|
|
%build
|
2017-05-02 09:07:06 +02:00
|
|
|
source=linux-%srcversion
|
2017-02-21 08:08:23 +01:00
|
|
|
cp $source/COPYING .
|
2022-03-23 09:14:44 +01:00
|
|
|
SRCDIR=$PWD/$source
|
2016-12-13 08:07:16 +01:00
|
|
|
mkdir pp
|
2022-03-23 09:14:44 +01:00
|
|
|
PPDIR=$PWD/pp
|
2016-12-13 08:07:16 +01:00
|
|
|
export DTC_FLAGS="-R 4 -p 0x1000"
|
2017-05-02 09:07:06 +02:00
|
|
|
DTC_FLAGS="$DTC_FLAGS -@"
|
2016-12-13 08:07:16 +01:00
|
|
|
|
2017-02-21 08:08:23 +01:00
|
|
|
cd $source/$DTS_folder
|
2016-12-13 08:07:16 +01:00
|
|
|
for dts in $ALL_SUPPORTED_DTB; do
|
|
|
|
target=${dts%*.dts}
|
|
|
|
mkdir -p $PPDIR/$(dirname $target)
|
2017-08-15 08:02:39 +02:00
|
|
|
cpp -x assembler-with-cpp -undef -D__DTS__ -nostdinc -I. -I$SRCDIR/include/ -I$SRCDIR/scripts/dtc/include-prefixes/ -P $target.dts -o $PPDIR/$target.dts
|
2016-12-13 08:07:16 +01:00
|
|
|
dtc $DTC_FLAGS -I dts -O dtb -i ./$(dirname $target) -o $PPDIR/$target.dtb $PPDIR/$target.dts
|
|
|
|
done
|
|
|
|
|
|
|
|
%define dtbdir /boot/dtb-%kernelrelease
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
cd pp
|
|
|
|
for dts in $ALL_SUPPORTED_DTB; do
|
|
|
|
target=${dts%*.dts}
|
2019-07-28 13:42:10 +02:00
|
|
|
install -m 755 -d %{buildroot}%{dtbdir}/$(dirname $target)
|
2018-01-31 19:59:10 +01:00
|
|
|
# install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target)
|
2016-12-13 08:07:16 +01:00
|
|
|
install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target)
|
2023-10-13 10:18:13 +02:00
|
|
|
%ifarch %arm aarch64 riscv64
|
2016-12-13 08:07:16 +01:00
|
|
|
# HACK: work around U-Boot ignoring vendor dir
|
|
|
|
baselink=%{dtbdir}/$(basename $target).dtb
|
|
|
|
ln -s $target.dtb %{buildroot}$baselink
|
2023-10-13 10:18:13 +02:00
|
|
|
%ifarch %arm
|
|
|
|
case $dts in
|
|
|
|
$SUBPKG_CASE
|
|
|
|
esac
|
|
|
|
echo $baselink >> ../$pkgname.list
|
|
|
|
%else
|
|
|
|
vendordir=$(basename $(dirname $target))
|
2016-12-13 08:07:16 +01:00
|
|
|
echo $baselink >> ../dtb-$vendordir.list
|
|
|
|
%endif
|
2023-10-13 10:18:13 +02:00
|
|
|
%endif
|
2016-12-13 08:07:16 +01:00
|
|
|
done
|
|
|
|
cd -
|
|
|
|
|
|
|
|
$SUBPKG_POST
|
|
|
|
$SUBPKG_FILES
|
|
|
|
%changelog
|