12a43201aSDennis Gilmore /* 22a43201aSDennis Gilmore * (C) Copyright 2014 32a43201aSDennis Gilmore * NVIDIA Corporation <www.nvidia.com> 42a43201aSDennis Gilmore * 52a43201aSDennis Gilmore * Copyright 2014 Red Hat, Inc. 62a43201aSDennis Gilmore * 72a43201aSDennis Gilmore * SPDX-License-Identifier: GPL-2.0+ 82a43201aSDennis Gilmore */ 92a43201aSDennis Gilmore 102a43201aSDennis Gilmore #ifndef _CONFIG_CMD_DISTRO_BOOTCMD_H 112a43201aSDennis Gilmore #define _CONFIG_CMD_DISTRO_BOOTCMD_H 122a43201aSDennis Gilmore 1390b7caafSStephen Warren /* 1490b7caafSStephen Warren * A note on error handling: It is possible for BOOT_TARGET_DEVICES to 1590b7caafSStephen Warren * reference a device that is not enabled in the U-Boot configuration, e.g. 1690b7caafSStephen Warren * it may include MMC in the list without CONFIG_CMD_MMC being enabled. Given 1790b7caafSStephen Warren * that BOOT_TARGET_DEVICES is a macro that's expanded by the C pre-processor 1890b7caafSStephen Warren * at compile time, it's not possible to detect and report such problems via 1990b7caafSStephen Warren * a simple #ifdef/#error combination. Still, the code needs to report errors. 2090b7caafSStephen Warren * The best way I've found to do this is to make BOOT_TARGET_DEVICES expand to 2190b7caafSStephen Warren * reference a non-existent symbol, and have the name of that symbol encode 2290b7caafSStephen Warren * the error message. Consequently, this file contains references to e.g. 2390b7caafSStephen Warren * BOOT_TARGET_DEVICES_references_MMC_without_CONFIG_CMD_MMC. Given the 2490b7caafSStephen Warren * prevalence of capitals here, this looks like a pre-processor macro and 2590b7caafSStephen Warren * hence seems like it should be all capitals, but it's really an error 2690b7caafSStephen Warren * message that includes some other pre-processor symbols in the text. 2790b7caafSStephen Warren */ 2890b7caafSStephen Warren 29af21f2fbSHans de Goede /* We need the part command */ 30af21f2fbSHans de Goede #define CONFIG_PARTITION_UUIDS 31af21f2fbSHans de Goede #define CONFIG_CMD_PART 32af21f2fbSHans de Goede 332a43201aSDennis Gilmore #define BOOTENV_SHARED_BLKDEV_BODY(devtypel) \ 342a43201aSDennis Gilmore "if " #devtypel " dev ${devnum}; then " \ 352a43201aSDennis Gilmore "setenv devtype " #devtypel "; " \ 36735b1cfeSSjoerd Simons "run scan_dev_for_boot_part; " \ 372a43201aSDennis Gilmore "fi\0" 382a43201aSDennis Gilmore 392a43201aSDennis Gilmore #define BOOTENV_SHARED_BLKDEV(devtypel) \ 402a43201aSDennis Gilmore #devtypel "_boot=" \ 412a43201aSDennis Gilmore BOOTENV_SHARED_BLKDEV_BODY(devtypel) 422a43201aSDennis Gilmore 432a43201aSDennis Gilmore #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \ 442a43201aSDennis Gilmore "bootcmd_" #devtypel #instance "=" \ 452a43201aSDennis Gilmore "setenv devnum " #instance "; " \ 462a43201aSDennis Gilmore "run " #devtypel "_boot\0" 472a43201aSDennis Gilmore 482a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \ 492a43201aSDennis Gilmore #devtypel #instance " " 502a43201aSDennis Gilmore 51d0bce0d1SSjoerd Simons #ifdef CONFIG_SANDBOX 52d0bce0d1SSjoerd Simons #define BOOTENV_SHARED_HOST BOOTENV_SHARED_BLKDEV(host) 53d0bce0d1SSjoerd Simons #define BOOTENV_DEV_HOST BOOTENV_DEV_BLKDEV 54d0bce0d1SSjoerd Simons #define BOOTENV_DEV_NAME_HOST BOOTENV_DEV_NAME_BLKDEV 55d0bce0d1SSjoerd Simons #else 56d0bce0d1SSjoerd Simons #define BOOTENV_SHARED_HOST 57d0bce0d1SSjoerd Simons #define BOOTENV_DEV_HOST \ 58d0bce0d1SSjoerd Simons BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX 59d0bce0d1SSjoerd Simons #define BOOTENV_DEV_NAME_HOST \ 60d0bce0d1SSjoerd Simons BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX 61d0bce0d1SSjoerd Simons #endif 62d0bce0d1SSjoerd Simons 632a43201aSDennis Gilmore #ifdef CONFIG_CMD_MMC 642a43201aSDennis Gilmore #define BOOTENV_SHARED_MMC BOOTENV_SHARED_BLKDEV(mmc) 652a43201aSDennis Gilmore #define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV 662a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_MMC BOOTENV_DEV_NAME_BLKDEV 672a43201aSDennis Gilmore #else 682a43201aSDennis Gilmore #define BOOTENV_SHARED_MMC 692a43201aSDennis Gilmore #define BOOTENV_DEV_MMC \ 702a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_MMC_without_CONFIG_CMD_MMC 712a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_MMC \ 722a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_MMC_without_CONFIG_CMD_MMC 732a43201aSDennis Gilmore #endif 742a43201aSDennis Gilmore 7540d21547SRoy Spliet #ifdef CONFIG_CMD_UBIFS 7640d21547SRoy Spliet #define BOOTENV_SHARED_UBIFS \ 7740d21547SRoy Spliet "ubifs_boot=" \ 7840d21547SRoy Spliet "if ubi part UBI && ubifsmount ubi${devnum}:boot; then " \ 7940d21547SRoy Spliet "setenv devtype ubi; " \ 8040d21547SRoy Spliet "setenv bootpart 0; " \ 8140d21547SRoy Spliet "run scan_dev_for_boot; " \ 8240d21547SRoy Spliet "fi\0" 8340d21547SRoy Spliet #define BOOTENV_DEV_UBIFS BOOTENV_DEV_BLKDEV 8440d21547SRoy Spliet #define BOOTENV_DEV_NAME_UBIFS BOOTENV_DEV_NAME_BLKDEV 8540d21547SRoy Spliet #else 8640d21547SRoy Spliet #define BOOTENV_SHARED_UBIFS 8740d21547SRoy Spliet #define BOOTENV_DEV_UBIFS \ 8840d21547SRoy Spliet BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS 8940d21547SRoy Spliet #define BOOTENV_DEV_NAME_UBIFS \ 9040d21547SRoy Spliet BOOT_TARGET_DEVICES_references_UBIFS_without_CONFIG_CMD_UBIFS 9140d21547SRoy Spliet #endif 9240d21547SRoy Spliet 93*74522c89SAlexander Graf #ifdef CONFIG_EFI_LOADER 94*74522c89SAlexander Graf #if defined(CONFIG_ARM64) 95*74522c89SAlexander Graf #define BOOTEFI_NAME "bootaa64.efi" 96*74522c89SAlexander Graf #elif defined(CONFIG_ARM) 97*74522c89SAlexander Graf #define BOOTEFI_NAME "bootarm.efi" 98*74522c89SAlexander Graf #endif 99*74522c89SAlexander Graf #endif 100*74522c89SAlexander Graf 101*74522c89SAlexander Graf #ifdef BOOTEFI_NAME 102*74522c89SAlexander Graf #define BOOTENV_SHARED_EFI \ 103*74522c89SAlexander Graf "boot_efi_binary=" \ 104*74522c89SAlexander Graf "load ${devtype} ${devnum}:${distro_bootpart} " \ 105*74522c89SAlexander Graf "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ 106*74522c89SAlexander Graf "bootefi ${kernel_addr_r}\0" \ 107*74522c89SAlexander Graf \ 108*74522c89SAlexander Graf "load_efi_dtb=" \ 109*74522c89SAlexander Graf "load ${devtype} ${devnum}:${distro_bootpart} " \ 110*74522c89SAlexander Graf "${fdt_addr_r} ${prefix}${fdt_name}; " \ 111*74522c89SAlexander Graf "fdt addr ${fdt_addr_r}\0" \ 112*74522c89SAlexander Graf \ 113*74522c89SAlexander Graf "efi_dtb_prefixes=/ /dtb/ /dtb/current/\0" \ 114*74522c89SAlexander Graf "scan_dev_for_efi=" \ 115*74522c89SAlexander Graf "for prefix in ${efi_dtb_prefixes}; do " \ 116*74522c89SAlexander Graf "if test -e ${devtype} " \ 117*74522c89SAlexander Graf "${devnum}:${distro_bootpart} " \ 118*74522c89SAlexander Graf "${prefix}${fdt_name}; then " \ 119*74522c89SAlexander Graf "run load_efi_dtb; " \ 120*74522c89SAlexander Graf "fi;" \ 121*74522c89SAlexander Graf "done;" \ 122*74522c89SAlexander Graf "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ 123*74522c89SAlexander Graf "efi/boot/"BOOTEFI_NAME"; then " \ 124*74522c89SAlexander Graf "echo Found EFI removable media binary " \ 125*74522c89SAlexander Graf "efi/boot/"BOOTEFI_NAME"; " \ 126*74522c89SAlexander Graf "run boot_efi_binary; " \ 127*74522c89SAlexander Graf "echo EFI LOAD FAILED: continuing...; " \ 128*74522c89SAlexander Graf "fi; \0" 129*74522c89SAlexander Graf #define SCAN_DEV_FOR_EFI "run scan_dev_for_efi;" 130*74522c89SAlexander Graf #else 131*74522c89SAlexander Graf #define BOOTENV_SHARED_EFI 132*74522c89SAlexander Graf #define SCAN_DEV_FOR_EFI 133*74522c89SAlexander Graf #endif 134*74522c89SAlexander Graf 1352a43201aSDennis Gilmore #ifdef CONFIG_CMD_SATA 1362a43201aSDennis Gilmore #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata) 1372a43201aSDennis Gilmore #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV 1382a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV 1392a43201aSDennis Gilmore #else 1402a43201aSDennis Gilmore #define BOOTENV_SHARED_SATA 1412a43201aSDennis Gilmore #define BOOTENV_DEV_SATA \ 1422a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA 1432a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_SATA \ 1442a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_CMD_SATA 1452a43201aSDennis Gilmore #endif 1462a43201aSDennis Gilmore 1472a43201aSDennis Gilmore #ifdef CONFIG_CMD_SCSI 148a03bdaa1SHans de Goede #define BOOTENV_RUN_SCSI_INIT "run scsi_init; " 149a03bdaa1SHans de Goede #define BOOTENV_SET_SCSI_NEED_INIT "setenv scsi_need_init; " 150a03bdaa1SHans de Goede #define BOOTENV_SHARED_SCSI \ 151a03bdaa1SHans de Goede "scsi_init=" \ 152a03bdaa1SHans de Goede "if ${scsi_need_init}; then " \ 153a03bdaa1SHans de Goede "setenv scsi_need_init false; " \ 154a03bdaa1SHans de Goede "scsi scan; " \ 155a03bdaa1SHans de Goede "fi\0" \ 156a03bdaa1SHans de Goede \ 157a03bdaa1SHans de Goede "scsi_boot=" \ 158a03bdaa1SHans de Goede BOOTENV_RUN_SCSI_INIT \ 159a03bdaa1SHans de Goede BOOTENV_SHARED_BLKDEV_BODY(scsi) 1602a43201aSDennis Gilmore #define BOOTENV_DEV_SCSI BOOTENV_DEV_BLKDEV 1612a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_SCSI BOOTENV_DEV_NAME_BLKDEV 1622a43201aSDennis Gilmore #else 163a03bdaa1SHans de Goede #define BOOTENV_RUN_SCSI_INIT 164a03bdaa1SHans de Goede #define BOOTENV_SET_SCSI_NEED_INIT 1652a43201aSDennis Gilmore #define BOOTENV_SHARED_SCSI 1662a43201aSDennis Gilmore #define BOOTENV_DEV_SCSI \ 1672a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_CMD_SCSI 1682a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_SCSI \ 1692a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_CMD_SCSI 1702a43201aSDennis Gilmore #endif 1712a43201aSDennis Gilmore 1722a43201aSDennis Gilmore #ifdef CONFIG_CMD_IDE 1732a43201aSDennis Gilmore #define BOOTENV_SHARED_IDE BOOTENV_SHARED_BLKDEV(ide) 1742a43201aSDennis Gilmore #define BOOTENV_DEV_IDE BOOTENV_DEV_BLKDEV 1752a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_IDE BOOTENV_DEV_NAME_BLKDEV 1762a43201aSDennis Gilmore #else 1772a43201aSDennis Gilmore #define BOOTENV_SHARED_IDE 1782a43201aSDennis Gilmore #define BOOTENV_DEV_IDE \ 1792a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_CMD_IDE 1802a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_IDE \ 1812a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_CMD_IDE 1822a43201aSDennis Gilmore #endif 1832a43201aSDennis Gilmore 184986691fbSStephen Warren #if defined(CONFIG_CMD_PCI_ENUM) || defined(CONFIG_DM_PCI) 185986691fbSStephen Warren #define BOOTENV_RUN_NET_PCI_ENUM "run boot_net_pci_enum; " 186986691fbSStephen Warren #define BOOTENV_SHARED_PCI \ 187986691fbSStephen Warren "boot_net_pci_enum=pci enum\0" 188986691fbSStephen Warren #else 189986691fbSStephen Warren #define BOOTENV_RUN_NET_PCI_ENUM 190986691fbSStephen Warren #define BOOTENV_SHARED_PCI 191986691fbSStephen Warren #endif 192986691fbSStephen Warren 1932a43201aSDennis Gilmore #ifdef CONFIG_CMD_USB 1943483b75dSStephen Warren #define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; " 1952a43201aSDennis Gilmore #define BOOTENV_SHARED_USB \ 1963483b75dSStephen Warren "boot_net_usb_start=usb start\0" \ 1972a43201aSDennis Gilmore "usb_boot=" \ 1983483b75dSStephen Warren "usb start; " \ 1992a43201aSDennis Gilmore BOOTENV_SHARED_BLKDEV_BODY(usb) 2002a43201aSDennis Gilmore #define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV 2012a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV 2022a43201aSDennis Gilmore #else 2033483b75dSStephen Warren #define BOOTENV_RUN_NET_USB_START 2042a43201aSDennis Gilmore #define BOOTENV_SHARED_USB 2052a43201aSDennis Gilmore #define BOOTENV_DEV_USB \ 2062a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB 2072a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_USB \ 2082a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB 2092a43201aSDennis Gilmore #endif 2102a43201aSDennis Gilmore 2112a43201aSDennis Gilmore #if defined(CONFIG_CMD_DHCP) 2122a43201aSDennis Gilmore #define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \ 2132a43201aSDennis Gilmore "bootcmd_dhcp=" \ 2143483b75dSStephen Warren BOOTENV_RUN_NET_USB_START \ 215986691fbSStephen Warren BOOTENV_RUN_NET_PCI_ENUM \ 216cc11b392SStephen Warren "if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \ 2172a43201aSDennis Gilmore "source ${scriptaddr}; " \ 2182a43201aSDennis Gilmore "fi\0" 2192a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \ 2202a43201aSDennis Gilmore "dhcp " 2212a43201aSDennis Gilmore #else 2222a43201aSDennis Gilmore #define BOOTENV_DEV_DHCP \ 2232a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_DHCP_without_CONFIG_CMD_DHCP 2242a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_DHCP \ 2252a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_DHCP_without_CONFIG_CMD_DHCP 2262a43201aSDennis Gilmore #endif 2272a43201aSDennis Gilmore 2282a43201aSDennis Gilmore #if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE) 2292a43201aSDennis Gilmore #define BOOTENV_DEV_PXE(devtypeu, devtypel, instance) \ 2302a43201aSDennis Gilmore "bootcmd_pxe=" \ 2313483b75dSStephen Warren BOOTENV_RUN_NET_USB_START \ 232986691fbSStephen Warren BOOTENV_RUN_NET_PCI_ENUM \ 2332a43201aSDennis Gilmore "dhcp; " \ 2342a43201aSDennis Gilmore "if pxe get; then " \ 2352a43201aSDennis Gilmore "pxe boot; " \ 2362a43201aSDennis Gilmore "fi\0" 2372a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_PXE(devtypeu, devtypel, instance) \ 2382a43201aSDennis Gilmore "pxe " 2392a43201aSDennis Gilmore #else 2402a43201aSDennis Gilmore #define BOOTENV_DEV_PXE \ 2412a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE 2422a43201aSDennis Gilmore #define BOOTENV_DEV_NAME_PXE \ 2432a43201aSDennis Gilmore BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE 2442a43201aSDennis Gilmore #endif 2452a43201aSDennis Gilmore 2462a43201aSDennis Gilmore #define BOOTENV_DEV_NAME(devtypeu, devtypel, instance) \ 2472a43201aSDennis Gilmore BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance) 2482a43201aSDennis Gilmore #define BOOTENV_BOOT_TARGETS \ 2492a43201aSDennis Gilmore "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0" 2502a43201aSDennis Gilmore 2512a43201aSDennis Gilmore #define BOOTENV_DEV(devtypeu, devtypel, instance) \ 2522a43201aSDennis Gilmore BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance) 2532a43201aSDennis Gilmore #define BOOTENV \ 254d0bce0d1SSjoerd Simons BOOTENV_SHARED_HOST \ 2552a43201aSDennis Gilmore BOOTENV_SHARED_MMC \ 256986691fbSStephen Warren BOOTENV_SHARED_PCI \ 2572a43201aSDennis Gilmore BOOTENV_SHARED_USB \ 2582a43201aSDennis Gilmore BOOTENV_SHARED_SATA \ 2592a43201aSDennis Gilmore BOOTENV_SHARED_SCSI \ 2602a43201aSDennis Gilmore BOOTENV_SHARED_IDE \ 26140d21547SRoy Spliet BOOTENV_SHARED_UBIFS \ 262*74522c89SAlexander Graf BOOTENV_SHARED_EFI \ 2632a43201aSDennis Gilmore "boot_prefixes=/ /boot/\0" \ 2642a43201aSDennis Gilmore "boot_scripts=boot.scr.uimg boot.scr\0" \ 265cc11b392SStephen Warren "boot_script_dhcp=boot.scr.uimg\0" \ 2662a43201aSDennis Gilmore BOOTENV_BOOT_TARGETS \ 2672a43201aSDennis Gilmore \ 2682a43201aSDennis Gilmore "boot_extlinux=" \ 26959d03cb3SSjoerd Simons "sysboot ${devtype} ${devnum}:${distro_bootpart} any " \ 2702a43201aSDennis Gilmore "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \ 2712a43201aSDennis Gilmore \ 2722a43201aSDennis Gilmore "scan_dev_for_extlinux=" \ 27359d03cb3SSjoerd Simons "if test -e ${devtype} " \ 27459d03cb3SSjoerd Simons "${devnum}:${distro_bootpart} " \ 2752a43201aSDennis Gilmore "${prefix}extlinux/extlinux.conf; then " \ 2762a43201aSDennis Gilmore "echo Found ${prefix}extlinux/extlinux.conf; " \ 2772a43201aSDennis Gilmore "run boot_extlinux; " \ 2782a43201aSDennis Gilmore "echo SCRIPT FAILED: continuing...; " \ 2792a43201aSDennis Gilmore "fi\0" \ 2802a43201aSDennis Gilmore \ 2812a43201aSDennis Gilmore "boot_a_script=" \ 28259d03cb3SSjoerd Simons "load ${devtype} ${devnum}:${distro_bootpart} " \ 2832a43201aSDennis Gilmore "${scriptaddr} ${prefix}${script}; " \ 2842a43201aSDennis Gilmore "source ${scriptaddr}\0" \ 2852a43201aSDennis Gilmore \ 2862a43201aSDennis Gilmore "scan_dev_for_scripts=" \ 2872a43201aSDennis Gilmore "for script in ${boot_scripts}; do " \ 28859d03cb3SSjoerd Simons "if test -e ${devtype} " \ 28959d03cb3SSjoerd Simons "${devnum}:${distro_bootpart} " \ 2902a43201aSDennis Gilmore "${prefix}${script}; then " \ 2912a43201aSDennis Gilmore "echo Found U-Boot script " \ 2922a43201aSDennis Gilmore "${prefix}${script}; " \ 2932a43201aSDennis Gilmore "run boot_a_script; " \ 2942a43201aSDennis Gilmore "echo SCRIPT FAILED: continuing...; " \ 2952a43201aSDennis Gilmore "fi; " \ 2962a43201aSDennis Gilmore "done\0" \ 2972a43201aSDennis Gilmore \ 2982a43201aSDennis Gilmore "scan_dev_for_boot=" \ 29959d03cb3SSjoerd Simons "echo Scanning ${devtype} " \ 30059d03cb3SSjoerd Simons "${devnum}:${distro_bootpart}...; " \ 3012a43201aSDennis Gilmore "for prefix in ${boot_prefixes}; do " \ 3022a43201aSDennis Gilmore "run scan_dev_for_extlinux; " \ 3032a43201aSDennis Gilmore "run scan_dev_for_scripts; " \ 304*74522c89SAlexander Graf "done;" \ 305*74522c89SAlexander Graf SCAN_DEV_FOR_EFI \ 306*74522c89SAlexander Graf "\0" \ 3072a43201aSDennis Gilmore \ 308735b1cfeSSjoerd Simons "scan_dev_for_boot_part=" \ 309f643d929SSjoerd Simons "part list ${devtype} ${devnum} -bootable devplist; " \ 310f643d929SSjoerd Simons "env exists devplist || setenv devplist 1; " \ 31159d03cb3SSjoerd Simons "for distro_bootpart in ${devplist}; do " \ 31259d03cb3SSjoerd Simons "if fstype ${devtype} " \ 31359d03cb3SSjoerd Simons "${devnum}:${distro_bootpart} " \ 314735b1cfeSSjoerd Simons "bootfstype; then " \ 315735b1cfeSSjoerd Simons "run scan_dev_for_boot; " \ 316735b1cfeSSjoerd Simons "fi; " \ 317735b1cfeSSjoerd Simons "done\0" \ 318735b1cfeSSjoerd Simons \ 3192a43201aSDennis Gilmore BOOT_TARGET_DEVICES(BOOTENV_DEV) \ 3202a43201aSDennis Gilmore \ 321453c6cc1SSjoerd Simons "distro_bootcmd=" BOOTENV_SET_SCSI_NEED_INIT \ 3222a43201aSDennis Gilmore "for target in ${boot_targets}; do " \ 3232a43201aSDennis Gilmore "run bootcmd_${target}; " \ 3242a43201aSDennis Gilmore "done\0" 3252a43201aSDennis Gilmore 326453c6cc1SSjoerd Simons #ifndef CONFIG_BOOTCOMMAND 327453c6cc1SSjoerd Simons #define CONFIG_BOOTCOMMAND "run distro_bootcmd" 328453c6cc1SSjoerd Simons #endif 329453c6cc1SSjoerd Simons 3302a43201aSDennis Gilmore #endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */ 331