MA-14120 Add config to guard append bootargs support
Grant user the permission to change the bootargs can be very
dangerous, so add config 'CONFIG_APPEND_BOOTARGS' to guard the
bootargs appending feature.
Test: bootargs can't be appended if "CONFIG_APPEND_BOOTARGS" is
not set.
Change-Id: I6d6879415ca251c806b56490290e5032aef24277
Signed-off-by: Ji Luo <ji.luo@nxp.com>
This commit is contained in:
parent
3a62d022b9
commit
24e33164cb
|
|
@ -233,6 +233,7 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
|
|||
strncat(commandline, bootargs_trusty, sizeof(commandline) - strlen(commandline));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_APPEND_BOOTARGS
|
||||
/* Add 'append_bootargs' to hold some paramemters which need to be appended
|
||||
* to bootargs */
|
||||
char *append_bootargs = env_get("append_bootargs");
|
||||
|
|
@ -245,6 +246,7 @@ int android_image_get_kernel(const struct andr_img_hdr *hdr, int verify,
|
|||
strncat(commandline, append_bootargs, sizeof(commandline) - strlen(commandline));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
debug("Kernel command line: %s\n", commandline);
|
||||
env_set("bootargs", commandline);
|
||||
|
|
|
|||
|
|
@ -62,3 +62,4 @@ CONFIG_SPL_USB_GADGET_SUPPORT=y
|
|||
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -62,3 +62,4 @@ CONFIG_SPL_USB_GADGET_SUPPORT=y
|
|||
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -63,3 +63,4 @@ CONFIG_SPL_USB_SDP_SUPPORT=y
|
|||
CONFIG_IMX_TRUSTY_OS=y
|
||||
CONFIG_SPL_ENV_SUPPORT=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -76,3 +76,4 @@ CONFIG_SPL_USB_GADGET_SUPPORT=y
|
|||
CONFIG_SPL_USB_SDP_SUPPORT=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -78,3 +78,4 @@ CONFIG_USB_DWC3=y
|
|||
CONFIG_USB_DWC3_GADGET=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -90,3 +90,4 @@ CONFIG_SPL_MMC_SUPPORT=y
|
|||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -120,3 +120,4 @@ CONFIG_NOT_UUU_BUILD=y
|
|||
CONFIG_SHA256=y
|
||||
CONFIG_SPL_MMC_WRITE=y
|
||||
CONFIG_DUAL_BOOTLOADER=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -122,3 +122,4 @@ CONFIG_SPL_GPIO_SUPPORT=y
|
|||
|
||||
CONFIG_SPL_ENV_SUPPORT=y
|
||||
CONFIG_SPL_LIBDISK_SUPPORT=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -90,3 +90,4 @@ CONFIG_SPL_MMC_SUPPORT=y
|
|||
CONFIG_SPL_GPIO_SUPPORT=y
|
||||
|
||||
CONFIG_NOT_UUU_BUILD=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -121,3 +121,4 @@ CONFIG_NOT_UUU_BUILD=y
|
|||
CONFIG_SHA256=y
|
||||
CONFIG_SPL_MMC_WRITE=y
|
||||
CONFIG_DUAL_BOOTLOADER=y
|
||||
CONFIG_APPEND_BOOTARGS=y
|
||||
|
|
|
|||
|
|
@ -50,5 +50,6 @@
|
|||
|
||||
#define CONFIG_FASTBOOT_BUF_ADDR CONFIG_SYS_LOAD_ADDR
|
||||
#define CONFIG_FASTBOOT_BUF_SIZE 0x19000000
|
||||
#define CONFIG_APPEND_BOOTARGS
|
||||
|
||||
#endif /*MX_ANDROID_COMMON_H*/
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ config AVB_ATX
|
|||
bool "Enable AVB_ATX support"
|
||||
depends on AVB_SUPPORT
|
||||
|
||||
config APPEND_BOOTARGS
|
||||
bool "Append bootargs support"
|
||||
|
||||
config BCH
|
||||
bool "Enable Software based BCH ECC"
|
||||
help
|
||||
|
|
|
|||
Loading…
Reference in New Issue