Browse code

Adding device tree compiler

Change-Id: I677680dfa1e2773dc181cb103fe5234a436ea136
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/7720
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Tested-by: Tapas Kundu <tkundu@vmware.com>

akaher authored on 2019/08/06 16:01:33
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,58 @@
0
+Summary:       Device Tree Compiler
1
+Name:          dtc
2
+Version:       1.5.0
3
+Release:       1%{?dist}
4
+License:       GPLv2+
5
+URL:           https://devicetree.org/
6
+Group:         Development/Tools
7
+Vendor:        VMware, Inc.
8
+Distribution:  Photon
9
+Source0:       https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.gz
10
+%define sha1 dtc=3b557ea9e2db096d7939489d76c9add3d73adbb2
11
+BuildRequires: gcc make
12
+BuildRequires: flex bison swig
13
+
14
+%description
15
+Devicetree is a data structure for describing hardware. Rather than hard coding
16
+every detail of a device into an operating system, many aspects of the hardware
17
+can be described in a data structure that is passed to the operating system at
18
+boot time. The devicetree is used by OpenFirmware, OpenPOWER Abstraction Layer
19
+(OPAL), Power Architecture Platform Requirements (PAPR) and in the standalone
20
+Flattened Device Tree (FDT) form.
21
+
22
+%package devel
23
+Summary: Development headers for device tree library
24
+Requires: %{name} = %{version}-%{release}
25
+
26
+%description devel
27
+This package provides development files for libfdt
28
+
29
+%prep
30
+%setup -q
31
+sed -i 's/python2/python3/' pylibfdt/setup.py
32
+
33
+%build
34
+make %{?_smp_mflags} V=1 CC="gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS"
35
+
36
+%install
37
+make install DESTDIR=%{buildroot} PREFIX=%{buildroot}/usr \
38
+                            LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} V=1
39
+
40
+%clean
41
+rm -rf %{buildroot}/*
42
+
43
+%files
44
+%license GPL
45
+%doc Documentation/manual.txt
46
+%{_bindir}/*
47
+%{_libdir}/libfdt-%{version}.so
48
+%{_libdir}/libfdt.so.*
49
+
50
+%files devel
51
+%{_libdir}/libfdt.so
52
+%{_libdir}/libfdt.a
53
+%{_includedir}/*
54
+
55
+%changelog
56
+* Wed Jul 24 2019 Ajay Kaher <akaher@vmware.com> 1.5.0-1
57
+- Initial build. First version