Accepting request 717646 from hardware👢staging

*WARNING*

Remove linked packages (u-boot-*) in hardware:boot *before* accepting 
this request!

All issues from SR#714191 should have been considered here.

- Fail on errors building RK3288 SD card images (tinker-rk3288 previously) 
- Add libretech-cc and libretech-ac

OBS-URL: https://build.opensuse.org/request/show/717646
OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=48
This commit is contained in:
Andreas Färber 2019-10-08 18:46:35 +00:00 committed by Git OBS Bridge
parent 2bfcbf1aa6
commit e2bbdb9b35
168 changed files with 744 additions and 201606 deletions

View File

@ -1,4 +1,4 @@
From 0d6f92cbd3c73b3ea3059c3be51723c6b38c22e8 Mon Sep 17 00:00:00 2001
From bf17a20049f959a36ef02a9de8d7521caa840abe Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@free.fr>
Date: Wed, 13 Apr 2016 13:44:29 +0200
Subject: [PATCH] XXX openSUSE XXX: Prepend partition 2 (and 3 fo chromebook
@ -10,7 +10,7 @@ Subject: [PATCH] XXX openSUSE XXX: Prepend partition 2 (and 3 fo chromebook
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 4993303f4d..7a32bed91b 100644
index 26e61ef196..d3797d9384 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -141,7 +141,7 @@
@ -22,7 +22,7 @@ index 4993303f4d..7a32bed91b 100644
"scan_dev_for_efi=" \
"setenv efi_fdtfile ${fdtfile}; " \
BOOTENV_EFI_SET_FDTFILE_FALLBACK \
@@ -438,7 +438,7 @@
@@ -451,7 +451,7 @@
"scan_dev_for_boot_part=" \
"part list ${devtype} ${devnum} -bootable devplist; " \
"env exists devplist || setenv devplist 1; " \

View File

@ -1,4 +1,4 @@
From 183d779f8fb3f706c0fe5fcb42ba6363dc4dec30 Mon Sep 17 00:00:00 2001
From c28b9e636a95d84452f421e189722fdbf7ae354c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Mon, 2 May 2016 23:25:07 +0200
Subject: [PATCH] Revert "Revert "omap3: Use raw SPL by default for mmc1""

View File

@ -1,4 +1,4 @@
From b333967ac327cf84e0e927bc302b069a89384cb7 Mon Sep 17 00:00:00 2001
From d37361752684802eb2e180d0a382428f63b9e97e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Wed, 21 Feb 2018 17:41:13 +0100
Subject: [PATCH] rpi: Use firmware provided device tree
@ -28,7 +28,7 @@ Signed-off-by: Guillaume Gardet <guillaume.gardet@free.fr>
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 39da54c3e7..81997056f4 100644
index 1ab35f1b25..d26010efac 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
@ -41,7 +41,7 @@ index 39da54c3e7..81997056f4 100644
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 5f5b40522d..06080b9347 100644
index 53aa554cc7..2b6bbf1b4b 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
@ -54,7 +54,7 @@ index 5f5b40522d..06080b9347 100644
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index bbf902bb91..17f672c9da 100644
index c33ea58438..c3fe878aa3 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
@ -67,7 +67,7 @@ index bbf902bb91..17f672c9da 100644
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index ea40351dc4..e84adb5f83 100644
index 98573bb89a..6895228bdb 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
@ -80,7 +80,7 @@ index ea40351dc4..e84adb5f83 100644
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index 981d17381a..8a2a5b83f8 100644
index bd15c98697..477a1bf789 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y

View File

@ -1,4 +1,4 @@
From ff802d34ced386f9c088bdbd67554ea33877195c Mon Sep 17 00:00:00 2001
From 46819cfd0043c03c8bc976526ad7f4071afe0760 Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@free.fr>
Date: Mon, 9 Apr 2018 10:28:26 +0200
Subject: [PATCH] Temp workaround for Chromebook snow to avoid the 'unable to
@ -9,10 +9,10 @@ Subject: [PATCH] Temp workaround for Chromebook snow to avoid the 'unable to
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 93a836eac3..d0307ff8b1 100644
index 1992d61182..9738caf691 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -558,7 +558,8 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
@@ -582,7 +582,8 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
cfg->host_caps |= MMC_MODE_4BIT;
cfg->host_caps &= ~MMC_MODE_8BIT;
}

View File

@ -1,4 +1,4 @@
From c702a07ea5cbd1c381f3aba2228a74b9c2c4f838 Mon Sep 17 00:00:00 2001
From a016e758b402f09cc890756453937b8eb09e26ec Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 24 Apr 2018 21:25:23 +0200
Subject: [PATCH] zynqmp: Add generic target

View File

@ -1,4 +1,4 @@
From 02a12c0a13facb1442e40c3c1c06eb03cc1dc567 Mon Sep 17 00:00:00 2001
From 04f5f7381b49e1b73ed78ee1cd00529fa7e1a036 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Thu, 26 Apr 2018 13:30:32 +0200
Subject: [PATCH] tools: zynqmpbif: Add support for load=after

View File

@ -1,4 +1,4 @@
From 8ada0178c1a33253f09d44d1c90ffb042c5cebc3 Mon Sep 17 00:00:00 2001
From c7511f0e6cf4c919884b92103a4ca4a11ac1d0dc Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@free.fr>
Date: Tue, 29 Jan 2019 11:38:12 +0100
Subject: [PATCH] boo#1123170: Remove ubifs support from omap3_beagle to keep a
@ -10,10 +10,10 @@ Subject: [PATCH] boo#1123170: Remove ubifs support from omap3_beagle to keep a
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index 73ffa83d0c..68317ead09 100644
index b389d1d3c5..ec45a4c77f 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -36,7 +36,6 @@ CONFIG_CMD_FS_UUID=y
@@ -37,7 +37,6 @@ CONFIG_CMD_FS_UUID=y
CONFIG_CMD_MTDPARTS=y
CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs)"
@ -21,7 +21,7 @@ index 73ffa83d0c..68317ead09 100644
# CONFIG_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_PARTITION_UUIDS=y
@@ -70,6 +69,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
@@ -71,6 +70,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
CONFIG_SPL_NAND_SIMPLE=y
@ -30,10 +30,10 @@ index 73ffa83d0c..68317ead09 100644
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 7698a90c4e..c614a6d962 100644
index f0c8c990fa..3020c12e81 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -91,7 +91,6 @@
@@ -89,7 +89,6 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(LEGACY_MMC, legacy_mmc, 0) \

View File

@ -1,4 +1,4 @@
From c2880bef36aee54e5a86c9a0c1b21f9c059c7d89 Mon Sep 17 00:00:00 2001
From 344e98c4f41ecffaf1a31f4c499138ec48845850 Mon Sep 17 00:00:00 2001
From: Matthias Brugger <mbrugger@suse.com>
Date: Tue, 5 Mar 2019 18:09:04 +0100
Subject: [PATCH] zynqmp: generic: fix compilation

View File

@ -0,0 +1,30 @@
From 6958326b9def18fa8d4ab6e0ca39ffc6935b412b Mon Sep 17 00:00:00 2001
From: Guillaume GARDET <guillaume.gardet@free.fr>
Date: Tue, 16 Jul 2019 14:40:07 +0200
Subject: [PATCH] ARM: exynos5: Try to boot on mmc2 before mmc0/1
As stated in commit a61a4a1db009e3e600258551a01b54c4f50ec103 with DM_MMC,
exynos boards now enumarates external SD/MMC slot as mmc2, instead of mmc1
with legacy mode. Moving mmc2 before mmc1/0 restore the previous behavior
of trying external SD/MMC before internal slot.
Signed-off-by: Guillaume GARDET <guillaume.gardet@arm.com>
---
include/configs/exynos5-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 397bbf6d9d..e0a4d76d53 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -128,9 +128,9 @@
#define EXYNOS_IRAM_SECONDARY_BASE 0x02020018
#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 2) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
- func(MMC, mmc, 2) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)

