Compare commits

..

No commits in common. "master" and "f19" have entirely different histories.
master ... f19

4 changed files with 95 additions and 150 deletions

7
.gitignore vendored
View File

@ -1,4 +1,3 @@
/dtc-*.tgz
/dtc-*.tar.xz
/dtc-*.tar.gz
/dtc-*.tar.bz2
dtc-v1.2.0.tgz
/dtc-v1.3.0.tgz
/dtc-v1.4.0.tgz

179
dtc.spec
View File

@ -1,26 +1,23 @@
Name: dtc
Version: 1.5.1
Release: 1%{?dist}
Summary: Device Tree Compiler
License: GPLv2+
URL: https://devicetree.org/
Name: dtc
Version: 1.4.0
Release: 1%{?dist}
Summary: Device Tree Compiler
Group: Development/Tools
License: GPLv2+
URL: http://git.jdl.com/gitweb/?p=dtc.git;a=summary
Source: http://www.jdl.com/software/dtc-v%{version}.tgz
Patch1: use-tx-as-the-type-specifier-instead-of-zx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
BuildRequires: gcc make
BuildRequires: flex bison swig
BuildRequires: python3-devel python3-setuptools
BuildRequires: flex, bison
%description
Devicetree is a data structure for describing hardware. Rather than hard coding
every detail of a device into an operating system, many aspects of the hardware
can be described in a data structure that is passed to the operating system at
boot time. The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer
(OPAL), Power Architecture Platform Requirements (PAPR) and in the standalone
Flattened Device Tree (FDT) form.
The Device Tree Compiler generates flattened Open Firmware style device trees
for use with PowerPC machines that lack an Open Firmware implementation
%package -n libfdt
Summary: Device tree library
Group: Development/Libraries
%description -n libfdt
libfdt is a library to process Open Firmware style device trees on various
@ -28,162 +25,54 @@ architectures.
%package -n libfdt-devel
Summary: Development headers for device tree library
Group: Development/Libraries
Requires: libfdt = %{version}-%{release}
%description -n libfdt-devel
This package provides development files for libfdt
%package -n libfdt-static
Summary: Static version of device tree library
Requires: libfdt-devel = %{version}-%{release}
%description -n libfdt-static
This package provides the static library of libfdt
%package -n python3-libfdt
Summary: Python 3 bindings for device tree library
%{?python_provide:%python_provide python2-libfdt}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python3-libfdt
This package provides python2 bindings for libfdt
%prep
%autosetup -p1
sed -i 's/python2/python3/' pylibfdt/setup.py
%setup -q -n dtc-v%{version}
%patch1 -p1
%build
make %{?_smp_mflags} V=1 CC="gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS"
make %{?_smp_mflags}
%install
#make install DESTDIR=$RPM_BUILD_ROOT SETUP_PREFIX=$RPM_BUILD_ROOT/usr PREFIX=/usr LIBDIR=%{_libdir}
PYTHON=python3 make install DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/usr \
LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} V=1
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr LIBDIR=%{_libdir}
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.a
# we don't want or need ftdump and it conflicts with freetype-demos, so drop
# it (rhbz 797805)
rm -f $RPM_BUILD_ROOT/%{_bindir}/ftdump
%ldconfig_scriptlets -n libfdt
%clean
rm -rf $RPM_BUILD_ROOT
%files
%license GPL
%doc Documentation/manual.txt
%defattr(-,root,root,-)
%doc GPL
%{_bindir}/*
%files -n libfdt
%license GPL
%{_libdir}/libfdt-1.5.0.so
%defattr(-,root,root,-)
%doc GPL
%{_libdir}/libfdt-%{version}.so
%{_libdir}/libfdt.so.*
%files -n libfdt-static
%{_libdir}/libfdt.a
%files -n libfdt-devel
%defattr(-,root,root,-)
%{_libdir}/libfdt.so
%{_includedir}/*
%files -n python3-libfdt
%{python3_sitearch}/*
%post -n libfdt
/sbin/ldconfig
%postun -n libfdt
/sbin/ldconfig
%changelog
* Wed Sep 11 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.1-1
- New dtc 1.5.1 release
* Tue Sep 10 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-3
- Rebuilt for Python 3.8
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Mar 12 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.0-1
- New dtc 1.5.0 release
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jan 15 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.7-2
- Upstream fix for crash (rhbz 1663054)
* Sat Aug 18 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.7-1
- New dtc 1.4.7 release
* Tue Jul 17 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.6-7
- Update Python macros to new packaging standards
(See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package)
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 06 2018 Bas Mevissen <abuse@basmevissen.nl> 1.4.6-5
- Add static library package, see BZ#1440975
* Wed Mar 7 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.6-4
- Add gcc BR
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 26 2018 Florian Weimer <fweimer@redhat.com> - 1.4.6-2
- Use Fedora build flags during build
* Mon Jan 22 2018 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.6-1
- New dtc 1.4.6 release
* Thu Sep 28 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.5-1
- New dtc 1.4.5 release
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jun 12 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.4-2
- Add upstream patches for python bindings
* Fri Mar 17 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.4-1
- New dtc 1.4.4 release
* Tue Feb 28 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.2-3.0931cea
- Rebase to same git snapshot that kernel is using for DT Overlays
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Sep 11 2016 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.2-1
- New dtc 1.4.2 release
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jun 16 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-4
- Use %%license
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.4.1-3
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Mon Jan 5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-2
- Use tar file from kernel.org
* Mon Jan 5 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.4.1-1
- New dtc 1.4.1 release
- Update URL and Sources
- Cleanup spec
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.4.0-3
- Avoid shell invocation and fix deps of libfdt %%post* scripts.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jun 24 2013 Josh Boyer <jwboyer@redhat.com> - 1.4.0-1
- New dtc 1.4.0 release (rhbz 977480)

View File

@ -1 +1 @@
SHA512 (dtc-1.5.1.tar.xz) = 9e17103d791c71f1ad5d86ab6ac629d523d9add684c9cccb1624214d6c65e5c29776c23a2ad70597420b043bb5dfd412bf4beafd74729f02309d399d9639da83
993e14242818bcfd801edd4f27ddd5a3 dtc-v1.4.0.tgz

View File

@ -0,0 +1,57 @@
From 46ed9702a0005da87edd0cc3d34dbe24d1526784 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Thu, 6 Jun 2013 17:01:39 +0200
Subject: [PATCH] use tx as the type specifier instead of zx
A couple of printf() commands use "zx" as a type specifier for printing
a difference of 2 pointers. "z" means a size_t, but using "t" which is
ptrdiff_t is correct. The issue was found on s390 (32-bit) where size_t
is defined as "unsigned long" as opposed to the usual "unsigned int".
---
fdtdump.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fdtdump.c b/fdtdump.c
index 723770d..c5811f0 100644
--- a/fdtdump.c
+++ b/fdtdump.c
@@ -95,7 +95,7 @@ static void dump_blob(void *blob, bool debug)
p = p_struct;
while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) {
- dumpf("%04zx: tag: 0x%08x (%s)\n",
+ dumpf("%04tx: tag: 0x%08x (%s)\n",
(uintptr_t)p - blob_off - 4, tag, tagname(tag));
if (tag == FDT_BEGIN_NODE) {
@@ -135,8 +135,8 @@ static void dump_blob(void *blob, bool debug)
p = PALIGN(p + sz, 4);
- dumpf("%04zx: string: %s\n", (uintptr_t)s - blob_off, s);
- dumpf("%04zx: value\n", (uintptr_t)t - blob_off);
+ dumpf("%04tx: string: %s\n", (uintptr_t)s - blob_off, s);
+ dumpf("%04tx: value\n", (uintptr_t)t - blob_off);
printf("%*s%s", depth * shift, "", s);
utilfdt_print_data(t, sz);
printf(";\n");
@@ -210,14 +210,14 @@ int main(int argc, char *argv[])
fdt_off_dt_strings(p) < this_len)
break;
if (debug)
- printf("%s: skipping fdt magic at offset %#zx\n",
+ printf("%s: skipping fdt magic at offset %#tx\n",
file, p - buf);
}
++p;
}
if (!p)
die("%s: could not locate fdt magic\n", file);
- printf("%s: found fdt at offset %#zx\n", file, p - buf);
+ printf("%s: found fdt at offset %#tx\n", file, p - buf);
buf = p;
}
--
1.8.1.4