summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung-hun Kim <sfoon.kim@samsung.com>2024-11-06 19:10:42 +0900
committerSung-hun Kim <sfoon.kim@samsung.com>2024-11-06 19:16:55 +0900
commitd9f37fa00337ce7fb554341eb5659a4603462d0d (patch)
tree872c9881327421e9a38aafae61b013bf8e7ca607
parent17dd049e478ca6ab454d8af0d3142e19df1d2a1a (diff)
downloadlinux-rpi-d9f37fa00337ce7fb554341eb5659a4603462d0d.tar.gz
linux-rpi-d9f37fa00337ce7fb554341eb5659a4603462d0d.tar.bz2
linux-rpi-d9f37fa00337ce7fb554341eb5659a4603462d0d.zip
script: Make linux-tizen-modules-source git repo up-to-date on the same branchold/tizen_20241114
If the version of linux-tizen-modules-source is different from the kernel, the created boot image may not boot the target exactly. This patch executes `git pull` on the linux-tizen-modules-source repo after making the branch of linux-tizen-modules-source synced with the kernel. If the user don't want it, just passes "dontpull" as the last argument of the build script. It will not execute `git pull`. Change-Id: I553738259e23d1bac1009f0c948beaefb08ed27a Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
-rwxr-xr-xbuild-rpi4.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/build-rpi4.sh b/build-rpi4.sh
index 7c6855e907d5..cb6865f519a2 100755
--- a/build-rpi4.sh
+++ b/build-rpi4.sh
@@ -14,11 +14,14 @@ BUILD_ROOT=$PWD
KERNEL_PATH=`basename ${BUILD_ROOT}`
if [ $# == 0 ]; then
- echo "Usage : $0 <architecture> [rt] [bootimg]"
+ echo "Usage : $0 <architecture> [rt] [bootimg] [dontpull]"
echo " architecture : arm or arm64"
+ echo " dontpull : do not execute \"git pull\" on linux-tizen-modules-source"
echo " e.g) $0 arm"
+ echo " e.g) $0 arm dontpull"
echo " e.g) $0 arm64 rt"
echo " e.g) $0 arm64 bootimg"
+ echo " e.g) $0 arm64 bootimg dontpull"
echo " e.g) $0 arm rt bootimg"
exit
fi
@@ -102,8 +105,18 @@ function mk_bootimg()
function mk_tizen_modules()
{
if [ -e ${BUILD_ROOT}/../linux-tizen-modules-source ]; then
+ if [ $MODULE_PULL = "1" ]; then
+ BRANCH=`git rev-parse --abbrev-ref HEAD`
+ echo "Current branch is "$BRANCH
+ fi
+
pushd ${BUILD_ROOT}/../linux-tizen-modules-source
+ if [ $MODULE_PULL = "1" ]; then
+ git checkout $BRANCH
+ git pull
+ fi
+
ln -s ${PWD}/include kernel
export LOGGER_MAIN_BUFFER_SIZE=256
@@ -218,6 +231,12 @@ if [ "$2" = "bootimg" ] || [ "$3" = "bootimg" ]; then
IS_BOOTIMG=1
fi
+MODULE_PULL=1
+if [ "$2" = "dontpull" ] || [ "$3" = "dontpull" ] || [ "$4" = "dontpull" ]; then
+ echo "Modules don't be pulled from git repo"
+ MODULE_PULL=0
+fi
+
if [ "$IS_RT" = "1" ]; then
echo "Build RT-Kernel"
BUILD_VERSION=`cat .kernel_buildenv`