Skip to content
Snippets Groups Projects
Commit ae35db73 authored by Nicola Sparnacci's avatar Nicola Sparnacci Committed by Davide Cardillo
Browse files

[LICENSE][YCONFIG] Add NXP EULA acceptance via configurator


Add possibility to accept automatically the EULA via the
configurator.

Modified the post-script so that if the license has already been
accepted then it's not asked to the user to accept it again.

JIRA Reference: [CLEAOS-627]

Signed-off-by: default avatarNicola Sparnacci <nicola.sparnacci@seco.com>
parent 9aff4af4
No related branches found
No related tags found
1 merge request!495[LAYER] i.MX platform support compatible with Clea OS
......@@ -8,6 +8,16 @@ BUILD_DIR=${PWD}
FSL_EULA_FILE=${BUILD_DIR}/../layers/meta-freescale/EULA
LOCAL_CONF_PATH="${BUILD_DIR}/conf/local.conf"
echo >&2
# Skip user interaction if the license has already been accepted
if grep -q "${LICENSE_VARIABLE}" "${LOCAL_CONF_PATH}"; then
echo "License variable already in local.conf:" >&2
grep "${LICENSE_VARIABLE}" "${LOCAL_CONF_PATH}" >&2
echo >&2
return 0
fi
# Check for the existence of EULA file in meta-freescale
if [ ! -e $FSL_EULA_FILE ]; then
echo -e "ERROR: NXP EULA not found at $FSL_EULA_FILE." >&2
......@@ -40,14 +50,7 @@ case "$choice" in
yes|y)
echo >&2
echo "The NXP EULA has been accepted." >&2
if grep -q "${LICENSE_VARIABLE}" "${LOCAL_CONF_PATH}"; then
echo "The NXP EULA flag ${LICENSE_VARIABLE} is already present. Updating it with the new value." >&2
sed -i "/${LICENSE_COMMENT}/d" "${LOCAL_CONF_PATH}"
sed -i "/${LICENSE_VARIABLE}/d" "${LOCAL_CONF_PATH}"
else
echo "Adding NXP EULA flag ${LICENSE_VARIABLE} to local.conf." >&2
fi
echo "Adding NXP EULA flag ${LICENSE_VARIABLE} to local.conf." >&2
echo -e "\n${LICENSE_COMMENT}\n${LICENSE_VARIABLE_LINE}\n" >> "${LOCAL_CONF_PATH}"
;;
no|n)
......@@ -56,4 +59,6 @@ case "$choice" in
*)
echo "Invalid input. Please respond with 'yes', 'y', 'no' or 'n'." >&2
;;
esac
\ No newline at end of file
esac
echo >&2
\ No newline at end of file
menu "i.MX Settings"
depends on HW_IMX
config YS_ACCEPT-FSL-EULA
bool "Automatically accept iMX EULA"
depends on ARCH_ARCHITECTURE_imx
help
Accept FSL EULA.
endmenu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment