-
Notifications
You must be signed in to change notification settings - Fork 0
/
odroid-xu-uboot.spec
74 lines (60 loc) · 2.4 KB
/
odroid-xu-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
%global commit 58ce8991b5c3c42a6b9855de173cfb06257ea499
Name: odroid-xu-uboot
Version: 2014.03.28
Release: 2%{?dist}
Summary: U-boot for ODROID-XU
Group: System Environment/Base
License: GPLv2
URL: http://odroid.com/dokuwiki/doku.php?id=en:odroid-xu
Source0: https://github.com/hardkernel/u-boot/archive/%{commit}/u-boot-%{commit}.tar.gz
Source1: boot.ini
Source2: grubby
Patch0: odroid-xu-uboot-2014.03.28-gcc5.patch
Patch1: odroid-xu-uboot-2014.03.28-arm-asm-io-h-use-static-inline.patch
Patch2: odroid-xu-uboot-2014.03.28-leds-weak.patch
Patch3: odroid-xu-uboot-2014.03.28-show-boot-progress-weak.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
BuildRequires: dos2unix
Requires: grubby
%description
U-boot for Hardkernel's ODROID-XU. 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
dos2unix COPYING.txt
chmod 644 COPYING.txt
%build
make %{?_smp_mflags} smdk5410_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 u-boot.bin %{buildroot}/boot/uboot/u-boot.bin
ln -s grubby-%{version}-%{release} %{buildroot}%{_datadir}/%{name}/grubby
%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 COPYING.txt CREDITS MAINTAINERS README
%{_datadir}/%{name}/grubby
%{_datadir}/%{name}/grubby-%{version}-%{release}
%config(noreplace) /boot/uboot/boot.ini
/boot/uboot/u-boot.bin
%changelog
* Mon Apr 06 2015 Scott K Logan <logans@cottsay.net> - 2014.03.28-2
- Make the boot.ini a config file
- Default output to 720p (and more)
* Fri Apr 03 2015 Scott K Logan <logans@cottsay.net> - 2014.03.28-1
- Initial package