summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-08-28 13:23:02 +0200
committerJakov Smolić <jsmolic@gentoo.org>2021-08-30 23:21:39 +0200
commit16f3be66790df19991d406b9a2de69393f4e8c97 (patch)
treedcfd0fc422627696fd473fc2c45eb6cef24490f6 /dev-embedded
parentsys-apps/gentoo-functions: add 0.15 (diff)
downloadgentoo-16f3be66790df19991d406b9a2de69393f4e8c97.tar.gz
gentoo-16f3be66790df19991d406b9a2de69393f4e8c97.tar.bz2
gentoo-16f3be66790df19991d406b9a2de69393f4e8c97.zip
dev-embedded/u-boot-tools: Version bump to 2021.07
* Bump EAPI to 8 * Use https:// instead of ftp:// in SRC_URI * Combine same build flags into myemakeargs * Use toolchain-funcs to export BUILD_CC and set HOSTCC=${BUILD_CC}, which enables us to correctly cross-compile the package, otherwise the build system tries to use cross-compiler as HOSTCC * Add USE=envtools that builds and installs only target-side environment tools which is useful for low storage situations where we only need envtools to read and modify U-Boot environment variables. This functionality matches the uboot-envtools package which is available in OpenWRT Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'dev-embedded')
-rw-r--r--dev-embedded/u-boot-tools/Manifest1
-rw-r--r--dev-embedded/u-boot-tools/metadata.xml11
-rw-r--r--dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild79
3 files changed, 87 insertions, 4 deletions
diff --git a/dev-embedded/u-boot-tools/Manifest b/dev-embedded/u-boot-tools/Manifest
index af7e7c744bef..758cfea596b8 100644
--- a/dev-embedded/u-boot-tools/Manifest
+++ b/dev-embedded/u-boot-tools/Manifest
@@ -1 +1,2 @@
DIST u-boot-2021.04-rc2.tar.bz2 16620315 BLAKE2B e16c167346ef3999443855b9a702bf28faacf51b7887c84096f7a372a0c820d6ed9f06c1dd209b4070adf8000853b58b7b9b81c5b32a973d37558acf1da2edfa SHA512 7bf07f15e0c5f5e63ef8cb9568278ea7c209e484bbb599c47b22a8d2e5c007cc204eec365e5328dea3e7b016cd6ba0cb4c917330cc76163b1016f7c7762ad1bf
+DIST u-boot-2021.07.tar.bz2 17275746 BLAKE2B 1a209a604e0f30264781a14ca855bbb777e8f1c031de60d28de397084fc9bfc4a3771ad00ec22f5cdcfa721f22707a533b9b59004ac0b107df927f23dc5ab0a6 SHA512 210b206a4626feb0985580d9448a97b499b09bf9b9313ca847a66624785e9e9b0fae8f2e329acd344f5f75cb722d2093dd0ee394311ddd1fde05e400ee71a24d
diff --git a/dev-embedded/u-boot-tools/metadata.xml b/dev-embedded/u-boot-tools/metadata.xml
index 71b1461e1146..899a677d0cde 100644
--- a/dev-embedded/u-boot-tools/metadata.xml
+++ b/dev-embedded/u-boot-tools/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="project">
- <email>embedded@gentoo.org</email>
- <name>Embedded Gentoo</name>
-</maintainer>
+ <maintainer type="project">
+ <email>embedded@gentoo.org</email>
+ <name>Embedded Gentoo</name>
+ </maintainer>
+ <use>
+ <flag name="envtools">Build only the target-side environment tools</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild b/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild
new file mode 100644
index 000000000000..8511d1c55044
--- /dev/null
+++ b/dev-embedded/u-boot-tools/u-boot-tools-2021.07.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+MY_P="u-boot-${PV/_/-}"
+DESCRIPTION="utilities for working with Das U-Boot"
+HOMEPAGE="https://www.denx.de/wiki/U-Boot/WebHome"
+SRC_URI="https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="envtools"
+
+RDEPEND="dev-libs/openssl:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ default
+ sed -i 's:\bpkg-config\b:${PKG_CONFIG}:g' \
+ scripts/kconfig/{g,m,n,q}conf-cfg.sh \
+ scripts/kconfig/Makefile \
+ tools/Makefile || die
+}
+
+src_configure() {
+ tc-export AR BUILD_CC CC PKG_CONFIG
+}
+
+src_compile() {
+ # Unset a few KBUILD variables. Bug #540476
+ unset KBUILD_OUTPUT KBUILD_SRC
+
+ local myemakeargs=(
+ V=1
+ AR="${AR}"
+ CC="${CC}"
+ HOSTCC="${BUILD_CC}"
+ HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)'
+ HOSTLDFLAGS="${LDFLAGS}"
+ )
+
+ emake "${myemakeargs[@]}" tools-only_defconfig
+
+ emake "${myemakeargs[@]}" \
+ NO_SDL=1 \
+ HOSTSTRIP=: \
+ STRIP=: \
+ CONFIG_ENV_OVERWRITE=y \
+ $(usex envtools envtools tools-all)
+}
+
+src_test() { :; }
+
+src_install() {
+ cd tools || die
+
+ if ! use envtools; then
+ dobin bmp_logo dumpimage fdtgrep gen_eth_addr img2srec mkenvimage mkimage
+ fi
+
+ dobin env/fw_printenv
+
+ dosym fw_printenv /usr/bin/fw_setenv
+
+ insinto /etc
+ doins env/fw_env.config
+
+ doman ../doc/mkimage.1
+}