1
0
Fork 0
Commit Graph

26 Commits (5d69a5d178a1fc3874b8d18e5be3e520f6acaca5)

Author SHA1 Message Date
Vasili Galka 5d69a5d178 Fix a few printf argument verification warnings
The parameters of size_t type shall be formatted using "%zu" and not
using "%d".

Precision argument for the "%.*s" parameters shall be of int type.

Signed-off-by: Vasili Galka <vvv444@gmail.com>
2014-09-15 13:32:55 -04:00
Dan Murphy fff40a7e02 common: spl: Add spl sata boot support
Add spl_sata to read a fat partition from a bootable SATA
drive.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
2014-02-19 10:47:43 -05:00
Dan Murphy 8cffe5bd0d spl: common: Support for USB MSD FAT image loading
Add SPL support to be able to detect a USB Mass Storage device
connected to a USB host.  Once a USB Mass storage device is detected
the SPL will load the u-boot.img from a FAT partition to target address.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
2014-01-24 16:59:22 -05:00
Taras Kondratiuk 62cf11c092 SPL: Limit image name print length
If image name is longer than 32 bytes, then it will be truncated.
This will remove '\0' at the end of the line, so printf will
go out of string limit.

Signed-off-by: Taras Kondratiuk <taras@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
2013-08-16 13:45:15 -04:00
Wolfgang Denk 1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Albert ARIBAUD cac423a730 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master' 2013-05-11 22:24:28 +02:00
SRICHARAN R 4a0eb75752 ARM: OMAP: Cleanup boot parameters usage
The boot parameters are read from individual variables
assigned for each of them. This been corrected and now
they are stored as a part of the global data 'gd'
structure. So read them from 'gd' instead.

Signed-off-by: Sricharan R <r.sricharan@ti.com>
[trini: Add igep0033 hunk]
Signed-off-by: Tom Rini <trini@ti.com>
2013-05-10 08:25:56 -04:00
Andreas Bießmann d2eae43ba8 lib: consolidate hang()
Delete all occurrences of hang() and provide a generic function.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
[trini: Modify check around puts() in hang.c slightly]
Signed-off-by: Tom Rini <trini@ti.com>
2013-05-01 16:41:08 -04:00
Enric Balletbo i Serra 6000992e26 SPL: ONENAND: Support SPL to boot u-boot from OneNAND.
This patch will allow use SPL to boot an u-boot from the OneNAND.

Tested with IGEPv2 board with a OneNAND from Numonyx

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
[trini: Add <spl.h> hunk to fix warning]
Signed-off-by: Tom Rini <trini@ti.com>
2013-03-11 11:05:49 -04:00
Ilya Yanok 62a814310e spl: support for booting via usbeth
In case of usbeth booting just call net_load_image("usb_ether").
This patch also adds CONFIG_SPL_USBETH_SUPPORT and
CONFIG_SPL_MUSB_NEW_SUPPORT config options to enable linking of SPL
against USB gagdet support and new MUSB driver resp.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2013-02-18 13:48:04 -05:00
Stefan Roese ea8256f072 SPL: Port SPL framework to powerpc
This patch enables the SPL framework to be used on powerpc platforms
and not only ARM.

timer_init() does not exist on PPC systems. The timer (decrementer) is
initialized and enabled in interrupt_init() here. And currently
interrupt_init() is called after relocation to SDRAM. Since the only
powerpc SPL implementation (a3m071) doesn't need a timer, let's remove
this timer_init() call for PPC systems.

Signed-off-by: Stefan Roese <sr@denx.de>
2012-12-05 17:30:22 +01:00
Allen Martin a759f1e0db SPL: make jump_to_image_no_args a weak symbol
Change jump_to_image_no_args() to a weak symbol to allow override by
SoC specific code.  This is required by tegra because the SPL runs on
a different CPU from the image it is loading, so tegra specific
initialization is required to start the host CPU.  Pass in spl_image
as a parameter for the same reason.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-10-29 09:07:05 -07:00
Tom Rini 868444faa0 SPL: Remove setting GD_FLG_RELOC in preloader_console_init()
We have not strictly speaking relocated at this point, do not claim that
we have.  This is not required for output.

