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>
|
|
|
|
*
|
2013-07-08 07:37:19 +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
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
2014-07-30 22:37:15 +00:00
|
|
|
#ifndef CONFIG_SPL_BUILD
|
|
|
|
#define BOOT_TARGET_DEVICES(func) \
|
|
|
|
func(MMC, mmc, 1) \
|
|
|
|
func(MMC, mmc, 0) \
|
|
|
|
func(USB, usb, 0) \
|
|
|
|
func(PXE, pxe, na) \
|
|
|
|
func(DHCP, dhcp, na)
|
|
|
|
#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
|
|
|
#else
|
2014-07-30 22:37:15 +00:00
|
|
|
#define BOOTENV
|
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
|
|
|
#endif
|
|
|
|
|
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"
|
|
|
|
#define CONFIG_SYS_USB_EVENT_POLL
|
|
|
|
#define CONFIG_PREBOOT "usb start"
|
|
|
|
#else
|
|
|
|
#define STDIN_KBD_USB ""
|
|
|
|
#endif
|
|
|
|
|
2013-01-22 06:20:07 +00:00
|
|
|
#ifdef CONFIG_VIDEO_TEGRA
|
|
|
|
#define STDOUT_LCD ",lcd"
|
|
|
|
#else
|
|
|
|
#define STDOUT_LCD ""
|
|
|
|
#endif
|
|
|
|
|
2012-10-24 08:32:05 +00:00
|
|
|
#define TEGRA_DEVICE_SETTINGS \
|
|
|
|
"stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \
|
2013-01-22 06:20:07 +00:00
|
|
|
"stdout=serial" STDOUT_LCD "\0" \
|
|
|
|
"stderr=serial" STDOUT_LCD "\0" \
|
|
|
|
""
|
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
|
|
|
|
|
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 \
|
ARM: tegra: set initrd_high so boot scripts work
During bootm/z, U-Boot relocates the DTB and initrd to high memory so
they are out of the way of the kernel. On ARM at least, some parts of
high memory are "highmem" and can't be accessed at early boot. To solve
this, we need to restrict this relocation process to use lower parts of
RAM that area accessible.
For the DTB, an earlier patch of mine set CONFIG_SYS_BOOTMAPSZ. However,
since some platforms have different restrictions on DTB and initrd
location, that config option doesn't affect the initrd. We need to set
the initrd_high environment variable to control the initrd relocation.
Since we have carefully chosen the load addresses for the DTB and
initrd (see comments in include/configs/tegraNNN-common.h re: values in
MEM_LAYOUT_ENV_SETTINGS), we don't actually need any DTB or initrd
relocation at all. Skipping relocation removes some redundant work.
Hence, set both fdt_high and initrd_high to ffffffff which completely
disables relocation.
If the user does something unusual, such as using custom locations for
the DTB/initrd load address or wanting to use DTB/initrd relocation for
some reason, they can simply set these variables to custom values to
override these environment defaults.
With this change, cmd_sysboot works correctly for a filesystem created
by the Fedora installer.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2014-06-19 16:52:59 +00:00
|
|
|
"fdt_high=ffffffff\0" \
|
|
|
|
"initrd_high=ffffffff\0" \
|
2014-07-30 22:37:15 +00:00
|
|
|
BOOTENV \
|
2014-01-23 20:17:01 +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)
|
2013-03-16 18:58:07 +00:00
|
|
|
#define CONFIG_FDT_SPI
|
|
|
|
#endif
|
|
|
|
|
2012-08-31 08:30:12 +00:00
|
|
|
/* overrides for SPL build here */
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
|
|
|
|
2013-05-21 13:45:18 +00:00
|
|
|
#define CONFIG_SKIP_LOWLEVEL_INIT
|
|
|
|
|
2012-08-31 08:30:12 +00:00
|
|
|
/* remove devicetree support */
|
|
|
|
#ifdef CONFIG_OF_CONTROL
|
|
|
|
#undef CONFIG_OF_CONTROL
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* remove I2C support */
|
2012-10-30 07:28:53 +00:00
|
|
|
#ifdef CONFIG_SYS_I2C_TEGRA
|
|
|
|
#undef CONFIG_SYS_I2C_TEGRA
|
2012-08-31 08:30:12 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_I2C
|
|
|
|
#undef CONFIG_CMD_I2C
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* remove MMC support */
|
|
|
|
#ifdef CONFIG_MMC
|
|
|
|
#undef CONFIG_MMC
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_GENERIC_MMC
|
|
|
|
#undef CONFIG_GENERIC_MMC
|
|
|
|
#endif
|
2012-09-05 00:00:24 +00:00
|
|
|
#ifdef CONFIG_TEGRA_MMC
|
|
|
|
#undef CONFIG_TEGRA_MMC
|
2012-08-31 08:30:12 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_MMC
|
|
|
|
#undef CONFIG_CMD_MMC
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* remove partitions/filesystems */
|
|
|
|
#ifdef CONFIG_DOS_PARTITION
|
|
|
|
#undef CONFIG_DOS_PARTITION
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_EFI_PARTITION
|
|
|
|
#undef CONFIG_EFI_PARTITION
|
|
|
|
#endif
|
2012-11-05 13:22:00 +00:00
|
|
|
#ifdef CONFIG_CMD_FS_GENERIC
|
|
|
|
#undef CONFIG_CMD_FS_GENERIC
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_EXT4
|
|
|
|
#undef CONFIG_CMD_EXT4
|
|
|
|
#endif
|
2012-08-31 08:30:12 +00:00
|
|
|
#ifdef CONFIG_CMD_EXT2
|
|
|
|
#undef CONFIG_CMD_EXT2
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_FAT
|
|
|
|
#undef CONFIG_CMD_FAT
|
|
|
|
#endif
|
2012-11-05 13:22:00 +00:00
|
|
|
#ifdef CONFIG_FS_EXT4
|
|
|
|
#undef CONFIG_FS_EXT4
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_FS_FAT
|
|
|
|
#undef CONFIG_FS_FAT
|
|
|
|
#endif
|
2012-08-31 08:30:12 +00:00
|
|
|
|
|
|
|
/* remove USB */
|
|
|
|
#ifdef CONFIG_USB_EHCI
|
|
|
|
#undef CONFIG_USB_EHCI
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_USB_EHCI_TEGRA
|
|
|
|
#undef CONFIG_USB_EHCI_TEGRA
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_USB_STORAGE
|
|
|
|
#undef CONFIG_USB_STORAGE
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_CMD_USB
|
|
|
|
#undef CONFIG_CMD_USB
|
|
|
|
#endif
|
|
|
|
|
2012-09-25 13:32:26 +00:00
|
|
|
/* remove part command support */
|
|
|
|
#ifdef CONFIG_PARTITION_UUIDS
|
|
|
|
#undef CONFIG_PARTITION_UUIDS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_CMD_PART
|
|
|
|
#undef CONFIG_CMD_PART
|
|
|
|
#endif
|
|
|
|
|
2012-08-31 08:30:12 +00:00
|
|
|
#endif /* CONFIG_SPL_BUILD */
|
|
|
|
|
2012-09-05 00:00:24 +00:00
|
|
|
#endif /* __TEGRA_COMMON_POST_H */
|