2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
tegra: flesh out bootcmd
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage
* Internal MMC (SD card or eMMC)
* If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in
partition 1 (although this may be overridden via the rootpart variable),
both ext2 and FAT filesystems are supported, the boot script may exist
in either / or /boot, and the boot script may be named boot.scr.uimg or
boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists
on the TFTP server. There is less flexibility here since those setting
up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot
image containing a script that will load the kernel, load any required
initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-16 06:21:00 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2010-2012
|
|
|
|
* NVIDIA Corporation <www.nvidia.com>
|
|
|
|
*/
|
|
|
|
|
2012-09-05 00:00:24 +00:00
|
|
|
#ifndef __TEGRA_COMMON_POST_H
|
|
|
|
#define __TEGRA_COMMON_POST_H
|
tegra: flesh out bootcmd
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage
* Internal MMC (SD card or eMMC)
* If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in
partition 1 (although this may be overridden via the rootpart variable),
both ext2 and FAT filesystems are supported, the boot script may exist
in either / or /boot, and the boot script may be named boot.scr.uimg or
boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists
on the TFTP server. There is less flexibility here since those setting
up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot
image containing a script that will load the kernel, load any required
initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-16 06:21:00 +00:00
|
|
|
|
2021-07-09 14:11:54 +00:00
|
|
|
#if CONFIG_IS_ENABLED(CMD_USB)
|
|
|
|
# define BOOT_TARGET_USB(func) func(USB, usb, 0)
|
|
|
|
#else
|
|
|
|
# define BOOT_TARGET_USB(func)
|
|
|
|
#endif
|
|
|
|
|
2019-04-15 09:32:24 +00:00
|
|
|
#ifndef BOOT_TARGET_DEVICES
|
2014-07-30 22:37:15 +00:00
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
|
|
|
func(MMC, mmc, 1) \
|
|
|
|
func(MMC, mmc, 0) \
|
2021-07-09 14:11:54 +00:00
|
|
|
BOOT_TARGET_USB(func) \
|
2014-07-30 22:37:15 +00:00
|
|
|
func(PXE, pxe, na) \
|
|
|
|
func(DHCP, dhcp, na)
|
2019-04-15 09:32:24 +00:00
|
|
|
#endif
|
2014-07-30 22:37:15 +00:00
|
|
|
#include <config_distro_bootcmd.h>
|
tegra: flesh out bootcmd
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage
* Internal MMC (SD card or eMMC)
* If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in
partition 1 (although this may be overridden via the rootpart variable),
both ext2 and FAT filesystems are supported, the boot script may exist
in either / or /boot, and the boot script may be named boot.scr.uimg or
boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists
on the TFTP server. There is less flexibility here since those setting
up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot
image containing a script that will load the kernel, load any required
initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-16 06:21:00 +00:00
|
|
|
|
2012-10-24 08:32:05 +00:00
|
|
|
#ifdef CONFIG_TEGRA_KEYBOARD
|
|
|
|
#define STDIN_KBD_KBC ",tegra-kbc"
|
|
|
|
#else
|
|
|
|
#define STDIN_KBD_KBC ""
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_USB_KEYBOARD
|
|
|
|
#define STDIN_KBD_USB ",usbkbd"
|
|
|
|
#else
|
|
|
|
#define STDIN_KBD_USB ""
|
|
|
|
#endif
|
|
|
|
|
2022-10-18 13:46:31 +00:00
|
|
|
#ifdef CONFIG_VIDEO
|
2016-01-30 23:37:49 +00:00
|
|
|
#define STDOUT_VIDEO ",vidconsole"
|
|
|
|
#else
|
|
|
|
#define STDOUT_VIDEO ""
|
|
|
|
#endif
|
|
|
|
|
2015-06-05 20:39:32 +00:00
|
|
|
#ifdef CONFIG_CROS_EC_KEYB
|
|
|
|
#define STDOUT_CROS_EC ",cros-ec-keyb"
|
|
|
|
#else
|
|
|
|
#define STDOUT_CROS_EC ""
|
|
|
|
#endif
|
|
|
|
|
2012-10-24 08:32:05 +00:00
|
|
|
#define TEGRA_DEVICE_SETTINGS \
|
2015-06-05 20:39:32 +00:00
|
|
|
"stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
|
2022-10-18 12:10:04 +00:00
|
|
|
"stdout=serial" STDOUT_VIDEO "\0" \
|
|
|
|
"stderr=serial" STDOUT_VIDEO "\0" \
|
2013-01-22 06:20:07 +00:00
|
|
|
""
|
2012-10-24 08:32:05 +00:00
|
|
|
|
2014-01-23 20:17:01 +00:00
|
|
|
#ifndef BOARD_EXTRA_ENV_SETTINGS
|
|
|
|
#define BOARD_EXTRA_ENV_SETTINGS
|
|
|
|
#endif
|
|
|
|
|
2015-03-04 23:36:00 +00:00
|
|
|
#ifdef CONFIG_ARM64
|
|
|
|
#define FDT_HIGH "ffffffffffffffff"
|
|
|
|
#define INITRD_HIGH "ffffffffffffffff"
|
|
|
|
#else
|
|
|
|
#define FDT_HIGH "ffffffff"
|
|
|
|
#define INITRD_HIGH "ffffffff"
|
|
|
|
#endif
|
|
|
|
|
tegra: flesh out bootcmd
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage
* Internal MMC (SD card or eMMC)
* If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in
partition 1 (although this may be overridden via the rootpart variable),
both ext2 and FAT filesystems are supported, the boot script may exist
in either / or /boot, and the boot script may be named boot.scr.uimg or
boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists
on the TFTP server. There is less flexibility here since those setting
up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot
image containing a script that will load the kernel, load any required
initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-16 06:21:00 +00:00
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
2012-09-05 00:00:24 +00:00
|
|
|
TEGRA_DEVICE_SETTINGS \
|
2012-10-02 09:26:51 +00:00
|
|
|
MEM_LAYOUT_ENV_SETTINGS \
|
2015-03-04 23:36:00 +00:00
|
|
|
"fdt_high=" FDT_HIGH "\0" \
|
|
|
|
"initrd_high=" INITRD_HIGH "\0" \
|
2014-07-30 22:37:15 +00:00
|
|
|
BOOTENV \
|
2022-03-30 22:07:25 +00:00
|
|
|
BOARD_EXTRA_ENV_SETTINGS
|
tegra: flesh out bootcmd
This implements a useful bootcmd for Tegra. The boot order is:
* If USB enabled, USB storage
* Internal MMC (SD card or eMMC)
* If networking is enabled, BOOTP/TFTP
When booting from USB or MMC, the boot script is assumed to be in
partition 1 (although this may be overridden via the rootpart variable),
both ext2 and FAT filesystems are supported, the boot script may exist
in either / or /boot, and the boot script may be named boot.scr.uimg or
boot.scr.
When booting over the network, it is assumed that boot.scr.uimg exists
on the TFTP server. There is less flexibility here since those setting
up network booting are expected to need less hand-holding.
In all cases, it is expected that the initial file loaded is a U-Boot
image containing a script that will load the kernel, load any required
initrd, load any required DTB, and finally bootm the kernel.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-05-16 06:21:00 +00:00
|
|
|
|
2013-03-16 18:58:13 +00:00
|
|
|
#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
|
2014-10-14 05:42:13 +00:00
|
|
|
#define CONFIG_TEGRA_SPI
|
2013-03-16 18:58:07 +00:00
|
|
|
#endif
|
|
|
|
|
2012-09-05 00:00:24 +00:00
|
|
|
#endif /* __TEGRA_COMMON_POST_H */
|