forked from pool/u-boot
Accepting request 536032 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/536032 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=91
This commit is contained in:
@@ -23,9 +23,7 @@
|
||||
%define rockchip_spl ROCKCHIP_SPL
|
||||
%define sunxi_spl SUNXI_SPL
|
||||
%define arndale_spl ARNDALE_SPL
|
||||
%define cuboxi_spl CUBOXI_SPL
|
||||
%define origen_spl ORIGEN_SPL
|
||||
%define udoo_spl UDOO_SPL
|
||||
%define imx6_spl IMX6_SPL
|
||||
%define socfpga_spl SOCFPGA_SPL
|
||||
|
||||
@@ -50,6 +48,9 @@ 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
|
||||
@@ -94,11 +95,21 @@ 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)
|
||||
@@ -125,34 +136,33 @@ export NO_DEBUGINFO_STRIP_DEBUG=true
|
||||
%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}/boot/$f
|
||||
install -D -m 0644 $f %{buildroot}%{uboot_dir}/$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
|
||||
install -D -m 0644 u-boot-dtb-tegra.BINEND %{buildroot}%{uboot_dir}/u-boot.BINEND
|
||||
elif [ -f u-boot-dtb.BINEND ]; then
|
||||
install -D -m 0644 u-boot-dtb.BINEND %{buildroot}%{uboot_dir}/u-boot.BINEND
|
||||
else
|
||||
install -D -m 0644 u-boot.BINEND %{buildroot}%{uboot_dir}/u-boot.BINEND
|
||||
fi
|
||||
%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 0755 MLO %{buildroot}/boot/MLO
|
||||
install -D -m 0644 MLO %{buildroot}%{uboot_dir}/MLO
|
||||
%endif
|
||||
%if %origen_spl == 1
|
||||
install -D -m 0755 spl/origen-spl.bin %{buildroot}/boot/origen-spl.bin
|
||||
install -D -m 0644 spl/origen-spl.bin %{buildroot}%{uboot_dir}/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
|
||||
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 0755 u-boot-spl.kwb %{buildroot}%{uboot_dir}/u-boot-spl.kwb
|
||||
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
|
||||
@@ -161,20 +171,14 @@ for t in ROCKCHIP_SPL_IMAGE_TYPES; do
|
||||
done
|
||||
%endif
|
||||
%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
|
||||
%if %udoo_spl == 1
|
||||
install -D -m 0755 SPL %{buildroot}/boot/udoo_spl.bin
|
||||
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 0755 SPL %{buildroot}/boot/imx6-spl.bin
|
||||
install -D -m 0644 SPL %{buildroot}%{uboot_dir}/imx6-spl.bin
|
||||
%endif
|
||||
%if %socfpga_spl == 1
|
||||
install -D -m 0755 u-boot-with-spl.sfp %{buildroot}/boot/u-boot-with-spl.sfp
|
||||
install -D -m 0644 u-boot-with-spl.sfp %{buildroot}%{uboot_dir}/u-boot-with-spl.sfp
|
||||
%endif
|
||||
|
||||
%if 0%{?is_rpi}
|
||||
|
Reference in New Issue
Block a user