commit 76785a2c72af9348725369096fedf3bb6778ffd8 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:37:37 2019 -0400 Package init diff --git a/dtc-1.4.7.tar.xz b/dtc-1.4.7.tar.xz new file mode 100644 index 0000000..591178e Binary files /dev/null and b/dtc-1.4.7.tar.xz differ diff --git a/dtc.spec b/dtc.spec new file mode 100644 index 0000000..456131f --- /dev/null +++ b/dtc.spec @@ -0,0 +1,80 @@ +Name: dtc +Version: 1.4.7 +Release: 2 +Summary: Device tree compiler +License: GPLv2+ +URL: https://devicetree.org/ +Source0: https://ftp.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz + +BuildRequires: gcc make git flex bison swig +BuildRequires: python2-devel python2-setuptools +Provides: libfdt +Obsoletes: libfdt + +Patch1: use-tx-as-the-type-specifier-instead-of-zx.patch + +%description +The 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. + +%package devel +Summary: Development headers for device tree library +Requires: libfdt = %{version}-%{release} +Provides: libfdt-static libfdt-devel +Obsoletes: libfdt-static libfdt-devel + +%description devel +This package provides development files for dtc. + +%package -n python2-libfdt +Summary: Python 2 bindings for device tree library +%{?python_provide:%python_provide python2-libfdt} +Requires: %{name} = %{version}-%{release} + +%description -n python2-libfdt +This package provides python2 bindings for libfdt + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 -Sgit + +%build +%make_build + +%install +%make_install SETUP_PREFIX=$RPM_BUILD_ROOT/usr LIBDIR=%{_libdir} PREFIX=/usr + +%pre + +%preun + +%post + +%postun + +%files +%doc README +%license GPL README.license +%{_bindir}/* +%{_libdir}/libfdt-%{version}.so +%{_libdir}/libfdt.so.* + +%files devel +%{_libdir}/libfdt.so +%{_includedir}/* +%{_libdir}/libfdt.a + +%files -n python2-libfdt +%{python2_sitearch}/* + +%files help +%doc Documentation/manual.txt + +%changelog +* Thu Sep 19 2019 openEuler Buildteam - 1.4.7-2 +- Package init diff --git a/use-tx-as-the-type-specifier-instead-of-zx.patch b/use-tx-as-the-type-specifier-instead-of-zx.patch new file mode 100644 index 0000000..a6241c5 --- /dev/null +++ b/use-tx-as-the-type-specifier-instead-of-zx.patch @@ -0,0 +1,39 @@ +--- dtc-1.4.7/fdtdump.c.orig 2018-07-23 04:00:50.000000000 +0100 ++++ dtc-1.4.7/fdtdump.c 2018-08-18 22:04:23.059267042 +0100 +@@ -100,7 +100,7 @@ + p = p_struct; + while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) { + +- dumpf("%04zx: tag: 0x%08"PRIx32" (%s)\n", ++ dumpf("%04tx: tag: 0x%08"PRIx32" (%s)\n", + (uintptr_t)p - blob_off - 4, tag, tagname(tag)); + + if (tag == FDT_BEGIN_NODE) { +@@ -140,8 +140,8 @@ + + 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"); +@@ -229,14 +229,14 @@ + if (valid_header(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 || endp - p < sizeof(struct fdt_header)) + 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; + } else if (!valid_header(buf, len)) + die("%s: header is not valid\n", file);