u-boot/u-boot.spec

150 lines
4.4 KiB
RPMSpec
Raw Normal View History

# u-boot multiplatform specfile
#
# Build examples:
# rpmbuild -ba u-boot.spec --define="TARGET_BOARD pxa255_idp" --target="arm"
#
# Tested targets:
# mainstone
# mainstone_rr
#
Name: u-boot
Version: 2024.01
Release: 2mamba
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: https://docs.u-boot.org/en/latest/
Source: https://ftp.denx.de/pub/u-boot/u-boot-%{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
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libncurses-devel
BuildRequires: libopenssl-devel
## AUTOBUILDREQ-END
License: GPL
%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.
%debug_package
%prep
%setup -q
%build
make defconfig
%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 tools-all
%endif
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
for f in {mk{,env}image,env/fw_printenv,img2srec,dumpimage,netconsole,jtagconsole,ncb,kwboot}; do
install -D -m 0755 tools/${f} %{buildroot}%{_bindir}/`basename ${f}`
done
for f in {mkimage,dumpimage,kwboot}; do
install -D -m 0644 doc/${f}.1 %{buildroot}%{_mandir}/man1/${f}.1
done
%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}/dumpimage
%{_bindir}/fw_printenv
%{_bindir}/img2srec
%{_bindir}/jtagconsole
%{_bindir}/kwboot
%{_bindir}/mkenvimage
%{_bindir}/mkimage
%{_bindir}/ncb
%{_bindir}/netconsole
%{_mandir}/man1/dumpimage.1*
%{_mandir}/man1/kwboot.1*
%{_mandir}/man1/mkimage.1*
%doc Licenses
%changelog
* Wed Feb 14 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2024.01-2mamba
- fix fw_printenv installation in bindir
* Tue Feb 13 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2024.01-1mamba
- update to 2024.01
* 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