bsp/tarball/build.sh | ●●●●● patch | view | raw | blame | history | |
bsp/tarball/imx_fetch.sh | ●●●●● patch | view | raw | blame | history |
bsp/tarball/build.sh
New file @@ -0,0 +1,62 @@ #!/bin/bash TAR_PATH=`pwd` TARBALL_URL=http://weike-iot.com:2211/imx6ull/bsp GIT_URL_NXP="https://source.codeaurora.org/external/imx" IMX_BRANCH="lf-5.10.52-2.1.0" function do_fetch_git() { SRC=$1 if [ -s ${SRC}-${IMX_BRANCH}.tar.xz ] ; then echo " -- ${SRC} fetch alread, skip it --" return; fi if [ ! -d $SRC ] ; then git clone --branch ${IMX_BRANCH} ${GIT_URL_NXP}/${SRC}.git fi cd $SRC git config tar.tar.xz.command "xz -c" git archive --format=tar.xz --prefix=${SRC}/ ${IMX_BRANCH} > ${TAR_PATH}/${SRC}-${IMX_BRANCH}.tar.xz cd - rm -rf $SRC } function do_fetch_url() { SRC=$1 if [ -s ${SRC}-${IMX_BRANCH}.tar.xz ] ; then echo " -- ${SRC} fetch alread, skip it --" return; fi echo " -- ${SRC} fetch alread, skip it --" wget ${TARBALL_URL}/${SRC}-${IMX_BRANCH}.tar.xz } function do_fetch() { if [ ! -z $TARBALL_URL ] ; then do_fetch_url uboot-imx else do_fetch_git uboot-imx fi if [ ! -z $TARBALL_URL ] ; then do_fetch_url linux-imx else do_fetch_git linux-imx fi } do_fetch bsp/tarball/imx_fetch.sh
New file @@ -0,0 +1,49 @@ #!/bin/bash TAR_PATH=`pwd` #TARBALL_URL=http://weike-iot.com:2211/imx6ull/bsp GIT_URL_NXP="https://source.codeaurora.org/external/imx" IMX_BRANCH="lf-5.10.52-2.1.0" function do_fetch_git() { SRC=$1 if [ ! -d $SRC ] ; then git clone --branch ${IMX_BRANCH} ${GIT_URL_NXP}/${SRC}.git fi cd $SRC git config tar.tar.xz.command "xz -c" git archive --format=tar.xz --prefix=${SRC}/ ${IMX_BRANCH} > ${TAR_PATH}/${SRC}-${IMX_BRANCH}.tar.xz cd - rm -rf $SRC } function do_fetch_url() { SRC=$1 wget ${TARBALL_URL}/${SRC}-${IMX_BRANCH}.tar.xz } if [ ! -s uboot-imx-${IMX_BRANCH}.tar.xz ] ; then if [ ! -z $TARBALL_URL ] ; then do_fetch_url uboot-imx else do_fetch_git uboot-imx fi fi if [ ! -s linux-imx-${IMX_BRANCH}.tar.xz ] ; then if [ ! -z $TARBALL_URL ] ; then do_fetch_url linux-imx else do_fetch_git uboot-imx fi fi