u-boot/u-boot.spec

128 lines
4.0 KiB
RPMSpec
Raw Normal View History

#
# u-boot multiplatform specfile
# Copyright (c) 2007-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
# Build examples:
# rpmbuild -ba u-boot.spec --define="TARGET_BOARD pxa255_idp" --target="arm"
#
# Tested targets:
# mainstone
# mainstone_rr
#
Name: u-boot
Version: 2009.11.1
Release: 1mamba
Summary: Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors
Group: System/Kernel and Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://u-boot.sourceforge.net/
Source: ftp://ftp.denx.de/pub/u-boot/%{name}-%{version}.tar.bz2
#Source: http://surfnet.dl.sourceforge.net/sourceforge/u-boot/%{name}-%{version}.tar.bz2
Patch0: u-boot-1.1.4-pxa255_idp.patch
Patch1: u-boot-1.1.6-phycore-pxa270-4.diff
Patch2: u-boot-1.1.6-mainstone.patch
Patch3: u-boot-1.1.6-mainstone_rr.patch
License: GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors.
%if "%{?TARGET_BOARD}"
%package %{TARGET_BOARD}
Summary: The u-boot firmware for the %{TARGET_BOARD} %{_TARGET_CPU} platform
Group: System/Kernel and Hardware
%description %{TARGET_BOARD}
Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors.
This package contains mkimage, a tool that creates kernel bootable images for u-boot.
This package contains the firmware for the %{TARGET_BOARD} %{_TARGET_CPU} platform.
%endif
%package tools
Summary: Tools for the u-boot Firmware
Group: System/Kernel and Hardware
%description tools
Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors.
This package contains mkimage, a tool that creates kernel bootable images for u-boot.
%prep
%setup -q
%if "%{?TARGET_BOARD}"
%patch0 -p1
%patch1 -p1
%patch2 -p1
%endif
sed -i "s|-idirafter|-I|" tools/Makefile
%build
%if "%{?TARGET_BOARD}"
%if "%{?TARGET_BOARD}" == "mainstone_rr"
patch -p1 < %{PATCH3}
make mainstone_config
%else
make %{TARGET_BOARD}_config
%endif
CROSS_COMPILE=%{_target_platform}- make all
%else
# configure for a fictituous target (only tools will be build)
%make TQM850L_config
%make CC=%{_target_platform}-gcc tools
%endif
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -D -m 0755 tools/mkimage %{buildroot}%{_bindir}/mkimage
#install -d -m 0755 tools/img2srec %{buildroot}%{_bindir}/img2srec
%if "%{?TARGET_BOARD}"
install -D -m 0755 u-boot.bin %{buildroot}/boot/u-boot-%{TARGET_BOARD}.bin
install -D -m 0644 u-boot.map %{buildroot}/boot/u-boot-%{TARGET_BOARD}.map
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%if "%{?TARGET_BOARD}"
%files %{TARGET_BOARD}
%defattr(-,root,root)
/boot/u-boot-%{TARGET_BOARD}.bin
/boot/u-boot-%{TARGET_BOARD}.map
%endif
%files tools
%defattr(-,root,root)
%{_bindir}/mkimage
%doc COPYING CREDITS README
%changelog
* Wed Mar 31 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2009.11.1-1mamba
- update to 2009.11.1
* Wed Mar 31 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.4-1mamba
- update to 1.3.4
* Sun Aug 31 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.6-1mamba
- update to 1.1.6
* Tue Jan 30 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.6-3qilnx
- added mainstone_rr patch
* Tue Jan 16 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.6-2qilnx
- rename u-boot.* to u-boot-%{TARGET_BOARD}
* Mon Jan 15 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.6-1qilnx
- update to version 1.1.6 by autospec
* Mon Aug 21 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.4-1qilnx
- update to version 1.1.4 by autospec
* Thu Sep 01 2005 Silvan Calarco <silvan.calarco@qilinux.it> 1.1.3-2qilnx
- don't rename mkimage because the kernel uses it with this name (make uImage)
* Wed Aug 31 2005 Silvan Calarco <silvan.calarco@qilinux.it> 1.1.3-1qilnx
- package created by autospec