mirror of
https://github.com/rancher/os-kernel.git
synced 2025-06-26 13:41:34 +00:00
Fix script format
This commit is contained in:
parent
b5b5441ded
commit
12d4f9ee95
@ -2,9 +2,9 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [[ "$KERNEL_TAG" == "" ]]; then
|
if [[ "$KERNEL_TAG" == "" ]]; then
|
||||||
echo "ERROR: Please set the KERNEL_TAG (the mainline KERNEL version is also the git tag) you're building"
|
echo "ERROR: Please set the KERNEL_TAG (the mainline KERNEL version is also the git tag) you're building"
|
||||||
echo " e.g., KERNEL_TAG=4.9.10 make release"
|
echo " e.g., KERNEL_TAG=4.9.10 make release"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
: ${ARTIFACTS:=$(pwd)/assets}
|
: ${ARTIFACTS:=$(pwd)/assets}
|
||||||
|
@ -15,16 +15,16 @@ MODULE_LIST=$(readlink -f modules.list)
|
|||||||
MODULE_EXTRA_LIST=$(readlink -f modules-extra.list)
|
MODULE_EXTRA_LIST=$(readlink -f modules-extra.list)
|
||||||
|
|
||||||
if [ -e "/source/dist/kernel/linux-${KERNEL_VERSION}-x86.tar.gz" ]; then
|
if [ -e "/source/dist/kernel/linux-${KERNEL_VERSION}-x86.tar.gz" ]; then
|
||||||
echo "skipping kernel build - found linux-${KERNEL_VERSION}-rancher-x86.tar.gz in ./dist/kernel/"
|
echo "skipping kernel build - found linux-${KERNEL_VERSION}-rancher-x86.tar.gz in ./dist/kernel/"
|
||||||
else
|
else
|
||||||
cd ${BUILD}/${DIR}
|
cd ${BUILD}/${DIR}
|
||||||
make oldconfig
|
make oldconfig
|
||||||
KVER=$(make kernelrelease)
|
KVER=$(make kernelrelease)
|
||||||
if [ -e "linux-${KERNEL_VERSION}-x86.tar" ] \
|
if [ -e "linux-${KERNEL_VERSION}-x86.tar" ] \
|
||||||
&& [ "$KVER" == "$KERNEL_VERSION" ]; then
|
&& [ "$KVER" == "$KERNEL_VERSION" ]; then
|
||||||
echo "Skipping kernel build, found linux-${KERNEL_VERSION}-x86.tar in $(pwd)"
|
echo "Skipping kernel build, found linux-${KERNEL_VERSION}-x86.tar in $(pwd)"
|
||||||
else
|
else
|
||||||
echo "building $KVER"
|
echo "building $KVER"
|
||||||
make -j$(nproc) tar-pkg
|
make -j$(nproc) tar-pkg
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -6,8 +6,8 @@ cd $(dirname $0)/..
|
|||||||
./scripts/test-firmware
|
./scripts/test-firmware
|
||||||
|
|
||||||
if ! ./scripts/download; then
|
if ! ./scripts/download; then
|
||||||
echo "blah"
|
echo "blah"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./scripts/extract
|
./scripts/extract
|
||||||
run-parts -v ./scripts/hooks
|
run-parts -v ./scripts/hooks
|
||||||
|
@ -28,8 +28,8 @@ pushd .
|
|||||||
cd ${DIR}
|
cd ${DIR}
|
||||||
echo "are there patches in ${PATCHES}"
|
echo "are there patches in ${PATCHES}"
|
||||||
for p in ${PATCHES}/*.patch; do
|
for p in ${PATCHES}/*.patch; do
|
||||||
echo "patching $p"
|
echo "patching $p"
|
||||||
patch -p1 -i $p
|
patch -p1 -i $p
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
cd $(dirname $0)/..
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
if ! ./scripts/ci; then
|
if ! ./scripts/ci; then
|
||||||
echo "build failure see release.log"
|
echo "build failure see release.log"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -13,24 +13,24 @@ echo "FIRMWARE test: $FIRMWARE"
|
|||||||
cd linux-firmware
|
cd linux-firmware
|
||||||
|
|
||||||
for i in $(<$FIRMWARE); do
|
for i in $(<$FIRMWARE); do
|
||||||
if [ -e $i ]; then
|
if [ -e $i ]; then
|
||||||
glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/')
|
glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/')
|
||||||
#echo Found $i, trying $glob
|
#echo Found $i, trying $glob
|
||||||
latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4)
|
latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4)
|
||||||
if [ "$latest" != "$i" ]; then
|
if [ "$latest" != "$i" ]; then
|
||||||
echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest"
|
echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest"
|
||||||
STOP="1"
|
STOP="1"
|
||||||
echo $latest >> new-firmware
|
echo $latest >> new-firmware
|
||||||
else
|
|
||||||
echo $i >> new-firmware
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo WARNING: Firmware listed in $FIRMWARE Not found $i
|
echo $i >> new-firmware
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo WARNING: Firmware listed in $FIRMWARE Not found $i
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$STOP" != "" ]; then
|
if [ "$STOP" != "" ]; then
|
||||||
echo "Update the $FIRMWARE file:"
|
echo "Update the $FIRMWARE file:"
|
||||||
cat new-firmware
|
cat new-firmware
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user