summaryrefslogtreecommitdiff
path: root/u-boot.spec
blob: 83a23e5d292f111e26637a716401d2d0dc7b18e3 (plain)
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
#Defines
%define base_version 2009.11
%define boot_path /boot

Name: u-boot
Release: 1
Version: %{base_version}
License: GPL
URL: http://www.denx.de/wiki/U-Boot
Source0: %{name}-%{base_version}.tar.bz2
Source100: %{name}-rpmlintrc

Summary: Das U-Boot boot loader binary
Group: Binary

%description
This package contains the source code for Das U-Boot.

U-Boot is a boot loader for Embedded boards based on PowerPC, ARM,
MIPS and several other processors, which can be installed in a boot
ROM and used to initialize and test the hardware or to download and
run application code.

%package tools
Summary: Das U-Boot boot image maker
Group: Development/Tools

%description tools
U-Boot utility for creating bootable kernel images.

%prep
%setup -q

%build
#Default config for u8500
make u8500_def_config

#Build-id needed/wanted by rpmbuild
export LDFLAGS="$LDFLAGS --build-id"

make u-boot

#Additional tools
make -C tools/mk_envimg

%install
#Build-id needed by rpm
export LDFLAGS="$LDFLAGS --build-id"

#Binaries
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{boot_path}
install -m 755 %{_builddir}/u-boot-%{base_version}/u-boot %{buildroot}%{boot_path}
install -m 644 %{_builddir}/u-boot-%{base_version}/u-boot.map %{buildroot}%{boot_path}
install -m 644 %{_builddir}/u-boot-%{base_version}/u-boot.lds %{buildroot}%{boot_path}
install -m 755 %{_builddir}/u-boot-%{base_version}/tools/mkimage %{buildroot}%{_bindir}
install -m 755 %{_builddir}/u-boot-%{base_version}/tools/img2srec %{buildroot}%{_bindir}
install -m 755 %{_builddir}/u-boot-%{base_version}/tools/mk_envimg/mk_envimg %{buildroot}%{_bindir}
#Remove unwanted sections
objcopy --gap-fill=0xff --remove-section=.note.gnu.build-id -O binary %{buildroot}%{boot_path}/u-boot %{buildroot}%{boot_path}/u-boot.bin

%clean
rm -rf %{buildroot}/*

%files
%defattr(-,root,root)
%{boot_path}/u-boot.bin
%{boot_path}/u-boot.map
%{boot_path}/u-boot
%{boot_path}/u-boot.lds

%files tools
%defattr(-,root,root)
%{_bindir}/mkimage
%{_bindir}/img2srec
%{_bindir}/mk_envimg