| Age | Commit message (Collapse) | Author |
|
The SPL code already knows which boot device it calls the spl_boot_mode()
on, so pass that information into the function. This allows the code of
spl_boot_mode() avoid invoking spl_boot_device() again, but it also lets
board_boot_order() correctly alter the behavior of the boot process.
The later one is important, since in certain cases, it is desired that
spl_boot_device() return value be overriden using board_boot_order().
Signed-off-by: Marek Vasut <[email protected]>
Cc: Andreas Bießmann <[email protected]>
Cc: Albert Aribaud <[email protected]>
Cc: Tom Rini <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
[add newly introduced zynq variant]
Signed-aff-by: Andreas Bießmann <[email protected]>
|
|
|
|
On modern NAND it's more than recommended to have a backup copy of the
u-boot binary to recover from corruption: bitflips are quite common on
MLC NANDs, and the read-disturbance will corrupt your u-boot partitition
more quickly than what you would see on an SLC NAND.
Add an extra Kconfig option to specify the offset of the redundant u-boot
image.
Signed-off-by: Boris Brezillon <[email protected]>
Acked-by: Hans de Goede <[email protected]>
[scottwood: added ifdef to fix build break]
Signed-off-by: Scott Wood <[email protected]>
|
|
Correct the error message in spl_load_image_ext() when image parsing
fails. Instead of "ext4fs_read failed" print "failed to parse image
header".
Signed-off-by: Petr Kulhavy <[email protected]>
CC: Guillaume GARDET <[email protected]>
CC: Tom Rini <[email protected]>
|
|
Remove redundant #if defined(CONFIG_SPL_OS_BOOT) statement around
getenv() calls in spl_load_image_ext_os().
The whole function is surrounded by #ifdef CONFIG_SPL_OS_BOOT.
No functional change.
Signed-off-by: Petr Kulhavy <[email protected]>
CC: Guillaume GARDET <[email protected]>
Acked-by: Guillaume GARDET <[email protected]>
|
|
show_boot_progress() is now called from SPL also.
Signed-off-by: Heiko Schocher <[email protected]>
|
|
When no DTB can be matched successfully to the board that's being used
a list of available FIT-embedded DTBs will be output to the console for
diagnostic purposes. But rather than the contents of the "description"
FDT property a non-existent property was accessed and as a result "NULL"
was output instead of the actual name(s) of the DTB(s). Fix this issue
by using the correct property which is also the exact same property
that's used earlier during the actual board matching process.
Signed-off-by: Andreas Dannenberg <[email protected]>
|
|
|
|
Allow configuring the begining of the malloc_f area in SPL.
This patch uses the same CONFIG_MALLOC_F_ADDR established by
the sandbox.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Simon Glass <[email protected]>
|
|
Remove the check for GD_FLG_SPL_INIT in spl_relocate_stack_gd().
The check will always fail. This is because spl_relocate_stack_gd()
is called from ARM's crt0.S and it is called before board_init_r().
The board_init_r() calls spl_init(), which sets the GD_FLG_SPL_INIT
flag.
Note that reserving the malloc area in RAM is not a problem even
if the GD_FLG_SPL_INIT flag is not set.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Chin Liang See <[email protected]>
Cc: Dinh Nguyen <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Stephen Warren <[email protected]>
|
|
When loading fit header, it should be loaded to a previous address
aligned to ARCH_DMA_MINALIGN and not 8. Fixing the same.
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
For odroid-c2 (arch-meson) for now disable designware eth as meson
now needs to do some harder GPIO work.
Signed-off-by: Tom Rini <[email protected]>
Conflicts:
lib/efi_loader/efi_disk.c
Modified:
configs/odroid-c2_defconfig
|
|
This provides a way to load a FIT containing U-Boot and a selection of device
tree files from UART.
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
No prints should be allowed during UART load.
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
Detect a FIT when loading from NAND and handle it using the
new FIT SPL support.
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
[trini: Make sure we continue to use (void *)(unsigned long) for
load_addr].
Signed-off-by: Tom Rini <[email protected]>
|
|
Detect a FIT when loading from a FAT File system and handle it using the
new FIT SPL support.
Tested-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
This provides a way to load a FIT containing U-Boot and a selection of device
tree files from a File system. Making sure that all the reads and writes
are aligned to their respective needs.
Tested-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
[trini: Make this still apply with Michal's alignment change for 'fit']
Signed-off-by: Tom Rini <[email protected]>
|
|
sectors field is not being updated when reading fdt from fit image. Because of
this size_of(u-boot.bin) is being read when reading fdt. Fixing it by updating
the sectors field properly.
Tested-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
Allow driver model to be used for block devices in SPL.
Signed-off-by: Simon Glass <[email protected]>
|
|
If bl_len is not aligned it can caused a problem because another code
expects that start is aligned.
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Support loading FIT in SPL for RAM bootmode.
CONFIG_SPL_LOAD_FIT_ADRESS points to address where FIT image is stored
in memory.
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Lokesh Vutla <[email protected]>
|
|
Call this function before passing control from SPL.
For fpga case it is necessary to enable for example level shifters
when bitstream is programmed.
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The spl_parse_image_header() can return 0 and it is not an error.
Only treat non-zero return value as an error.
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Reviewed-by: Stefano Babic <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
When FDT is not present in the image user doesn't get any error what's
wrong. Print error message if LIBCOMMON_SUPPORT is enabled.
Signed-off-by: Michal Simek <[email protected]>
Seris-cc: uboot
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
|
|
Avoid calling directly into the MMC code - use the new API call instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass <[email protected]>
|
|
When defined, SPL will proceed to another boot method
if the image it has loaded does not have a signature.
This is useful if the subsequent boot methods are much
more complex.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Fabio Estevam <[email protected]>
|
|
Allow the spl_parse_image_header() to return value. This is convenient
for controlling the SPL boot flow if the loaded image is corrupted.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Tom Rini <[email protected]>
|
|
The error message "spl: mmc block read error" may come from two
different functions, so we should better annotate the function name
where the error comes from to help debugging.
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
If CONFIG_SPL_OS_BOOT is enabled and Linux image is not flashed at
RAW_MODE_KERNEL_SECTOR in MMC, spl still assumes that Linux is
available and tries to boot it and hangs. In order to avoid this,
adding a check to verify if parsed image header is of type IH_OS_LINUX.
If it fails then fall back to load u-boot image.
Signed-off-by: Lokesh Vutla <[email protected]>
|
|
In case of #define DEBUG 1 (fordebugging SPL). A bug in
spl_nand_load_image() will be triggered, because it prints
using hw ecc regardless of soft ecc configurations and
initializations.
Signed-off-by: Ahmed Samir <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
|
|
On some sunxi boards (and presumably also non sunxi boards) u-boot can
be either loaded from a sdcard in a micro-sd slot, or from eMMC.
Print which MMC spl tries to boot from, to help debugging.
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
The function spl_parse_image_header() falls back to a raw image
if the U-Boot header is missing and CONFIG_SPL_PANIC_ON_RAW_IMAGE
is undefined. While, mmc_load_image_raw_sector() only accepts a
U-Boot legacy image or an FIT image, preventing us from loading a
raw image.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Fix "warning: cast to pointer from integer of different size".
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
|
|
Detect a FIT when loading from MMC and handle it using the new FIT SPL
support.
Signed-off-by: Simon Glass <[email protected]>
|
|
This provides a way to load a FIT containing U-Boot and a selection of device
tree files. The board can select the correct device tree by probing the
hardware. Then U-Boot is started with the selected device tree.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Stephen Warren <[email protected]>
|
|
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Tested-by: Stephen Warren <[email protected]>
|
|
Since commit fd61d39970b9901217efc7536d9f3a61b4e1752a:
spl: mmc: add break statements in spl_mmc_load_image()
RAW and FS boot modes are now exclusive again. So, if MMCSD_MODE_RAW fails, the
board hangs. This patch allows to try MMCSD_MODE_FS then.
It has been tested on a beaglebone black to boot on an EXT partition.
Signed-off-by: Guillaume GARDET <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Nikita Kiryanov <[email protected]>
Cc: Igor Grinberg <[email protected]>
Cc: Paul Kocialkowski <[email protected]>
Cc: Pantelis Antoniou <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Matwey V. Kornilov <[email protected]>
Acked-by: Nikita Kiryanov <[email protected]>
|
|
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.
Signed-off-by: Stephen Warren <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
As of gcc 5.2.1 for Thumb-1, it is not possible any
more to assign gd from C code, as gd is mapped to r9,
and r9 may now be saved in the prolog sequence, and
restored in the epilog sequence, of any C functions.
Therefore arch_setup_gd(), which is supposed to set
r9, may actually have no effect, causing U-Boot to
use a bad address to access GD.
Fix this by never calling arch_setup_gd() for ARM,
and instead setting r9 in arch/arm/lib/crt0.S, to
the value returned by board_init_f_alloc_reserve().
Signed-off-by: Albert ARIBAUD <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
|
|
In order to support boot from multiple devices through board_boot_order,
it's necessary to use the block number of a device.
The use of a hard-coded 0 for the device number also creates a need
to re-order block devices for use in SPL like this:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/freescale/mx6slevk/mx6slevk.c;hb=HEAD#l195
Signed-off-by: Eric Nelson <[email protected]>
|
|
For a simple static string, use panic_str() which prevents calling
printf needlessly.
Signed-off-by: Sjoerd Simons <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
It is risky to have two different functions with much the same code. Future
authors may update one but not the other. It is hard to see which parts are
the same and which are different.
Unify the functions and drop the differences that are not really needed.
Note that one puts() becomes printf() as Tom mentioned that this does not
affect image size:
https://patchwork.ozlabs.org/patch/537276/
Note: It would be better to have an empty printf() and avoid the #ifdef for
CONFIG_SPL_LIBCOMMON_SUPPORT.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Michal Simek <[email protected]>
|
|
The 'p' suffix makes it more obvious that we are dealing with a pointer
to a (pointer) value that will be returned to its caller.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Nikita Kiryanov <[email protected]>
Tested-by: Michal Simek <[email protected]>
|