Merge tag 'efi-next-20250105' of https://source.denx.de/u-boot/custodians/u-boot-efi
[u-boot.git] / include / env / distro / sf.h
blobee48a8a4e8fe4cb16d3ae09baac88c173d39d463
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright (C) 2020 Amarula Solutions(India)
5 * SF distro configurations.
6 */
8 #ifndef __DISTRO_SF_CONFIG_H
9 #define __DISTRO_SF_CONFIG_H
11 #if IS_ENABLED(CONFIG_CMD_SF)
12 #define BOOTENV_SHARED_SF(devtypel) \
13 #devtypel "_boot=" \
14 "if " #devtypel " probe ${busnum}; then " \
15 "devtype=" #devtypel "; " \
16 "run scan_sf_for_scripts; " \
17 "fi\0"
18 #define BOOTENV_DEV_SF(devtypeu, devtypel, instance) \
19 "bootcmd_" #devtypel #instance "=" \
20 "busnum=" #instance "; " \
21 "run " #devtypel "_boot\0"
22 #define BOOTENV_DEV_NAME_SF(devtypeu, devtypel, instance) \
23 #devtypel #instance " "
24 #else
25 #define BOOTENV_SHARED_SF(devtypel)
26 #define BOOTENV_DEV_SF \
27 BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
28 #define BOOTENV_DEV_NAME_SF \
29 BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF
31 #endif /* CONFIG_CMD_SF */
33 #define BOOTENV_SF \
34 BOOTENV_SHARED_SF(sf) \
35 "scan_sf_for_scripts=" \
36 "${devtype} read ${scriptaddr} " \
37 "${script_offset_f} ${script_size_f}; " \
38 "source ${scriptaddr}; " \
39 "echo SCRIPT FAILED: continuing...\0"
41 #endif /* __DISTRO_SF_CONFIG_H */