kernel: move the download files to meta_data.yaml

Move the source tar balls download to "dl_files" of meta_data.yaml.
The kernel stuff is downloaded via "downloader -s". dl_hook deals with
the kernel stuff locally.

Test Plan:
- PASS: Build kernel-std
- PASS: Build kernel-rt
- PASS: Build intel-opae-fpga
- PASS: Build image
- Pass: Boot system

Story: 2009221
Task: 44577

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: Ib63553fb42e96a4eab8b16b47d7b4e2172ffe13c
This commit is contained in:
Yue Tao 2022-02-18 11:05:09 +08:00 committed by Yue Tao
parent 7ded004316
commit a54d2963ab
6 changed files with 39 additions and 90 deletions

View File

@ -1,29 +1,13 @@
#!/bin/bash
# The only parameter is the name of the folder where the source code
# is extracted to. Pay attention to that the extracted package should
# is extracted to. Be aware that the extracted package should
# be put at the same path where this script is located.
# Tools needed: unzip/rpm2cpio/cpio/md5sum
# Tools needed: unzip/rpm2cpio/cpio
OPAE_PKG=OPAE_1.3.7-5_el7.zip
OPAE_VER=1.3.7-5
OPAE_MD5SUM=389888f2bb3e8cfb002a1ba880fc6823
OPAE_DRV=opae-intel-fpga-driver-2.0.1
wget https://github.com/OPAE/opae-sdk/releases/download/${OPAE_VER}/${OPAE_PKG}
if [ $? -ne 0 ]
then
echo "wget failed: OPAE source!"
exit 1
fi
md5sum ./${OPAE_PKG} | grep ${OPAE_MD5SUM}
if [ $? -ne 0 ]
then
echo "Wrong md5sum: OPAE source!"
exit 1
fi
unzip ./${OPAE_PKG}
if [ $? -ne 0 ]
then

View File

@ -2,6 +2,13 @@
debver: 2.0.1-10
debname: kmod-opae-fpga-driver
dl_hook: dl_hook
dl_files:
OPAE_1.3.7-5_el7.zip:
topdir: null
url:
"https://github.com/OPAE/opae-sdk/releases/download/1.3.7-5/\
OPAE_1.3.7-5_el7.zip"
md5sum: 389888f2bb3e8cfb002a1ba880fc6823
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -22,31 +22,11 @@
# the extracted source code. Be aware that this new directory will be
# created in the same directory as where this script is located when
# building.
# Tools needed: wget/tar/md5sum/sed
# Tools needed: tar/sed
KERNEL_HEAD_COMMIT=8048444fc7e44c6fc04a5e0b35d6117fe51c17fc
KERNEL_MD5SUM=ed39ae794109417f7ab54a0a3f58b64e
DEBIAN_DL_PATH=http://snapshot.debian.org/archive/debian/20210410T143728Z/pool/main/l/linux/
DEBIAN_FILE=linux_5.10.28-1.debian.tar.xz
DEBIAN_MD5SUM=de03a25a5c7e12ec1e559b6b0ce8889f
if [ ! -f "./linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz" ]
then
wget https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/snapshot/linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz
if [ $? -ne 0 ]
then
echo "wget failed: linux-yocto source!"
exit 1
fi
fi
md5sum ./linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz | grep ${KERNEL_MD5SUM}
if [ $? -ne 0 ]
then
echo "Wrong md5sum: linux-yocto source!"
exit 1
fi
tar xvf linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz
if [ $? -ne 0 ]
then
@ -56,26 +36,12 @@ fi
mv linux-yocto-${KERNEL_HEAD_COMMIT} $1
cd $1
wget ${DEBIAN_DL_PATH}${DEBIAN_FILE}
if [ $? -ne 0 ]
then
echo "wget failed: debian folder for kernel!"
exit 1
fi
md5sum ./${DEBIAN_FILE} | grep ${DEBIAN_MD5SUM}
if [ $? -ne 0 ]
then
echo "Wrong md5sum: debian folder for kernel!"
exit 1
fi
tar xvf ${DEBIAN_FILE}
tar xvf ../${DEBIAN_FILE}
if [ $? -ne 0 ]
then
echo "tar failed: debian folder for kernel!"
exit 1
fi
rm ${DEBIAN_FILE}
# The debian folder is written to build "linux". If use this folder
# to build similar things for kernel-rt, all the packages are renamed

