summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig56
-rw-r--r--cmd/eficonfig.c2
-rw-r--r--cmd/fastboot.c2
-rw-r--r--cmd/optee_rpmb.c23
4 files changed, 71 insertions, 12 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 45c20636951..c182d73ddbd 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -262,7 +262,6 @@ config CMD_BOOTD
config CMD_BOOTM
bool "bootm"
- depends on BOOTM
default y
help
Boot an application image from the memory.
@@ -334,6 +333,48 @@ config CMD_BOOTI
help
Boot an AArch64 Linux Kernel image from memory.
+config BOOTM_LINUX
+ bool "Support booting Linux OS images"
+ depends on CMD_BOOTM || CMD_BOOTZ || CMD_BOOTI
+ default y
+ help
+ Support booting the Linux kernel directly via a command such as bootm
+ or booti or bootz.
+
+config BOOTM_NETBSD
+ bool "Support booting NetBSD (non-EFI) loader images"
+ depends on CMD_BOOTM
+ default y
+ help
+ Support booting NetBSD via the bootm command.
+
+config BOOTM_OPENRTOS
+ bool "Support booting OPENRTOS / FreeRTOS images"
+ depends on CMD_BOOTM
+ help
+ Support booting OPENRTOS / FreeRTOS via the bootm command.
+
+config BOOTM_OSE
+ bool "Support booting Enea OSE images"
+ depends on (ARM && (ARM64 || CPU_V7A || CPU_V7R) || SANDBOX || PPC || X86)
+ depends on CMD_BOOTM
+ help
+ Support booting Enea OSE images via the bootm command.
+
+config BOOTM_PLAN9
+ bool "Support booting Plan9 OS images"
+ depends on CMD_BOOTM
+ default y
+ help
+ Support booting Plan9 images via the bootm command.
+
+config BOOTM_RTEMS
+ bool "Support booting RTEMS OS images"
+ depends on CMD_BOOTM
+ default y
+ help
+ Support booting RTEMS images via the bootm command.
+
config CMD_SEAMA
bool "Support read SEAMA NAND images"
depends on MTD_RAW_NAND
@@ -350,6 +391,13 @@ config CMD_VBE
is used to boot. Updating the parameters is not currently
supported.
+config BOOTM_VXWORKS
+ bool "Support booting VxWorks OS images"
+ depends on CMD_BOOTM
+ default y
+ help
+ Support booting VxWorks images via the bootm command.
+
config CMD_BOOTEFI
bool "bootefi"
depends on EFI_LOADER
@@ -444,7 +492,6 @@ config CMD_ELF
config CMD_ELF_FDT_SETUP
bool "Flattened Device Tree setup in bootelf cmd"
- default n
depends on CMD_ELF
select LIB_LIBFDT
select LMB
@@ -1348,7 +1395,9 @@ config CMD_CLONE
config CMD_OPTEE_RPMB
bool "Enable read/write support on RPMB via OPTEE"
- depends on SUPPORT_EMMC_RPMB && OPTEE
+ depends on (SUPPORT_EMMC_RPMB && OPTEE) || SANDBOX_TEE
+ default y if SANDBOX_TEE
+ select OPTEE_TA_AVB if SANDBOX_TEE
help
Enable the commands for reading, writing persistent named values
in the Replay Protection Memory Block partition in eMMC by
@@ -2573,7 +2622,6 @@ config CMD_CROS_EC
config CMD_SCMI
bool "Enable scmi command"
depends on SCMI_FIRMWARE
- default n
help
This command provides user interfaces to several SCMI (System
Control and Management Interface) protocols available on Arm
diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
index 8234e602b8f..0ba92c60e03 100644
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -1419,7 +1419,7 @@ static efi_status_t eficonfig_edit_boot_option(u16 *varname, struct eficonfig_bo
}
bo->initrd_info.current_path = calloc(1, EFICONFIG_FILE_PATH_BUF_SIZE);
- if (!bo->file_info.current_path) {
+ if (!bo->initrd_info.current_path) {
ret = EFI_OUT_OF_RESOURCES;
goto out;
}
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 792e83d372c..c3c19231c98 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -159,7 +159,7 @@ NXTARG:
return CMD_RET_USAGE;
}
- fastboot_init(buf_addr, buf_size);
+ fastboot_init((void *)buf_addr, buf_size);
if (!strcmp(argv[1], "udp"))
return do_fastboot_udp(argc, argv, buf_addr, buf_size);
diff --git a/cmd/optee_rpmb.c b/cmd/optee_rpmb.c
index e0e44bbed04..b3cafd92410 100644
--- a/cmd/optee_rpmb.c
+++ b/cmd/optee_rpmb.c
@@ -87,8 +87,10 @@ static int read_persistent_value(const char *name,
rc = tee_shm_alloc(tee, name_size,
TEE_SHM_ALLOC, &shm_name);
- if (rc)
- return -ENOMEM;
+ if (rc) {
+ rc = -ENOMEM;
+ goto close_session;
+ }
rc = tee_shm_alloc(tee, buffer_size,
TEE_SHM_ALLOC, &shm_buf);
@@ -125,6 +127,9 @@ out:
tee_shm_free(shm_buf);
free_name:
tee_shm_free(shm_name);
+close_session:
+ tee_close_session(tee, session);
+ tee = NULL;
return rc;
}
@@ -139,17 +144,20 @@ static int write_persistent_value(const char *name,
struct tee_param param[2];
size_t name_size = strlen(name) + 1;
+ if (!value_size)
+ return -EINVAL;
+
if (!tee) {
if (avb_ta_open_session())
return -ENODEV;
}
- if (!value_size)
- return -EINVAL;
rc = tee_shm_alloc(tee, name_size,
TEE_SHM_ALLOC, &shm_name);
- if (rc)
- return -ENOMEM;
+ if (rc) {
+ rc = -ENOMEM;
+ goto close_session;
+ }
rc = tee_shm_alloc(tee, value_size,
TEE_SHM_ALLOC, &shm_buf);
@@ -178,6 +186,9 @@ out:
tee_shm_free(shm_buf);
free_name:
tee_shm_free(shm_name);
+close_session:
+ tee_close_session(tee, session);
+ tee = NULL;
return rc;
}