Quentin Schulz | 1e1a92b | 2024-01-17 18:59:10 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * (C) Copyright 2023 Theobroma Systems Design und Consulting GmbH |
| 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * setup_boottargets() - Swap mmc0 and mmc1 in boot_targets depending on U-Boot |
| 8 | * proper load medium. |
| 9 | * |
| 10 | * If bootsource is uSD-card we can assume that we want to use the |
| 11 | * SD-Card instead of the eMMC as first boot_target for distroboot. |
| 12 | * We only want to swap the defaults and not any custom environment a |
| 13 | * user has set. We exit early if a changed boot_targets environment |
| 14 | * is detected. |
| 15 | * |
| 16 | * Return: |
| 17 | * 0 if OK, -1 otherwise |
| 18 | */ |
| 19 | int setup_boottargets(void); |