View File

@ -2,6 +2,19 @@
debver: 5.10.74
debname: linux-rt
dl_hook: dl_hook
dl_files:
linux-yocto-8048444fc7e44c6fc04a5e0b35d6117fe51c17fc.tar.gz:
topdir: null
url:
"https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/snapshot/\
linux-yocto-8048444fc7e44c6fc04a5e0b35d6117fe51c17fc.tar.gz"
md5sum: ed39ae794109417f7ab54a0a3f58b64e
linux_5.10.28-1.debian.tar.xz:
topdir: null
url:
"http://snapshot.debian.org/archive/debian/20210410T143728Z/pool/main/\
l/linux/linux_5.10.28-1.debian.tar.xz"
md5sum: de03a25a5c7e12ec1e559b6b0ce8889f
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -3,31 +3,11 @@
# The only parameter is the name of the folder where the source code
# is extracted to. Pay attention to that the extracted package should
# be put at the same path where this script is located.
# Tools needed: wget/tar/md5sum
# Tools needed: tar
KERNEL_HEAD_COMMIT=9e84a42af61ff9c6feb89ab8d61ee5f25fb35c72
KERNEL_MD5SUM=58ed543af9eb3767a7c576a603c5eb94
DEBIAN_DL_PATH=http://snapshot.debian.org/archive/debian/20210410T143728Z/pool/main/l/linux/
DEBIAN_FILE=linux_5.10.28-1.debian.tar.xz
DEBIAN_MD5SUM=de03a25a5c7e12ec1e559b6b0ce8889f
if [ ! -f "./linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz" ]
then
wget https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/snapshot/linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz
if [ $? -ne 0 ]
then
echo "wget failed: linux-yocto source!"
exit 1
fi
fi
md5sum ./linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz | grep ${KERNEL_MD5SUM}
if [ $? -ne 0 ]
then
echo "Wrong md5sum: linux-yocto source!"
exit 1
fi
tar xvf linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz
if [ $? -ne 0 ]
then
@ -37,23 +17,9 @@ fi
mv linux-yocto-${KERNEL_HEAD_COMMIT} $1
cd $1
wget ${DEBIAN_DL_PATH}${DEBIAN_FILE}
if [ $? -ne 0 ]
then
echo "wget failed: debian folder for kernel!"
exit 1
fi
md5sum ./${DEBIAN_FILE} | grep ${DEBIAN_MD5SUM}
if [ $? -ne 0 ]
then
echo "Wrong md5sum: debian folder for kernel!"
exit 1
fi
tar xvf ${DEBIAN_FILE}
tar xvf ../${DEBIAN_FILE}
if [ $? -ne 0 ]
then
echo "tar failed: debian folder for kernel!"
exit 1
fi
rm ${DEBIAN_FILE}

View File

@ -2,6 +2,19 @@
debver: 5.10.74
debname: linux
dl_hook: dl_hook
dl_files:
linux-yocto-9e84a42af61ff9c6feb89ab8d61ee5f25fb35c72.tar.gz:
topdir: null
url:
"https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/snapshot/\
linux-yocto-9e84a42af61ff9c6feb89ab8d61ee5f25fb35c72.tar.gz"
md5sum: 58ed543af9eb3767a7c576a603c5eb94
linux_5.10.28-1.debian.tar.xz:
topdir: null
url:
"http://snapshot.debian.org/archive/debian/20210410T143728Z/pool/main/\
l/linux/linux_5.10.28-1.debian.tar.xz"
md5sum: de03a25a5c7e12ec1e559b6b0ce8889f
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true