Signed-off-by: Tom Rini <trini@ti.com>
2012-10-15 11:53:47 -07:00
Ilya Yanok 7ac2fe2da2 OMAP: networking support for SPL
This patch adds support for networking in SPL. Some devices are
capable of loading SPL via network so it makes sense to load the
main U-Boot binary via network too. This patch tries to use
existing network code as much as possible. Unfortunately, it depends
on environment which in turn depends on other code so SPL size
is increased significantly. No effort was done to decouple network
code and environment so far.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-01 10:02:14 -07:00
Ilya Yanok 4063c77deb OMAP: spl: call timer_init() from SPL
We need to initialize timer properly, otherwise all delays
inside SPL will be wrong.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-10-01 10:02:14 -07:00
Pavel Machek c57b953da9 SPL: Add support for loading image from ram in SPL.
Signed-off-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:28 -07:00
Tom Rini 4212098181 SPL: Rework how we inform about un-headered images
First, remove the puts from the case where we don't have an mkimage
header as this is somewhat common and intentional for no-arg target
images.  Second, rework the final switch statement in board_init_r to,
in the case of !CONFIG_SPL_OS_BOOT be only about doing debug prints
about if we know what the magic is or not (the CONFIG_SPL_OS_BOOT case
is unchanged).  Then we call jump_to_image_no_args().  This gives us the
same behavior as before but with slightly smaller code.

Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:28 -07:00
Tom Rini 1292eaf353 SPL: Make un-supported boot device puts a debug instead
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Stefan Roese 3c6f8a0d19 SPL: Enable use of custom defined U-Boot entry point
By setting CONFIG_SYS_UBOOT_START boards can now use a different entry
point for their U-Boot image. So the U-Boot entry point is not fixed
to CONFIG_SYS_TEXT_BASE any more.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Tom Rini a4cc1c4877 SPL: SPI: Enhance spi_spl_load to match the other load functions
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Stefan Roese 022b4975c8 SPL: Add option to skip copying of the mkimage header
On some system (e.g. powerpc), the load-address and entry-point is
located at address 0. So the current approach to load the image
(payload) including the header to the address "load-address - 64"
can't work here.

This patch adds an flag to skip this copying including header to
the SPL framework. By setting SPL_COPY_PAYLOAD_ONLY, only the
playload will be copied. This will be used by the SPL NOR flash
driver on powerpc.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Stefan Roese 33d346464a SPL: Add NOR flash booting support
SPL NOR flash booting support is quite simple. Only copying of the
images is needed.

On MPC5xxx we need to make sure to only use the standard memcpy()
implementation and not the MPC5xxx specific one. As the MPC5xxx
version has some complexity which is not needed for this SPL
booting.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 11:20:27 -07:00
Stefan Roese 77552b0633 SPL: Use image_get_xxx() functions to access header values
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 09:50:00 -07:00
Stefano Babic ae83d882f5 SPL: do not use fix value for u-boot size
If an u-boot image is not found, SPL thinks to load a bare
u-boot.bin image with a maximum size of 200KB.
Use CONFIG_SYS_MONITOR_LEN instead.

Signed-off-by: Stefan Roese <stefan.roese@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 09:49:59 -07:00
Tom Rini 6507f133f3 SPL: Create arch/arm/lib/spl.c for board_init_f and jump_to_image_linux
In SPL (CONFIG_SPL_FRAMEWORK) board_init_f must setup the stack pointer,
clear the BSS and call board_init_r.  We mark this as weak as some
platforms may need to perform additional initalization at this point.
We provide a gd that we know will be in a usable location, once the BSS
has been cleared to help with this as well.  Finally, we no longer call
relocate_code so remove that from the armv7 version.

Next, both board_init_f and jump_to_image_linux are going to be
inherently arch-specific, so move these versions to arch/arm/lib/spl.c

Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 09:49:59 -07:00
Tom Rini 47f7bcae8c SPL: Move the omap SPL framework to common/spl
Add a new flag, CONFIG_SPL_FRAMEWORK to opt into the common/spl SPL
framework, enable on all of the previously using boards.  We move the
spl_ymodem.c portion to common/ and spl_mmc.c to drivers/mmc/.  We leave
the NAND one in-place as we plan to replace it later in this series.

We use common/spl to avoid linker problems with respect to merging
constant strings in objects.   Otherwise all strings in common/ will be
linked in and kept which grows SPL in size too much.

Signed-off-by: Tom Rini <trini@ti.com>
2012-09-27 09:49:59 -07:00