| Age | Commit message (Collapse) | Author |
|
Change the load_image so that it returns success or failure of the
command (using CMD_RET_SUCCESS or CMD_RET_FAILURE).
This way, hush scripts can optionally load different files depending
upon the system configuration.
A simple example:
if afs load ${kernel_name} ${kernel_addr}; then echo loaded; else echo \
not loaded; fi
Signed-off-by: Ryan Harkin <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
|
|
Add a command to the ARM flash support to check if an image exists or
not.
If the image is found, it will return CMD_RET_SUCCESS, else
CMD_RET_FAILURE. This allows hush scripts to conditionally load images.
A simple example:
if afs exists ${kernel_name}; then echo found; else echo \
not found; fi
Signed-off-by: Ryan Harkin <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
|
|
CONFIG_NETCONSOLE causes common/bootm.c to call eth_unregister()
for network device shutdown. However, with CONFIG_DM_ETH this
function is no longer defined.
This is a workaround to avoid the call in that case, and solely
rely on eth_halt(). In case this is insufficient, a proper way
to unregister / remove network devices needs to be implemented.
Signed-off-by: Bernhard Nortmann <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
The gd->malloc_ptr and the gd->malloc_limit are offsets to gd->malloc_base.
But the addr variable contains the absolute address. The new_ptr must be:
addr + bytes - gd->malloc_base.
Signed-off-by: Philipp Rosenberger <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
|
|
The command:
ethsw [port <port_no>] ingress filtering
{ [help] | show | enable | disable }
- enable/disable VLAN ingress filtering on port
can be used to enable/disable/show VLAN ingress filtering on a port.
This command has also been added to the ethsw generic parser
from common/cmd_ethsw.c
Signed-off-by: Johnson Leung <[email protected]>
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The command:
ethsw vlan fdb { [help] | show | shared | private }
- make VLAN learning shared or private"
configures the FDB to share the FDB entries learned on multiple VLANs
or to keep them separated. By default, the FBD uses private VLAN
learning. This command has also been added to the ethsw generic parser
from common/cmd_ethsw.c
Signed-off-by: Johnson Leung <[email protected]>
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The new added commands can be used to configure VLANs for a port
on both ingress and egress.
The new commands are:
ethsw [port <port_no>] pvid { [help] | show | <pvid> }
- set/show PVID (ingress and egress VLAN tagging) for a port;
ethsw [port <port_no>] vlan { [help] | show | add <vid> | del <vid> }
- add a VLAN to a port (VLAN members);
ethsw [port <port_no>] untagged { [help] | show | all | none | pvid }
- set egress tagging mod for a port"
ethsw [port <port_no>] egress tag { [help] | show | pvid | classified }
- Configure VID source for egress tag. Tag's VID could be the
frame's classified VID or the PVID of the port
These commands have also been added to the ethsw generic parser from
common/cmd_ethsw.c
Signed-off-by: Johnson Leung <[email protected]>
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The new command:
ethsw [port <port_no>] [vlan <vid>] fdb
{ [help] | show | flush | { add | del } <mac> }
Can be used to add and delete FDB entries. Also, the command can be used
to show entries from the FDB tables. When used with [port <port_no>]
and [vlan <vid>], only the matching the FDB entries can be seen or
flushed. The command has also been added to the generic ethsw parser
from cmd_ethsw.c.
Signed-off-by: Johnson Leung <[email protected]>
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The code that checks if a string has the format of a MAC address has been
moved to a separate function called eth_validate_ethaddr_str().
This has been done to allow other components (such as vsc9953 driver)
to validate a MAC address.
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The command:
ethsw [port <port_no>] learning { [help] | show | auto | disable }
can be used to enable/disable HW learning on a port.
This patch also adds this command to the generic ethsw parser from
cmd_ethsw.
Signed-off-by: Johnson Leung <[email protected]>
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
The new added command:
ethsw [port <port_no>] statistics { [help] | [clear] }
will print counters like the number of Rx/Tx frames,
number of Rx/Tx bytes, number of Rx/Tx unicast frames, etc.
This patch also adds this commnd in the genereric ethsw
parser from cmd_ethsw.c
Signed-off-by: Codrin Ciubotariu <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
This patch creates a flexible parser for Ethernet Switch
configurations that should support complex commands.
The parser searches for predefined keywords in the command
and calls the proper function when a match is found.
Also, the parser allows for optional keywords, such as
"port", to apply the command on a port
or on all ports. For now, the defined commands are:
ethsw [port <port_no>] { enable | disable | show }
Signed-off-by: Codrin Ciubotariu <[email protected]>
Reviewed-by: York Sun <[email protected]>
|
|
Bigger source buffer than dest buffer could overflow when copying
strings. Source and destination buffer sizes are same now.
Signed-off-by: Imran Zaman <[email protected]>
|
|
Now that we have a new header file for cache-aligned allocation, we should
move the stack-based allocation macro there also.
Signed-off-by: Simon Glass <[email protected]>
|
|
At present malloc.h is included everywhere since it recently was added to
common.h in this commit:
4519668 mtd/nand/ubi: assortment of alignment fixes
This seems wasteful and unnecessary. We have been trying to trim down
common.h and put separate functions into separate header files and that
change goes in the opposite direction.
Move malloc_cache_aligned() to a new header so that this can be avoided.
The header would perhaps be better named as alignmem.h but it needs to be
included after common.h and people might be confused by this. With the name
memalign.h it fits nicely after malloc() in most cases.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Marcel Ziswiler <[email protected]>
|
|
The "dfu" command has been extended to support transfers via TFTP protocol.
Signed-off-by: Lukasz Majewski <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
This code allows using DFU defined mediums for storing data received via
TFTP protocol.
It reuses and preserves functionality of legacy code at common/update.c.
The update_tftp() function now accepts parameters - namely medium device
name and its number (e.g. mmc 1).
Without this information passed old behavior is preserved.
Signed-off-by: Lukasz Majewski <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
CONFIG_SYS_NO_FLASH is set
Up till now it was impossible to use code from update.c when system
was not equipped with raw FLASH memory.
Such behavior prevented DFU from reusing this code.
Signed-off-by: Lukasz Majewski <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The Rockchip boot ROM requires a particular file format for booting from SPI.
It consists of a 512-byte header encoded with RC4, some padding and then up
to 32KB of executable code in 2KB blocks, separated by 2KB empty blocks.
Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
converted to this format. This allows booting from SPI flash on supported
machines.
Signed-off-by: Simon Glass <[email protected]>
|
|
The Rockchip boot ROM requires a particular file format. It consists of
64KB of zeroes, a 512-byte header encoded with RC4, and then some executable
code.
Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
converted to this format.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rockchip SoCs require certain formats for code that they execute, The
simplest format is a 4-byte header at the start of a binary file. Add
support for this so that we can create images that the boot ROM understands.
Signed-off-by: Simon Glass <[email protected]>
|
|
|
|
These tests come from Chrome OS code. They are not particularly tidy but can
be useful for checking that the TPM is behaving correctly. Some knowledge of
TPM operation is required to use these.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard<[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
Add a command to display basic information about a TPM such as the model and
open/close state. This can be useful for debugging.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
Rather then crashing when there is no data, print an error. The error is
printed by the caller to parse_byte_string().
Acked-by: Christophe Ricard <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
When a 'tpm' command fails, we set the return code but give no indication
of failure. This can be confusing.
Add an error message when any tpm command fails.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard<[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
I2C chips can support a register offset, with registers accessible by
sending this offset as the first part of any read or write transaction.
Most I2C chips have a single byte offset, thus the offset length is 1.
This provides access for up 256 registers.
However other offset lengths are supported, including 0.
Add a command to provide access to the offset length from the command
line. This allows the offset length to be read or written.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard<[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
Add driver model support to the TPM command and the TPM library. Both
support only a single TPM at present.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard<[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
Add new Kconfig options for TPMs in preparation for moving boards to use
Kconfig for TPM configuration.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Christophe Ricard<[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
|
|
|
|
Various U-Boot adoptions/extensions to MTD/NAND/UBI did not take buffer
alignment into account which led to failures of the following form:
ERROR: v7_dcache_inval_range - start address is not aligned - 0x1f7f0108
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x1f7f1108
Signed-off-by: Marcel Ziswiler <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Scott Wood <[email protected]>
[trini: Add __UBOOT__ hunk to lib/zlib/zutil.c due to malloc.h in common.h]
Signed-off-by: Tom Rini <[email protected]>
|
|
The set_default_env() function from env_common.c expects either
a fully formatted error msg, e.g.: "## Resetting to default environment\n"
or an error msg prefixed with an !, in which case it will format it.
Fix the init_mmc_for_env() error messages to be prefixed with a !
this changes the bootup-log on sunxi when no mmc card is found from:
MMC: SUNXI SD/MMC: 0
No MMC card foundIn: serial
Out: serial
To:
MMC: SUNXI SD/MMC: 0
*** Warning - No MMC card found, using default environment
In: serial
Out: serial
Which clearly is how things should look.
Signed-off-by: Hans de Goede <[email protected]>
|
|
This should use the align parameter, not bytes. Natural alignment is one
use case but should not be the only one supported by this function.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Add nds32 ag101p generic board support.
Signed-off-by: Kun-Hua Huang <[email protected]>
|
|
GCC 5.1 starts warning for comparisons such as !a > 0, assuming that the
negation was meant to apply to the whole expression rather than just the
left operand.
Indeed the comparison in the FIT loadable code is confusingly written,
though it does end up doing the right thing. Rewrite the condition to be
more explicit, that is, iterate over strings until they're exhausted.
Signed-off-by: Thierry Reding <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Move x86_fsp_init() call after initf_malloc() so that we can fix up
the gd->malloc_limit later.
Signed-off-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
We have flipped CONFIG_SPL_DISABLE_OF_CONTROL. We have cleansing
devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
away the ugly logic in include/fdtdec.h:
#ifdef CONFIG_OF_CONTROL
# if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
# define OF_CONTROL 0
# else
# define OF_CONTROL 1
# endif
#else
# define OF_CONTROL 0
#endif
Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute. It refers to
CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
SPL.
Also, we no longer have to cancel CONFIG_OF_CONTROL in
include/config_uncmd_spl.h and scripts/Makefile.spl.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Acked-by: Linus Walleij <[email protected]>
|
|
As we discussed a couple of times, negative CONFIG options make our
life difficult; CONFIG_SYS_NO_FLASH, CONFIG_SYS_DCACHE_OFF, ...
and here is another one.
Now, there are three boards enabling OF_CONTROL on SPL:
- socfpga_arria5_defconfig
- socfpga_cyclone5_defconfig
- socfpga_socrates_defconfig
This commit adds CONFIG_SPL_OF_CONTROL for them and deletes
CONFIG_SPL_DISABLE_OF_CONTROL from the other boards to invert
the logic.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
|
|
This causes widespread breakage due to the operation of the low-level code
in crt0.S and cro0_64.S for ARM at least.
The fix is not complicated but it seems safer to revert this for now.
This reverts commit 2afddae07523f23f77acd066ad1719f53d289f98.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use memalign() with ARCH_DMA_MINALIGN to allocate read buffers.
This is required because, flash drivers may use DMA for read operations
and may have to invalidate the buffer before read.
Signed-off-by: Ravi Babu <[email protected]>
Signed-off-by: Vignesh R <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
Tested-by: Jagan Teki <[email protected]>
|
|
Use memalign() with ARCH_DMA_MINALIGN to allocate read buffers.
This is required because, flash drivers may use DMA for read operations
and may have to invalidate the buffer before read.
Signed-off-by: Ravi Babu <[email protected]>
Signed-off-by: Vignesh R <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
Tested-by: Jagan Teki <[email protected]>
|
|
There is quite a bit of assembler code that can be removed if we use the
generic global_data setup. Less arch-specific code makes it easier to add
new features and maintain the start-up code.
Drop the unneeded code and adjust the hooks in board_f.c to cope.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
At present we have a simple assignment to gd. With some archs this is
implemented as a register or through some other means; a simple assignment
does not suit in all cases.
Change this to a function and add documentation to describe how this all
works.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: York Sun <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Some archs like to have larger alignment for their global data. Use 16 bytes
which suits all current archs.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
bd->bi_dram[] has both start address and size defined as 32-bit,
which is not the case on some platforms where >=4GiB memory bank
is used. Change them to support such memory banks.
Signed-off-by: Bin Meng <[email protected]>
|
|
This fixes the following warning (and the runtime error reporting):
../common/image-fdt.c:491:4: warning: 'fdt_ret' may be used
uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Max Krummenacher <[email protected]>
Signed-off-by: Marcel Ziswiler <[email protected]>
Acked-by: Marek Vasut <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Allow showing custom board info from a checkboard() function being
implemented if CONFIG_CUSTOM_BOARDINFO is specified. Previously the
device tree model was always displayed not taking any
CONFIG_CUSTOM_BOARDINFO into account.
Signed-off-by: Marcel Ziswiler <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The following commit changed the order of the column vs. row parameter
to the lcd_init_console() function but missed actually changing it as
well the second time it is called from lcd_clear() which resulted in a
garbled text console which this patch fixes.
commit 604c7d4a5a3cf70949f6e6094bf0d52ee3b4804d
common/lcd_console: introduce display/framebuffer rotation
Tested on Colibri T20 with my latest assortment of tegra
fixes/enhancements patch set.
Signed-off-by: Marcel Ziswiler <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Add option to set shell prompt string from menuconfig and migrate
boards globally.
The migration is done as follows:
- Boards that explicitly and unconditionally set CONFIG_SYS_PROMPT had the
entry moved to their defconfig files.
- Boards that defined some kind of #ifdef logic which selects the
CONFIG_SYS_PROMPT (for example qemu-mips) got an #undef CONFIG_SYS_PROMPT
right before the #ifdef logic and were left alone.
- This change forces CONFIG_SYS_PROMPT to be a per board decision, and thus
CONFIG_SYS_PROMPT was removed from all <soc>_common.h and <arch>_common.h
files. This results in a streamlined default value across platforms, and
includes the following files: spear-common, sunxi-common, mv-common,
ti_armv7_common, tegra-common, at91-sama5_common, and zynq-common.
- Boards that relied on <arch/soc>_common.h values of CONFIG_SYS_PROMPT were
not updated in their respective defconfig files under the assumption that
since they did not explicitly define a value, they're fine with whatever
the default is.
- On the other hand, boards that relied on a value defined in some
<boards>_common.h file such as woodburn_common, rpi-common,
bur_am335x_common, ls2085a_common, siemens_am33x_common, and
omap3_evm_common, had their values moved to the respective defconfig files.
- The define V_PROMPT was removed, since it is not used anywhere except for
assigning a value for CONFIG_SYS_PROMPT.
Cc: Tom Rini <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Igor Grinberg <[email protected]>
Signed-off-by: Nikita Kiryanov <[email protected]>
[trini: Add spring, sniper, smartweb to conversion]
Signed-off-by: Tom Rini <[email protected]>
|