blob: 0e0da458b90b800bb4ac011c08ba2aaa6b3efb72 [file] [log] [blame]
Faiz Abbas097fd512019-02-27 13:29:38 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Nishanth Menona94a4072023-11-01 15:56:03 -05003 * Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com
Faiz Abbas097fd512019-02-27 13:29:38 +05304 *
5 * Environment variable definitions for NAND on TI boards.
6 */
7
Miquel Raynal88718be2019-10-03 19:50:03 +02008#ifdef CONFIG_MTD_RAW_NAND
Faiz Abbas097fd512019-02-27 13:29:38 +05309#define NANDARGS \
10 "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
11 "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
12 "nandargs=setenv bootargs console=${console} " \
13 "${optargs} " \
14 "root=${nandroot} " \
15 "rootfstype=${nandrootfstype}\0" \
16 "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
Michael Trimarchi98303ce2022-05-22 15:22:08 +020017 "nandrootfstype=ubifs rootwait\0" \
Faiz Abbas097fd512019-02-27 13:29:38 +053018 "nandboot=echo Booting from nand ...; " \
19 "run nandargs; " \
20 "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
21 "nand read ${loadaddr} NAND.kernel; " \
22 "bootz ${loadaddr} - ${fdtaddr}\0"
23#else
24#define NANDARGS ""
25#endif