blob: ad8d3a8b7642c380a7aa0fa75cae81fbf1aa64a9 [file] [log] [blame]
Daniel Schultzd0039d32024-07-16 22:11:31 -07001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2024 PHYTEC Messtechnik GmbH
4 * Author: Daniel Schultz <d.schultz@phytec.de>
5 */
6
7/* Logic for TI K3 based SoCs to boot from a MMC device. */
8
Daniel Schultz4d7437c2024-07-16 22:11:32 -07009#include <env/phytec/overlays.env>
Daniel Schultz18df5852024-08-30 02:09:30 -070010#include <env/phytec/rauc.env>
Daniel Schultz4d7437c2024-07-16 22:11:32 -070011
Daniel Schultzd0039d32024-07-16 22:11:31 -070012mmcargs=setenv bootargs console=${console} earlycon=${earlycon}
Daniel Schultz18df5852024-08-30 02:09:30 -070013 root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw
Daniel Schultzb59e7ed2024-08-30 02:09:29 -070014mmcloadimage=load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} Image
15mmcloadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
Daniel Schultz18df5852024-08-30 02:09:30 -070016mmcboot=if test ${doraucboot} = 1; then run raucinit; fi;
17 run mmcargs;
Daniel Schultzd0039d32024-07-16 22:11:31 -070018 mmc dev ${mmcdev};
19 mmc rescan;
Daniel Schultzb59e7ed2024-08-30 02:09:29 -070020 run mmcloadimage;
21 run mmcloadfdt;
Daniel Schultz4d7437c2024-07-16 22:11:32 -070022 run mmc_apply_overlays;
Daniel Schultzb59e7ed2024-08-30 02:09:29 -070023 booti ${kernel_addr_r} - ${fdt_addr_r}