68 lines
1.9 KiB
Bash
68 lines
1.9 KiB
Bash
# Template file for 'u-boot-tools'
|
|
pkgname=u-boot-tools
|
|
version=2022.04
|
|
revision=1
|
|
wrksrc="u-boot-${version}"
|
|
build_style=gnu-makefile
|
|
make_build_args="HOSTSTRIP=: STRIP=: NO_SDL=1"
|
|
make_build_target="tools-all tools-only envtools"
|
|
hostmakedepends="bison flex which"
|
|
makedepends="openssl-devel libuuid-devel gnutls-devel ncurses-libtinfo-devel"
|
|
short_desc="Das U-Boot tools"
|
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://www.denx.de/wiki/U-Boot/"
|
|
distfiles="ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
|
|
checksum=68e065413926778e276ec3abd28bb32fa82abaa4a6898d570c1f48fbdb08bcd0
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make_build_args+=" CROSS_BUILD_TOOLS=y CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
|
hostmakedepends+=" u-boot-tools"
|
|
fi
|
|
|
|
post_extract() {
|
|
vsed '1itypedef unsigned long ulong;' \
|
|
-i include/image.h \
|
|
-i include/env.h \
|
|
-i tools/mkimage.h \
|
|
-i tools/proftool.c
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
vsed -e 's;^\t$(obj)/bmp_logo;\tbmp_logo;g' -i tools/Makefile
|
|
fi
|
|
}
|
|
|
|
do_configure() {
|
|
make ${makejobs} ${make_build_args} tools-only_defconfig
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs} ${make_build_args} tools-all
|
|
make ${makejobs} ${make_build_args} tools-only
|
|
make ${makejobs} ${make_build_args} envtools
|
|
}
|
|
|
|
do_check() {
|
|
# skip tests for now. requires some gymnastics to make the python scripts
|
|
# find libfdt. the most useful target appears to be "make tcheck"
|
|
: ;
|
|
}
|
|
|
|
do_install() {
|
|
ln -sf fw_printenv tools/env/fw_setenv
|
|
for x in bmp_logo dumpimage fdtgrep fit_check_sign fit_info gen_eth_addr \
|
|
gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage \
|
|
proftool spl_size_limit env/fw_printenv env/fw_setenv; do
|
|
vbin "tools/$x"
|
|
if [ -r "doc/${x}.1" ]; then
|
|
vman "doc/${x}.1"
|
|
fi
|
|
done
|
|
}
|
|
|
|
uboot-mkimage_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - (transitional meta package)"
|
|
build_style=meta
|
|
}
|