81
_multibuild Normal file
View File

@ -0,0 +1,81 @@
<multibuild>
<flavor>tools</flavor>
<flavor>a10-olinuxino-lime</flavor>
<flavor>a13-olinuxino</flavor>
<flavor>a13-olinuxinom</flavor>
<flavor>a20-olinuxino-lime</flavor>
<flavor>a20-olinuxino-lime2</flavor>
<flavor>a20-olinuxinomicro</flavor>
<flavor>am335xevm</flavor>
<flavor>am57xxevm</flavor>
<flavor>arndale</flavor>
<flavor>bananapi</flavor>
<flavor>bananapim2plush3</flavor>
<flavor>bananapim64</flavor>
<flavor>clearfog</flavor>
<flavor>colibrit20</flavor>
<flavor>cubieboard</flavor>
<flavor>cubieboard2</flavor>
<flavor>cubietruck</flavor>
<flavor>dragonboard410c</flavor>
<flavor>dragonboard820c</flavor>
<flavor>evb-rk3399</flavor>
<flavor>firefly-rk3288</flavor>
<flavor>firefly-rk3399</flavor>
<flavor>geekbox</flavor>
<flavor>highbank</flavor>
<flavor>hikey</flavor>
<flavor>hyundaia7hd</flavor>
<flavor>jetson-tk1</flavor>
<flavor>khadas-vim</flavor>
<flavor>khadas-vim2</flavor>
<flavor>lamobor1</flavor>
<flavor>libretech-ac</flavor>
<flavor>libretech-cc</flavor>
<flavor>ls1012afrdmqspi</flavor>
<flavor>melea1000</flavor>
<flavor>merriia80optimus</flavor>
<flavor>mvebudb-88f3720</flavor>
<flavor>mvebudbarmada8k</flavor>
<flavor>mvebuespressobin-88f3720</flavor>
<flavor>mvebumcbin-88f8040</flavor>
<flavor>mx53loco</flavor>
<flavor>mx6cuboxi</flavor>
<flavor>mx6qsabrelite</flavor>
<flavor>nanopia64</flavor>
<flavor>nanopineo</flavor>
<flavor>nanopineoair</flavor>
<flavor>odroid</flavor>
<flavor>odroid-c2</flavor>
<flavor>odroid-xu3</flavor>
<flavor>omap3beagle</flavor>
<flavor>omap4panda</flavor>
<flavor>orangepipc</flavor>
<flavor>orangepipc2</flavor>
<flavor>p2371-2180</flavor>
<flavor>p2771-0000-500</flavor>
<flavor>paz00</flavor>
<flavor>pcm051rev3</flavor>
<flavor>pine64plus</flavor>
<flavor>pinebook</flavor>
<flavor>pineh64</flavor>
<flavor>poplar</flavor>
<flavor>qemu-ppce500</flavor>
<flavor>qemu-riscv64</flavor>
<flavor>qemu-riscv64smode</flavor>
<flavor>rock64-rk3328</flavor>
<flavor>rock960-rk3399</flavor>
<flavor>rpi</flavor>
<flavor>rpi2</flavor>
<flavor>rpi3</flavor>
<flavor>sifivefu540</flavor>
<flavor>snow</flavor>
<flavor>socfpgade0nanosoc</flavor>
<flavor>spring</flavor>
<flavor>tinker-rk3288</flavor>
<flavor>turrisomnia</flavor>
<flavor>udoo</flavor>
<flavor>udooneo</flavor>
<flavor>xilinxzynqmpgeneric</flavor>
<flavor>xilinxzynqmpzcu102rev10</flavor>
</multibuild>

View File

@ -1,196 +0,0 @@
#!/bin/bash -e
if [ ! -e u-boot.spec.tmp ]; then
# We need to convert u-boot.spec.in into u-boot.spec.tmp first
/bin/sh update_git.sh
fi
BOARDNAME="$1"
BOARDCONFIG="$2"
ARCH_RESTRICTIONS="$3"
armv6_boards="rpi"
# TI
armv7_boards="omap3_beagle omap4_panda am335x_evm pcm051_rev3 am57xx_evm"
# Exynos
armv7_boards="$armv7_boards arndale snow spring odroid odroid-xu3"
# Calxeda
armv7_boards="$armv7_boards highbank"
# Freescale
armv7_boards="$armv7_boards mx53loco mx6cuboxi mx6qsabrelite udoo udoo_neo"
# Allwinner
armv7_boards="$armv7_boards Bananapi Cubieboard Cubieboard2 Cubietruck Mele_A1000 Merrii_A80_Optimus"
armv7_boards="$armv7_boards A10-OLinuXino-Lime A13-OLinuXino A13-OLinuXinoM"
armv7_boards="$armv7_boards A20-OLinuXino-Lime A20-OLinuXino-Lime2 A20-OLinuXino_MICRO"
armv7_boards="$armv7_boards nanopi_neo nanopi_neo_air orangepi_pc Hyundai_A7HD Lamobo_R1 bananapi_m2_plus_h3"
# Broadcom
armv7_boards="$armv7_boards rpi_2"
# Nvidia
armv7_boards="$armv7_boards colibri_t20 paz00 jetson-tk1"
# Rockchip
armv7_boards="$armv7_boards firefly-rk3288 tinker-rk3288"
# Marvell
armv7_boards="$armv7_boards clearfog turris_omnia"
# Altera
armv7_boards="$armv7_boards socfpga_de0_nano_soc"
aarch64_boards="ls1012afrdm_qspi rpi_3"
# Allwinner
aarch64_boards="$aarch64_boards bananapi_m64 nanopi_a64 orangepi_pc2 pine64_plus pine_h64 pinebook"
# Amlogic
aarch64_boards="$aarch64_boards khadas-vim khadas-vim2 odroid-c2"
# Hisilicon
aarch64_boards="$aarch64_boards hikey poplar"
# Marvell
aarch64_boards="$aarch64_boards mvebu_db-88f3720 mvebu_espressobin-88f3720"
aarch64_boards="$aarch64_boards mvebu_db_armada8k mvebu_mcbin-88f8040"
# Nvidia
aarch64_boards="$aarch64_boards p2371-2180 p2771-0000-500"
# Qualcomm
aarch64_boards="$aarch64_boards dragonboard410c dragonboard820c"
# Rockchip
aarch64_boards="$aarch64_boards geekbox"
aarch64_boards="$aarch64_boards evb-rk3399 firefly-rk3399 rock960-rk3399"
# Xilinx
aarch64_boards="$aarch64_boards xilinx_zynqmp_zcu102_rev1_0 xilinx_zynqmp_generic"
ppc_boards="qemu-ppce500"
riscv64_boards="qemu-riscv64 sifive_fu540"
function generate_spec() {
sed "s/BOARDCONFIG/$BOARDCONFIG/g
s/BOARDNAME/$BOARDNAME/g
s/ARCH_RESTRICTIONS/$ARCH_RESTRICTIONS/g
s/BINEND/$BINEND/g
s/ORIGEN_SPL/$ORIGEN_SPL/g
s/ARNDALE_SPL/$ARNDALE_SPL/g
s/MVEBU_SPL/$MVEBU_SPL/g
s/SOCFPGA_SPL/$SOCFPGA_SPL/g
s/ROCKCHIP_SPL_IMAGE_TYPES/$ROCKCHIP_SPL_IMAGE_TYPES/g
s/ROCKCHIP_SPL_SOC/$ROCKCHIP_SPL_SOC/g
s/ROCKCHIP_SPL/$ROCKCHIP_SPL/g
s/SUNXI_SPL/$SUNXI_SPL/g
s/TEGRA_SPL/$TEGRA_SPL/g
s/IMX6_SPL/$IMX6_SPL/g
s/OMAP_SPL/$OMAP_SPL/g"
}
if [ ! "$1" -o ! "$2" -o ! "$3" ]; then
# armv6 boards
for BOARDCONFIG in $armv6_boards; do
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
BOARDCONFIG=${BOARDCONFIG}_defconfig
ARCH_RESTRICTIONS="armv6l armv6hl"
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
done
# armv7 boards
for BOARDCONFIG in $armv7_boards; do
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
BOARDCONFIG=${BOARDCONFIG}_defconfig
ARCH_RESTRICTIONS="armv7l armv7hl"
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
done
# aarch64 boards
for BOARDCONFIG in $aarch64_boards; do
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
BOARDCONFIG=${BOARDCONFIG}_defconfig
ARCH_RESTRICTIONS="aarch64"
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
done
# ppc boards
for BOARDCONFIG in $ppc_boards; do
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
BOARDCONFIG=${BOARDCONFIG}_defconfig
ARCH_RESTRICTIONS="ppc"
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
done
# riscv64 boards
for BOARDCONFIG in $riscv64_boards; do
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
BOARDCONFIG=${BOARDCONFIG}_defconfig
ARCH_RESTRICTIONS="riscv64"
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
done
# Generate u-boot.spec
generate_spec < u-boot.spec.tmp > u-boot.spec
exit 0
fi
MVEBU_SPL=0
OMAP_SPL=0
ROCKCHIP_SPL=0
SUNXI_SPL=0
ARNDALE_SPL=0
ORIGEN_SPL=0
IMX6_SPL=0
SOCFPGA_SPL=0
case "$(echo $BOARDCONFIG | sed -e 's/_defconfig//')" in
mx53loco|mx6qsabrelite|efika*)
BINEND=imx
;;
omap*|am335x*|pcm051*)
BINEND=img
OMAP_SPL=1
;;
arndale)
BINEND=bin
ARNDALE_SPL=1
;;
Bananapi*|Cubieboard*|Cubietruck*|Hyundai_A7HD|Mele_A1000|nanopi_neo|*-OLinuXino*|orangepi_pc|Lamobo_R1|bananapi_m2_plus_h3)
BINEND=img
SUNXI_SPL=1
;;
bananapi_m64|nanopi_a64|orangepi_pc2|pine64_plus|pine_h64|pinebook)
BINEND=itb
SUNXI_SPL=1
;;
snow|spring)
BINEND=img
;;
mx6cuboxi)
BINEND=img
IMX6_SPL=1
;;
udoo|udoo_neo)
BINEND=img
IMX6_SPL=1
;;
firefly-rk3288)
BINEND=bin
ROCKCHIP_SPL=1
ROCKCHIP_SPL_IMAGE_TYPES="rksd rkimage"
ROCKCHIP_SPL_SOC=rk3288
;;
tinker-rk3288)
BINEND=bin
ROCKCHIP_SPL=1
ROCKCHIP_SPL_IMAGE_TYPES="rksd"
ROCKCHIP_SPL_SOC=rk3288
;;
evb-rk3399|firefly-rk3399|rock960-rk3399)
BINEND=bin
ROCKCHIP_SPL=1
ROCKCHIP_SPL_IMAGE_TYPES="rksd"
ROCKCHIP_SPL_SOC=rk3399
;;
clearfog|turris_omnia)
BINEND=img
MVEBU_SPL=1
;;
socfpga_*)
BINEND=img
SOCFPGA_SPL=1
;;
xilinx*|zynq*)
BINEND=elf
;;
*) BINEND=bin ;;
esac
generate_spec < u-boot-board.spec.tmp > u-boot-$BOARDNAME.spec
cp u-boot.changes u-boot-$BOARDNAME.changes

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:76b7772d156b3ddd7644c8a1736081e55b78828537ff714065d21dbade229bef
size 13601643

