build.sh: add support to build kernel version 3.x
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
4d0244409c
commit
a04ea9af59
31
sdk/build.sh
31
sdk/build.sh
|
|
@ -37,6 +37,12 @@ SOURCE_MIRROR_URL ?= \"http://build-linux.digi.com/yocto/downloads/\"
|
||||||
INHERIT += \"own-mirrors\"
|
INHERIT += \"own-mirrors\"
|
||||||
"
|
"
|
||||||
|
|
||||||
|
KERNEL_3X_CFG="
|
||||||
|
# Build Linux 3.10 and U-Boot 2013.01
|
||||||
|
PREFERRED_VERSION_linux-dey = \"3.10\"
|
||||||
|
PREFERRED_VERSION_u-boot-dey = \"2013.01\"
|
||||||
|
"
|
||||||
|
|
||||||
REPO="$(which repo)"
|
REPO="$(which repo)"
|
||||||
|
|
||||||
error() {
|
error() {
|
||||||
|
|
@ -90,6 +96,17 @@ done<<-_EOF_
|
||||||
wr21 -
|
wr21 -
|
||||||
_EOF_
|
_EOF_
|
||||||
|
|
||||||
|
# Support Linux-3.x and U-Boot 2013.x
|
||||||
|
while read _pl _ker; do
|
||||||
|
eval "${_pl}_ker=\"${_ker}\""
|
||||||
|
done<<-_EOF_
|
||||||
|
ccardimx28js y
|
||||||
|
ccimx51js n
|
||||||
|
ccimx53js n
|
||||||
|
cpx2 n
|
||||||
|
wr21 n
|
||||||
|
_EOF_
|
||||||
|
|
||||||
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
||||||
YOCTO_INST_DIR="${WORKSPACE}/digi-yocto-sdk.$(echo ${DY_REVISION} | tr '/' '_')"
|
YOCTO_INST_DIR="${WORKSPACE}/digi-yocto-sdk.$(echo ${DY_REVISION} | tr '/' '_')"
|
||||||
YOCTO_PROJ_DIR="${WORKSPACE}/projects"
|
YOCTO_PROJ_DIR="${WORKSPACE}/projects"
|
||||||
|
|
@ -123,12 +140,14 @@ fi
|
||||||
rm -rf ${YOCTO_IMGS_DIR} ${YOCTO_PROJ_DIR}
|
rm -rf ${YOCTO_IMGS_DIR} ${YOCTO_PROJ_DIR}
|
||||||
for platform in ${DY_PLATFORMS}; do
|
for platform in ${DY_PLATFORMS}; do
|
||||||
eval platform_variants="\${${platform}_var}"
|
eval platform_variants="\${${platform}_var}"
|
||||||
|
eval platform_kernel3x="\${${platform}_ker%n}"
|
||||||
|
for kernel_ver in "" ${platform_kernel3x:+-3x}; do
|
||||||
for variant in ${platform_variants}; do
|
for variant in ${platform_variants}; do
|
||||||
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}"
|
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}${kernel_ver}"
|
||||||
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}"
|
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}${kernel_ver}"
|
||||||
if [ "${variant}" != "DONTBUILDVARIANTS" ]; then
|
if [ "${variant}" != "DONTBUILDVARIANTS" ]; then
|
||||||
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}_${variant}"
|
_this_prj_dir="${YOCTO_PROJ_DIR}/${platform}${kernel_ver}_${variant}"
|
||||||
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}_${variant}"
|
_this_img_dir="${YOCTO_IMGS_DIR}/${platform}${kernel_ver}_${variant}"
|
||||||
_this_var_arg="-v ${variant}"
|
_this_var_arg="-v ${variant}"
|
||||||
[ "${variant}" = "-" ] && _this_var_arg="-v \\"
|
[ "${variant}" = "-" ] && _this_var_arg="-v \\"
|
||||||
fi
|
fi
|
||||||
|
|
@ -152,6 +171,9 @@ for platform in ${DY_PLATFORMS}; do
|
||||||
sed -i -e "s,^#DIGI_INTERNAL_GIT,DIGI_INTERNAL_GIT,g" conf/local.conf
|
sed -i -e "s,^#DIGI_INTERNAL_GIT,DIGI_INTERNAL_GIT,g" conf/local.conf
|
||||||
printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf
|
printf "${DIGI_PREMIRROR_CFG}" >> conf/local.conf
|
||||||
fi
|
fi
|
||||||
|
if [ -n "${kernel_ver}" ]; then
|
||||||
|
printf "${KERNEL_3X_CFG}" >> conf/local.conf
|
||||||
|
fi
|
||||||
[ "${DY_RM_WORK}" = "true" ] && printf "\nINHERIT += \"rm_work\"\n" >> conf/local.conf
|
[ "${DY_RM_WORK}" = "true" ] && printf "\nINHERIT += \"rm_work\"\n" >> conf/local.conf
|
||||||
for target in ${DY_TARGET}; do
|
for target in ${DY_TARGET}; do
|
||||||
printf "\n[INFO] Building the $target target.\n"
|
printf "\n[INFO] Building the $target target.\n"
|
||||||
|
|
@ -162,4 +184,5 @@ for platform in ${DY_PLATFORMS}; do
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue