Commit 89488f17 authored by Milan P. Stanić's avatar Milan P. Stanić

main/u-boot: build uboot-tools from u-boot aport

we build u-boot packages and u-boot-tools in two aports. this patch make
u-boot-tools from same aports where u-boot packages are built
parent cc25a985
Pipeline #68296 passed with stages
in 19 minutes and 20 seconds
......@@ -3,14 +3,14 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=u-boot
pkgver=2021.01
pkgrel=0
pkgrel=2
pkgdesc="u-boot bootloader common files"
url="https://www.denx.de/wiki/U-Boot/"
arch="armhf armv7 aarch64"
arch="armhf armv7 aarch64 x86_64 x86"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
ISC LGPL-2.0-only LGPL-2.1-only X11"
makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
py3-setuptools"
py3-setuptools linux-headers"
if [ "$CARCH" = "aarch64" ]; then
makedepends="$makedepends arm-trusted-firmware-sun50i"
fi
......@@ -45,7 +45,11 @@ _allboards=""
for board_config in $board_configs; do
_allboards="$_allboards $pkgname-${board_config%%:*}"
done
subpackages="$pkgname-all:_all $_allboards"
subpackages="$_allboards $pkgname-tools"
case "$CARCH" in
arm*|aarch64) subpackages="$pkgname-all:_all $_allboards $pkgname-tools";;
esac
build() {
cd "$builddir"
......@@ -71,15 +75,40 @@ build() {
make O="$BUILD_DIR" all || return 1
done
done
msg "Building u-boot-tools"
make tools-only_defconfig
make tools-all
}
package() {
case "$CARCH" in
x86*) return;;
esac
cd "$builddir"/build
mkdir -p "$pkgdir"/usr/share/$pkgname "$pkgdir"/usr/sbin
install "$srcdir"/README.txt "$pkgdir"/usr/share/$pkgname/README.txt || return 1
install "$srcdir"/update-u-boot "$pkgdir"/usr/sbin || return 1
}
tools() {
pkgdesc="u-boot bootloader utility tools"
provides="uboot-tools"
replaces="uboot-tools"
mkdir -p $pkgdir
mkdir $subpkgdir
cd "$builddir"
for tool in bmp_logo dumpimage env/fw_printenv \
fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr img2srec \
mkenvimage mkimage ncb proftool ubsha1 xway-swap-bytes env/fw_printenv; do
install -D tools/$tool \
$subpkgdir/usr/bin/$(basename $tool)
done
install -Dm644 tools/env/fw_env.config \
"${subpkgdir}/usr/share/doc/${pkgname}/examples/fw_env.config"
cd "$subpkgdir"/usr/bin
ln -sf fw_printenv fw_setenv
}
_all() {
pkgdesc="u-boot for all boards (meta package)"
depends="$_allboards"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment