sys-boot/u-boot: add nanopi-m4m2 support

This commit is contained in:
Martin Sekera 2021-04-26 18:09:20 +02:00
parent b9bcfd0f2e
commit f6984f9107
4 changed files with 222 additions and 5 deletions

View file

@ -13,7 +13,7 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* arm64"
UBOOT_ALL_DEFCONFIGS=( pinebook-pro-rk3399 )
UBOOT_ALL_DEFCONFIGS=( pinebook-pro-rk3399 nanopi-m4v2-rk3399 )
IUSE="${UBOOT_ALL_DEFCONFIGS[@]/#/uboot_defconfigs_}"
REQUIRED_USE="^^ ( ${IUSE} )"
@ -24,10 +24,6 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/0002-Correct-boot-order-to-be-USB-SD-eMMC.patch"
"${FILESDIR}/0003-Enable-the-power-LED-during-early-startup.patch"
)
uboot_get_defconfig() {
local cfg
@ -41,6 +37,17 @@ uboot_get_defconfig() {
die "no uboot_defconfigs_ set"
}
src_prepare() {
epatch "${FILESDIR}/rk3399-all.boot-order-usb-sd-mmc.patch"
if use uboot_defconfigs_pinebook-pro-rk3399; then
epatch "${FILESDIR}/rk3399-pinebook-pro.power-led.patch"
fi
if use uboot_defconfigs_nanopi-m4v2-rk3399; then
epatch "${FILESDIR}/rk3399-nanopi-m4v2.add.patch"
fi
}
src_configure() {
emake $(uboot_get_defconfig)