# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/u-boot/u-boot.conf # Copyright (C) 2006 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # maybe set MY_ARCH, too, otherwise their Makefile sed's CROSS_COMPILE: makeopt="CROSS_COMPILE=$archprefix -j$SDECFG_PARALLEL_MAX" makeinstopt= board="none" case "$arch" in avr32) case "$SDECFG_AVR32_BOARDDEF" in atngw100|atstk100*) board=$SDECFG_AVR32_BOARDDEF ;; esac ;; arm) board=$SDECFG_ARM_BOARDDEF ;; riscv) export OPENSBI="$root/boot/fw_dynamic.bin" board=sifive_unleashed ;; riscv64) export OPENSBI="$root/boot/fw_dynamic.bin" board=sifive_unmatched ;; esac [ ! "$board" -o "$board" = "none" ] && abort "TODO: Add $arch and board configuration" hook_add premake 3 'eval $MAKE ${board}_defconfig' hook_add postmake 3 'eval $MAKE $makeopt env' u_boot_install() { local toolsbin=$base/build/$SDECFG_ID/TOOLCHAIN/$toolsdir/bin/mkimage atstage native && toolsbin=$root$sbindir/mkimage install tools/mkimage $toolsbin #install tools/env/fw_printenv $root$sbindir install u-boot.* $root/boot/ [[ "$arch" = riscv* ]] && install spl/u-boot-spl.bin $root/boot/ ln -sf fw_printenv $root$sbindir/fw_setenv } hook_add postmake 5 'u_boot_install'