[packages/uboot] up to 2020.10

atler atler at pld-linux.org
Wed Dec 16 19:01:03 CET 2020


commit 436e906e0669697d7a2ae3fbcec09fc132dd68ae
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Dec 16 18:58:02 2020 +0100

    up to 2020.10
    
    - start building images (inspired by fedora)
    - on rpi use firmware provided dt to support dtoverlays (from fedora)
    - https urls
    - use provided config for building tools only

 ...using-the-DT-provided-by-the-Raspberry-Pi.patch |  96 +++++++++
 uboot.config                                       | 225 ---------------------
 uboot.spec                                         | 114 +++++++++--
 3 files changed, 194 insertions(+), 241 deletions(-)
---
diff --git a/uboot.spec b/uboot.spec
index 2f8f899..2a1049e 100644
--- a/uboot.spec
+++ b/uboot.spec
@@ -1,16 +1,37 @@
 Summary:	Das U-Boot -- the Universal Boot Loader
 Summary(pl.UTF-8):	Das U-Boot - uniwersalny bootloader
 Name:		uboot
-Version:	2015.04
+Version:	2020.10
 Release:	1
 License:	GPL v2
 Group:		Applications/System
-Source0:	ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
-# Source0-md5:	570bdc2c47270c2a98ca60ff6c5c74cd
-Source1:	%{name}.config
-URL:		http://www.denx.de/wiki/U-Boot
+Source0:	https://ftp.denx.de/pub/u-boot/u-boot-%{version}.tar.bz2
+# Source0-md5:	14656f08aa73a8dbbde2424fe78bbe3b
+Patch0:		rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
+URL:		https://www.denx.de/wiki/U-Boot
+%ifarch aarch64
+BuildRequires:	arm-trusted-firmware-armv8
+%endif
+BuildRequires:	bison
+BuildRequires:	flex
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		common_configs	tools-only
+
+%ifarch %{arm}
+%define		arch_configs	rpi_0_w rpi_2
+%else
+%ifarch aarch64
+%define		arch_configs	pinebook-pro-rk3399
+%endif
+%endif
+
+%define		configs %{common_configs} %{?arch_configs}
+
+%define		rk3399_configs pinebook-pro-rk3399
+
+%define		imagedir	%{_datadir}/uboot
+
 %description
 Das U-Boot (Universal Bootloader, German for "the submarine") is a
 boot loader for a number of different computer architectures,
@@ -21,6 +42,27 @@ Das U-Boot (Universal Bootloader lub "łódź podwodna" po niemiecku) to
 bootloader dla wielu różnych architektur komputerów, w tym PPC, ARM,
 AVR32, MIPS, x86, 68k, Nios i MicroBlaze.
 
+%package image-pinebook-pro
+Summary:	U-Boot firmware images for Pinebook Pro
+Group:		Applications/System
+
+%description image-pinebook-pro
+U-Boot firmware images for Pinebook Pro.
+
+%package image-raspberry-pi-2
+Summary:	U-Boot firmware image for Raspberry Pi 2
+Group:		Applications/System
+
+%description image-raspberry-pi-2
+U-Boot firmware image for Raspberry Pi 2.
+
+%package image-raspberry-pi-zero
+Summary:	U-Boot firmware image for Raspberry Pi Zero
+Group:		Applications/System
+
+%description image-raspberry-pi-zero
+U-Boot firmware image for Raspberry Pi Zero.
+
 %package mkimage
 Summary:	Generate kernel image for U-Boot
 Summary(pl.UTF-8):	Generowanie obrazu jądra dla U-Boota
@@ -43,30 +85,54 @@ jądra Linuksa "uImage" w nagłówkiem, sumą kontrolną CRC32 itp. do
 wykorzystania przez bootloader U-Boot.
 
 mkimage może być używane także do tworzenia obrazów ramdysków do
-wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra
-lub połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
+wykorzystania przez U-Boota - osobnych w stosunku do obrazu jądra lub
+połączonych w jeden plik. mkimage obudowuje obrazy w 64-bajtowy
 nagłówek zawierający informacje o architekturze docelowej, systemie
 operacyjnym, rodzaju obrazu, metodzie kompresji, punktach wejściowych,
 czasie utworzenia, sumach kontrolnych CRC32 itp.
 
 %prep
 %setup -q -n u-boot-%{version}
-
-cp -p %{SOURCE1} .config
+%patch0 -p1
 
 %build
-%{__make} tools-only \
-	HOSTCC="%{__cc}" \
-	HOSTSTRIP=: \
-	HOST_CFLAGS="%{rpmcflags}" \
-	HOST_LDFLAGS="%{rpmldflags}" \
-	BIN_FILES="bmp_logo gen_eth_addr img2srec mkimage"
+for config in %configs; do
+	if echo ' %rk3399_configs ' | grep -q " $config "; then
+		mkdir -p build/$config
+		cp -p /usr/share/arm-trusted-firmware/rk3399/* build/$config
+	fi
+	%{__make} ${config}_defconfig \
+		HOSTCC="%{__cc}" \
+		STRIP=: \
+		HOSTCFLAGS="%{rpmcflags}" \
+		HOSTLDFLAGS="%{rpmldflags}" \
+		V=1 \
+		O=build/$config
+	%{__make} \
+		$(test "$config" = "tools-only" && echo tools-only) \
+		HOSTCC="%{__cc}" \
+		STRIP=: \
+		HOSTCFLAGS="%{rpmcflags}" \
+		HOSTLDFLAGS="%{rpmldflags}" \
+		V=1 \
+		O=build/$config
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
 
-install tools/mkimage $RPM_BUILD_ROOT%{_bindir}
+for config in %configs; do
+	if [ "$config" = "tools-only" ]; then
+		install build/$config/tools/mkimage $RPM_BUILD_ROOT%{_bindir}
+	elif echo ' %rk3399_configs ' | grep -q " $config "; then
+		install -d $RPM_BUILD_ROOT%{imagedir}/$config
+		cp -p build/$config/{idbloader.img,u-boot.itb} $RPM_BUILD_ROOT%{imagedir}/$config
+	else
+		install -d $RPM_BUILD_ROOT%{imagedir}/$config
+		cp -p build/$config/u-boot.bin $RPM_BUILD_ROOT%{imagedir}/$config
+	fi
+done
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -75,6 +141,22 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc MAINTAINERS README
 
+%ifarch aarch64
+%files image-pinebook-pro
+%defattr(644,root,root,755)
+%{imagedir}/pinebook-pro-rk3399
+%endif
+
+%ifarch %{arm}
+%files image-raspberry-pi-2
+%defattr(644,root,root,755)
+%{imagedir}/rpi_2
+
+%files image-raspberry-pi-zero
+%defattr(644,root,root,755)
+%{imagedir}/rpi_0_w
+%endif
+
 %files mkimage
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/mkimage
diff --git a/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
new file mode 100644
index 0000000..c156e4d
--- /dev/null
+++ b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch
@@ -0,0 +1,96 @@
+From f10f94831450671a77f61fe413b4a57459963860 Mon Sep 17 00:00:00 2001
+From: Peter Robinson <pbrobinson at gmail.com>
+Date: Mon, 10 Aug 2020 22:20:29 +0100
+Subject: [PATCH] rpi: Use firmware provided device tree
+
+Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
+---
+ configs/rpi_0_w_defconfig      | 2 +-
+ configs/rpi_2_defconfig        | 2 +-
+ configs/rpi_3_32b_defconfig    | 2 +-
+ configs/rpi_3_b_plus_defconfig | 2 +-
+ configs/rpi_3_defconfig        | 2 +-
+ configs/rpi_defconfig          | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
+index bba5e12b12..0241f4c6d3 100644
+--- a/configs/rpi_0_w_defconfig
++++ b/configs/rpi_0_w_defconfig
+@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
+index 1c2bbb29ce..9573e475f4 100644
+--- a/configs/rpi_2_defconfig
++++ b/configs/rpi_2_defconfig
+@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
+index b8a3d17f43..252df994e6 100644
+--- a/configs/rpi_3_32b_defconfig
++++ b/configs/rpi_3_32b_defconfig
+@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
+index 4c361438fa..3b2996a2f9 100644
+--- a/configs/rpi_3_b_plus_defconfig
++++ b/configs/rpi_3_b_plus_defconfig
+@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
+index 9b281a4f15..1e9ee6122e 100644
+--- a/configs/rpi_3_defconfig
++++ b/configs/rpi_3_defconfig
+@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
+index b5ad53c37b..223fc03275 100644
+--- a/configs/rpi_defconfig
++++ b/configs/rpi_defconfig
+@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y
+ CONFIG_CMD_MMC=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+-CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+-- 
+2.26.2
+
diff --git a/uboot.config b/uboot.config
deleted file mode 100644
index e75c6c5..0000000
--- a/uboot.config
+++ /dev/null
@@ -1,225 +0,0 @@
-#
-# Automatically generated file; DO NOT EDIT.
-# U-Boot 2015.04 Configuration
-#
-CONFIG_HAVE_GENERIC_BOARD=y
-CONFIG_SYS_GENERIC_BOARD=y
-# CONFIG_ARC is not set
-# CONFIG_ARM is not set
-# CONFIG_AVR32 is not set
-# CONFIG_BLACKFIN is not set
-# CONFIG_M68K is not set
-# CONFIG_MICROBLAZE is not set
-# CONFIG_MIPS is not set
-# CONFIG_NDS32 is not set
-# CONFIG_NIOS2 is not set
-# CONFIG_OPENRISC is not set
-# CONFIG_PPC is not set
-CONFIG_SANDBOX=y
-# CONFIG_SH is not set
-# CONFIG_SPARC is not set
-# CONFIG_X86 is not set
-CONFIG_SYS_ARCH="sandbox"
-CONFIG_SYS_BOARD="sandbox"
-CONFIG_SYS_CONFIG_NAME="sandbox"
-CONFIG_DM=y
-CONFIG_DM_SERIAL=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
-CONFIG_DM_CROS_EC=y
-CONFIG_SYS_MALLOC_F_LEN=0x400
-CONFIG_DM_I2C=y
-
-#
-# Sandbox architecture
-#
-# CONFIG_DM_TEST is not set
-CONFIG_DEFAULT_DEVICE_TREE=""
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYS_MALLOC_F=y
-CONFIG_EXPERT=y
-# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
-
-#
-# Boot images
-#
-CONFIG_FIT=y
-# CONFIG_FIT_VERBOSE is not set
-# CONFIG_FIT_SIGNATURE is not set
-CONFIG_SYS_EXTRA_OPTIONS=""
-
-#
-# Command line interface
-#
-CONFIG_HUSH_PARSER=y
-CONFIG_SYS_HUSH_PARSER=y
-
-#
-# Commands
-#
-
-#
-# Info commands
-#
-CONFIG_CMD_BDI=y
-CONFIG_CMD_CONSOLE=y
-CONFIG_CMD_LICENSE=y
-
-#
-# Boot commands
-#
-CONFIG_CMD_BOOTD=y
-CONFIG_CMD_BOOTM=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_RUN=y
-CONFIG_CMD_IMI=y
-CONFIG_CMD_IMLS=y
-CONFIG_CMD_XIMG=y
-
-#
-# Environment commands
-#
-CONFIG_CMD_EXPORTENV=y
-CONFIG_CMD_IMPORTENV=y
-CONFIG_CMD_EDITENV=y
-CONFIG_CMD_SAVEENV=y
-
-#
-# Memory commands
-#
-CONFIG_CMD_MEMORY=y
-CONFIG_CMD_CRC32=y
-CONFIG_LOOPW=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_MX_CYCLIC=y
-CONFIG_CMD_MEMINFO=y
-
-#
-# Device access commands
-#
-CONFIG_CMD_DM=y
-# CONFIG_CMD_DEMO is not set
-CONFIG_CMD_LOADB=y
-CONFIG_CMD_LOADS=y
-CONFIG_CMD_FLASH=y
-CONFIG_CMD_NAND=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_FPGA=y
-
-#
-# Shell scripting commands
-#
-CONFIG_CMD_ECHO=y
-CONFIG_CMD_ITEST=y
-CONFIG_CMD_SOURCE=y
-
-#
-# Network commands
-#
-CONFIG_CMD_NET=y
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_TFTPSRV=y
-CONFIG_CMD_RARP=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_NFS=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_CDP=y
-CONFIG_CMD_SNTP=y
-CONFIG_CMD_DNS=y
-CONFIG_CMD_LINK_LOCAL=y
-
-#
-# Misc commands
-#
-CONFIG_CMD_TIME=y
-CONFIG_CMD_MISC=y
-CONFIG_CMD_TIMER=y
-CONFIG_SUPPORT_OF_CONTROL=y
-
-#
-# Device Tree Control
-#
-CONFIG_OF_CONTROL=y
-CONFIG_OF_EMBED=y
-# CONFIG_OF_HOSTFILE is not set
-CONFIG_NET=y
-
-#
-# Device Drivers
-#
-CONFIG_DM_WARN=y
-CONFIG_DM_DEVICE_REMOVE=y
-CONFIG_DM_STDIO=y
-# CONFIG_DM_DEMO is not set
-
-#
-# NAND Device Support
-#
-CONFIG_SYS_NAND_SELF_INIT=y
-CONFIG_NAND_DENALI=y
-# CONFIG_SYS_NAND_DENALI_64BIT is not set
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=0
-CONFIG_CMD_CROS_EC=y
-CONFIG_CROS_EC=y
-CONFIG_CROS_EC_I2C=y
-CONFIG_CROS_EC_LPC=y
-CONFIG_CROS_EC_SPI=y
-CONFIG_CONFIG_FSL_SEC_MON=y
-CONFIG_CROS_EC_KEYB=y
-# CONFIG_DEBUG_UART is not set
-# CONFIG_DM_I2C_COMPAT is not set
-CONFIG_LPC32XX_GPIO=y
-CONFIG_VIDEO_LCD_SSD2828=y
-CONFIG_VIDEO_LCD_SSD2828_TX_CLK=0
-CONFIG_VIDEO_LCD_SSD2828_RESET=""
-CONFIG_VIDEO_LCD_SPI_CS=""
-CONFIG_VIDEO_LCD_SPI_SCLK=""
-CONFIG_VIDEO_LCD_SPI_MOSI=""
-CONFIG_VIDEO_LCD_SPI_MISO=""
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB=y
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI=y
-CONFIG_USB_STORAGE=y
-
-#
-# MMC Host controller Support
-#
-CONFIG_FSL_CAAM=y
-CONFIG_DM_THERMAL=y
-
-#
-# File systems
-#
-
-#
-# Library routines
-#
-# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
-CONFIG_SYS_HZ=1000
-CONFIG_RSA=y
-CONFIG_RSA_SOFTWARE_EXP=y
-CONFIG_RSA_FREESCALE_EXP=y
-
-#
-# Hashing Support
-#
-CONFIG_SHA1=y
-CONFIG_SHA256=y
-CONFIG_SHA_HW_ACCEL=y
-CONFIG_SHA_PROG_HW_ACCEL=y
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/uboot.git/commitdiff/436e906e0669697d7a2ae3fbcec09fc132dd68ae



More information about the pld-cvs-commit mailing list