diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-06-20 10:10:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:31 -0700 |
commit | 84d9e903f1b6d9c48e3615fd4bb5b2eee3ff79a4 (patch) | |
tree | 2c8857bb43492d6a1744ea260597fb83399ff7c2 | |
parent | 41ba20701710481458bcf01c1396c061c8d66886 (diff) |
Modify seaboard configs to allow fdt based startup.
These modifications are necessary to allow the u-boot to bring up
ARM targets using the FDT (the flat device tree) as the means of
communicating platform's hardware details to the kernel.
As of this change, in addition to previously recognized kernel
formats (particularly, uImage) the u-boot also accepts a so
called FIT image. See doc/uImage.FIT/howto.txt for more
information about the FIT image format.
As a result, there are now three ways to boot up a kernel:
1. bootm <uImage addr>
2. bootm <uImage addr> - <device tree addr>
3. bootm <FIT image addr>
1. This is the legacy mode which has been using so far. On
startup u-boot unpacks the uImage, and passes control to the
kernel with the relocation start address, machine ID and
pointer to the kernel command line as the three parameters.
2. This is a device tree mode using two separate images - the
same uImage and the device tree blob. The '-' in the middle is
used to indicate that there is no initrd. The u-boot relocates
the device tree into the allotted window, modifies its
contents to include target hardware specific information
(memory size, clock frequencies, initrd location, command
line, etc., etc.) and then invokes the kernel passing the
pointer to the device tree as the third parameter instead of
the kernel command line. The kernel startup code can tell that
the third parameter is the device tree by checking for the
appropriate device tree header.
3. In this case the zImage (which is used to create the uImage)
and the device tree are combined in another device tree
structure, the FIT image. The u-boot recognizes this by
detecting the same device tree header pattern in the base of
the image. Then it separates the kernel and the kernel device
tree, places them in memory and continues as in case 2 above.
BUG=chromium-os:16665
TEST=manual
Reboot kaen, stop it at the u-boot prompt
Prepare networking as follows:
Tegra2 # usb start; dhcp;
Try booting up the kernel using three different commands:
tftpboot ${loadaddr} 172.22.73.75:/tftpboot/vbendeb/uImage; bootm
tftpboot ${loadaddr} 172.22.73.75:/tftpboot/vbendeb/uImage; \
tftpboot 0x1300000 172.22.73.75:/tftpboot/vbendeb/kaen.dtb; \
boom ${loadaddr} - 0x1300000
tftpboot ${loadaddr} 172.22.73.75:/tftpboot/vbendeb/itsImage; bootm
when booted using method 1 the /proc/device tree directory on the
target is empty, when booted using the other two methods the
/proc/device-tree directory contains the device tree passed in by
u-boot.
Change-Id: I2cdcc14170f7873c29844811e15c23a729142beb
Reviewed-on: http://gerrit.chromium.org/gerrit/2922
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | include/configs/tegra2-common.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 4000805cda0..4fae97e30d0 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -35,7 +35,6 @@ /* FDT support */ #define CONFIG_OF_LIBFDT /* Device tree support */ -#define CONFIG_OF_NO_KERNEL /* Don't pass device tree to kernel */ #define CONFIG_OF_CONTROL /* Use the device tree to set up U-Boot */ #define CONFIG_OF_EMBED /* Embed the device tree in U-Boot */ @@ -313,4 +312,14 @@ CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) +/* kernel Device tree booting support */ +#define CONFIG_FIT 1 +#define CONFIG_CMD_IMI 1 + +/* + * 32M is what it takes the u-boot to allocate enough room for the kernel + * loader to inflate the kernel and keep a copy of the device tree handy. + */ +#define CONFIG_SYS_BOOTMAPSZ (1 << 25) + #endif /* __TEGRA2_COMMON_H */ |