@@ -81,6 +81,7 @@ uboot_compile_config () {
for binary in ${UBOOT_BINARIES}; do
k=$(expr $k + 1);
if [ $k -eq $i ]; then
+ uboot_compile_config_prepare_binary $config $type $binary
uboot_compile_config_copy_binary $config $type $binary
fi
done
@@ -93,6 +94,13 @@ uboot_compile_config () {
fi
}
+# Do nothing by default, this is a hook to be extended by BSP recipes
+uboot_compile_config_prepare_binary () {
+ config=$1
+ type=$2
+ binary=$3
+}
+
uboot_compile_config_copy_binary () {
config=$1
type=$2
BSP layers might need to perform additional steps on the U-Boot binary, which are not a part of the oe_runmake invocation. For example, the binary might need to be signed or converted to the Android boot image. In order to let BSP recipes to perform such tasks without duplicating u-boot.inc functions, add a special hook to be called before uboot_compile_config_copy_binary(). Note: it is of course possible to push necessary steps into uboot_compile_config_copy_binary() itself, but it doesn't look as clean as just adding a hook. Cc: Koen Kooi <koen.kooi@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> --- meta/recipes-bsp/u-boot/u-boot.inc | 8 ++++++++ 1 file changed, 8 insertions(+)