| #
c9bf1d5a |
| 11-Oct-2017 |
Tom Rini <trini@konsulko.com> |
UPSTREAM: cmd/pxe.c: Rework bootargs construction to clarify string checks
As the code currently stands, we first check that the length of the given command line, along with ip_str/mac_str along wit
UPSTREAM: cmd/pxe.c: Rework bootargs construction to clarify string checks
As the code currently stands, we first check that the length of the given command line, along with ip_str/mac_str along with an additional 1 for the NULL termination will fit within the buffer we have, and if not, we return an error. The way this code was originally written however left Coverity "unhappy" due to using strcat rather than strncat. Switching this to strncat however causes clang to be unhappy that we aren't enforcing the "1" portion within strncat. Rather than further re-work the code to include a "- 1" in this case as well, make the strcat code only be done within the else side of the length test. This keeps both clang and Coverity happy.
Fixes: 48ee0a87bc46 ("cmd/pxe.c: Rework initrd and bootargs handling slightly") Change-Id: I6a3d3ea54d6b7e1f3c2aed200b2f706f42d570d4 Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 59ee8f83b6e77550d5697fced4899e9b5173981f)
show more ...
|
| #
7f2f3661 |
| 27-Sep-2017 |
Tom Rini <trini@konsulko.com> |
UPSTREAM: cmd/pxe.c: Rework initrd and bootargs handling slightly
For the initrd portion of handling our bootm arguments we do not have a sufficiently long enough buffer for some improbable 64bit ca
UPSTREAM: cmd/pxe.c: Rework initrd and bootargs handling slightly
For the initrd portion of handling our bootm arguments we do not have a sufficiently long enough buffer for some improbable 64bit cases. Expand this buffer to allow for a 64bit address and almost 256MB initrd to be used. Make use of strncpy/strncat when constructing the values here since we know what the worst case valid values are, length wise.
Similarly for bootargs themselves, we need to make use of strlen/sizeof and strncpy/strncat to ensure that we don't overflow bootargs itself.
Cc: Simon Glass <sjg@chromium.org> Cc: Alexander Graf <agraf@suse.de> Change-Id: I86151e4bde53972d9b6105f3a85db93b114e22d8 Reported-by: Coverity (CID: 131256) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 48ee0a87bc46a6f863ffd9e0396b7a068dd68c50)
show more ...
|
| #
35affd7a |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
Rename this function for consistency with env_get().
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| #
00caae6d |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h.
Quite a few place
env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h.
Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also.
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
382bee57 |
| 03-Aug-2017 |
Simon Glass <sjg@chromium.org> |
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd
env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| #
f63963f0 |
| 01-Sep-2016 |
York Sun <york.sun@nxp.com> |
pxe: Fix pxe boot with FIT image
When FIT image is used, a single image provides kernel, device tree and optionally ramdisk. Argc and argv need to be adjusted to support this.
Test cases: 1. Booti
pxe: Fix pxe boot with FIT image
When FIT image is used, a single image provides kernel, device tree and optionally ramdisk. Argc and argv need to be adjusted to support this.
Test cases: 1. Booting with legacy images 2. Booting with legacy images without initrd 3. Booting with FIT image Test commands: 1. pxe get && pxe boot 2. sysboot
Signed-off-by: York Sun <york.sun@nxp.com> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
show more ...
|
| #
57dc53a7 |
| 08-Feb-2016 |
Tom Rini <trini@konsulko.com> |
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
|
| #
a187559e |
| 06-Feb-2016 |
Bin Meng <bmeng.cn@gmail.com> |
Use correct spelling of "U-Boot"
Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.).
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed
Use correct spelling of "U-Boot"
Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.).
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
show more ...
|
| #
2e192b24 |
| 18-Jan-2016 |
Simon Glass <sjg@chromium.org> |
Remove the cmd_ prefix from command files
Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way.
Signed-o
Remove the cmd_ prefix from command files
Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
show more ...
|