From e5757f3cacd20035bc00248897c4fd35348519f3 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 13 Jun 2017 10:42:43 +0100 Subject: [PATCH] 2017.07 RC1, first pass at adjusting the build process for chromebooks and other devices that need special steps --- armv8-boards => aarch64-boards | 4 + aarch64-chromebooks | 0 armv7-boards => arm-boards | 10 +- arm-chromebooks | 8 + clearfog-distroboot.patch | 167 -------------------- sources | 2 +- u-boot-openssl-1.1.patch | 271 --------------------------------- uboot-tools.spec | 77 +++++----- 8 files changed, 54 insertions(+), 485 deletions(-) rename armv8-boards => aarch64-boards (78%) create mode 100644 aarch64-chromebooks rename armv7-boards => arm-boards (94%) create mode 100644 arm-chromebooks delete mode 100644 clearfog-distroboot.patch delete mode 100644 u-boot-openssl-1.1.patch diff --git a/armv8-boards b/aarch64-boards similarity index 78% rename from armv8-boards rename to aarch64-boards index 02f8675..7468e71 100644 --- a/armv8-boards +++ b/aarch64-boards @@ -1,10 +1,14 @@ +bananapi_m64 dragonboard410c espresso7420 +evb-rk3328 evb-rk3399 +firefly-rk3399 hikey mvebu_espressobin-88f3720 mvebu_mcbin-88f8040 odroid-c2 +orangepi_prime p2371-2180 pine64_plus rpi_3 diff --git a/aarch64-chromebooks b/aarch64-chromebooks new file mode 100644 index 0000000..e69de29 diff --git a/armv7-boards b/arm-boards similarity index 94% rename from armv7-boards rename to arm-boards index dec40a9..f1c848a 100644 --- a/armv7-boards +++ b/arm-boards @@ -19,9 +19,6 @@ Bananapi_M2_Ultra Bananapro chiliboard CHIP -chromebook_jerry -chromebit_mickey -chromebook_minnie Chuwi_V7_CW0825 clearfog cl-som-am57x @@ -71,9 +68,9 @@ MK808C MSI_Primo73 MSI_Primo81 mx6cuboxi +nanopi_m1 nanopi_neo novena -nyan-big odroid odroid-xu3 omap3_beagle @@ -92,8 +89,6 @@ orangepi_plus2e orangepi_zero origen paz00 -peach-pi -peach-pit polaroid_mid2809pxe04 pov_protab2_ips9 q8_a13_tablet @@ -107,9 +102,8 @@ rock2 rpi_2 rpi_3_32b Sinlinx_SinA31s +Sinovoip_BPI_M2_Plus smdkv310 -snow -spring stih410-b2260 sunxi_Gemei_G9 tinker-rk3288 diff --git a/arm-chromebooks b/arm-chromebooks new file mode 100644 index 0000000..899c823 --- /dev/null +++ b/arm-chromebooks @@ -0,0 +1,8 @@ +chromebit_mickey_defconfig +chromebook_jerry_defconfig +chromebook_minnie_defconfig +nyan-big_defconfig +peach-pi_defconfig +peach-pit_defconfig +snow_defconfig +spring_defconfig diff --git a/clearfog-distroboot.patch b/clearfog-distroboot.patch deleted file mode 100644 index dccde09..0000000 --- a/clearfog-distroboot.patch +++ /dev/null @@ -1,167 +0,0 @@ -From patchwork Wed May 10 13:12:34 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot] arm: mvebu: clearfog: generic distro bootcmd -From: Patrick Wildt -X-Patchwork-Id: 760587 -X-Patchwork-Delegate: sr@denx.de -Message-Id: <20170510131233.GA6368@eris.local> -To: u-boot@lists.denx.de -Cc: sr@denx.de -Date: Wed, 10 May 2017 15:12:34 +0200 - -Switch Clearfog to the generic distro defaults. This has been taken -from a Debian mailing list thread: - -https://lists.debian.org/debian-boot/2016/10/msg00026.html - -Signed-off-by: Patrick Wildt ---- - configs/clearfog_defconfig | 10 +--------- - include/configs/clearfog.h | 48 +++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 48 insertions(+), 10 deletions(-) - -diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig -index 1264871e83..097506872d 100644 ---- a/configs/clearfog_defconfig -+++ b/configs/clearfog_defconfig -@@ -8,14 +8,13 @@ CONFIG_SPL_MMC_SUPPORT=y - CONFIG_SPL_SERIAL_SUPPORT=y - CONFIG_SPL_LIBDISK_SUPPORT=y - CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" -+CONFIG_DISTRO_DEFAULTS=y - CONFIG_BOOTDELAY=3 - CONFIG_SYS_CONSOLE_INFO_QUIET=y - # CONFIG_DISPLAY_BOARDINFO is not set - CONFIG_SPL=y - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x141 - CONFIG_SPL_I2C_SUPPORT=y --CONFIG_HUSH_PARSER=y --CONFIG_CMD_BOOTZ=y - # CONFIG_CMD_IMLS is not set - # CONFIG_CMD_FLASH is not set - CONFIG_CMD_MMC=y -@@ -25,15 +24,8 @@ CONFIG_CMD_I2C=y - CONFIG_CMD_USB=y - # CONFIG_CMD_SETEXPR is not set - CONFIG_CMD_TFTPPUT=y --CONFIG_CMD_DHCP=y --CONFIG_CMD_MII=y --CONFIG_CMD_PING=y - CONFIG_CMD_CACHE=y - CONFIG_CMD_TIME=y --CONFIG_CMD_EXT2=y --CONFIG_CMD_EXT4=y --CONFIG_CMD_FAT=y --CONFIG_CMD_FS_GENERIC=y - CONFIG_EFI_PARTITION=y - # CONFIG_PARTITION_UUIDS is not set - # CONFIG_SPL_PARTITION_UUIDS is not set -diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h -index 0c51d2a288..bd96ed690f 100644 ---- a/include/configs/clearfog.h -+++ b/include/configs/clearfog.h -@@ -80,7 +80,7 @@ - #define CONFIG_SYS_ALT_MEMTEST - - /* Keep device tree and initrd in lower memory so the kernel can access them */ --#define CONFIG_EXTRA_ENV_SETTINGS \ -+#define RELOCATION_LIMITS_ENV_SETTINGS \ - "fdt_high=0x10000000\0" \ - "initrd_high=0x10000000\0" - -@@ -134,4 +134,50 @@ - */ - #include "mv-common.h" - -+/* Include the common distro boot environment */ -+#ifndef CONFIG_SPL_BUILD -+#include -+ -+#ifdef CONFIG_MMC -+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -+#else -+#define BOOT_TARGET_DEVICES_MMC(func) -+#endif -+ -+#ifdef CONFIG_USB_STORAGE -+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) -+#else -+#define BOOT_TARGET_DEVICES_USB(func) -+#endif -+ -+#define BOOT_TARGET_DEVICES(func) \ -+ BOOT_TARGET_DEVICES_MMC(func) \ -+ BOOT_TARGET_DEVICES_USB(func) \ -+ func(PXE, pxe, na) \ -+ func(DHCP, dhcp, na) -+ -+#define KERNEL_ADDR_R __stringify(0x800000) -+#define FDT_ADDR_R __stringify(0x100000) -+#define RAMDISK_ADDR_R __stringify(0x1800000) -+#define SCRIPT_ADDR_R __stringify(0x200000) -+#define PXEFILE_ADDR_R __stringify(0x300000) -+ -+#define LOAD_ADDRESS_ENV_SETTINGS \ -+ "kernel_addr_r=" KERNEL_ADDR_R "\0" \ -+ "fdt_addr_r=" FDT_ADDR_R "\0" \ -+ "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \ -+ "scriptaddr=" SCRIPT_ADDR_R "\0" \ -+ "pxefile_addr_r=" PXEFILE_ADDR_R "\0" -+ -+#include -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ RELOCATION_LIMITS_ENV_SETTINGS \ -+ LOAD_ADDRESS_ENV_SETTINGS \ -+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ -+ "console=ttyS0,115200\0" \ -+ BOOTENV -+ -+#endif /* CONFIG_SPL_BUILD */ -+ - #endif /* _CONFIG_CLEARFOG_H */ -From patchwork Tue May 9 11:54:44 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot] arm: mvebu: clearfog: reset uSOM onboard 1512 phy -From: Patrick Wildt -X-Patchwork-Id: 760053 -X-Patchwork-Delegate: sr@denx.de -Message-Id: <20170509115444.GA4503@eris.local> -To: u-boot@lists.denx.de -Cc: sr@denx.de -Date: Tue, 9 May 2017 13:54:44 +0200 - -Use GPIO19 which is wired to the uSOM phy reset signal in order to reset -the uSOM's 1512 Gigabit Ethernet phy. - -This GPIO is valid on ClearFog rev 2.1 and newer. - -Taken from SolidRun's specialised u-boot, see -https://github.com/SolidRun/u-boot-armada38x/commit/f906e3df172e07ac82cdd87b278d7896949262ea - -Signed-off-by: Patrick Wildt ---- - board/solidrun/clearfog/clearfog.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c -index 2773f5957e..3a8257cac3 100644 ---- a/board/solidrun/clearfog/clearfog.c -+++ b/board/solidrun/clearfog/clearfog.c -@@ -131,8 +131,12 @@ int board_init(void) - /* Toggle GPIO41 to reset onboard switch and phy */ - clrbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9)); - clrbits_le32(MVEBU_GPIO1_BASE + 0x4, BIT(9)); -+ /* GPIO 19 on ClearFog rev 2.1 controls the uSOM onboard phy reset */ -+ clrbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19)); -+ clrbits_le32(MVEBU_GPIO0_BASE + 0x4, BIT(19)); - mdelay(1); - setbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9)); -+ setbits_le32(MVEBU_GPIO0_BASE + 0x0, BIT(19)); - mdelay(10); - - /* Init I2C IO expanders */ diff --git a/sources b/sources index a4c37b0..9ac2311 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-2017.05.tar.bz2) = be270f9242a72b05463092a022bbabd54996762de1ff23bf7575124ac02e62f49572a4e2f6f571a5019047d40027e56e35593b5cc373c4a5a39b100c3377ba93 +SHA512 (u-boot-2017.07-rc1.tar.bz2) = 9a02545b14186329f0ae8995d5df0208c588d661f548a6b7da32085e76db96f7a8a23fd88036b20a842d6c0bfdfae72df18cd60e0515fc0fa826a95e03061829 diff --git a/u-boot-openssl-1.1.patch b/u-boot-openssl-1.1.patch deleted file mode 100644 index 3f1e725..0000000 --- a/u-boot-openssl-1.1.patch +++ /dev/null @@ -1,271 +0,0 @@ -From patchwork Mon May 8 19:31:19 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,v3,1/2] rsa: Fix build with OpenSSL 1.1.x -From: Jelle van der Waa -X-Patchwork-Id: 759762 -X-Patchwork-Delegate: trini@ti.com -Message-Id: <20170508193120.17348-2-jelle@vdwaa.nl> -To: Simon Glass , Andrew Duda , - "mario . six @ gdsys . cc" , u-boot@lists.denx.de -Cc: Tom Rini -Date: Mon, 8 May 2017 21:31:19 +0200 - -The rsa_st struct has been made opaque in 1.1.x, add forward compatible -code to access the n, e, d members of rsa_struct. - -EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be -called to reinitialise an already created structure. ---- - lib/rsa/rsa-sign.c | 44 ++++++++++++++++++++++++++++++++++++++------ - 1 file changed, 38 insertions(+), 6 deletions(-) - -diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c -index 8c6637e328..1da4ef7fff 100644 ---- a/lib/rsa/rsa-sign.c -+++ b/lib/rsa/rsa-sign.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -20,6 +21,19 @@ - #define HAVE_ERR_REMOVE_THREAD_STATE - #endif - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+static void RSA_get0_key(const RSA *r, -+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) -+{ -+ if (n != NULL) -+ *n = r->n; -+ if (e != NULL) -+ *e = r->e; -+ if (d != NULL) -+ *d = r->d; -+} -+#endif -+ - static int rsa_err(const char *msg) - { - unsigned long sslErr = ERR_get_error(); -@@ -286,16 +300,22 @@ static int rsa_init(void) - { - int ret; - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ret = SSL_library_init(); -+#else -+ ret = OPENSSL_init_ssl(0, NULL); -+#endif - if (!ret) { - fprintf(stderr, "Failure to init SSL library\n"); - return -1; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_load_error_strings(); - - OpenSSL_add_all_algorithms(); - OpenSSL_add_all_digests(); - OpenSSL_add_all_ciphers(); -+#endif - - return 0; - } -@@ -335,12 +355,15 @@ err_set_rsa: - err_engine_init: - ENGINE_free(e); - err_engine_by_id: -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ENGINE_cleanup(); -+#endif - return ret; - } - - static void rsa_remove(void) - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - #ifdef HAVE_ERR_REMOVE_THREAD_STATE -@@ -349,6 +372,7 @@ static void rsa_remove(void) - ERR_remove_state(0); - #endif - EVP_cleanup(); -+#endif - } - - static void rsa_engine_remove(ENGINE *e) -@@ -409,7 +433,11 @@ static int rsa_sign_with_key(RSA *rsa, struct checksum_algo *checksum_algo, - ret = rsa_err("Could not obtain signature"); - goto err_sign; - } -- EVP_MD_CTX_cleanup(context); -+ #if OPENSSL_VERSION_NUMBER < 0x10100000L -+ EVP_MD_CTX_cleanup(context); -+ #else -+ EVP_MD_CTX_reset(context); -+ #endif - EVP_MD_CTX_destroy(context); - EVP_PKEY_free(key); - -@@ -479,6 +507,7 @@ static int rsa_get_exponent(RSA *key, uint64_t *e) - { - int ret; - BIGNUM *bn_te; -+ const BIGNUM *key_e; - uint64_t te; - - ret = -EINVAL; -@@ -487,17 +516,18 @@ static int rsa_get_exponent(RSA *key, uint64_t *e) - if (!e) - goto cleanup; - -- if (BN_num_bits(key->e) > 64) -+ RSA_get0_key(key, NULL, &key_e, NULL); -+ if (BN_num_bits(key_e) > 64) - goto cleanup; - -- *e = BN_get_word(key->e); -+ *e = BN_get_word(key_e); - -- if (BN_num_bits(key->e) < 33) { -+ if (BN_num_bits(key_e) < 33) { - ret = 0; - goto cleanup; - } - -- bn_te = BN_dup(key->e); -+ bn_te = BN_dup(key_e); - if (!bn_te) - goto cleanup; - -@@ -527,6 +557,7 @@ int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp, - { - BIGNUM *big1, *big2, *big32, *big2_32; - BIGNUM *n, *r, *r_squared, *tmp; -+ const BIGNUM *key_n; - BN_CTX *bn_ctx = BN_CTX_new(); - int ret = 0; - -@@ -548,7 +579,8 @@ int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp, - if (0 != rsa_get_exponent(key, exponent)) - ret = -1; - -- if (!BN_copy(n, key->n) || !BN_set_word(big1, 1L) || -+ RSA_get0_key(key, &key_n, NULL, NULL); -+ if (!BN_copy(n, key_n) || !BN_set_word(big1, 1L) || - !BN_set_word(big2, 2L) || !BN_set_word(big32, 32L)) - ret = -1; - -From patchwork Mon May 8 19:31:20 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,v3,2/2] tools: kwbimage fix build with OpenSSL 1.1.x -From: Jelle van der Waa -X-Patchwork-Id: 759763 -X-Patchwork-Delegate: trini@ti.com -Message-Id: <20170508193120.17348-3-jelle@vdwaa.nl> -To: Simon Glass , Andrew Duda , - "mario . six @ gdsys . cc" , u-boot@lists.denx.de -Cc: Tom Rini -Date: Mon, 8 May 2017 21:31:20 +0200 - -The rsa_st struct has been made opaque in 1.1.x, add forward compatible -code to access the n, e, d members of rsa_struct. - -EVP_MD_CTX_cleanup has been removed in 1.1.x and EVP_MD_CTX_reset should be -called to reinitialise an already created structure. - -Signed-off-by: Jelle van der Waa ---- - tools/kwbimage.c | 36 ++++++++++++++++++++++++++++++------ - 1 file changed, 30 insertions(+), 6 deletions(-) - -diff --git a/tools/kwbimage.c b/tools/kwbimage.c -index 2c637c7446..8c0e730e7b 100644 ---- a/tools/kwbimage.c -+++ b/tools/kwbimage.c -@@ -18,10 +18,30 @@ - #include "kwbimage.h" - - #ifdef CONFIG_KWB_SECURE -+#include - #include - #include - #include - #include -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+static void RSA_get0_key(const RSA *r, -+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) -+{ -+ if (n != NULL) -+ *n = r->n; -+ if (e != NULL) -+ *e = r->e; -+ if (d != NULL) -+ *d = r->d; -+} -+ -+#else -+void EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) -+{ -+ EVP_MD_CTX_reset(ctx); -+} -+#endif - #endif - - static struct image_cfg_element *image_cfg; -@@ -470,12 +490,16 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf, - char *keyname) - { - int size_exp, size_mod, size_seq; -+ const BIGNUM *key_e, *key_n; - uint8_t *cur; - char *errmsg = "Failed to encode %s\n"; - -- if (!key || !key->e || !key->n || !dst) { -+ RSA_get0_key(key, NULL, &key_e, NULL); -+ RSA_get0_key(key, &key_n, NULL, NULL); -+ -+ if (!key || !key_e || !key_n || !dst) { - fprintf(stderr, "export pk failed: (%p, %p, %p, %p)", -- key, key->e, key->n, dst); -+ key, key_e, key_n, dst); - fprintf(stderr, errmsg, keyname); - return -EINVAL; - } -@@ -490,8 +514,8 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf, - * do the encoding manually. - */ - -- size_exp = BN_num_bytes(key->e); -- size_mod = BN_num_bytes(key->n); -+ size_exp = BN_num_bytes(key_e); -+ size_mod = BN_num_bytes(key_n); - size_seq = 4 + size_mod + 4 + size_exp; - - if (size_mod > 256) { -@@ -520,14 +544,14 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf, - *cur++ = 0x82; - *cur++ = (size_mod >> 8) & 0xFF; - *cur++ = size_mod & 0xFF; -- BN_bn2bin(key->n, cur); -+ BN_bn2bin(key_n, cur); - cur += size_mod; - /* Exponent */ - *cur++ = 0x02; /* INTEGER */ - *cur++ = 0x82; - *cur++ = (size_exp >> 8) & 0xFF; - *cur++ = size_exp & 0xFF; -- BN_bn2bin(key->e, cur); -+ BN_bn2bin(key_e, cur); - - if (hashf) { - struct hash_v1 pk_hash; diff --git a/uboot-tools.spec b/uboot-tools.spec index da1e0df..f036dc3 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,25 +1,25 @@ -#global candidate rc3 +%global candidate rc1 Name: uboot-tools -Version: 2017.05 -Release: 2%{?candidate:.%{candidate}}%{?dist} +Version: 2017.07 +Release: 0.1%{?candidate:.%{candidate}}%{?dist} Summary: U-Boot utilities Group: Development/Tools License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot Source0: ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 -Source1: armv7-boards -Source2: armv8-boards +Source1: arm-boards +Source2: arm-chromebooks +Source3: aarch64-boards +Source4: aarch64-chromebooks Patch1: add-BOOTENV_INIT_COMMAND-for-commands-that-may-be-ne.patch -Patch2: u-boot-openssl-1.1.patch Patch3: mx6cuboxi-Add-support-for-sata.patch Patch4: mx6-Initial-Hummingboard-2-support.patch -Patch5: sti-STiH410-B2260-support.patch -Patch6: AW64-add-spl-atf-support.patch +# Patch5: sti-STiH410-B2260-support.patch +# Patch6: AW64-add-spl-atf-support.patch Patch7: use-Fedora-specific-EFI-path-name.patch -Patch8: clearfog-distroboot.patch Patch9: arm-tegra-nyan-chromebook.patch # Patch19: 0001-arm-mvebu-enable-generic-distro-boot-config.patch @@ -29,8 +29,13 @@ BuildRequires: dtc BuildRequires: gcc BuildRequires: git BuildRequires: openssl-devel -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-libfdt +BuildRequires: swig +%ifarch %{arm} aarch64 +BuildRequires: vboot-utils +%endif %ifarch aarch64 BuildRequires: arm-trusted-firmware-armv8 %endif @@ -43,12 +48,12 @@ and fw_printenv/fw_setenv for manipulating the boot environment variables. %ifarch aarch64 %package -n uboot-images-armv8 -Summary: u-boot bootloader images for armv8 boards +Summary: u-boot bootloader images for aarch64 boards Requires: uboot-tools BuildArch: noarch %description -n uboot-images-armv8 -u-boot bootloader binaries for the aarch64 vexpress_aemv8a +u-boot bootloader binaries for aarch64 boards %endif %ifarch %{arm} @@ -86,29 +91,22 @@ git config --unset user.email git config --unset user.name rm -rf .git +cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 . + %build mkdir builds -%ifarch aarch64 -for board in $(cat %SOURCE2) +%ifarch aarch64 %{arm} +for board in $(cat %{_arch}-boards) do -mkdir builds/$(echo $board)/ -# Needs improving but currently Pine64 is the only one -if [ "$board" = ""pine64_plus ]; then - cp /usr/share/arm-trusted-firmware/sun50iw1p1/bl31.bin builds/$(echo $board)/ -fi -make $(echo $board)_defconfig O=builds/$(echo $board)/ -make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" %{?_smp_mflags} V=1 O=builds/$(echo $board)/ -done - -%endif - -%ifarch %{arm} -for board in $(cat %SOURCE1) -do -mkdir builds/$(echo $board)/ -make $(echo $board)_defconfig V=1 O=builds/$(echo $board)/ -make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" %{?_smp_mflags} V=1 O=builds/$(echo $board)/ + echo "Building board: $board" + mkdir builds/$(echo $board)/ + # Needs improving but currently Pine64 is the only one + if [ "$board" = ""pine64_plus ]; then + cp /usr/share/arm-trusted-firmware/sun50iw1p1/bl31.bin builds/$(echo $board)/ + fi + make $(echo $board)_defconfig O=builds/$(echo $board)/ + make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" %{?_smp_mflags} V=1 O=builds/$(echo $board)/ done %endif @@ -123,7 +121,7 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/ %ifarch aarch64 -for board in $(cat %SOURCE2) +for board in $(cat %{_arch}-boards) do mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/ for file in spl/*spl.bin u-boot.bin u-boot.dtb u-boot-dtb.img u-boot.img u-boot.itb spl/sunxi-spl.bin @@ -136,7 +134,7 @@ done %endif %ifarch %{arm} -for board in $(cat %SOURCE1) +for board in $(cat %{_arch}-boards) do mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/ for file in MLO SPL spl/arndale-spl.bin spl/origen-spl.bin spl/smdkv310-spl.bin spl/*spl.bin u-boot.bin u-boot.dtb u-boot-dtb-tegra.bin u-boot.img u-boot.imx u-boot-nodtb-tegra.bin u-boot-spl.kwb u-boot-sunxi-with-spl.bin @@ -149,7 +147,7 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/ done # Bit of a hack to remove binaries we don't use as they're large -for board in $(cat %SOURCE1) +for board in $(cat %{_arch}-boards) do if [ -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then rm -f $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/u-boot.* @@ -167,7 +165,7 @@ done %endif %ifarch aarch64 -for board in $(cat %SOURCE2) +for board in $(cat %{_arch}-boards) do mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/$(echo $board)/ for file in MLO SPL spl/arndale-spl.bin spl/origen-spl.bin spl/smdkv310-spl.bin u-boot.bin u-boot.dtb u-boot-dtb-tegra.bin u-boot.img u-boot.imx u-boot-nodtb-tegra.bin u-boot-spl.kwb u-boot-sunxi-with-spl.bin @@ -194,7 +192,7 @@ done %endif %ifarch aarch64 -for board in $(cat %SOURCE2) +for board in $(cat %{_arch}-boards) do mkdir -p $RPM_BUILD_ROOT%{_datadir}/uboot/elf/$(echo $board)/ for file in u-boot @@ -226,7 +224,7 @@ cp -p board/Marvell/db-88f6820-gp/README builds/docs/README.mvebu-db-88f6820 cp -p board/rockchip/evb_rk3399/README builds/docs/README.evb_rk3399 cp -p board/solidrun/clearfog/README builds/docs/README.clearfog cp -p board/solidrun/mx6cuboxi/README builds/docs/README.mx6cuboxi -cp -p board/sunxi/README.pine64 builds/docs/README.pine64 +cp -p board/sunxi/README.sunxi64 builds/docs/README.sunxi64 cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand cp -p board/ti/am335x/README builds/docs/README.am335x cp -p board/ti/omap5_uevm/README builds/docs/README.omap5_uevm @@ -262,6 +260,9 @@ cp -p board/warp7/README builds/docs/README.warp7 %endif %changelog +* Tue Jun 6 2017 Peter Robinson 2017.07-0.1.rc1 +- 2017.07 RC1 + * Mon May 29 2017 Peter Robinson 2017.05-02 - Add distro-boot support for ClearFog - Add support for building a chained u-boot for nyan-big