projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stm32f7: board: Fix memory init
[oweals/u-boot.git]
/
cmd
/
cramfs.c
diff --git
a/cmd/cramfs.c
b/cmd/cramfs.c
index 49ee36c74aec81cbdb512d0e46526ba7cce380e0..598028cfadbdedbae33933a2387da55a87818f69 100644
(file)
--- a/
cmd/cramfs.c
+++ b/
cmd/cramfs.c
@@
-1,5
+1,5
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
/*
- * SPDX-License-Identifier: GPL-2.0+
*
* based on: cmd_jffs2.c
*
*
* based on: cmd_jffs2.c
*
@@
-104,7
+104,7
@@
int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
struct mtdids id;
ulong addr;
struct mtdids id;
ulong addr;
- addr = simple_strtoul(
getenv
("cramfsaddr"), NULL, 16);
+ addr = simple_strtoul(
env_get
("cramfsaddr"), NULL, 16);
/* hack! */
/* cramfs_* only supports NOR flash chips */
/* hack! */
/* cramfs_* only supports NOR flash chips */
@@
-117,9
+117,9
@@
int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
part.offset = (u64)(uintptr_t) map_sysmem(addr - OFFSET_ADJUSTMENT, 0);
/* pre-set Boot file name */
part.offset = (u64)(uintptr_t) map_sysmem(addr - OFFSET_ADJUSTMENT, 0);
/* pre-set Boot file name */
- if ((filename = getenv("bootfile")) == NULL) {
+ filename = env_get("bootfile");
+ if (!filename)
filename = "uImage";
filename = "uImage";
- }
if (argc == 2) {
filename = argv[1];
if (argc == 2) {
filename = argv[1];
@@
-138,7
+138,7
@@
int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (size > 0) {
printf("### CRAMFS load complete: %d bytes loaded to 0x%lx\n",
size, offset);
if (size > 0) {
printf("### CRAMFS load complete: %d bytes loaded to 0x%lx\n",
size, offset);
-
setenv
_hex("filesize", size);
+
env_set
_hex("filesize", size);
} else {
printf("### CRAMFS LOAD ERROR<%x> for %s!\n", size, filename);
}
} else {
printf("### CRAMFS LOAD ERROR<%x> for %s!\n", size, filename);
}
@@
-169,7
+169,7
@@
int do_cramfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
struct mtdids id;
ulong addr;
struct mtdids id;
ulong addr;
- addr = simple_strtoul(
getenv
("cramfsaddr"), NULL, 16);
+ addr = simple_strtoul(
env_get
("cramfsaddr"), NULL, 16);
/* hack! */
/* cramfs_* only supports NOR flash chips */
/* hack! */
/* cramfs_* only supports NOR flash chips */