2015-10-08 08:25:53 +02:00
|
|
|
#
|
|
|
|
# spec file for package u-boot-spring
|
|
|
|
#
|
2016-02-09 16:49:43 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-10-08 08:25:53 +02:00
|
|
|
# Copyright (c) 2010 Texas Instruments Inc by Nishanth Menon
|
|
|
|
# Copyright (c) 2007-2010 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define x_loader 0
|
|
|
|
%define origen_spl 0
|
2016-04-07 13:32:23 +02:00
|
|
|
%define rockchip_spl 0
|
2015-10-08 08:25:53 +02:00
|
|
|
%define sunxi_spl 0
|
|
|
|
%define arndale_spl 0
|
|
|
|
%define cuboxi_spl 0
|
2016-02-09 16:49:43 +01:00
|
|
|
%define udoo_spl 0
|
2015-10-08 08:25:53 +02:00
|
|
|
|
|
|
|
# archive_version differs from version for RC version only
|
2016-04-22 16:25:22 +02:00
|
|
|
%define archive_version 2016.05-rc1
|
2015-10-08 08:25:53 +02:00
|
|
|
|
|
|
|
Name: u-boot-spring
|
2016-04-22 16:25:22 +02:00
|
|
|
Version: 2016.05~rc1
|
2015-10-08 08:25:53 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: The u-boot firmware for the spring arm platform
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: System/Boot
|
|
|
|
Url: http://www.denx.de/wiki/U-Boot
|
|
|
|
Source: ftp://ftp.denx.de/pub/u-boot/u-boot-%{archive_version}.tar.bz2
|
|
|
|
Source2: arndale-bl1.img
|
|
|
|
Source300: u-boot-rpmlintrc
|
2016-03-07 13:27:45 +01:00
|
|
|
# Set default environment slightly different for EFI, so it finds our dtbs
|
2016-04-22 16:25:22 +02:00
|
|
|
Patch1: 0001-XXX-openSUSE-XXX-Load-dtb-from-partition-2.patch
|
2016-03-07 13:27:45 +01:00
|
|
|
# Move omap3 to distro boot method
|
2016-04-22 16:25:22 +02:00
|
|
|
Patch2: 0002-XXX-openSUSE-XXX-omap3-Move-to-distro-bootcmd.patch
|
|
|
|
# Fix exynos KVM support
|
|
|
|
Patch3: 0003-exynos-Set-CNTFRQ.patch
|
|
|
|
# EFI fixes and ISO boot support
|
|
|
|
Patch4: 0004-iso-Make-little-endian-and-64bit-safe.patch
|
|
|
|
Patch5: 0005-iso-Start-with-partition-1.patch
|
|
|
|
Patch6: 0006-iso-Allow-512-byte-sector-size.patch
|
|
|
|
Patch7: 0007-efi_loader-Split-drive-add-into-function.patch
|
|
|
|
Patch8: 0008-efi_loader-Add-el-torito-support.patch
|
|
|
|
Patch9: 0009-efi_loader-Pass-file-path-to-payload.patch
|
|
|
|
Patch10: 0010-efi_loader-Increase-path-string-to-32-characters.patch
|
|
|
|
Patch11: 0011-distro-Enable-iso-partition-code.patch
|
|
|
|
Patch12: 0012-efi_loader-Use-system-fdt-as-fallback.patch
|
|
|
|
Patch13: 0013-efi_loader-Put-fdt-into-convenient-location.patch
|
|
|
|
Patch14: 0014-efi_loader-Expose-ascending-efi-memory-map.patch
|
|
|
|
Patch15: 0015-efi_loader-Always-flush-in-cache-line-size-granulari.patch
|
|
|
|
Patch16: 0016-efi_loader-Handle-memory-overflows.patch
|
|
|
|
Patch17: 0017-ARM-rpi-fix-64-bit-CONFIG_SYS_TEXT_BASE.patch
|
2015-10-08 08:25:53 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
# Arndale board need DTC >= 1.4
|
|
|
|
BuildRequires: bc
|
|
|
|
BuildRequires: dtc >= 1.4.0
|
2016-02-17 10:26:12 +01:00
|
|
|
%if "%{name}" == "u-boot-qemu-ppce500"
|
|
|
|
# Owns /usr/share/qemu directory
|
|
|
|
BuildRequires: qemu
|
|
|
|
Provides: qemu-ppc:%{_datadir}/qemu/u-boot.e500
|
|
|
|
%endif
|
2016-02-09 16:49:43 +01:00
|
|
|
%if "%{name}" == "u-boot-rpi" || "%{name}" == "u-boot-rpi2"
|
|
|
|
# Owns /boot/vc directory
|
|
|
|
BuildRequires: raspberrypi-firmware
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
Provides: u-boot-loader
|
|
|
|
Conflicts: otherproviders(u-boot-loader)
|
|
|
|
%if %x_loader == 1
|
|
|
|
Obsoletes: x-loader-spring
|
|
|
|
Provides: x-loader-spring
|
|
|
|
%endif
|
|
|
|
ExclusiveArch: armv7l armv7hl
|
|
|
|
|
|
|
|
%description
|
|
|
|
Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors.
|
|
|
|
This package contains the firmware for the spring arm platform.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for the u-boot Firmware
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Das U-Boot (or just "U-Boot" for short) is Open Source Firmware for Embedded PowerPC, ARM, MIPS and x86 processors.
|
|
|
|
This package contains documentation for u-boot firmware
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n u-boot-%{archive_version}
|
2015-11-08 11:26:14 +01:00
|
|
|
%patch1 -p1
|
2016-04-22 16:25:22 +02:00
|
|
|
%patch2 -p1
|
2016-03-07 13:27:45 +01:00
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
2016-04-22 16:25:22 +02:00
|
|
|
%patch10 -p1
|
2016-03-07 13:27:45 +01:00
|
|
|
%patch11 -p1
|
2016-04-22 16:25:22 +02:00
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
|
|
|
%patch14 -p1
|
|
|
|
%patch15 -p1
|
|
|
|
%patch16 -p1
|
|
|
|
%patch17 -p1
|
2015-10-08 08:25:53 +02:00
|
|
|
|
|
|
|
%build
|
2016-02-09 16:49:43 +01:00
|
|
|
make %{?jobs:-j %jobs} CROSS_COMPILE= CFLAGS="$RPM_OPT_FLAGS" spring_defconfig
|
|
|
|
make %{?jobs:-j %jobs} CROSS_COMPILE= CFLAGS="$RPM_OPT_FLAGS" USE_PRIVATE_LIBGG=yes
|
2015-10-08 08:25:53 +02:00
|
|
|
%if "%{name}" == "u-boot-snow" || "%{name}" == "u-boot-spring"
|
|
|
|
# Chromebook ARM (snow) and HP Chromebook 11 (spring) need a uImage format
|
|
|
|
export TEXT_START=$(awk '$NF == "_start" { printf "0x"$1 }' System.map)
|
|
|
|
./tools/mkimage -A arm -O linux -T kernel -C none -a $TEXT_START -e $TEXT_START -n uboot -d u-boot-dtb.bin u-boot.img
|
|
|
|
%endif
|
2016-04-07 13:32:23 +02:00
|
|
|
%if %rockchip_spl == 1
|
|
|
|
for t in ; do
|
|
|
|
./tools/mkimage -n -d spl/u-boot-spl-dtb.bin -T $t u-boot-spl.$t
|
|
|
|
done
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
|
|
|
|
%install
|
2015-12-24 12:16:47 +01:00
|
|
|
export NO_BRP_STRIP_DEBUG=true
|
|
|
|
export NO_DEBUGINFO_STRIP_DEBUG=true
|
|
|
|
%define uboot_dir /boot
|
|
|
|
%if "%{name}" == "u-boot-rpi" || "%{name}" == "u-boot-rpi2"
|
|
|
|
%define uboot_dir /boot/vc
|
|
|
|
%endif
|
2016-02-17 10:26:12 +01:00
|
|
|
%if "%{name}" == "u-boot-qemu-ppce500"
|
|
|
|
%define uboot_dir %{_datadir}/qemu
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
%if "%{name}" == "u-boot-jetson-tk1"
|
|
|
|
# tegra-uboot-flasher needs several intermediate files, under their original name.
|
2016-04-07 13:32:23 +02:00
|
|
|
for f in u-boot u-boot.dtb u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin spl/u-boot-spl; do
|
2015-10-08 08:25:53 +02:00
|
|
|
install -D -m 0644 $f %{buildroot}/boot/$f
|
|
|
|
done
|
|
|
|
%else
|
|
|
|
# Some times u-boot needs a dtb to configure itself appended to the binary.
|
|
|
|
# In that case prefer the one with a working dtb already appended.
|
|
|
|
if [ -f u-boot-dtb-tegra.bin ]; then
|
2015-12-24 12:16:47 +01:00
|
|
|
install -D -m 0644 u-boot-dtb-tegra.img %{buildroot}%{uboot_dir}/u-boot.img
|
2015-10-08 08:25:53 +02:00
|
|
|
elif [ -f u-boot-dtb.img ]; then
|
2015-12-24 12:16:47 +01:00
|
|
|
install -D -m 0644 u-boot-dtb.img %{buildroot}%{uboot_dir}/u-boot.img
|
2015-10-08 08:25:53 +02:00
|
|
|
else
|
2015-12-24 12:16:47 +01:00
|
|
|
install -D -m 0644 u-boot.img %{buildroot}%{uboot_dir}/u-boot.img
|
2015-10-08 08:25:53 +02:00
|
|
|
fi
|
2016-02-17 10:26:12 +01:00
|
|
|
%if "%{name}" == "u-boot-qemu-ppce500"
|
|
|
|
mv %{buildroot}%{uboot_dir}/u-boot.img %{buildroot}%{uboot_dir}/u-boot.e500
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
%endif
|
|
|
|
%if %x_loader == 1
|
|
|
|
install -D -m 0755 MLO %{buildroot}/boot/MLO
|
|
|
|
%endif
|
|
|
|
%if %origen_spl == 1
|
|
|
|
install -D -m 0755 spl/origen-spl.bin %{buildroot}/boot/origen-spl.bin
|
|
|
|
%endif
|
|
|
|
%if %arndale_spl == 1
|
|
|
|
install -D -m 0755 spl/arndale-spl.bin %{buildroot}/boot/arndale-spl.bin
|
|
|
|
install -D -m 0755 %{SOURCE2} %{buildroot}/boot/arndale-bl1.img
|
|
|
|
%endif
|
2016-04-07 13:32:23 +02:00
|
|
|
%if %rockchip_spl == 1
|
|
|
|
install -D -m 0644 spl/u-boot-spl-dtb.bin %{buildroot}%{uboot_dir}/u-boot-spl-dtb.bin
|
|
|
|
for t in ; do
|
|
|
|
install -D -m 0644 u-boot-spl.$t %{buildroot}%{uboot_dir}/u-boot-spl.$t
|
|
|
|
done
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
%if %sunxi_spl == 1
|
|
|
|
install -D -m 0755 spl/sunxi-spl.bin %{buildroot}/boot/sunxi-spl.bin
|
|
|
|
install -D -m 0755 u-boot-sunxi-with-spl.bin %{buildroot}/boot/u-boot-sunxi-with-spl.bin
|
|
|
|
%endif
|
|
|
|
%if %cuboxi_spl == 1
|
|
|
|
install -D -m 0755 SPL %{buildroot}/boot/cuboxi-spl.bin
|
|
|
|
%endif
|
2016-02-09 16:49:43 +01:00
|
|
|
%if %udoo_spl == 1
|
|
|
|
install -D -m 0755 SPL %{buildroot}/boot/udoo_spl.bin
|
|
|
|
%endif
|
2015-10-08 08:25:53 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-02-09 16:49:43 +01:00
|
|
|
%{uboot_dir}/*
|
2015-10-08 08:25:53 +02:00
|
|
|
%doc Licenses/gpl-2.0.txt README
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
# Generic documents
|
|
|
|
%doc doc/README.JFFS2 doc/README.JFFS2_NAND doc/README.commands
|
|
|
|
%doc doc/README.autoboot doc/README.commands doc/README.console doc/README.dns
|
|
|
|
%doc doc/README.hwconfig doc/README.nand doc/README.NetConsole doc/README.serial_multi
|
|
|
|
%doc doc/README.SNTP doc/README.standalone doc/README.update doc/README.usb
|
2016-02-26 22:18:42 +01:00
|
|
|
%doc doc/README.video doc/README.VLAN doc/README.silent doc/README.POST
|
2015-10-08 08:25:53 +02:00
|
|
|
# Copy some useful kermit scripts as well
|
|
|
|
%doc tools/kermit/dot.kermrc tools/kermit/flash_param tools/kermit/send_cmd tools/kermit/send_image
|
|
|
|
# Now any h/w dependent Documentation
|
|
|
|
%doc doc/README.ARM-memory-map
|
|
|
|
|
|
|
|
%changelog
|