| | |
| | | |
| | | TAR_PATH=`pwd` |
| | | |
| | | TARBALL_URL=http://weike-iot.com:2211/imx6ull/bsp |
| | | TARBALL_URL=http://127.0.0.1:2211/imx6ull/bsp |
| | | |
| | | GIT_URL_NXP="https://source.codeaurora.org/external/imx" |
| | | IMX_BRANCH="lf-5.10.52-2.1.0" |
| | | BSP_BRANCH=lf-5.10.52-2.1.0 |
| | | |
| | | |
| | | # $SYSTEM should be buildroot, yocto or debian |
| | | # Buildroot distro should be: buildroot-2021.02 |
| | | # Yocto distro should be : hardknott |
| | | # Debian distro should be : buster or bullseye |
| | | SYSTEM=buildroot |
| | | DISTRO=v2021.02 |
| | | |
| | | SYSTYPE=`echo $SYSTEM | tr 'A-Z' 'a-z'` |
| | | if [ $SYSTYPE == "debian" ] ; then |
| | | SYSNAME=${DISTRO} |
| | | else |
| | | SYSNAME=${SYSTYPE} |
| | | fi |
| | | ROOTFS_DIR=rootfs_${SYSNAME} |
| | | |
| | | function do_fetch_git() |
| | | { |
| | | SRC=$1 |
| | | SRC=$1 |
| | | |
| | | if [ -s ${SRC}-${IMX_BRANCH}.tar.xz ] ; then |
| | | if [ -s ${SRC}-${BSP_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 |
| | | if [ ! -d $SRC ] ; then |
| | | git clone --branch ${BSP_BRANCH} ${GIT_URL_NXP}/${SRC}.git |
| | | fi |
| | | |
| | | cd $SRC |
| | | echo " -- start git clone ${SRC} now --" |
| | | |
| | | 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 $SRC |
| | | git config tar.tar.xz.command "xz -c" |
| | | git archive --format=tar.xz --prefix=${SRC}/ ${BSP_BRANCH} > ${TAR_PATH}/${SRC}-${BSP_BRANCH}.tar.xz |
| | | |
| | | cd - |
| | | cd - |
| | | rm -rf $SRC |
| | | } |
| | | |
| | | function do_fetch_url() |
| | | { |
| | | SRC=$1 |
| | | TARBALL=$1 |
| | | |
| | | if [ -s ${SRC}-${IMX_BRANCH}.tar.xz ] ; then |
| | | echo " -- ${SRC} fetch alread, skip it --" |
| | | if [ -s ${TARBALL} ] ; then |
| | | echo " -- ${TARBALL} fetch alread, skip it --" |
| | | return; |
| | | fi |
| | | |
| | | echo " -- ${SRC} fetch alread, skip it --" |
| | | echo " -- start wget fetch ${TARBALL} now --" |
| | | |
| | | wget ${TARBALL_URL}/${SRC}-${IMX_BRANCH}.tar.xz |
| | | wget ${TARBALL_URL}/${TARBALL} |
| | | } |
| | | |
| | | |
| | | function do_fetch() |
| | | { |
| | | if [ ! -z $TARBALL_URL ] ; then |
| | | do_fetch_url uboot-imx |
| | | if [ ! -z $TARBALL_URL ] ; then |
| | | do_fetch_url uboot-imx-${BSP_BRANCH}.tar.xz |
| | | do_fetch_url linux-imx-${BSP_BRANCH}.tar.xz |
| | | do_fetch_url ${ROOTFS_DIR}.tar.bz2 |
| | | do_fetch_url rtl8188fu.tar.bz2 |
| | | do_fetch_url firmware.tar.bz2 |
| | | else |
| | | do_fetch_git uboot-imx |
| | | fi |
| | | |
| | | if [ ! -z $TARBALL_URL ] ; then |
| | | do_fetch_url linux-imx |
| | | else |
| | | do_fetch_git linux-imx |
| | | fi |
| | | } |