/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2024 PHYTEC Messtechnik GmbH
 * Author: Daniel Schultz <d.schultz@phytec.de>
 */

/* Logic for TI K3 based SoCs to boot via network. */

#include <env/phytec/overlays.env>

netargs=setenv bootargs console=${console} root=/dev/nfs ip=dhcp rw
	nfsroot=${serverip}:${nfsroot},vers=4,tcp ${optargs}
netloadimage=${get_cmd} ${kernel_addr_r} ${serverip}:/Image
netloadfdt=${get_cmd} ${fdt_addr_r} ${serverip}:/${fdtfile}
netboot=echo DEPRECATION WARNING: netboot will be removed in future versions. Use standard boot instead.;
	run netargs;
	setenv autoload no;
	dhcp;
	run netloadimage;
	run netloadfdt;
	run net_apply_overlays;
	booti ${kernel_addr_r} - ${fdt_addr_r}
