-
Notifications
You must be signed in to change notification settings - Fork 0
/
odroid-c-uboot.spec
102 lines (82 loc) · 3.45 KB
/
odroid-c-uboot.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
%global commit b7b8dc21b64b9494618325c9b4d2fbae728aeed6
Name: odroid-c-uboot
Version: 2017.05.31
Release: 1%{?dist}
Summary: U-boot for ODROID-C
Group: System Environment/Base
License: GPLv2
URL: http://odroid.com/dokuwiki/doku.php?id=en:odroid-c1
Source0: https://github.com/hardkernel/u-boot/archive/%{commit}/u-boot-%{commit}.tar.gz
Source1: boot.ini
Source2: grubby
Source3: hardkernel-1080.bmp
Source4: hardkernel-720.bmp
Patch0: %{name}-2016.10.10-sync-linux-compiler-includes.patch
Patch1: %{name}-2015.04.06-arm-asm-io-h-use-static-inline.patch
Patch2: %{name}-2015.04.06-show-boot-progress-weak.patch
Patch3: %{name}-2015.04.06-leds-weak.patch
Patch4: %{name}-2015.04.06-replace-wait-ms-with-mdelay.patch
Patch5: %{name}-2016.10.10-revert-kitkat-scaling.patch
Patch6: %{name}-2016.10.10-add-vframe-provider-s-definition.patch
Patch100: %{name}-2015.04.06-aml-meson-armv5-compat.patch
# We always need to use a cross compiler because we can't use hardfloat static
# libraries. This means that we'll always produce an ARM package, even when
# built on x86 machines. The code compiled here is also indifferent of the
# architecture used on the ODROID's OS.
BuildArch: noarch
BuildRequires: arm-none-eabi-gcc-cs
Requires: grubby
%description
U-boot for Hardkernel's ODROID-C. This package installs u-boot.bin and a
default boot.ini, and also configures grubby.
%prep
%setup -qn u-boot-%{commit}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
make %{?_smp_mflags} odroidc_config
make %{?_smp_mflags} CROSS_COMPILE=arm-none-eabi-
%install
install -p -m0644 -D %{SOURCE2} %{buildroot}%{_datadir}/%{name}/grubby-%{version}-%{release}
install -p -m0644 -D %{SOURCE1} %{buildroot}/boot/uboot/boot.ini
install -p -m0755 -D sd_fuse/u-boot.bin %{buildroot}/boot/uboot/u-boot.bin
ln -s grubby-%{version}-%{release} %{buildroot}%{_datadir}/%{name}/grubby
install -p -m0644 -D %{SOURCE3} %{buildroot}/boot/uboot/hardkernel-1080.bmp
install -p -m0644 -D %{SOURCE4} %{buildroot}/boot/uboot/hardkernel-720.bmp
%post
cat %{_datadir}/%{name}/grubby-%{version}-%{release} >> %{_sysconfdir}/sysconfig/uboot
%preun
while read l; do
sed -i "0,/^`echo "$l" | sed 's/\//\\\\\//g'`/{//d}" %{_sysconfdir}/sysconfig/uboot
done < %{_datadir}/%{name}/grubby-%{version}-%{release}
%files
%doc COPYING CREDITS MAINTAINERS README
%{_datadir}/%{name}/grubby
%{_datadir}/%{name}/grubby-%{version}-%{release}
%config(noreplace) /boot/uboot/boot.ini
/boot/uboot/u-boot.bin
/boot/uboot/hardkernel-1080.bmp
/boot/uboot/hardkernel-720.bmp
%changelog
* Sat Jan 20 2018 Scott K Logan <[email protected]> - 2017.05.31-1
- Pull latest source
- Sync linux includes for new gcc compat
* Sat Oct 22 2016 Scott K Logan <[email protected]> - 2016.10.10-2
- Revert a bad logo scaling patch
* Fri Oct 14 2016 Scott K Logan <[email protected]> - 2016.10.10-1
- Pull latest source
* Sun Dec 06 2015 Scott K Logan <[email protected]> - 2015.08.07-2
- Add enabledac var and clean up boot.ini
- Use Hardkernel logo instead of test pattern
* Sat Nov 28 2015 Scott K Logan <[email protected]> - 2015.08.07-1
- Pull latest source
* Sun May 03 2015 Scott K Logan <[email protected]> - 2015.04.06-1
- Various fixes in boot.ini
- Update to version 2015.04.06
* Sat May 02 2015 Scott K Logan <[email protected]> - 2015.01.03-1
- Initial package