| 4d907025 | 12-Jun-2014 |
Stephen Warren <swarren@nvidia.com> |
sandbox: restore ability to access host fs through standard commands
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree" removed the ability for get_device_and_partition() to ha
sandbox: restore ability to access host fs through standard commands
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree" removed the ability for get_device_and_partition() to handle the "host" device type, and redirect accesses to it to the host filesystem. This broke some unit tests that use this feature. So, revert that change. The code added back by this patch is slightly different to pacify checkpatch.
However, we're then left with "host" being both: - A pseudo device that accesses the hosts real filesystem. - An emulated block device, which accesses "sectors" inside a file stored on the host.
In order to resolve this discrepancy, rename the pseudo device from host to hostfs, and adjust the unit-tests for this change.
The "help sb" output is modified to reflect this rename, and state where the host and hostfs devices should be used.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Josh Wu <josh.wu@atmel.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
show more ...
|
| aa53233a | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Add an I/O tracing feature
When debugging drivers it is useful to see what I/O accesses were done and in what order.
Even if the individual accesses are of little interest it can be useful to verif
Add an I/O tracing feature
When debugging drivers it is useful to see what I/O accesses were done and in what order.
Even if the individual accesses are of little interest it can be useful to verify that the access pattern is consistent each time an operation is performed. In this case a checksum can be used to characterise the operation of a driver. The checksum can be compared across different runs of the operation to verify that the driver is working properly.
In particular, when performing major refactoring of the driver, where the access pattern should not change, the checksum provides assurance that the refactoring work has not broken the driver.
Add an I/O tracing feature and associated commands to provide this facility. It works by sneaking into the io.h heder for an architecture and redirecting I/O accesses through its tracing mechanism.
For now no commands are provided to examine the trace buffer. The format is fairly simple, so 'md' is a reasonable substitute.
Note: The checksum feature is only useful for I/O regions where the contents do not change outside of software control. Where this is not suitable you can fall back to manually comparing the addresses. It might be useful to enhance tracing to only checksum the accesses and not the data read/written.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9e546ee9 | 15-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
cosmetic: autoboot: update old style GNU struct init
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl> |
| 9fb70f31 | 15-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
cmd_md5sum.c: remove dead code / fix warning
commit ecd729500 "Add parameter to md5sum to save the md5 sum" adds support to build a string to be saved in the env and tries to zero end it with str_pt
cmd_md5sum.c: remove dead code / fix warning
commit ecd729500 "Add parameter to md5sum to save the md5 sum" adds support to build a string to be saved in the env and tries to zero end it with str_ptr = '\0'; This does actually set the pointer to the end of the buffer itself to zero. Since the string was already zero terminated by the sprintf before it, just remove the line, preventing a clang warning.
cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| 2b9912e6 | 12-Jun-2014 |
Jeroen Hofstee <jeroen@myspectrum.nl> |
includes: move openssl headers to include/u-boot
commit 18b06652cd "tools: include u-boot version of sha256.h" unconditionally forced the sha256.h from u-boot to be used for tools instead of the hos
includes: move openssl headers to include/u-boot
commit 18b06652cd "tools: include u-boot version of sha256.h" unconditionally forced the sha256.h from u-boot to be used for tools instead of the host version. This is fragile though as it will also include the host version. Therefore move it to include/u-boot to join u-boot/md5.h etc which were renamed for the same reason.
cc: Simon Glass <sjg@chromium.org> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
show more ...
|
| ce1400f6 | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Enhance fit_check_sign to check all images
At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify.
Sig
Enhance fit_check_sign to check all images
At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> (v1)
show more ...
|
| 2b164f1c | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
bootm: Move decompression code into its own function
This makes it possible to decompress an image without it being a kernel and without intending to boot it (as it needed for host tools, for exampl
bootm: Move decompression code into its own function
This makes it possible to decompress an image without it being a kernel and without intending to boot it (as it needed for host tools, for example).
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| ea51a628 | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Allow compiling common/bootm.c on with HOSTCC
We want to use some of the functionality in this file, so make it build on the host.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| e3c83c0a | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Fix small 'case' typo in image-fit.c
This typo makes the comment confusing. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| 07c0cd71 | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
bootm: Support android boot on sandbox
A small change allows this to operate on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| 126cc864 | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
image: Remove the fit_load_image() property parameter
This can be obtained by looking up the image type, so is redundant. It is better to centralise this lookup to avoid errors.
Signed-off-by: Simo
image: Remove the fit_load_image() property parameter
This can be obtained by looking up the image type, so is redundant. It is better to centralise this lookup to avoid errors.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b6396403 | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
bootm: Split out code from cmd_bootm.c
This file has code in three different categories: - Command processing - OS-specific boot code - Locating images and setting up to boot
Only the first categor
bootm: Split out code from cmd_bootm.c
This file has code in three different categories: - Command processing - OS-specific boot code - Locating images and setting up to boot
Only the first category really belongs in a file called cmd_bootm.c.
Leave the command processing code where it is. Split out the OS-specific boot code into bootm_os.c. Split out the other code into bootm.c
Header files and extern declarations are tidied but otherwise no code changes are made, to make it easier to review.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 12df2abe | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
Reverse the meaning of the fit_config_verify() return code
It is more common to have 0 mean OK, and -ve mean error. Change this function to work the same way to avoid confusion.
Signed-off-by: Simo
Reverse the meaning of the fit_config_verify() return code
It is more common to have 0 mean OK, and -ve mean error. Change this function to work the same way to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 04819a4f | 12-Jun-2014 |
Simon Glass <sjg@chromium.org> |
hash: Use uint8_t in preference to u8
This type is more readily available on the host compiler, so use it instead.
Signed-off-by: Simon Glass <sjg@chromium.org> |
| 50babaf8 | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: correct the return condition of fdt_initrd()
Before this commit, fdt_initrd() just returned if initrd start address is zero. But it is possible if the RAM is located at address 0.
This
fdt_support: correct the return condition of fdt_initrd()
Before this commit, fdt_initrd() just returned if initrd start address is zero. But it is possible if the RAM is located at address 0.
This commit makes the return condition more reasonable: Just return if the size of initrd is zero.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| f18295d3 | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: fix an endian bug of fdt_initrd()
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.
fdt_initrd() invoked write
fdt_support: fix an endian bug of fdt_initrd()
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.
fdt_initrd() invoked write_cell(), which always swaps byte order. It means the function only worked on little endian architectures. (On big endian architectures, the byte order should be kept as it is)
This commit uses cpu_to_fdt32() and cpu_to_fdt64() and deletes write_cell().
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 739a01ed | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: fix an endian bug of fdt_fixup_memory_banks
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.
fdt_fixup_memory
fdt_support: fix an endian bug of fdt_fixup_memory_banks
Data written to DTB must be converted to big endian order. It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.
fdt_fixup_memory_banks() invoked write_cell(), which always swaps byte order. It means the function only worked on little endian architectures.
This commit adds and uses a new helper function, fdt_pack_reg(), which works on both big endian and little endian architrectures.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| f89d482f | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg() which uses get_cells_len().
Beforehand, this commit adds 'const' qualifier to
fdt_support: add 'const' qualifier for unchanged argument
In the next commit, I will add a new function, fdt_pack_reg() which uses get_cells_len().
Beforehand, this commit adds 'const' qualifier to get_cells_len(). Otherwise, a warning message will appear: warning: passing argument 1 of 'get_cells_len' discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 972f2a89 | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: refactor fdt_fixup_stdout() function
- Do not use a deep indentation. We have only 80-character on each line and 1 indentation consumes 8 spaces. Before the code moves far to the
fdt_support: refactor fdt_fixup_stdout() function
- Do not use a deep indentation. We have only 80-character on each line and 1 indentation consumes 8 spaces. Before the code moves far to the right, you should consider to fix your code. See Linux Documentation/CodingStyle.
- Add CONFIG_OF_STDOUT_VIA_ALIAS and OF_STDOUT_PATH macros only to their definition. Do not add them to both callee and caller. This is a tip to avoid using #ifdef everywhere.
- OF_STDOUT_PATH and CONFIG_OF_STDOUT_VIA_ALIAS are exclusive. If both are defined, the former takes precedence. Do not try to fix-up "linux,stdout-path" property twice.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| bc6ed0f9 | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: delete force argument of fdt_chosen()
After all, we have realized "force" argument is completely useless. fdt_chosen() was always called with force = 1.
We should always want to do the
fdt_support: delete force argument of fdt_chosen()
After all, we have realized "force" argument is completely useless. fdt_chosen() was always called with force = 1.
We should always want to do the same thing (set appropriate value to the property) even if the property already exists.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| dbe963ae | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: delete force argument of fdt_initrd()
After all, we have realized "force" argument is completely useless. fdt_initrd() was always called with force = 1.
We should always want to do the
fdt_support: delete force argument of fdt_initrd()
After all, we have realized "force" argument is completely useless. fdt_initrd() was always called with force = 1.
We should always want to do the same thing (set appropriate value to the property) even if the property already exists.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 8edb2192 | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: refactor with fdt_find_or_add_subnode helper func
Some functions in fdt_support.c do the same routine: search a node with a given name ("chosen", "memory", etc.) or newly create it if i
fdt_support: refactor with fdt_find_or_add_subnode helper func
Some functions in fdt_support.c do the same routine: search a node with a given name ("chosen", "memory", etc.) or newly create it if it does not exist.
So this commit makes that routine to a helper function.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 0613c57c | 18-Apr-2014 |
Masahiro Yamada <yamada.m@jp.panasonic.com> |
fdt_support: delete unnecessary DECLARE_GLOBAL_DATA_PTR
gd->bd is not used in fdt_support.c.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org> |
| b1f49ab8 | 02-Oct-2013 |
Dan Murphy <dmurphy@ti.com> |
ARM: fdt support: Add usbethaddr as an acceptable MAC
A board that has a USB ethernet device only may set the usbetheraddr and not the ethaddr. ethaddr will be the default MAC address that is chosen
ARM: fdt support: Add usbethaddr as an acceptable MAC
A board that has a USB ethernet device only may set the usbetheraddr and not the ethaddr. ethaddr will be the default MAC address that is chosen and if that is not populated then the usbethaddr is looked at. If neither are set then then device tree blob is not modified.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
show more ...
|
| a5710920 | 23-May-2014 |
Stephen Warren <swarren@nvidia.com> |
cmd_mmc: make mmc dev always re-probe the HW
Currently, U-Boot behaves as follows:
- Begin with no SD card inserted in "mmc 1" - Execute: mmc dev 1 - This fails, since there is no card - User plugs
cmd_mmc: make mmc dev always re-probe the HW
Currently, U-Boot behaves as follows:
- Begin with no SD card inserted in "mmc 1" - Execute: mmc dev 1 - This fails, since there is no card - User plugs in an SD card - Execute: mmc dev 1 - This still fails, since the HW isn't reprobed.
With this change, U-Boot behaves as follows:
- Begin with no SD card inserted in "mmc 1" - Execute: mmc dev 1 - This fails, since there is no card - User plugs in an SD card - Execute: mmc dev 1 - The newly present SD card is detected
I know that "mmc rescan" will force the HW to be reprobed, but I feel it makes more sense if "mmc dev" always reprobes the HW after selecting the current MMC device. This allows scripts to just execute "mmc dev", and not have to also execute "mmc rescan" to check for media presense.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
show more ...
|