34 lines
1.5 KiB
Makefile
34 lines
1.5 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
PKG_NAME="u-boot-Odroid_N2"
|
|
PKG_VERSION="v2023.10"
|
|
PKG_LICENSE="GPL"
|
|
PKG_SITE="https://www.denx.de/wiki/U-Boot"
|
|
PKG_URL="https://github.com/u-boot/u-boot/archive/${PKG_VERSION}.tar.gz"
|
|
PKG_DEPENDS_TARGET="toolchain amlogic-boot-fip"
|
|
PKG_DEPENDS_UNPACK="amlogic-boot-fip"
|
|
PKG_LONGDESC="Das U-Boot is a cross-platform bootloader for embedded systems."
|
|
PKG_TOOLCHAIN="manual"
|
|
|
|
configure_package() {
|
|
PKG_UBOOT_CONFIG="odroid-n2_defconfig"
|
|
PKG_UBOOT_FIP="odroid-n2"
|
|
FIP_DIR="$(get_build_dir amlogic-boot-fip)"
|
|
}
|
|
|
|
make_target() {
|
|
[ "${BUILD_WITH_DEBUG}" = "yes" ] && PKG_DEBUG=1 || PKG_DEBUG=0
|
|
setup_pkg_config_host
|
|
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm make mrproper
|
|
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm make HOSTCC="${HOST_CC}" HOSTCFLAGS="-I${TOOLCHAIN}/include" HOSTLDFLAGS="${HOST_LDFLAGS}" ${PKG_UBOOT_CONFIG}
|
|
DEBUG=${PKG_DEBUG} CROSS_COMPILE="${TARGET_KERNEL_PREFIX}" LDFLAGS="" ARCH=arm _python_sysroot="${TOOLCHAIN}" _python_prefix=/ _python_exec_prefix=/ make HOSTCC="${HOST_CC}" HOSTCFLAGS="-I${TOOLCHAIN}/include" HOSTLDFLAGS="${HOST_LDFLAGS}" HOSTSTRIP="true" CONFIG_MKIMAGE_DTC_PATH="scripts/dtc/dtc"
|
|
|
|
cp -av ${PKG_BUILD}/u-boot.bin ${FIP_DIR}/${PKG_UBOOT_FIP}
|
|
cd ${FIP_DIR}
|
|
./build-fip.sh ${PKG_UBOOT_FIP} ${FIP_DIR}/${PKG_UBOOT_FIP}/u-boot.bin ${PKG_BUILD}
|
|
}
|
|
|
|
makeinstall_target() {
|
|
: # nothing
|
|
}
|