mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 08:01:14 +02:00
dev-embedded/u-boot-tools: Sync with Gentoo
It's from Gentoo commit 3d4ba884ecd77ac6c5f3a1d52cc91520dd618c3e.
This commit is contained in:
parent
1892418c7e
commit
674a9ceeda
@ -1 +1,2 @@
|
|||||||
DIST u-boot-2021.04-rc2.tar.bz2 16620315 BLAKE2B e16c167346ef3999443855b9a702bf28faacf51b7887c84096f7a372a0c820d6ed9f06c1dd209b4070adf8000853b58b7b9b81c5b32a973d37558acf1da2edfa SHA512 7bf07f15e0c5f5e63ef8cb9568278ea7c209e484bbb599c47b22a8d2e5c007cc204eec365e5328dea3e7b016cd6ba0cb4c917330cc76163b1016f7c7762ad1bf
|
DIST u-boot-2024.01.tar.bz2 19926911 BLAKE2B c62a22f56276426917b0db508ad7dc82efa4fe7be14c5e7d79ecdea172b2b383981b7e65b7e920b196d0162a17fb362ef97a8d758a1b30e509e3c66748d2c106 SHA512 45bd093ba3bda23e43cdde83d8656c1ee1348ac2886ecff1fee475f101ac4965a5be6565408fa5b990c723f3fdc833edfca60a719f735a43040cd14a1b59a88b
|
||||||
|
DIST u-boot-tools-2024.01-fix-invalid-escape-sequence.patch 1285 BLAKE2B ad0af975b59794f21a44472a1f1b4542e75e478d51e649a6c339a4af9963cb4b822e6eba6819cbd3d35c09f3c33f1995288ef296e07466a427cf1f0dd0a399e1 SHA512 8675c267ca5a234924bdf8fc03dcaf75501cf86ac7a9b2e7fbc7982b9620e8863af289c124c5e91cccee58cc116b4d2798be745dedc1b28099a143f3464ad4d6
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
Disable unused mkeficapsule
|
||||||
|
|
||||||
|
`CONFIG_TOOLS_MKEFICAPSULE` requires gnutls to build. Since we don't actually
|
||||||
|
expose the tool, we can just disable it.
|
||||||
|
|
||||||
|
diff -ur a/configs/tools-only_defconfig b/configs/tools-only_defconfig
|
||||||
|
--- a/configs/tools-only_defconfig 2023-01-09 09:07:33.000000000 -0700
|
||||||
|
+++ b/configs/tools-only_defconfig 2023-08-11 14:01:50.151294889 -0600
|
||||||
|
@@ -33,4 +33,4 @@
|
||||||
|
# CONFIG_VIRTIO_SANDBOX is not set
|
||||||
|
# CONFIG_GENERATE_ACPI_TABLE is not set
|
||||||
|
# CONFIG_EFI_LOADER is not set
|
||||||
|
-CONFIG_TOOLS_MKEFICAPSULE=y
|
||||||
|
+# CONFIG_TOOLS_MKEFICAPSULE is not set
|
@ -0,0 +1,17 @@
|
|||||||
|
Disable unused pylibfdt
|
||||||
|
|
||||||
|
The `imply BINMAN` causes `pylibfdt` to be built, which requires python. We
|
||||||
|
don't currently expose `pylibfdt`, or declare python dependencies, so disable
|
||||||
|
it.
|
||||||
|
|
||||||
|
diff -ur a/arch/Kconfig b/arch/Kconfig
|
||||||
|
--- a/arch/Kconfig 2023-01-09 09:07:33.000000000 -0700
|
||||||
|
+++ b/arch/Kconfig 2023-08-11 14:01:05.998403114 -0600
|
||||||
|
@@ -205,7 +205,6 @@
|
||||||
|
imply KEYBOARD
|
||||||
|
imply PHYSMEM
|
||||||
|
imply GENERATE_ACPI_TABLE
|
||||||
|
- imply BINMAN
|
||||||
|
|
||||||
|
config SH
|
||||||
|
bool "SuperH architecture"
|
@ -1,8 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
<maintainer type="project">
|
<maintainer type="project">
|
||||||
<email>embedded@gentoo.org</email>
|
<email>embedded@gentoo.org</email>
|
||||||
<name>Embedded Gentoo</name>
|
<name>Embedded Gentoo</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="envtools">Build only the target-side environment tools</flag>
|
||||||
|
</use>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
@ -1,77 +0,0 @@
|
|||||||
# Copyright 1999-2021 Gentoo Authors
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI="7"
|
|
||||||
|
|
||||||
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="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 ~riscv x86"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="dev-libs/openssl:0="
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
BDEPEND="
|
|
||||||
sys-devel/bison
|
|
||||||
sys-devel/flex
|
|
||||||
virtual/pkgconfig
|
|
||||||
"
|
|
||||||
|
|
||||||
S=${WORKDIR}/${MY_P}
|
|
||||||
|
|
||||||
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 CC PKG_CONFIG
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
# Unset a few KBUILD variables. Bug #540476
|
|
||||||
unset KBUILD_OUTPUT KBUILD_SRC
|
|
||||||
|
|
||||||
emake \
|
|
||||||
V=1 \
|
|
||||||
AR="${AR}" \
|
|
||||||
CC="${CC}" \
|
|
||||||
HOSTCC="${CC}" \
|
|
||||||
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
|
|
||||||
HOSTLDFLAGS="${LDFLAGS}" \
|
|
||||||
tools-only_defconfig
|
|
||||||
|
|
||||||
emake \
|
|
||||||
V=1 \
|
|
||||||
NO_SDL=1 \
|
|
||||||
HOSTSTRIP=: \
|
|
||||||
STRIP=: \
|
|
||||||
AR="${AR}" \
|
|
||||||
CC="${CC}" \
|
|
||||||
HOSTCC="${CC}" \
|
|
||||||
HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
|
|
||||||
HOSTLDFLAGS="${LDFLAGS}" \
|
|
||||||
CONFIG_ENV_OVERWRITE=y \
|
|
||||||
tools-all
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() { :; }
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
cd tools || die
|
|
||||||
dobin bmp_logo dumpimage fdtgrep gen_eth_addr img2srec mkenvimage mkimage
|
|
||||||
dobin env/fw_printenv
|
|
||||||
dosym fw_printenv /usr/bin/fw_setenv
|
|
||||||
insinto /etc
|
|
||||||
doins env/fw_env.config
|
|
||||||
doman "${S}"/doc/mkimage.1
|
|
||||||
}
|
|
@ -0,0 +1,94 @@
|
|||||||
|
# Copyright 1999-2024 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
|
||||||
|
https://github.com/u-boot/u-boot/commit/88b9b9c44c859bdd9bb227e2fdbc4cbf686c3343.patch
|
||||||
|
-> u-boot-tools-2024.01-fix-invalid-escape-sequence.patch
|
||||||
|
"
|
||||||
|
S="${WORKDIR}/${MY_P}"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv x86"
|
||||||
|
IUSE="envtools"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/openssl:=
|
||||||
|
net-libs/gnutls:=
|
||||||
|
sys-apps/util-linux:=
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
BDEPEND="
|
||||||
|
dev-lang/swig
|
||||||
|
app-alternatives/yacc
|
||||||
|
app-alternatives/lex
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
# https://github.com/u-boot/u-boot/pull/489
|
||||||
|
"${DISTDIR}"/u-boot-tools-2024.01-fix-invalid-escape-sequence.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
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
|
||||||
|
tc-export_build_env
|
||||||
|
}
|
||||||
|
|
||||||
|
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="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)'
|
||||||
|
HOSTLDFLAGS="${BUILD_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 dumpimage fdtgrep gen_eth_addr img2srec mkeficapsule 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user