Binary file not shown.

3
u-boot-2019.07.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bff4fa77e8da17521c030ca4c5b947a056c1b1be4d3e6ee8637020b8d50251d0
size 13939667

BIN
u-boot-2019.07.tar.bz2.sig Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a10-olinuxino-lime
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a10-olinuxino-lime" == "rpi" || "a10-olinuxino-lime" == "rpi2" || "a10-olinuxino-lime" == "rpi3"
%define is_rpi 1
%endif
%if "a10-olinuxino-lime" == "evb-rk3399" || "a10-olinuxino-lime" == "firefly-rk3399" || "a10-olinuxino-lime" == "puma-rk3399" || "a10-olinuxino-lime" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a10-olinuxino-lime" == "bananapim64" || "a10-olinuxino-lime" == "nanopia64" || "a10-olinuxino-lime" == "pine64plus" || "a10-olinuxino-lime" == "pinebook"
%define is_a64 1
%endif
%if "a10-olinuxino-lime" == "orangepipc2"
%define is_h5 1
%endif
%if "a10-olinuxino-lime" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a10-olinuxino-lime
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a10-olinuxino-lime platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a10-olinuxino-lime
Provides: x-loader-a10-olinuxino-lime
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a10-olinuxino-lime 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A10-OLinuXino-Lime_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a13-olinuxino
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a13-olinuxino" == "rpi" || "a13-olinuxino" == "rpi2" || "a13-olinuxino" == "rpi3"
%define is_rpi 1
%endif
%if "a13-olinuxino" == "evb-rk3399" || "a13-olinuxino" == "firefly-rk3399" || "a13-olinuxino" == "puma-rk3399" || "a13-olinuxino" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a13-olinuxino" == "bananapim64" || "a13-olinuxino" == "nanopia64" || "a13-olinuxino" == "pine64plus" || "a13-olinuxino" == "pinebook"
%define is_a64 1
%endif
%if "a13-olinuxino" == "orangepipc2"
%define is_h5 1
%endif
%if "a13-olinuxino" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a13-olinuxino
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a13-olinuxino platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a13-olinuxino
Provides: x-loader-a13-olinuxino
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a13-olinuxino 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A13-OLinuXino_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a13-olinuxinom
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a13-olinuxinom" == "rpi" || "a13-olinuxinom" == "rpi2" || "a13-olinuxinom" == "rpi3"
%define is_rpi 1
%endif
%if "a13-olinuxinom" == "evb-rk3399" || "a13-olinuxinom" == "firefly-rk3399" || "a13-olinuxinom" == "puma-rk3399" || "a13-olinuxinom" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a13-olinuxinom" == "bananapim64" || "a13-olinuxinom" == "nanopia64" || "a13-olinuxinom" == "pine64plus" || "a13-olinuxinom" == "pinebook"
%define is_a64 1
%endif
%if "a13-olinuxinom" == "orangepipc2"
%define is_h5 1
%endif
%if "a13-olinuxinom" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a13-olinuxinom
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a13-olinuxinom platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a13-olinuxinom
Provides: x-loader-a13-olinuxinom
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a13-olinuxinom 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A13-OLinuXinoM_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a20-olinuxino-lime
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a20-olinuxino-lime" == "rpi" || "a20-olinuxino-lime" == "rpi2" || "a20-olinuxino-lime" == "rpi3"
%define is_rpi 1
%endif
%if "a20-olinuxino-lime" == "evb-rk3399" || "a20-olinuxino-lime" == "firefly-rk3399" || "a20-olinuxino-lime" == "puma-rk3399" || "a20-olinuxino-lime" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a20-olinuxino-lime" == "bananapim64" || "a20-olinuxino-lime" == "nanopia64" || "a20-olinuxino-lime" == "pine64plus" || "a20-olinuxino-lime" == "pinebook"
%define is_a64 1
%endif
%if "a20-olinuxino-lime" == "orangepipc2"
%define is_h5 1
%endif
%if "a20-olinuxino-lime" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a20-olinuxino-lime
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a20-olinuxino-lime platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a20-olinuxino-lime
Provides: x-loader-a20-olinuxino-lime
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a20-olinuxino-lime 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A20-OLinuXino-Lime_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a20-olinuxino-lime2
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a20-olinuxino-lime2" == "rpi" || "a20-olinuxino-lime2" == "rpi2" || "a20-olinuxino-lime2" == "rpi3"
%define is_rpi 1
%endif
%if "a20-olinuxino-lime2" == "evb-rk3399" || "a20-olinuxino-lime2" == "firefly-rk3399" || "a20-olinuxino-lime2" == "puma-rk3399" || "a20-olinuxino-lime2" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a20-olinuxino-lime2" == "bananapim64" || "a20-olinuxino-lime2" == "nanopia64" || "a20-olinuxino-lime2" == "pine64plus" || "a20-olinuxino-lime2" == "pinebook"
%define is_a64 1
%endif
%if "a20-olinuxino-lime2" == "orangepipc2"
%define is_h5 1
%endif
%if "a20-olinuxino-lime2" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a20-olinuxino-lime2
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a20-olinuxino-lime2 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a20-olinuxino-lime2
Provides: x-loader-a20-olinuxino-lime2
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a20-olinuxino-lime2 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A20-OLinuXino-Lime2_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-a20-olinuxinomicro
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "a20-olinuxinomicro" == "rpi" || "a20-olinuxinomicro" == "rpi2" || "a20-olinuxinomicro" == "rpi3"
%define is_rpi 1
%endif
%if "a20-olinuxinomicro" == "evb-rk3399" || "a20-olinuxinomicro" == "firefly-rk3399" || "a20-olinuxinomicro" == "puma-rk3399" || "a20-olinuxinomicro" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "a20-olinuxinomicro" == "bananapim64" || "a20-olinuxinomicro" == "nanopia64" || "a20-olinuxinomicro" == "pine64plus" || "a20-olinuxinomicro" == "pinebook"
%define is_a64 1
%endif
%if "a20-olinuxinomicro" == "orangepipc2"
%define is_h5 1
%endif
%if "a20-olinuxinomicro" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-a20-olinuxinomicro
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the a20-olinuxinomicro platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-a20-olinuxinomicro
Provides: x-loader-a20-olinuxinomicro
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 a20-olinuxinomicro 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" A20-OLinuXino_MICRO_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-am335xevm
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 1
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "am335xevm" == "rpi" || "am335xevm" == "rpi2" || "am335xevm" == "rpi3"
%define is_rpi 1
%endif
%if "am335xevm" == "evb-rk3399" || "am335xevm" == "firefly-rk3399" || "am335xevm" == "puma-rk3399" || "am335xevm" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "am335xevm" == "bananapim64" || "am335xevm" == "nanopia64" || "am335xevm" == "pine64plus" || "am335xevm" == "pinebook"
%define is_a64 1
%endif
%if "am335xevm" == "orangepipc2"
%define is_h5 1
%endif
%if "am335xevm" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-am335xevm
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the am335xevm platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-am335xevm
Provides: x-loader-am335xevm
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 am335xevm 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" am335x_evm_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-am57xxevm
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "am57xxevm" == "rpi" || "am57xxevm" == "rpi2" || "am57xxevm" == "rpi3"
%define is_rpi 1
%endif
%if "am57xxevm" == "evb-rk3399" || "am57xxevm" == "firefly-rk3399" || "am57xxevm" == "puma-rk3399" || "am57xxevm" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "am57xxevm" == "bananapim64" || "am57xxevm" == "nanopia64" || "am57xxevm" == "pine64plus" || "am57xxevm" == "pinebook"
%define is_a64 1
%endif
%if "am57xxevm" == "orangepipc2"
%define is_h5 1
%endif
%if "am57xxevm" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-am57xxevm
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the am57xxevm platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-am57xxevm
Provides: x-loader-am57xxevm
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 am57xxevm 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" am57xx_evm_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-arndale
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 1
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "arndale" == "rpi" || "arndale" == "rpi2" || "arndale" == "rpi3"
%define is_rpi 1
%endif
%if "arndale" == "evb-rk3399" || "arndale" == "firefly-rk3399" || "arndale" == "puma-rk3399" || "arndale" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "arndale" == "bananapim64" || "arndale" == "nanopia64" || "arndale" == "pine64plus" || "arndale" == "pinebook"
%define is_a64 1
%endif
%if "arndale" == "orangepipc2"
%define is_h5 1
%endif
%if "arndale" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-arndale
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the arndale platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-arndale
Provides: x-loader-arndale
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 arndale 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" arndale_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-bananapi
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "bananapi" == "rpi" || "bananapi" == "rpi2" || "bananapi" == "rpi3"
%define is_rpi 1
%endif
%if "bananapi" == "evb-rk3399" || "bananapi" == "firefly-rk3399" || "bananapi" == "puma-rk3399" || "bananapi" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "bananapi" == "bananapim64" || "bananapi" == "nanopia64" || "bananapi" == "pine64plus" || "bananapi" == "pinebook"
%define is_a64 1
%endif
%if "bananapi" == "orangepipc2"
%define is_h5 1
%endif
%if "bananapi" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-bananapi
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the bananapi platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-bananapi
Provides: x-loader-bananapi
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 bananapi 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Bananapi_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-bananapim2plush3
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "bananapim2plush3" == "rpi" || "bananapim2plush3" == "rpi2" || "bananapim2plush3" == "rpi3"
%define is_rpi 1
%endif
%if "bananapim2plush3" == "evb-rk3399" || "bananapim2plush3" == "firefly-rk3399" || "bananapim2plush3" == "puma-rk3399" || "bananapim2plush3" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "bananapim2plush3" == "bananapim64" || "bananapim2plush3" == "nanopia64" || "bananapim2plush3" == "pine64plus" || "bananapim2plush3" == "pinebook"
%define is_a64 1
%endif
%if "bananapim2plush3" == "orangepipc2"
%define is_h5 1
%endif
%if "bananapim2plush3" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-bananapim2plush3
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the bananapim2plush3 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-bananapim2plush3
Provides: x-loader-bananapim2plush3
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 bananapim2plush3 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" bananapi_m2_plus_h3_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-bananapim64
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "bananapim64" == "rpi" || "bananapim64" == "rpi2" || "bananapim64" == "rpi3"
%define is_rpi 1
%endif
%if "bananapim64" == "evb-rk3399" || "bananapim64" == "firefly-rk3399" || "bananapim64" == "puma-rk3399" || "bananapim64" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "bananapim64" == "bananapim64" || "bananapim64" == "nanopia64" || "bananapim64" == "pine64plus" || "bananapim64" == "pinebook"
%define is_a64 1
%endif
%if "bananapim64" == "orangepipc2"
%define is_h5 1
%endif
%if "bananapim64" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-bananapim64
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the bananapim64 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-bananapim64
Provides: x-loader-bananapim64
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 bananapim64 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" bananapi_m64_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.itb %{buildroot}%{uboot_dir}/u-boot.itb
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.itb %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.itb /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

View File

@ -1,283 +0,0 @@
#
# spec file for package u-boot-BOARDNAME
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%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" == "rpi3"
%define is_rpi 1
%endif
%if "BOARDNAME" == "evb-rk3399" || "BOARDNAME" == "firefly-rk3399" || "BOARDNAME" == "puma-rk3399" || "BOARDNAME" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "BOARDNAME" == "bananapim64" || "BOARDNAME" == "nanopia64" || "BOARDNAME" == "pine64plus" || "BOARDNAME" == "pinebook"
%define is_a64 1
%endif
%if "BOARDNAME" == "orangepipc2"
%define is_h5 1
%endif
%if "BOARDNAME" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
ARCHIVE_VERSION
Name: u-boot-BOARDNAME
UBOOT_VERSION
Release: 0
Summary: The U-Boot firmware for the BOARDNAME platform
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%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# 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
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: ARCH_RESTRICTIONS
%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.
%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}
PATCH_EXEC
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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
%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-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.BINEND /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-clearfog
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 1
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "clearfog" == "rpi" || "clearfog" == "rpi2" || "clearfog" == "rpi3"
%define is_rpi 1
%endif
%if "clearfog" == "evb-rk3399" || "clearfog" == "firefly-rk3399" || "clearfog" == "puma-rk3399" || "clearfog" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "clearfog" == "bananapim64" || "clearfog" == "nanopia64" || "clearfog" == "pine64plus" || "clearfog" == "pinebook"
%define is_a64 1
%endif
%if "clearfog" == "orangepipc2"
%define is_h5 1
%endif
%if "clearfog" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-clearfog
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the clearfog platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-clearfog
Provides: x-loader-clearfog
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 clearfog 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" clearfog_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-colibrit20
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "colibrit20" == "rpi" || "colibrit20" == "rpi2" || "colibrit20" == "rpi3"
%define is_rpi 1
%endif
%if "colibrit20" == "evb-rk3399" || "colibrit20" == "firefly-rk3399" || "colibrit20" == "puma-rk3399" || "colibrit20" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "colibrit20" == "bananapim64" || "colibrit20" == "nanopia64" || "colibrit20" == "pine64plus" || "colibrit20" == "pinebook"
%define is_a64 1
%endif
%if "colibrit20" == "orangepipc2"
%define is_h5 1
%endif
%if "colibrit20" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-colibrit20
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the colibrit20 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-colibrit20
Provides: x-loader-colibrit20
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 colibrit20 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" colibri_t20_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-cubieboard
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "cubieboard" == "rpi" || "cubieboard" == "rpi2" || "cubieboard" == "rpi3"
%define is_rpi 1
%endif
%if "cubieboard" == "evb-rk3399" || "cubieboard" == "firefly-rk3399" || "cubieboard" == "puma-rk3399" || "cubieboard" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "cubieboard" == "bananapim64" || "cubieboard" == "nanopia64" || "cubieboard" == "pine64plus" || "cubieboard" == "pinebook"
%define is_a64 1
%endif
%if "cubieboard" == "orangepipc2"
%define is_h5 1
%endif
%if "cubieboard" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-cubieboard
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the cubieboard platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-cubieboard
Provides: x-loader-cubieboard
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 cubieboard 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Cubieboard_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-cubieboard2
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "cubieboard2" == "rpi" || "cubieboard2" == "rpi2" || "cubieboard2" == "rpi3"
%define is_rpi 1
%endif
%if "cubieboard2" == "evb-rk3399" || "cubieboard2" == "firefly-rk3399" || "cubieboard2" == "puma-rk3399" || "cubieboard2" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "cubieboard2" == "bananapim64" || "cubieboard2" == "nanopia64" || "cubieboard2" == "pine64plus" || "cubieboard2" == "pinebook"
%define is_a64 1
%endif
%if "cubieboard2" == "orangepipc2"
%define is_h5 1
%endif
%if "cubieboard2" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-cubieboard2
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the cubieboard2 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-cubieboard2
Provides: x-loader-cubieboard2
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 cubieboard2 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Cubieboard2_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-cubietruck
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "cubietruck" == "rpi" || "cubietruck" == "rpi2" || "cubietruck" == "rpi3"
%define is_rpi 1
%endif
%if "cubietruck" == "evb-rk3399" || "cubietruck" == "firefly-rk3399" || "cubietruck" == "puma-rk3399" || "cubietruck" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "cubietruck" == "bananapim64" || "cubietruck" == "nanopia64" || "cubietruck" == "pine64plus" || "cubietruck" == "pinebook"
%define is_a64 1
%endif
%if "cubietruck" == "orangepipc2"
%define is_h5 1
%endif
%if "cubietruck" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-cubietruck
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the cubietruck platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-cubietruck
Provides: x-loader-cubietruck
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 cubietruck 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Cubietruck_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-dragonboard410c
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "dragonboard410c" == "rpi" || "dragonboard410c" == "rpi2" || "dragonboard410c" == "rpi3"
%define is_rpi 1
%endif
%if "dragonboard410c" == "evb-rk3399" || "dragonboard410c" == "firefly-rk3399" || "dragonboard410c" == "puma-rk3399" || "dragonboard410c" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "dragonboard410c" == "bananapim64" || "dragonboard410c" == "nanopia64" || "dragonboard410c" == "pine64plus" || "dragonboard410c" == "pinebook"
%define is_a64 1
%endif
%if "dragonboard410c" == "orangepipc2"
%define is_h5 1
%endif
%if "dragonboard410c" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-dragonboard410c
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the dragonboard410c platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-dragonboard410c
Provides: x-loader-dragonboard410c
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 dragonboard410c 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" dragonboard410c_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-dragonboard820c
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "dragonboard820c" == "rpi" || "dragonboard820c" == "rpi2" || "dragonboard820c" == "rpi3"
%define is_rpi 1
%endif
%if "dragonboard820c" == "evb-rk3399" || "dragonboard820c" == "firefly-rk3399" || "dragonboard820c" == "puma-rk3399" || "dragonboard820c" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "dragonboard820c" == "bananapim64" || "dragonboard820c" == "nanopia64" || "dragonboard820c" == "pine64plus" || "dragonboard820c" == "pinebook"
%define is_a64 1
%endif
%if "dragonboard820c" == "orangepipc2"
%define is_h5 1
%endif
%if "dragonboard820c" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-dragonboard820c
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the dragonboard820c platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-dragonboard820c
Provides: x-loader-dragonboard820c
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 dragonboard820c 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" dragonboard820c_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-evb-rk3399
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 1
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "evb-rk3399" == "rpi" || "evb-rk3399" == "rpi2" || "evb-rk3399" == "rpi3"
%define is_rpi 1
%endif
%if "evb-rk3399" == "evb-rk3399" || "evb-rk3399" == "firefly-rk3399" || "evb-rk3399" == "puma-rk3399" || "evb-rk3399" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "evb-rk3399" == "bananapim64" || "evb-rk3399" == "nanopia64" || "evb-rk3399" == "pine64plus" || "evb-rk3399" == "pinebook"
%define is_a64 1
%endif
%if "evb-rk3399" == "orangepipc2"
%define is_h5 1
%endif
%if "evb-rk3399" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-evb-rk3399
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the evb-rk3399 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-evb-rk3399
Provides: x-loader-evb-rk3399
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 evb-rk3399 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" evb-rk3399_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 rksd; do
./tools/mkimage -n rk3399 -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 rksd; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-firefly-rk3288
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 1
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "firefly-rk3288" == "rpi" || "firefly-rk3288" == "rpi2" || "firefly-rk3288" == "rpi3"
%define is_rpi 1
%endif
%if "firefly-rk3288" == "evb-rk3399" || "firefly-rk3288" == "firefly-rk3399" || "firefly-rk3288" == "puma-rk3399" || "firefly-rk3288" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "firefly-rk3288" == "bananapim64" || "firefly-rk3288" == "nanopia64" || "firefly-rk3288" == "pine64plus" || "firefly-rk3288" == "pinebook"
%define is_a64 1
%endif
%if "firefly-rk3288" == "orangepipc2"
%define is_h5 1
%endif
%if "firefly-rk3288" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-firefly-rk3288
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the firefly-rk3288 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-firefly-rk3288
Provides: x-loader-firefly-rk3288
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 firefly-rk3288 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" firefly-rk3288_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 rksd rkimage; do
./tools/mkimage -n rk3288 -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 rksd rkimage; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-firefly-rk3399
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 1
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "firefly-rk3399" == "rpi" || "firefly-rk3399" == "rpi2" || "firefly-rk3399" == "rpi3"
%define is_rpi 1
%endif
%if "firefly-rk3399" == "evb-rk3399" || "firefly-rk3399" == "firefly-rk3399" || "firefly-rk3399" == "puma-rk3399" || "firefly-rk3399" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "firefly-rk3399" == "bananapim64" || "firefly-rk3399" == "nanopia64" || "firefly-rk3399" == "pine64plus" || "firefly-rk3399" == "pinebook"
%define is_a64 1
%endif
%if "firefly-rk3399" == "orangepipc2"
%define is_h5 1
%endif
%if "firefly-rk3399" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-firefly-rk3399
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the firefly-rk3399 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-firefly-rk3399
Provides: x-loader-firefly-rk3399
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 firefly-rk3399 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" firefly-rk3399_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 rksd; do
./tools/mkimage -n rk3399 -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 rksd; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-geekbox
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "geekbox" == "rpi" || "geekbox" == "rpi2" || "geekbox" == "rpi3"
%define is_rpi 1
%endif
%if "geekbox" == "evb-rk3399" || "geekbox" == "firefly-rk3399" || "geekbox" == "puma-rk3399" || "geekbox" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "geekbox" == "bananapim64" || "geekbox" == "nanopia64" || "geekbox" == "pine64plus" || "geekbox" == "pinebook"
%define is_a64 1
%endif
%if "geekbox" == "orangepipc2"
%define is_h5 1
%endif
%if "geekbox" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-geekbox
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the geekbox platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-geekbox
Provides: x-loader-geekbox
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 geekbox 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" geekbox_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-highbank
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "highbank" == "rpi" || "highbank" == "rpi2" || "highbank" == "rpi3"
%define is_rpi 1
%endif
%if "highbank" == "evb-rk3399" || "highbank" == "firefly-rk3399" || "highbank" == "puma-rk3399" || "highbank" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "highbank" == "bananapim64" || "highbank" == "nanopia64" || "highbank" == "pine64plus" || "highbank" == "pinebook"
%define is_a64 1
%endif
%if "highbank" == "orangepipc2"
%define is_h5 1
%endif
%if "highbank" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-highbank
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the highbank platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-highbank
Provides: x-loader-highbank
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 highbank 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" highbank_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-hikey
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "hikey" == "rpi" || "hikey" == "rpi2" || "hikey" == "rpi3"
%define is_rpi 1
%endif
%if "hikey" == "evb-rk3399" || "hikey" == "firefly-rk3399" || "hikey" == "puma-rk3399" || "hikey" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "hikey" == "bananapim64" || "hikey" == "nanopia64" || "hikey" == "pine64plus" || "hikey" == "pinebook"
%define is_a64 1
%endif
%if "hikey" == "orangepipc2"
%define is_h5 1
%endif
%if "hikey" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-hikey
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the hikey platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-hikey
Provides: x-loader-hikey
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 hikey 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" hikey_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-hyundaia7hd
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "hyundaia7hd" == "rpi" || "hyundaia7hd" == "rpi2" || "hyundaia7hd" == "rpi3"
%define is_rpi 1
%endif
%if "hyundaia7hd" == "evb-rk3399" || "hyundaia7hd" == "firefly-rk3399" || "hyundaia7hd" == "puma-rk3399" || "hyundaia7hd" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "hyundaia7hd" == "bananapim64" || "hyundaia7hd" == "nanopia64" || "hyundaia7hd" == "pine64plus" || "hyundaia7hd" == "pinebook"
%define is_a64 1
%endif
%if "hyundaia7hd" == "orangepipc2"
%define is_h5 1
%endif
%if "hyundaia7hd" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-hyundaia7hd
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the hyundaia7hd platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-hyundaia7hd
Provides: x-loader-hyundaia7hd
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 hyundaia7hd 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Hyundai_A7HD_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-jetson-tk1
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "jetson-tk1" == "rpi" || "jetson-tk1" == "rpi2" || "jetson-tk1" == "rpi3"
%define is_rpi 1
%endif
%if "jetson-tk1" == "evb-rk3399" || "jetson-tk1" == "firefly-rk3399" || "jetson-tk1" == "puma-rk3399" || "jetson-tk1" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "jetson-tk1" == "bananapim64" || "jetson-tk1" == "nanopia64" || "jetson-tk1" == "pine64plus" || "jetson-tk1" == "pinebook"
%define is_a64 1
%endif
%if "jetson-tk1" == "orangepipc2"
%define is_h5 1
%endif
%if "jetson-tk1" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-jetson-tk1
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the jetson-tk1 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-jetson-tk1
Provides: x-loader-jetson-tk1
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 jetson-tk1 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" jetson-tk1_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-khadas-vim
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "khadas-vim" == "rpi" || "khadas-vim" == "rpi2" || "khadas-vim" == "rpi3"
%define is_rpi 1
%endif
%if "khadas-vim" == "evb-rk3399" || "khadas-vim" == "firefly-rk3399" || "khadas-vim" == "puma-rk3399" || "khadas-vim" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "khadas-vim" == "bananapim64" || "khadas-vim" == "nanopia64" || "khadas-vim" == "pine64plus" || "khadas-vim" == "pinebook"
%define is_a64 1
%endif
%if "khadas-vim" == "orangepipc2"
%define is_h5 1
%endif
%if "khadas-vim" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-khadas-vim
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the khadas-vim platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-khadas-vim
Provides: x-loader-khadas-vim
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 khadas-vim 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" khadas-vim_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-khadas-vim2
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "khadas-vim2" == "rpi" || "khadas-vim2" == "rpi2" || "khadas-vim2" == "rpi3"
%define is_rpi 1
%endif
%if "khadas-vim2" == "evb-rk3399" || "khadas-vim2" == "firefly-rk3399" || "khadas-vim2" == "puma-rk3399" || "khadas-vim2" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "khadas-vim2" == "bananapim64" || "khadas-vim2" == "nanopia64" || "khadas-vim2" == "pine64plus" || "khadas-vim2" == "pinebook"
%define is_a64 1
%endif
%if "khadas-vim2" == "orangepipc2"
%define is_h5 1
%endif
%if "khadas-vim2" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-khadas-vim2
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the khadas-vim2 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-khadas-vim2
Provides: x-loader-khadas-vim2
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 khadas-vim2 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" khadas-vim2_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-lamobor1
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "lamobor1" == "rpi" || "lamobor1" == "rpi2" || "lamobor1" == "rpi3"
%define is_rpi 1
%endif
%if "lamobor1" == "evb-rk3399" || "lamobor1" == "firefly-rk3399" || "lamobor1" == "puma-rk3399" || "lamobor1" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "lamobor1" == "bananapim64" || "lamobor1" == "nanopia64" || "lamobor1" == "pine64plus" || "lamobor1" == "pinebook"
%define is_a64 1
%endif
%if "lamobor1" == "orangepipc2"
%define is_h5 1
%endif
%if "lamobor1" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-lamobor1
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the lamobor1 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-lamobor1
Provides: x-loader-lamobor1
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 lamobor1 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Lamobo_R1_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-ls1012afrdmqspi
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "ls1012afrdmqspi" == "rpi" || "ls1012afrdmqspi" == "rpi2" || "ls1012afrdmqspi" == "rpi3"
%define is_rpi 1
%endif
%if "ls1012afrdmqspi" == "evb-rk3399" || "ls1012afrdmqspi" == "firefly-rk3399" || "ls1012afrdmqspi" == "puma-rk3399" || "ls1012afrdmqspi" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "ls1012afrdmqspi" == "bananapim64" || "ls1012afrdmqspi" == "nanopia64" || "ls1012afrdmqspi" == "pine64plus" || "ls1012afrdmqspi" == "pinebook"
%define is_a64 1
%endif
%if "ls1012afrdmqspi" == "orangepipc2"
%define is_h5 1
%endif
%if "ls1012afrdmqspi" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-ls1012afrdmqspi
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the ls1012afrdmqspi platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-ls1012afrdmqspi
Provides: x-loader-ls1012afrdmqspi
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 ls1012afrdmqspi 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" ls1012afrdm_qspi_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-melea1000
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "melea1000" == "rpi" || "melea1000" == "rpi2" || "melea1000" == "rpi3"
%define is_rpi 1
%endif
%if "melea1000" == "evb-rk3399" || "melea1000" == "firefly-rk3399" || "melea1000" == "puma-rk3399" || "melea1000" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "melea1000" == "bananapim64" || "melea1000" == "nanopia64" || "melea1000" == "pine64plus" || "melea1000" == "pinebook"
%define is_a64 1
%endif
%if "melea1000" == "orangepipc2"
%define is_h5 1
%endif
%if "melea1000" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-melea1000
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the melea1000 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-melea1000
Provides: x-loader-melea1000
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 melea1000 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Mele_A1000_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-merriia80optimus
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "merriia80optimus" == "rpi" || "merriia80optimus" == "rpi2" || "merriia80optimus" == "rpi3"
%define is_rpi 1
%endif
%if "merriia80optimus" == "evb-rk3399" || "merriia80optimus" == "firefly-rk3399" || "merriia80optimus" == "puma-rk3399" || "merriia80optimus" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "merriia80optimus" == "bananapim64" || "merriia80optimus" == "nanopia64" || "merriia80optimus" == "pine64plus" || "merriia80optimus" == "pinebook"
%define is_a64 1
%endif
%if "merriia80optimus" == "orangepipc2"
%define is_h5 1
%endif
%if "merriia80optimus" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-merriia80optimus
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the merriia80optimus platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-merriia80optimus
Provides: x-loader-merriia80optimus
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 merriia80optimus 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" Merrii_A80_Optimus_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mvebudb-88f3720
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mvebudb-88f3720" == "rpi" || "mvebudb-88f3720" == "rpi2" || "mvebudb-88f3720" == "rpi3"
%define is_rpi 1
%endif
%if "mvebudb-88f3720" == "evb-rk3399" || "mvebudb-88f3720" == "firefly-rk3399" || "mvebudb-88f3720" == "puma-rk3399" || "mvebudb-88f3720" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mvebudb-88f3720" == "bananapim64" || "mvebudb-88f3720" == "nanopia64" || "mvebudb-88f3720" == "pine64plus" || "mvebudb-88f3720" == "pinebook"
%define is_a64 1
%endif
%if "mvebudb-88f3720" == "orangepipc2"
%define is_h5 1
%endif
%if "mvebudb-88f3720" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mvebudb-88f3720
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mvebudb-88f3720 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mvebudb-88f3720
Provides: x-loader-mvebudb-88f3720
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 mvebudb-88f3720 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mvebu_db-88f3720_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mvebudbarmada8k
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mvebudbarmada8k" == "rpi" || "mvebudbarmada8k" == "rpi2" || "mvebudbarmada8k" == "rpi3"
%define is_rpi 1
%endif
%if "mvebudbarmada8k" == "evb-rk3399" || "mvebudbarmada8k" == "firefly-rk3399" || "mvebudbarmada8k" == "puma-rk3399" || "mvebudbarmada8k" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mvebudbarmada8k" == "bananapim64" || "mvebudbarmada8k" == "nanopia64" || "mvebudbarmada8k" == "pine64plus" || "mvebudbarmada8k" == "pinebook"
%define is_a64 1
%endif
%if "mvebudbarmada8k" == "orangepipc2"
%define is_h5 1
%endif
%if "mvebudbarmada8k" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mvebudbarmada8k
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mvebudbarmada8k platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mvebudbarmada8k
Provides: x-loader-mvebudbarmada8k
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 mvebudbarmada8k 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mvebu_db_armada8k_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mvebuespressobin-88f3720
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mvebuespressobin-88f3720" == "rpi" || "mvebuespressobin-88f3720" == "rpi2" || "mvebuespressobin-88f3720" == "rpi3"
%define is_rpi 1
%endif
%if "mvebuespressobin-88f3720" == "evb-rk3399" || "mvebuespressobin-88f3720" == "firefly-rk3399" || "mvebuespressobin-88f3720" == "puma-rk3399" || "mvebuespressobin-88f3720" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mvebuespressobin-88f3720" == "bananapim64" || "mvebuespressobin-88f3720" == "nanopia64" || "mvebuespressobin-88f3720" == "pine64plus" || "mvebuespressobin-88f3720" == "pinebook"
%define is_a64 1
%endif
%if "mvebuespressobin-88f3720" == "orangepipc2"
%define is_h5 1
%endif
%if "mvebuespressobin-88f3720" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mvebuespressobin-88f3720
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mvebuespressobin-88f3720 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mvebuespressobin-88f3720
Provides: x-loader-mvebuespressobin-88f3720
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 mvebuespressobin-88f3720 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mvebu_espressobin-88f3720_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mvebumcbin-88f8040
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mvebumcbin-88f8040" == "rpi" || "mvebumcbin-88f8040" == "rpi2" || "mvebumcbin-88f8040" == "rpi3"
%define is_rpi 1
%endif
%if "mvebumcbin-88f8040" == "evb-rk3399" || "mvebumcbin-88f8040" == "firefly-rk3399" || "mvebumcbin-88f8040" == "puma-rk3399" || "mvebumcbin-88f8040" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mvebumcbin-88f8040" == "bananapim64" || "mvebumcbin-88f8040" == "nanopia64" || "mvebumcbin-88f8040" == "pine64plus" || "mvebumcbin-88f8040" == "pinebook"
%define is_a64 1
%endif
%if "mvebumcbin-88f8040" == "orangepipc2"
%define is_h5 1
%endif
%if "mvebumcbin-88f8040" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mvebumcbin-88f8040
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mvebumcbin-88f8040 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mvebumcbin-88f8040
Provides: x-loader-mvebumcbin-88f8040
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 mvebumcbin-88f8040 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mvebu_mcbin-88f8040_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.bin %{buildroot}%{uboot_dir}/u-boot.bin
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.bin %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.bin /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mx53loco
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mx53loco" == "rpi" || "mx53loco" == "rpi2" || "mx53loco" == "rpi3"
%define is_rpi 1
%endif
%if "mx53loco" == "evb-rk3399" || "mx53loco" == "firefly-rk3399" || "mx53loco" == "puma-rk3399" || "mx53loco" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mx53loco" == "bananapim64" || "mx53loco" == "nanopia64" || "mx53loco" == "pine64plus" || "mx53loco" == "pinebook"
%define is_a64 1
%endif
%if "mx53loco" == "orangepipc2"
%define is_h5 1
%endif
%if "mx53loco" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mx53loco
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mx53loco platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mx53loco
Provides: x-loader-mx53loco
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 mx53loco 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mx53loco_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.imx %{buildroot}%{uboot_dir}/u-boot.imx
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.imx %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.imx /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mx6cuboxi
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 1
%define socfpga_spl 0
%if "mx6cuboxi" == "rpi" || "mx6cuboxi" == "rpi2" || "mx6cuboxi" == "rpi3"
%define is_rpi 1
%endif
%if "mx6cuboxi" == "evb-rk3399" || "mx6cuboxi" == "firefly-rk3399" || "mx6cuboxi" == "puma-rk3399" || "mx6cuboxi" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mx6cuboxi" == "bananapim64" || "mx6cuboxi" == "nanopia64" || "mx6cuboxi" == "pine64plus" || "mx6cuboxi" == "pinebook"
%define is_a64 1
%endif
%if "mx6cuboxi" == "orangepipc2"
%define is_h5 1
%endif
%if "mx6cuboxi" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mx6cuboxi
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mx6cuboxi platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mx6cuboxi
Provides: x-loader-mx6cuboxi
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 mx6cuboxi 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mx6cuboxi_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-mx6qsabrelite
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 0
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "mx6qsabrelite" == "rpi" || "mx6qsabrelite" == "rpi2" || "mx6qsabrelite" == "rpi3"
%define is_rpi 1
%endif
%if "mx6qsabrelite" == "evb-rk3399" || "mx6qsabrelite" == "firefly-rk3399" || "mx6qsabrelite" == "puma-rk3399" || "mx6qsabrelite" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "mx6qsabrelite" == "bananapim64" || "mx6qsabrelite" == "nanopia64" || "mx6qsabrelite" == "pine64plus" || "mx6qsabrelite" == "pinebook"
%define is_a64 1
%endif
%if "mx6qsabrelite" == "orangepipc2"
%define is_h5 1
%endif
%if "mx6qsabrelite" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-mx6qsabrelite
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the mx6qsabrelite platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-mx6qsabrelite
Provides: x-loader-mx6qsabrelite
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 mx6qsabrelite 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" mx6qsabrelite_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.imx %{buildroot}%{uboot_dir}/u-boot.imx
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.imx %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.imx /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-nanopia64
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "nanopia64" == "rpi" || "nanopia64" == "rpi2" || "nanopia64" == "rpi3"
%define is_rpi 1
%endif
%if "nanopia64" == "evb-rk3399" || "nanopia64" == "firefly-rk3399" || "nanopia64" == "puma-rk3399" || "nanopia64" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "nanopia64" == "bananapim64" || "nanopia64" == "nanopia64" || "nanopia64" == "pine64plus" || "nanopia64" == "pinebook"
%define is_a64 1
%endif
%if "nanopia64" == "orangepipc2"
%define is_h5 1
%endif
%if "nanopia64" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-nanopia64
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the nanopia64 platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-nanopia64
Provides: x-loader-nanopia64
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%endif
ExclusiveArch: aarch64
%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 nanopia64 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" nanopi_a64_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.itb %{buildroot}%{uboot_dir}/u-boot.itb
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.itb %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.itb /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

