Merge branch 'dey-2.0/master' into dey-2.0/maint
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
commit
165f7097e4
|
|
@ -4,7 +4,7 @@ SRCBRANCH = "v2013.01/dub-2.0/maint"
|
||||||
SRCREV = "${AUTOREV}"
|
SRCREV = "${AUTOREV}"
|
||||||
|
|
||||||
# Select internal or Github U-Boot repo
|
# Select internal or Github U-Boot repo
|
||||||
UBOOT_GIT_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
||||||
|
|
||||||
SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}"
|
SRC_URI = "${UBOOT_GIT_URI};branch=${SRCBRANCH}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ SRCBRANCH = "v2015.04/maint"
|
||||||
SRCREV = "${AUTOREV}"
|
SRCREV = "${AUTOREV}"
|
||||||
|
|
||||||
# Select internal or Github U-Boot repo
|
# Select internal or Github U-Boot repo
|
||||||
UBOOT_GIT_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
From: "Diaz de Grenu, Jose" <Jose.DiazdeGrenu@digi.com>
|
From: "Diaz de Grenu, Jose" <Jose.DiazdeGrenu@digi.com>
|
||||||
Date: Tue, 23 Aug 2016 13:05:05 +0200
|
Date: Tue, 23 Aug 2016 13:05:05 +0200
|
||||||
Subject: [PATCH] tools: env: implement support for environment encryption by
|
Subject: [PATCH] tools: env: implement support for environment encryption
|
||||||
CAAM
|
by CAAM
|
||||||
|
|
||||||
https://jira.digi.com/browse/DEL-2836
|
https://jira.digi.com/browse/DEL-2836
|
||||||
|
|
||||||
|
|
@ -10,8 +10,8 @@ Signed-off-by: Diaz de Grenu, Jose <Jose.DiazdeGrenu@digi.com>
|
||||||
configs/sandbox_defconfig | 1 +
|
configs/sandbox_defconfig | 1 +
|
||||||
tools/env/Makefile | 2 +-
|
tools/env/Makefile | 2 +-
|
||||||
tools/env/caam_keyblob.h | 45 +++++++++++++++
|
tools/env/caam_keyblob.h | 45 +++++++++++++++
|
||||||
tools/env/fw_env.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++
|
tools/env/fw_env.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
4 files changed, 187 insertions(+), 1 deletion(-)
|
4 files changed, 185 insertions(+), 1 deletion(-)
|
||||||
create mode 100644 tools/env/caam_keyblob.h
|
create mode 100644 tools/env/caam_keyblob.h
|
||||||
|
|
||||||
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
|
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
|
||||||
|
|
@ -89,7 +89,7 @@ index 000000000000..1e33b3f01a05
|
||||||
+#endif /* CAAM_KEYBLOB_H */
|
+#endif /* CAAM_KEYBLOB_H */
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
|
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
|
||||||
index daa02a760e37..09f06c874b17 100644
|
index daa02a760e37..806c2fb6d550 100644
|
||||||
--- a/tools/env/fw_env.c
|
--- a/tools/env/fw_env.c
|
||||||
+++ b/tools/env/fw_env.c
|
+++ b/tools/env/fw_env.c
|
||||||
@@ -21,6 +21,7 @@
|
@@ -21,6 +21,7 @@
|
||||||
|
|
@ -233,16 +233,7 @@ index daa02a760e37..09f06c874b17 100644
|
||||||
/*
|
/*
|
||||||
* Print the current definition of one, or more, or all
|
* Print the current definition of one, or more, or all
|
||||||
* environment variables
|
* environment variables
|
||||||
@@ -259,6 +368,8 @@ int fw_printenv (int argc, char *argv[])
|
@@ -334,6 +443,15 @@ int fw_env_close(void)
|
||||||
argc -= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ check_caam_encryption();
|
|
||||||
+
|
|
||||||
if (fw_env_open())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
@@ -334,6 +445,15 @@ int fw_env_close(void)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,16 +249,16 @@ index daa02a760e37..09f06c874b17 100644
|
||||||
/*
|
/*
|
||||||
* Update CRC
|
* Update CRC
|
||||||
*/
|
*/
|
||||||
@@ -504,6 +624,8 @@ int fw_setenv(int argc, char *argv[])
|
@@ -1191,6 +1309,8 @@ int fw_env_open(void)
|
||||||
argc -= 2;
|
struct env_image_single *single;
|
||||||
}
|
struct env_image_redundant *redundant;
|
||||||
|
|
||||||
+ check_caam_encryption();
|
+ check_caam_encryption();
|
||||||
+
|
+
|
||||||
if (argc < 2) {
|
if (parse_config ()) /* should fill envdevices */
|
||||||
errno = EINVAL;
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1229,6 +1351,15 @@ int fw_env_open(void)
|
|
||||||
|
@@ -1229,6 +1349,15 @@ int fw_env_open(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -283,7 +274,7 @@ index daa02a760e37..09f06c874b17 100644
|
||||||
crc0_ok = (crc0 == *environment.crc);
|
crc0_ok = (crc0 == *environment.crc);
|
||||||
if (!HaveRedundEnv) {
|
if (!HaveRedundEnv) {
|
||||||
if (!crc0_ok) {
|
if (!crc0_ok) {
|
||||||
@@ -1286,6 +1417,15 @@ int fw_env_open(void)
|
@@ -1286,6 +1415,15 @@ int fw_env_open(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ SRCREV = "${AUTOREV}"
|
||||||
S = "${WORKDIR}"
|
S = "${WORKDIR}"
|
||||||
|
|
||||||
# Select internal or Github U-Boot repo
|
# Select internal or Github U-Boot repo
|
||||||
UBOOT_GIT_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
UBOOT_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ inherit kernel fsl-kernel-localversion
|
||||||
LOCALVERSION = "-dey"
|
LOCALVERSION = "-dey"
|
||||||
|
|
||||||
# Select internal or Github Linux repo
|
# Select internal or Github Linux repo
|
||||||
LINUX_GIT_URI = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}"
|
LINUX_GIT_URI ?= "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
${LINUX_GIT_URI};branch=${SRCBRANCH} \
|
${LINUX_GIT_URI};branch=${SRCBRANCH} \
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,10 @@ if [ -z "${DY_MFG_IMAGE}" ] && echo ${JOB_NAME} | grep -qs 'dey.*mfg'; then
|
||||||
DY_MFG_IMAGE="true"
|
DY_MFG_IMAGE="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${DY_MACHINES_LAYER}" ]; then
|
||||||
|
MACHINES_LAYER="-m ${DY_MACHINES_LAYER}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Per-platform data
|
# Per-platform data
|
||||||
while read _pl _var _tgt; do
|
while read _pl _var _tgt; do
|
||||||
# DY_BUILD_VARIANTS comes from Jenkins environment:
|
# DY_BUILD_VARIANTS comes from Jenkins environment:
|
||||||
|
|
@ -165,6 +169,7 @@ done<<-_EOF_
|
||||||
ccimx6sbc DONTBUILDVARIANTS dey-image-qt
|
ccimx6sbc DONTBUILDVARIANTS dey-image-qt
|
||||||
ccimx6ulsbc DONTBUILDVARIANTS dey-image-qt
|
ccimx6ulsbc DONTBUILDVARIANTS dey-image-qt
|
||||||
ccimx6ulstarter DONTBUILDVARIANTS core-image-base
|
ccimx6ulstarter DONTBUILDVARIANTS core-image-base
|
||||||
|
ccimx6ulsom DONTBUILDVARIANTS dey-image-mft-module-min
|
||||||
_EOF_
|
_EOF_
|
||||||
|
|
||||||
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
||||||
|
|
@ -221,7 +226,7 @@ for platform in ${DY_PLATFORMS}; do
|
||||||
# mixing environments between different platform's projects
|
# mixing environments between different platform's projects
|
||||||
(
|
(
|
||||||
export TEMPLATECONF="${TEMPLATECONF:+${TEMPLATECONF}/${platform}}"
|
export TEMPLATECONF="${TEMPLATECONF:+${TEMPLATECONF}/${platform}}"
|
||||||
MKP_PAGER="" . ${YOCTO_INST_DIR}/mkproject.sh -p ${platform} ${_this_var_arg} <<< "y"
|
MKP_PAGER="" . ${YOCTO_INST_DIR}/mkproject.sh -p ${platform} ${MACHINES_LAYER} ${_this_var_arg} <<< "y"
|
||||||
# Set a common DL_DIR and SSTATE_DIR for all platforms
|
# Set a common DL_DIR and SSTATE_DIR for all platforms
|
||||||
sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_PROJ_DIR}/downloads\"" \
|
sed -i -e "/^#DL_DIR ?=/cDL_DIR ?= \"${YOCTO_PROJ_DIR}/downloads\"" \
|
||||||
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
-e "/^#SSTATE_DIR ?=/cSSTATE_DIR ?= \"${YOCTO_PROJ_DIR}/sstate-cache\"" \
|
||||||
|
|
|
||||||
|
|
@ -48,14 +48,10 @@ Usage: source ${MKP_SCRIPTNAME} [OPTIONS]
|
||||||
|
|
||||||
-l list supported platforms
|
-l list supported platforms
|
||||||
-p <platform> select platform for the project
|
-p <platform> select platform for the project
|
||||||
-v <variant> select platform variant
|
-m <layer> Layer with the supported platforms (defaults to meta-digi)
|
||||||
|
|
||||||
Supported platforms: $(display_supported_platforms)
|
Supported platforms: $(display_supported_platforms)
|
||||||
|
|
||||||
See platform include files for supported variant names:
|
|
||||||
|
|
||||||
${MKP_SCRIPTPATH}/sources/meta-digi/meta-digi-arm/conf/machine/include/<platform>.inc
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,28 +149,31 @@ if ! cmp -s ${MKP_SCRIPTPATH}/${MKP_SCRIPTNAME} ${MKP_SCRIPTPATH}/sources/meta-d
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Get available platforms
|
|
||||||
MKP_AVAILABLE_PLATFORMS="$(echo $(ls -1 ${MKP_CONFIGPATH}/*/local.conf.sample | sed -e 's,^.*config/\([^/]\+\)/local\.conf\.sample,\1,g'))"
|
|
||||||
|
|
||||||
# Verify if this is a new project (so we do NOT customize it)
|
# Verify if this is a new project (so we do NOT customize it)
|
||||||
[ -r "${MKP_PROJECTPATH}/conf/bblayers.conf" -a -r "${MKP_PROJECTPATH}/conf/local.conf" ] && MKP_OLD_PROJECT="1"
|
[ -r "${MKP_PROJECTPATH}/conf/bblayers.conf" -a -r "${MKP_PROJECTPATH}/conf/local.conf" ] && MKP_OLD_PROJECT="1"
|
||||||
|
|
||||||
# The script needs to be sourced (not executed) so make sure to
|
# The script needs to be sourced (not executed) so make sure to
|
||||||
# initialize OPTIND variable for getopts.
|
# initialize OPTIND variable for getopts.
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
while getopts "lp:v:" c; do
|
while getopts "lp:v:m:" c; do
|
||||||
case "${c}" in
|
case "${c}" in
|
||||||
l) MKP_LIST_PLATFORMS="y";;
|
l) MKP_LIST_PLATFORMS="y";;
|
||||||
p) MKP_PLATFORM="${OPTARG}";;
|
p) MKP_PLATFORM="${OPTARG}";;
|
||||||
v) MKP_VARIANT="${OPTARG}";;
|
v) MKP_VARIANT="${OPTARG}";;
|
||||||
|
m) MKP_CONFIGPATH="${MKP_SCRIPTPATH}/sources/${OPTARG}/sdk/config";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## Get available platforms
|
||||||
|
MKP_AVAILABLE_PLATFORMS="$(echo $(ls -1 ${MKP_CONFIGPATH}/*/local.conf.sample | sed -e 's,^.*config/\([^/]\+\)/local\.conf\.sample,\1,g'))"
|
||||||
|
|
||||||
## Sanity checks
|
## Sanity checks
|
||||||
if [ "${BASH_SOURCE}" = "${0}" ]; then
|
if [ "${BASH_SOURCE}" = "${0}" ]; then
|
||||||
error "This script needs to be sourced"
|
error "This script needs to be sourced"
|
||||||
elif [ ${#} -eq 0 ] ; then
|
elif [ ${#} -eq 0 ] ; then
|
||||||
usage
|
usage
|
||||||
|
elif [ ! -d "${MKP_CONFIGPATH}" ]; then
|
||||||
|
error "selected platform configuration directory \"${MKP_CONFIGPATH}\" does not exist"
|
||||||
elif [ -n "${MKP_LIST_PLATFORMS}" ]; then
|
elif [ -n "${MKP_LIST_PLATFORMS}" ]; then
|
||||||
display_supported_platforms
|
display_supported_platforms
|
||||||
elif [ -z "${MKP_PLATFORM}" ]; then
|
elif [ -z "${MKP_PLATFORM}" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue