This repository has been archived on 2025-09-06. You can view files and clone it, but cannot push or open issues/pull-requests.
home-assistant-yellow/repos/aimee-os/sys-boot/u-boot/u-boot-2023.01.ebuild

72 lines
1.7 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit savedconfig toolchain-funcs
MY_P="u-boot-${PV/_/-}"
DESCRIPTION="Das U-Boot firmware"
HOMEPAGE="http://www.denx.de/wiki/U-Boot"
SRC_URI="https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~arm64"
PATCHES=(
"${FILESDIR}"/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch
"${FILESDIR}"/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch
"${FILESDIR}"/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch
"${FILESDIR}"/0002-rpi-add-NVMe-to-boot-order.patch
"${FILESDIR}"/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch
"${FILESDIR}"/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch
"${FILESDIR}"/0005-nvme-improve-readability-of-nvme_setup_prps.patch
"${FILESDIR}"/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch
"${FILESDIR}"/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch
)
src_configure() {
restore_config .config
if [ -f .config ]; then
emake -j1 olddefconfig
else
# TODO Build images for other boards based on USE flags
emake -j1 rpi_4_defconfig
fi
tc-export AR BUILD_CC CC LD OBJCOPY PKG_CONFIG
tc-export_build_env
}
src_compile() {
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}"
LD="${LD}"
OBJCOPY="${OBJCOPY}"
)
emake "${myemakeargs[@]}" \
NO_SDL=1 \
HOSTSTRIP=: \
STRIP=: \
CONFIG_ENV_OVERWRITE=y
}
src_test() { :; }
src_install() {
save_config .config
insinto /usr/share/${PN}
doins u-boot.bin
}