File diff suppressed because it is too large Load Diff

View File

@ -1,297 +0,0 @@
#
# spec file for package u-boot-nanopineo
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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 https://bugs.opensuse.org/
#
%bcond_with uboot_atf
%bcond_with uboot_atf_pine64
%define mvebu_spl 0
%define x_loader 0
%define rockchip_spl 0
%define sunxi_spl 1
%define arndale_spl 0
%define origen_spl 0
%define imx6_spl 0
%define socfpga_spl 0
%if "nanopineo" == "rpi" || "nanopineo" == "rpi2" || "nanopineo" == "rpi3"
%define is_rpi 1
%endif
%if "nanopineo" == "evb-rk3399" || "nanopineo" == "firefly-rk3399" || "nanopineo" == "puma-rk3399" || "nanopineo" == "rock960-rk3399"
%define is_rk3399 1
%endif
%if "nanopineo" == "bananapim64" || "nanopineo" == "nanopia64" || "nanopineo" == "pine64plus" || "nanopineo" == "pinebook"
%define is_a64 1
%endif
%if "nanopineo" == "orangepipc2"
%define is_h5 1
%endif
%if "nanopineo" == "pineh64"
%define is_h6 1
%endif
# archive_version differs from version for RC version only
%define archive_version 2019.04
Name: u-boot-nanopineo
Version: 2019.04
Release: 0
Summary: The U-Boot firmware for the nanopineo platform
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
Patch0001: 0001-XXX-openSUSE-XXX-Prepend-partition-.patch
Patch0002: 0002-Revert-Revert-omap3-Use-raw-SPL-by-.patch
Patch0003: 0003-rpi-Use-firmware-provided-device-tr.patch
Patch0004: 0004-Temp-workaround-for-Chromebook-snow.patch
Patch0005: 0005-zynqmp-Add-generic-target.patch
Patch0006: 0006-tools-zynqmpbif-Add-support-for-loa.patch
Patch0007: 0007-boo-1123170-Remove-ubifs-support-fr.patch
Patch0008: 0008-zynqmp-generic-fix-compilation.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?is_rk3399} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-rk3399
%endif
%if (0%{?is_a64} || 0%{?is_h5}) && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ia64
%endif
%if 0%{?is_h6} && %{with uboot_atf}
BuildRequires: arm-trusted-firmware-sun50ih6
%endif
BuildRequires: bc
BuildRequires: bison
# Arndale board needs DTC >= 1.4
BuildRequires: dtc >= 1.4.0
BuildRequires: flex
# u-boot-clearfog (tools/kwbimage.c) needs openssl to build
BuildRequires: libopenssl-devel
BuildRequires: python-devel
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
# make_fit_atf.py
BuildRequires: python-pyelftools
%endif
%endif
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
%endif
%if "%{name}" == "u-boot-zynqmp"
BuildRequires: zynqmp-dts
%endif
%if 0%{?is_rpi}
# For mountpoint
Requires(post): util-linux
%endif
Provides: u-boot-loader
Conflicts: otherproviders(u-boot-loader)
%if %x_loader == 1
Obsoletes: x-loader-nanopineo
Provides: x-loader-nanopineo
%endif
%if "%{name}" == "u-boot-am335xevm"
# http://git.denx.de/?p=u-boot.git;a=commit;h=8fa7f65dd02c176ee6021eaf40114560b8954ba2
Obsoletes: am335x_boneblack
Provides: am335x_boneblack
%endif
%if "%{name}" == "bananapi_m2_plus_h3"
# http://git.denx.de/?p=u-boot.git;a=commit;h=268ae6548779ccd8ba38ce39d43f41be7e0bc133
Obsoletes: Sinovoip_BPI_M2_Plus
Provides: Sinovoip_BPI_M2_Plus
%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 nanopineo 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}
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -p1
%patch0008 -p1
%build
export SOURCE_DATE_EPOCH=$(date -d "$(head -n 2 %{_sourcedir}/%{name}.changes | tail -n 1 | cut -d- -f1 )" +%s)
%if 0%{?is_a64} || 0%{?is_h5}
export BL31=/usr/share/arm-trusted-firmware-sun50ia64/bl31.bin
%endif
%if 0%{?is_h6}
export BL31=/usr/share/arm-trusted-firmware-sun50ih6/bl31.bin
%endif
%if %{with uboot_atf}
%if "%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399"
cp /usr/share/arm-trusted-firmware-rk3399/bl31.elf .
%endif
%endif
make %{?_smp_mflags} CROSS_COMPILE= HOSTCFLAGS="$RPM_OPT_FLAGS" nanopi_neo_defconfig
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" \
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
all u-boot.itb
%else
all
%endif
%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 ; do
./tools/mkimage -n -d spl/u-boot-spl.bin -T $t u-boot-spl.$t
done
%endif
%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.img %{buildroot}%{uboot_dir}/u-boot.img
%if ("%{name}" == "u-boot-evb-rk3399" || "%{name}" == "u-boot-firefly-rk3399") && %{with uboot_atf}
install -D -m 0644 u-boot.itb %{buildroot}%{uboot_dir}/u-boot.itb
%endif
%if "%{name}" == "u-boot-qemu-ppce500"
mv %{buildroot}%{uboot_dir}/u-boot.img %{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 ; 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
%if "%{name}" == "u-boot-rpi3"
echo -e "# Boot in AArch64 mode\narm_control=0x200" > %{buildroot}%{uboot_dir}/ubootconfig.txt
%endif
%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
if ! [[ "$(readlink -f /boot/efi)" -ef "$(readlink -f %{uboot_dir})" ]]; then
[ -f %{uboot_dir}/ubootconfig.txt ] && cp %{uboot_dir}/ubootconfig.txt /boot/efi
cp %{uboot_dir}/u-boot.img /boot/efi/
fi
fi
%endif
%files
%defattr(-,root,root)
%license Licenses/gpl-2.0.txt
%doc README
%{uboot_dir}/*
%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
%changelog

Some files were not shown because too many files have changed in this diff Show More