- 21 8月, 2018 2 次提交
-
-
由 Jean-Jacques Hiblot 提交于
In some cases it can be useful to be able to bind a device to a driver from the command line. The obvious example is for versatile devices such as USB gadget. Another use case is when the devices are not yet ready at startup and require some setup before the drivers are bound (ex: FPGA which bitsream is fetched from a mass storage or ethernet) usage example: bind usb_dev_generic 0 usb_ether unbind usb_dev_generic 0 usb_ether or unbind eth 1 bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether unbind /ocp/omap_dwc3@48380000/usb@48390000 Signed-off-by: NJean-Jacques Hiblot <jjhiblot@ti.com>
-
由 Sam Protsenko 提交于
In case when user provides '-' as USB controller index, like this: => fastboot - data abort occurs in strcmp() function in do_fastboot(), here: if (!strcmp(argv[1], "udp")) (tested on BeagleBone Black). That's because argv[1] is NULL when user types in the '-', and null pointer dereference occurs in strcmp() (which is ok according to C standard specification). So we must validate user input to prevent such behavior. While at it, check also the result of strtoul() function and handle error cases properly. Signed-off-by: NSam Protsenko <semen.protsenko@linaro.org> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NLukasz Majewski <lukma@denx.de>
-
- 18 8月, 2018 1 次提交
-
-
由 Adam Ford 提交于
This converts the following to Kconfig: CONFIG_MII CONFIG_DRIVER_TI_EMAC Signed-off-by: NAdam Ford <aford173@gmail.com> Acked-by: NJagan Teki <jagan@amarulasolutions.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 11 8月, 2018 2 次提交
-
-
由 Mario Six 提交于
Add a command to debug the AXI bus. Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NMario Six <mario.six@gdsys.cc>
-
由 Rob Bracero 提交于
This update adds PPC64 ELF V1 ABI support to bootelf for both the program header and section header options. Elf64 support was already present for the program header option, but it was not handling the PPC64 ELF V1 ABI case. For the PPC64 ELF V1 ABI, the e_entry field of the elf header must be treated as function descriptor pointer instead of a function address. The first doubleword of the function descriptor is the function's entry address. Signed-off-by: NRob Bracero <robbracero@gmail.com> [trini: Fix whitespace issues] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 10 8月, 2018 1 次提交
-
-
由 Troy Kisky 提交于
sata_probe returns 1 for failure, so don't checkout for < 0 fixes: f19f1ecb dm: sata: Support driver model with the 'sata' command Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 30 7月, 2018 4 次提交
-
-
由 Tom Rini 提交于
The TPMv2 code requires the log functionality, so select it. Signed-off-by: NTom Rini <trini@konsulko.com>
-
由 Michal Simek 提交于
CMD_DM is used for debug purpose and it shouldn't be enabled by default via Kconfig. Unfortunately this is in the tree for quite a long time that's why solution is to use imply DM for all targets which are enabling DM. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NTom Rini <trini@konsulko.com> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Michal Simek 提交于
Fix Kconfig bool, default, select and imply options to be alphabetically sorted. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Michal Simek 提交于
Trivial Kconfig cleanup. Use tabs instead of spaces and every Kconfig entry should be separated by newline. Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Reviewed-by: NTom Rini <trini@konsulko.com> Reviewed-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 28 7月, 2018 1 次提交
-
-
由 Miquel Raynal 提交于
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfig. As we cannot define two 'tpm' commands at the same time, the command for TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this is the exact command name that must be written into eg. test files, any user already using the TPM v2 stack can continue to do so by just writing 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt will search for the closest command named after 'tpm'. The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: NSimon Glass <sjg@chromium.org> [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL terminated string due to LLVM warning] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 27 7月, 2018 1 次提交
-
-
由 Joe Hershberger 提交于
Instead of depending on a env callback for bootfile, read it explicitly. We do this because the bootfile can be specified on the command line and if it is, we will overwrite the internal variable. If a netboot_common() is called again with no bootfile parameter, we want to use the one in the environment. Signed-off-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 26 7月, 2018 1 次提交
-
-
由 Tom Rini 提交于
On 64bit platforms we would otherwise see: ../cmd/ubi.c: In function 'ubi_volume_read': ../cmd/ubi.c:359:16: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t {aka long unsigned int}' [-Wformat=] Fixes: 68c7025d ("cmd: ubi: print load size after establishing volume size") Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 25 7月, 2018 7 次提交
-
-
由 Heinrich Schuchardt 提交于
Remove unused function efi_get_time_init(). Initialization of the RTC has to be done in board bring up not in the EFI subsystem. There is no RTC device in the UEFI spec. The RTC is only accessed through the runtime services. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Heinrich Schuchardt 提交于
For the boot and runtime services tables and for the system table the crc32 has to be set in the header. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Simon Glass 提交于
This function currently returns an error code, but never uses it. There is no function comment so it is not obvious why. Presuambly the error is not important. Update the function to explain its purpose and why it ignores the error. Drop the useful error return value. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Simon Glass 提交于
This is a bit confusing at present since it adds 4KB to the pointer, then rounds it up. It looks like a bug, but is not. Move the 4KB addition into a separate statement and expand the comment. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Alexander Graf 提交于
The bootefi command gets a few addresses as values passed in. In sandbox, these values are in U-Boot address space, so we need to make sure we explicitly call map_sysmem() on them to be able to access them. Signed-off-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Mark Kettenis 提交于
Multiple EFI binaries may be executed in sequence. So if we already are in non-secure mode after running the first one we should skip the switching code since it no longer works once we're non-secure. Signed-off-by: NMark Kettenis <kettenis@openbsd.org> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
由 Mark Kettenis 提交于
If desired (and possible) switch into HYP mode or non-secure SVC mode before calling the entry point of an EFI application. This allows U-Boot to provide a usable PSCI implementation and makes it possible to boot kernels into hypervisor mode using an EFI bootloader. Based on diffs from Heinrich Schuchardt and Alexander Graf. Signed-off-by: NMark Kettenis <kettenis@openbsd.org> [agraf: Fix indentation] Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 24 7月, 2018 2 次提交
-
-
由 Igor Opaniuk 提交于
1. Since libavb library alone is highly portable, introduce dedicated Kconfig symbol for AVB bootloader-dependent operations, so it's possible to build libavb separately. AVB bootloader-dependent operations include: * Helpers to process strings in order to build OS bootargs. * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c. * Helpers to alloc/init/free avb ops. 2. Add CONFIG_FASTBOOT dependency, as fastboot buffer is re-used in partition verification operations. Reported-by: NEugeniu Rosca <rosca.eugeniu@gmail.com> Signed-off-by: NIgor Opaniuk <igor.opaniuk@linaro.org> Reviewed-by: NEugeniu Rosca <rosca.eugeniu@gmail.com> Tested-by: NEugeniu Rosca <rosca.eugeniu@gmail.com>
-
由 Kay Potthoff 提交于
In the case that there was no name defined for a partition the code assumes that name_len is 22 and therefore allocates exactly that space for a dummy name. But the function sprintf() first resolves "0x%08llx@0x%08llx" to a string that is longer than 22 bytes. This leads to a buffer overflow. The replacement function snprintf() limits the copied bytes to name_len and therefore avoids the buffer overflow. Signed-off-by: NKay Potthoff <Kay.Potthoff@microsys.de>
-
- 23 7月, 2018 1 次提交
-
-
由 Adam Ford 提交于
This converts the following to Kconfig: CONFIG_MTD_PARTITIONS CONFIG_MTD_DEVICE Signed-off-by: NAdam Ford <aford173@gmail.com>
-
- 21 7月, 2018 2 次提交
-
-
由 Quentin Schulz 提交于
While the `env export` can take as parameters variables to be exported, `env import` does not have such a mechanism of variable selection. Let's add the ability to add parameters at the end of the command for variables to be imported. Every env variable from the env to be imported passed by parameter to this command will override the value of the variable in the current env. If a variable exists in the current env but not in the imported env, if this variable is passed as a parameter to env import, the variable will be unset ONLY if the -d option is passed to env import, otherwise the current value of the variable is kept. If a variable exists in the imported env, the variable in the current env will be set to the value of the one from the imported env. All the remaining variables are left untouched. As the size parameter of env import is positional but optional, let's add the possibility to use the sentinel '-' for when we don't want to give the size parameter (when the env is '\0' terminated) but we pass a list of variables at the end of the command. env import addr env import addr - env import addr size env import addr - foo1 foo2 env import addr size foo1 foo2 are all valid. env import -c addr env import -c addr - env import -c addr - foo1 foo2 are all invalid because they don't pass the size parameter required for checking, while the following are valid. env import addr size env import addr size foo1 foo2 Nothing's changed for the other parameters or the overall behaviour. One of its use case could be to load a secure environment from the signed U-Boot binary and load only a handful of variables from an other, unsecure, environment without completely losing control of U-Boot. Signed-off-by: NQuentin Schulz <quentin.schulz@bootlin.com> Tested-by: NAlex Kiernan <alex.kiernan@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Quentin Schulz 提交于
The error message should start with `## Error: ` so that it's easily detectable by tests without needing to have a complex regexp for matching all possible error message patterns. Let's add the `## Error: ` prefix to the error messages since it's the one already in use. Suggested-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NQuentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NStephen Warren <swarren@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
- 20 7月, 2018 5 次提交
-
-
由 Yaniv Levinsky 提交于
The function set_default_env() sets the hashtable flags for import_r(). Formally set_default_env() doesn't accept flags from its callers. In practice the caller can (un)set the H_INTERACTIVE flag, but it has to be done using the first character of the function's string argument. Other flags like H_FORCE can't be set by the caller. Change the function to accept flags argument. The benefits are: 1. The caller will have to explicitly set the H_INTERACTIVE flag, instead of un-setting it using a special char in a string. 2. Add the ability to propagate flags from the caller to himport(), especially the H_FORCE flag from do_env_default() in nvedit.c that currently gets ignored for "env default -a -f" commands. 3. Flags and messages will not be coupled together. A caller will be able to set flags without passing a string and vice versa. Please note: The propagation of H_FORCE from do_env_default() does not introduce any functional changes, because currently himport_r() is set to destroy the old environment regardless if H_FORCE flag is set or not. More changes are needed to utilize the propagation of H_FORCE. Signed-off-by: NYaniv Levinsky <yaniv.levinsky@compulab.co.il> Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
-
由 Yaniv Levinsky 提交于
The function set_default_vars() in common.c adds H_INTERACTIVE to the h_import() flag, but the function has no way of telling if the command actually was user directed like this flag suggest. The flag should be set by the calling function do_env_default() in nvedit.c instead, where the command is certainty user directed. Move the H_INTERACTIVE flag from set_default_vars() to do_env_default(). Signed-off-by: NYaniv Levinsky <yaniv.levinsky@compulab.co.il> Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
-
由 Yaniv Levinsky 提交于
The env_flag in do_env_default() doesn't get propagated and therefore gets ignored by himport_r(). This breaks to ability to "forcibly" reset variables to their default values using the environment command. Scenario example of the problem: # setenv kernel uImage # setenv .flags kernel:so # env default -f kernel ## Error: Can't overwrite "kernel" himport_r: can't insert "kernel=zImage" into hash table Change the call path so it will pass the flag correctly. Signed-off-by: NYaniv Levinsky <yaniv.levinsky@compulab.co.il> Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
-
由 Yaniv Levinsky 提交于
The naming convention for flags in nvedit.c is: * The hashtable flag (defined in search.h) is named "env_flag" * The command flag argument (defined in command.h) is named "flag" This convention is kept in functions like do_env_print(), do_env_set() and do_env_delete(), but not in do_env_default(). Rename the hashtable flag in do_env_default() from "flag" to "env_flag". Rename the command flag in do_env_default() from "__flag" to "flag". No functional change. Signed-off-by: NYaniv Levinsky <yaniv.levinsky@compulab.co.il> Reviewed-by: NIgor Grinberg <grinberg@compulab.co.il>
-
由 Alex Kiernan 提交于
When sourcing a FIT format script, if we've not been told the unit name to use, look for a default property at the root of /images to work out which unit we should use. Signed-off-by: NAlex Kiernan <alex.kiernan@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 12 7月, 2018 2 次提交
-
-
由 Stefan Roese 提交于
When trying to attach an UBI MTD partition via "ubi part", it may happen that the MTD partition defined in U-Boot (via mtdparts) is not big enough than the one, where the UBI device has been created on. This may lead to errors, which are not really descriptive to debug and solve this issue, like: ubi0 error: vtbl_check: too large reserved_pebs 1982, good PEBs 1020 ubi0 error: vtbl_check: volume table check failed: record 0, error 9 or: ubi0 error: init_volumes: not enough PEBs, required 1738, available 1020 ubi0 error: ubi_wl_init: no enough physical eraseblocks (-718, need 1) ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -12 Lets add an additional message upon attach failure, to aid the U-Boot user to solve this problem. Signed-off-by: NStefan Roese <sr@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Heiko Schocher <hs@denx.de>
-
由 Stefan Agner 提交于
When using static volumes, the file size stored in the volume is determined at runtime. Currently the ubi command prints the file size specified on the console, which leads to a rather confusing series of messages: # ubi read ${fdt_addr_r} testvol Read 0 bytes from volume testvol to 82000000 No size specified -> Using max size (179924992) Make sure to print the actual size read in any case: # ubi read ${fdt_addr_r} testvol No size specified -> Using max size (179924992) Read 179924992 bytes from volume testvol to 82000000 Signed-off-by: NStefan Agner <stefan.agner@toradex.com>
-
- 11 7月, 2018 1 次提交
-
-
This patch moves CONFIG_MP to Kconfig Signed-off-by: NSiva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
-
- 03 7月, 2018 3 次提交
-
-
由 Alexander Graf 提交于
Currently we can choose between 2 different types of behavior for the serverip variable: 1) Always overwrite it with the DHCP server IP address (default) 2) Ignore what the DHCP server says (CONFIG_BOOTP_SERVERIP) This patch adds a 3rd option: 3) Use serverip from DHCP if no serverip is given (CONFIG_BOOTP_PREFER_SERVERIP) With this new option, we can have the default case that a boot file gets loaded from the DHCP provided TFTP server work while allowing users to specify their own serverip variable to explicitly use a different tftp server. Signed-off-by: NAlexander Graf <agraf@suse.de> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Alexander Graf 提交于
We can call commands like dhcp and bootp without arguments or with explicit command line arguments that really should tell the code where to look for files instead. Unfortunately, the current code simply overwrites command line arguments in the dhcp case with dhcp values. This patch allows the code to preserve the command line values if they were set on the command line. That way the semantics are slightly more intuitive. The reason this patch does that by introducing a new variable is that we can not rely on net_boot_file_name[0] being unset, as today it's completely legal to call "dhcp" and afterwards run "tftp" and expect the latter to repeat the same query as before. I would prefer not to break that behavior in case anyone relies on it. Signed-off-by: NAlexander Graf <agraf@suse.de> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
由 Lothar Felten 提交于
Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or time out if no WoL packed is received. If the WoL packet contains a password, it is saved in the environment variable 'wolpassword' using the etherwake format (dot or colon separated decimals). Intended use case: a networked device should boot an alternate image. It's attached to a network on a client site, modifying the DHCP server configuration or setup of a tftp server is not allowed. After power on the device waits a few seconds for a WoL packet. If a packet is received, the device boots the alternate image. Otherwise it boots the default image. This method is a simple way to interact with a system via network even if only the MAC address is known. Tools to send WoL packets are available on all common platforms. Some Ethernet drivers seem to pad the incoming packet. The additional padding bytes might be recognized as Wake-on-LAN password bytes. By default enabled in pengwyn_defconfig. Signed-off-by: NLothar Felten <lothar.felten@gmail.com> Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
-
- 02 7月, 2018 1 次提交
-
-
由 Bin Meng 提交于
ACPI tables can be passed via EFI configuration table to an EFI application. This is only supported on x86 so far. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 24 6月, 2018 1 次提交
-
-
由 Bin Meng 提交于
Each entry of the EFI memory descriptors occupies map->desc_size, not sizeof(struct efi_mem_desc). Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 19 6月, 2018 2 次提交
-
-
由 Marek Vasut 提交于
Add option to the booti_setup() which indicates to it that the caller requires the image to be relocated to the beginning of the RAM and that the information whether the image can be located anywhere in RAM at 2 MiB aligned boundary or not is to be ignored. This is useful ie. in case the Image is wrapped in another envelope, ie. fitImage and not relocating it but moving it would corrupt the envelope. Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com> Cc: Bin Chen <bin.chen@linaro.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-By: NBin Chen <bin.chen@linaro.org>
-
由 Alex Kiernan 提交于
When the `mmc hwpartition` command is disabled, remove the associated help text. Signed-off-by: NAlex Kiernan <alex.kiernan@gmail.com>
-