u-boot/include/env/tq/spi.env
Markus Niebel de27ed88b3 env: tq: add shareable environment settings
Prepare moving boiler plate code out of board confguration header and
prepare to share a lot of things between boards.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
2026-04-02 09:05:46 -03:00

24 lines
565 B
Bash

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright (c) 2024-2026 TQ-Systems GmbH <u-boot@ew.tq-group.com>,
* D-82229 Seefeld, Germany.
* Author: Max Merchel
*
* shared spi environment for TQ boards
*/
update_uboot_spi=
run check_ipaddr;
if tftp ${uboot}; then
if itest "${filesize}" >= "${uboot_spi_size}"; then
echo "ERROR: size to large ...";
exit;
fi;
echo "Write u-boot image to SPI NOR ...";
if sf probe; then
run write_uboot_spi;
fi;
fi;
write_uboot_spi=sf update "${loadaddr}" "${uboot_spi_start}" "${filesize}"