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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
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
|
|
|
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} >= 120300 )
|
|
|
|
%define dtc_symbols 1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%(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
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: System/Boot
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
$ARCH_RESTRICTIONS
|
|
|
|
BuildRequires: cpp
|
2017-05-02 09:07:06 +02:00
|
|
|
%if 0%{?dtc_symbols}
|
|
|
|
BuildRequires: dtc >= 1.4.3
|
|
|
|
%else
|
2016-12-13 08:07:16 +01:00
|
|
|
BuildRequires: dtc >= 1.4.0
|
2017-05-02 09:07:06 +02:00
|
|
|
%endif
|
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 .
|
2017-08-15 08:02:39 +02:00
|
|
|
SRCDIR=`pwd`/$source
|
2016-12-13 08:07:16 +01:00
|
|
|
mkdir pp
|
|
|
|
PPDIR=`pwd`/pp
|
|
|
|
export DTC_FLAGS="-R 4 -p 0x1000"
|
2017-05-02 09:07:06 +02:00
|
|
|
%if 0%{?dtc_symbols}
|
|
|
|
DTC_FLAGS="$DTC_FLAGS -@"
|
|
|
|
%endif
|
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)
|
2019-09-11 08:08:09 +02:00
|
|
|
%ifarch aarch64 riscv64
|
2016-12-13 08:07:16 +01:00
|
|
|
# HACK: work around U-Boot ignoring vendor dir
|
|
|
|
baselink=%{dtbdir}/$(basename $target).dtb
|
|
|
|
vendordir=$(basename $(dirname $target))
|
|
|
|
ln -s $target.dtb %{buildroot}$baselink
|
|
|
|
echo $baselink >> ../dtb-$vendordir.list
|
|
|
|
%endif
|
|
|
|
done
|
|
|
|
cd -
|
|
|
|
|
|
|
|
$SUBPKG_POST
|
|
|
|
$SUBPKG_FILES
|
|
|
|
%changelog
|