SHA256
1
0
forked from pool/u-boot

Accepting request 742229 from hardware:boot

OBS-URL: https://build.opensuse.org/request/show/742229
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=110
This commit is contained in:
2019-10-24 21:04:21 +00:00
committed by Git OBS Bridge
171 changed files with 1060 additions and 201614 deletions

View File

@@ -1,4 +1,4 @@
From 0d6f92cbd3c73b3ea3059c3be51723c6b38c22e8 Mon Sep 17 00:00:00 2001
From 5c52feb96a63368a7b8d7fa09e03e72dd9518474 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 3570a32dff..a8b93ca50b 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 @@
@@ -465,7 +465,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 cd627d9bf2149929301bafdcea8deb097f09986a 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""
@@ -9,10 +9,10 @@ This reverts commit 7fa75d0ac5502db813d109c1df7bd0da34688685.
1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index c8b8ac657f..a76bf3de1f 100644
index 734fa9d9e6..a35451f195 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -133,8 +133,6 @@ void save_omap_boot_params(void)
@@ -132,8 +132,6 @@ void save_omap_boot_params(void)
(boot_device <= MMC_BOOT_DEVICES_END)) {
switch (boot_device) {
case BOOT_DEVICE_MMC1:

View File

@@ -1,4 +1,4 @@
From b333967ac327cf84e0e927bc302b069a89384cb7 Mon Sep 17 00:00:00 2001
From 79010f19df5787e201b2c9e7c6f54d70ac5c2ef6 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,10 +28,10 @@ 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 fe5a7763a6..ed7f9381e9 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
@@ -41,10 +41,10 @@ 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 bf331c0ad0..52e3c3b234 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
@@ -54,10 +54,10 @@ 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 c2417a0ec9..191962f0f7 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
@@ -67,10 +67,10 @@ 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 4fa682539c..03a2356d3d 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -15,7 +15,7 @@ CONFIG_CMD_GPIO=y
@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
@@ -80,10 +80,10 @@ 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 2c04b3334e..bf00d8b669 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -14,7 +14,7 @@ CONFIG_CMD_GPIO=y
@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y

View File

@@ -1,4 +1,4 @@
From ff802d34ced386f9c088bdbd67554ea33877195c Mon Sep 17 00:00:00 2001
From 9fb72dbb5f4bb92e9ce294f91aaf1f48af92e6c0 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 ebe7bcdd90..de0c11852a 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,
@@ -599,7 +599,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 5cca414fc09b0819289d32d2994eb21daa82c068 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 dc7797478604d41d2f002f885cd2a8cd3d22fd19 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 e9bcf78e73609a32d15699f0a6bc2e0cd9e08b0d 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 bf49de4704..90ae0c3b90 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -36,7 +36,6 @@ CONFIG_CMD_FS_UUID=y
@@ -38,7 +38,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
@@ -72,6 +71,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 e8c60838b7..99cd59d40e 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -91,7 +91,6 @@
@@ -83,7 +83,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 c34095d98fe8d6422ea8a71e8f1df9e5a7caf2c0 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,100 @@
From 082fa10793d12601ba9480c5d57a06c531505a82 Mon Sep 17 00:00:00 2001
From: Matthias Brugger <mbrugger@suse.com>
Date: Thu, 5 Sep 2019 10:48:46 +0200
Subject: [PATCH] libfdt: fdt_address_cells() and fdt_size_cells()
Add internal fdt_cells() to avoid copy and paste. Fix typo in
fdt_size_cells() documentation comment.
This is based in upstream commit:
c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()")
but misses the test cases, as we don't implement them in U-Boot.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit b3bec26ecd6ef446a9c11504d414a50453eefe62)
---
scripts/dtc/libfdt/fdt_addresses.c | 35 +++++++++++-------------------
scripts/dtc/libfdt/libfdt.h | 2 +-
2 files changed, 14 insertions(+), 23 deletions(-)
diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c
index eff4dbcc72..49537b578d 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -1,6 +1,7 @@
/*
* libfdt - Flat Device Tree manipulation
* Copyright (C) 2014 David Gibson <david@gibson.dropbear.id.au>
+ * Copyright (C) 2018 embedded brains GmbH
*
* libfdt is dual licensed: you can use it either under the terms of
* the GPL, or the BSD license, at your option.
@@ -55,42 +56,32 @@
#include "libfdt_internal.h"
-int fdt_address_cells(const void *fdt, int nodeoffset)
+static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
{
- const fdt32_t *ac;
+ const fdt32_t *c;
int val;
int len;
- ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len);
- if (!ac)
+ c = fdt_getprop(fdt, nodeoffset, name, &len);
+ if (!c)
return 2;
- if (len != sizeof(*ac))
+ if (len != sizeof(*c))
return -FDT_ERR_BADNCELLS;
- val = fdt32_to_cpu(*ac);
+ val = fdt32_to_cpu(*c);
if ((val <= 0) || (val > FDT_MAX_NCELLS))
return -FDT_ERR_BADNCELLS;
return val;
}
-int fdt_size_cells(const void *fdt, int nodeoffset)
+int fdt_address_cells(const void *fdt, int nodeoffset)
{
- const fdt32_t *sc;
- int val;
- int len;
-
- sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len);
- if (!sc)
- return 2;
-
- if (len != sizeof(*sc))
- return -FDT_ERR_BADNCELLS;
-
- val = fdt32_to_cpu(*sc);
- if ((val < 0) || (val > FDT_MAX_NCELLS))
- return -FDT_ERR_BADNCELLS;
+ return fdt_cells(fdt, nodeoffset, "#address-cells");
+}
- return val;
+int fdt_size_cells(const void *fdt, int nodeoffset)
+{
+ return fdt_cells(fdt, nodeoffset, "#size-cells");
}
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index cf86ddba88..66f01fec53 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1109,7 +1109,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
*
* returns:
* 0 <= n < FDT_MAX_NCELLS, on success
- * 2, if the node has no #address-cells property
+ * 2, if the node has no #size-cells property
* -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
* #size-cells property
* -FDT_ERR_BADMAGIC,

View File

@@ -0,0 +1,74 @@
From 364d2cbad906064fa386f6170f9f1d927eb69ae8 Mon Sep 17 00:00:00 2001
From: Matthias Brugger <mbrugger@suse.com>
Date: Thu, 5 Sep 2019 10:48:47 +0200
Subject: [PATCH] libfdt: return correct value if #size-cells property is not
present
According to the device tree specification, the default value for
was not present.
This patch also makes fdt_address_cells() and fdt_size_cells() conform
to the behaviour documented in libfdt.h. The defaults are only returned
if fdt_getprop() returns -FDT_ERR_NOTFOUND, otherwise the actual error
is returned.
This is based on upstream commit:
aa7254d ("libfdt: return correct value if #size-cells property is not present")
but misses the test case part, as we don't implement them in U-Boot.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
(cherry picked from commit 9328f2adca50bd0b90f291230894fc46bc564665)
---
scripts/dtc/libfdt/fdt_addresses.c | 16 +++++++++++++---
scripts/dtc/libfdt/libfdt.h | 2 +-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c
index 49537b578d..f13a87dfa0 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -64,7 +64,7 @@ static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
c = fdt_getprop(fdt, nodeoffset, name, &len);
if (!c)
- return 2;
+ return len;
if (len != sizeof(*c))
return -FDT_ERR_BADNCELLS;
@@ -78,10 +78,20 @@ static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
int fdt_address_cells(const void *fdt, int nodeoffset)
{
- return fdt_cells(fdt, nodeoffset, "#address-cells");
+ int val;
+
+ val = fdt_cells(fdt, nodeoffset, "#address-cells");
+ if (val == -FDT_ERR_NOTFOUND)
+ return 2;
+ return val;
}
int fdt_size_cells(const void *fdt, int nodeoffset)
{
- return fdt_cells(fdt, nodeoffset, "#size-cells");
+ int val;
+
+ val = fdt_cells(fdt, nodeoffset, "#size-cells");
+ if (val == -FDT_ERR_NOTFOUND)
+ return 1;
+ return val;
}
diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h
index 66f01fec53..5c778b115b 100644
--- a/scripts/dtc/libfdt/libfdt.h
+++ b/scripts/dtc/libfdt/libfdt.h
@@ -1109,7 +1109,7 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
*
* returns:
* 0 <= n < FDT_MAX_NCELLS, on success
- * 2, if the node has no #size-cells property
+ * 1, if the node has no #size-cells property
* -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid
* #size-cells property
* -FDT_ERR_BADMAGIC,

View File

@@ -0,0 +1,62 @@
From 4ec9166e183805f15df73ec48b5750f386828f51 Mon Sep 17 00:00:00 2001
From: Matthias Brugger <mbrugger@suse.com>
Date: Thu, 5 Sep 2019 10:48:48 +0200
Subject: [PATCH] libfdt: Allow #size-cells of 0
The commit "libfdt: fdt_address_cells() and fdt_size_cells()" introduced
a bug as it consolidated code between the helpers for getting
be 0, and is frequently found so in practice for /cpus. IEEE1275 only
requires implementations to handle 1..4 for #address-cells, although one
could make a case for #address-cells == #size-cells == 0 being used to
represent a bridge with a single port.
While we're there, it's not totally obvious that the existing implicit
cast of a u32 to int will give the correct results according to strict C,
although it does work in practice. Straighten that up to cast only after
we've made our range checks.
This is based on upstream commit:
b8d6eca ("libfdt: Allow #size-cells of 0")
but misses the test cases,as we don't implement them in U-Boot.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
(cherry picked from commit 28e8a01e3e92755cb9e4d57f8fa25146c5aa698c)
---
scripts/dtc/libfdt/fdt_addresses.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/scripts/dtc/libfdt/fdt_addresses.c b/scripts/dtc/libfdt/fdt_addresses.c
index f13a87dfa0..788c143113 100644
--- a/scripts/dtc/libfdt/fdt_addresses.c
+++ b/scripts/dtc/libfdt/fdt_addresses.c
@@ -59,7 +59,7 @@
static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
{
const fdt32_t *c;
- int val;
+ uint32_t val;
int len;
c = fdt_getprop(fdt, nodeoffset, name, &len);
@@ -70,10 +70,10 @@ static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
return -FDT_ERR_BADNCELLS;
val = fdt32_to_cpu(*c);
- if ((val <= 0) || (val > FDT_MAX_NCELLS))
+ if (val > FDT_MAX_NCELLS)
return -FDT_ERR_BADNCELLS;
- return val;
+ return (int)val;
}
int fdt_address_cells(const void *fdt, int nodeoffset)
@@ -81,6 +81,8 @@ int fdt_address_cells(const void *fdt, int nodeoffset)
int val;
val = fdt_cells(fdt, nodeoffset, "#address-cells");
+ if (val == 0)
+ return -FDT_ERR_BADNCELLS;
if (val == -FDT_ERR_NOTFOUND)
return 2;
return val;

View File

@@ -0,0 +1,28 @@
From 5e1c2ca428cb26dfcea48c759ae63d281ade8d49 Mon Sep 17 00:00:00 2001
From: Matthias Brugger <mbrugger@suse.com>
Date: Thu, 5 Sep 2019 10:48:49 +0200
Subject: [PATCH] dm: Fix default address cells return value
Default address cells value on the livetree access function
returns the wrong value. Fix this so that the value returned
corresponds to the device tree specification.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
(cherry picked from commit 477b4084f76f7fa16e4d8483525c6d0070b47364)
---
include/dm/of.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dm/of.h b/include/dm/of.h
index 461e25aa19..6bef73b441 100644
--- a/include/dm/of.h
+++ b/include/dm/of.h
@@ -111,7 +111,7 @@ static inline const char *of_node_full_name(const struct device_node *np)
/* Default #address and #size cells */
#if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
#endif

84
_multibuild Normal file
View File

@@ -0,0 +1,84 @@
<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>avnetultra96rev1</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>rpi4</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>
<flavor>zynqzturn</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.10.tar.bz2 Normal file
View File

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

BIN
u-boot-2019.10.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

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