forked from pool/u-boot
Accepting request 607419 from hardware👢staging
- Conditionalize pine64plus ATF support on uboot_atf_pine64 - u-boot-board.spec.in: Update license - Add poplar - Update to 2018.05 - Update to 2018.05-rc3 - Include u-boot.spec in autogeneration logic - Add support for .bif generation in mkimage - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0006-tools-zynqmpimage-Add-partition-rea.patch 0007-tools-zynqmpimage-Move-defines-to-h.patch 0008-MAINTAINERS-Declare-tools-zynq-.-c-.patch 0009-tools-zynqmpimage-Add-bif-support.patch 0010-tools-zynqmpbif-Add-support-for-loa.patch - Add generic ZynqMP support - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0005-zynqmp-Add-generic-target.patch - Update to 2018.05-rc2 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch 0010-Temp-workaround-for-Chromebook-snow.patch * Patches added: 0004-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0010-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0009-rpi-Allow-to-boot-without-serial.patch 0010-mmc-use-core-clock-frequency-in-bcm.patch * Patches added: 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch - Update to 2018.05-rc1 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0003-Revert-rockchip-mkimage-remove-plac.patch 0004-rpi-Use-firmware-provided-device-tr.patch 0005-rpi3-Enable-lan78xx-driver.patch 0006-net-Only-access-network-devices-aft.patch 0007-rpi-Add-identifier-for-the-new-RPi3.patch 0008-efi_loader-Fix-network-DP-with-DM_E.patch * Patches added: 0003-rpi-Use-firmware-provided-device-tr.patch 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch OBS-URL: https://build.opensuse.org/request/show/607419 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=16
This commit is contained in:
192
u-boot.spec.in
192
u-boot.spec.in
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package u-boot-BOARDNAME
|
||||
# spec file for package u-boot
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2010 Texas Instruments Inc by Nishanth Menon
|
||||
@@ -18,198 +18,54 @@
|
||||
#
|
||||
|
||||
|
||||
%define mvebu_spl MVEBU_SPL
|
||||
%define x_loader OMAP_SPL
|
||||
%define rockchip_spl ROCKCHIP_SPL
|
||||
%define sunxi_spl SUNXI_SPL
|
||||
%define arndale_spl ARNDALE_SPL
|
||||
%define origen_spl ORIGEN_SPL
|
||||
%define imx6_spl IMX6_SPL
|
||||
%define socfpga_spl SOCFPGA_SPL
|
||||
|
||||
%if "BOARDNAME" == "rpi" || "BOARDNAME" == "rpi2" || "BOARDNAME" == "rpi332b" || "BOARDNAME" == "rpi3"
|
||||
%define is_rpi 1
|
||||
%endif
|
||||
|
||||
# archive_version differs from version for RC version only
|
||||
# 'archive_version' differs from 'version' for RC version only
|
||||
ARCHIVE_VERSION
|
||||
|
||||
Name: u-boot-BOARDNAME
|
||||
Name: u-boot
|
||||
UBOOT_VERSION
|
||||
Release: 0
|
||||
Summary: The U-Boot firmware for the BOARDNAME platform
|
||||
License: GPL-2.0
|
||||
Summary: Tools for the U-Boot Firmware
|
||||
License: GPL-2.0-only
|
||||
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
|
||||
Source1: ftp://ftp.denx.de/pub/u-boot/u-boot-%{archive_version}.tar.bz2.sig
|
||||
Source2: arndale-bl1.img
|
||||
Source3: update_git.sh
|
||||
Source300: u-boot-rpmlintrc
|
||||
PATCH_FILES
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0
|
||||
BuildRequires: arm-trusted-firmware-pine64
|
||||
%endif
|
||||
BuildRequires: bc
|
||||
# Arndale board needs DTC >= 1.4
|
||||
BuildRequires: dtc >= 1.4.0
|
||||
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
%if "%{name}" == "u-boot-qemu-ppce500"
|
||||
# Owns /usr/share/qemu directory
|
||||
BuildRequires: qemu
|
||||
Provides: qemu-ppc:%{_datadir}/qemu/u-boot.e500
|
||||
%endif
|
||||
%if 0%{?is_rpi}
|
||||
# Owns /boot/vc directory
|
||||
BuildRequires: raspberrypi-firmware
|
||||
# For mountpoint
|
||||
Requires(post): util-linux
|
||||
%endif
|
||||
Provides: u-boot-loader
|
||||
Conflicts: otherproviders(u-boot-loader)
|
||||
%if %x_loader == 1
|
||||
Obsoletes: x-loader-BOARDNAME
|
||||
Provides: x-loader-BOARDNAME
|
||||
%endif
|
||||
ExclusiveArch: ARCH_RESTRICTIONS
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%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 BOARDNAME platform.
|
||||
This package contains:
|
||||
mkimage- a tool that creates kernel bootable images for U-Boot.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for the U-Boot Firmware
|
||||
Group: Documentation/Other
|
||||
|
||||
%description doc
|
||||
%package tools
|
||||
Summary: Tools for the U-Boot Firmware
|
||||
Group: System/Boot
|
||||
|
||||
%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 documentation for U-Boot firmware.
|
||||
This package contains:
|
||||
mkimage- a tool that creates kernel bootable images for U-Boot.
|
||||
|
||||
%prep
|
||||
%setup -q -n u-boot-%{archive_version}
|
||||
PATCH_EXEC
|
||||
|
||||
%build
|
||||
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
|
||||
%if "%{name}" == "u-boot-pine64plus"
|
||||
export BL31=/boot/bl31.bin
|
||||
%endif
|
||||
|
||||
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" BOARDCONFIG
|
||||
echo "Attempting to enable fdt apply command (.dtbo) support."
|
||||
echo "CONFIG_OF_LIBFDT_OVERLAY=y" >> .config
|
||||
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" USE_PRIVATE_LIBGG=yes
|
||||
|
||||
%ifarch aarch64
|
||||
%if %sunxi_spl == 1
|
||||
cat spl/sunxi-spl.bin u-boot.itb > u-boot-sunxi-with-spl.bin
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%if %rockchip_spl == 1
|
||||
for t in ROCKCHIP_SPL_IMAGE_TYPES; do
|
||||
./tools/mkimage -n ROCKCHIP_SPL_SOC -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
|
||||
done
|
||||
%endif
|
||||
# needed for include/config/auto.conf
|
||||
make defconfig
|
||||
make silentoldconfig
|
||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" USE_PRIVATE_LIBGG=yes tools-only
|
||||
|
||||
%install
|
||||
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
|
||||
export NO_BRP_STRIP_DEBUG=true
|
||||
export NO_DEBUGINFO_STRIP_DEBUG=true
|
||||
%define uboot_dir /boot
|
||||
%if 0%{?is_rpi}
|
||||
%define uboot_dir /boot/vc
|
||||
%endif
|
||||
%if "%{name}" == "u-boot-qemu-ppce500"
|
||||
%define uboot_dir %{_datadir}/qemu
|
||||
%endif
|
||||
%if "%{name}" == "u-boot-jetson-tk1"
|
||||
# tegra-uboot-flasher needs several intermediate files, under their original name.
|
||||
for f in u-boot u-boot.dtb u-boot-dtb-tegra.bin u-boot-nodtb-tegra.bin spl/u-boot-spl; do
|
||||
install -D -m 0644 $f %{buildroot}%{uboot_dir}/$f
|
||||
done
|
||||
%else
|
||||
%if "%{name}" == "u-boot-p2371-2180"
|
||||
# Jetson TX1 Driver Pack flash.sh needs several intermediate files, under their original name.
|
||||
for f in u-boot u-boot.bin u-boot.dtb u-boot-dtb.bin; do
|
||||
install -D -m 0644 $f %{buildroot}%{uboot_dir}/$f
|
||||
done
|
||||
%else
|
||||
install -D -m 0644 u-boot.BINEND %{buildroot}%{uboot_dir}/u-boot.BINEND
|
||||
%if "%{name}" == "u-boot-qemu-ppce500"
|
||||
mv %{buildroot}%{uboot_dir}/u-boot.BINEND %{buildroot}%{uboot_dir}/u-boot.e500
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%if %x_loader == 1
|
||||
install -D -m 0644 MLO %{buildroot}%{uboot_dir}/MLO
|
||||
%endif
|
||||
%if %origen_spl == 1
|
||||
install -D -m 0644 spl/origen-spl.bin %{buildroot}%{uboot_dir}/origen-spl.bin
|
||||
%endif
|
||||
%if %arndale_spl == 1
|
||||
install -D -m 0644 spl/arndale-spl.bin %{buildroot}%{uboot_dir}/arndale-spl.bin
|
||||
install -D -m 0644 %{SOURCE2} %{buildroot}%{uboot_dir}/arndale-bl1.img
|
||||
%endif
|
||||
%if %mvebu_spl == 1
|
||||
install -D -m 0644 u-boot-spl.kwb %{buildroot}%{uboot_dir}/u-boot-spl.kwb
|
||||
%endif
|
||||
%if %rockchip_spl == 1
|
||||
install -D -m 0644 spl/u-boot-spl.bin %{buildroot}%{uboot_dir}/u-boot-spl.bin
|
||||
for t in ROCKCHIP_SPL_IMAGE_TYPES; do
|
||||
install -D -m 0644 u-boot-spl.$t %{buildroot}%{uboot_dir}/u-boot-spl.$t
|
||||
done
|
||||
%endif
|
||||
%if %sunxi_spl == 1
|
||||
install -D -m 0644 spl/sunxi-spl.bin %{buildroot}%{uboot_dir}/sunxi-spl.bin
|
||||
install -D -m 0644 u-boot-sunxi-with-spl.bin %{buildroot}%{uboot_dir}/u-boot-sunxi-with-spl.bin
|
||||
%endif
|
||||
%if %imx6_spl == 1
|
||||
install -D -m 0644 SPL %{buildroot}%{uboot_dir}/imx6-spl.bin
|
||||
%endif
|
||||
%if %socfpga_spl == 1
|
||||
install -D -m 0644 u-boot-with-spl.sfp %{buildroot}%{uboot_dir}/u-boot-with-spl.sfp
|
||||
%endif
|
||||
install -D -m 0755 tools/mkimage %{buildroot}%{_bindir}/mkimage
|
||||
install -D -m 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1/mkimage.1
|
||||
|
||||
%if 0%{?is_rpi}
|
||||
%post
|
||||
# On the Raspberry Pi we chain-load u-boot.bin from bootcode.bin via config.txt.
|
||||
# It needs to be on the first FAT partition, wherever we mounted it.
|
||||
# a) Unmounted, then do nothing.
|
||||
# b) Mounted as /boot/vc, then they're in the right place already.
|
||||
# c) Mounted as /boot/efi, with /boot/vc as symlink, then nothing to be done.
|
||||
# d) Mounted as /boot/efi, with /boot/vc a directory, then copy files over.
|
||||
if mountpoint -q /boot/efi; then
|
||||
[[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]] || cp %{uboot_dir}/u-boot.BINEND /boot/efi/
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%files tools
|
||||
%defattr(-,root,root)
|
||||
%{uboot_dir}/*
|
||||
%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
|
||||
%doc doc/README.video doc/README.VLAN doc/README.silent doc/README.POST
|
||||
# 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
|
||||
%{_bindir}/mkimage
|
||||
%{_mandir}/man1/mkimage.1.gz
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user