diff --git a/config/boards/orangepi5.conf b/config/boards/orangepi5.conf index 17c5ad527..28f38c4e0 100644 --- a/config/boards/orangepi5.conf +++ b/config/boards/orangepi5.conf @@ -101,6 +101,28 @@ function pre_config_uboot_target__orangepi5_patch_uboot_bootconfig_hack_for_sata fi } + +function post_config_uboot_target__orangepi5_keep_sata_bootconfig() { + if [[ $BRANCH == "vendor" ]]; then + return + fi + + display_alert "u-boot for ${BOARD}" "u-boot: hack bootconfig for sata spi image" "info" + + if [[ $BOOTCONFIG == "orangepi-5-sata-rk3588s_defconfig" ]]; then + cp .config ${uboottempdir}/.config.sata + fi +} + +function pre_package_uboot_image__orangepi5_copy_sataconfig_to_pacage() { + if [[ $BRANCH == "vendor" ]]; then + return + fi + + run_host_command_logged cp ${uboottempdir}/.config.sata "$uboottempdir/usr/lib/u-boot/orangepi-5-sata-rk3588s_defconfig" + run_host_command_logged rm ${uboottempdir}/.config.sata +} + function post_family_tweaks_bsp__orangepi5_copy_usb2_service() { if [[ $BRANCH == "edge" || $BRANCH == "current" ]]; then return