Skip to content

Commit

Permalink
automate the Core build and binary collection
Browse files Browse the repository at this point in the history
  • Loading branch information
technobly committed Sep 22, 2016
1 parent cfd71ae commit d17554a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build/make_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ else if [ $MAKE_RELEASE_PLATFORM == "p1" ] || [ $MAKE_RELEASE_PLATFORM == "8" ];
./release.sh 8 p1
else if [ $MAKE_RELEASE_PLATFORM == "electron" ] || [ $MAKE_RELEASE_PLATFORM == "10" ]; then
./release.sh 10 electron
else if [ $MAKE_RELEASE_PLATFORM == "core" ] || [ $MAKE_RELEASE_PLATFORM == "0" ]; then
./release.sh 0 core
else if [ $MAKE_RELEASE_PLATFORM == "all" ]; then
./release.sh 6 photon
./release.sh 8 p1
./release.sh 10 electron
./release.sh 0 core
else
echo ERROR, $MAKE_RELEASE_PLATFORM not valid!!
fi
fi
fi
fi
fi
2 changes: 2 additions & 0 deletions build/release-all.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

./release.sh 6 photon
./release.sh 8 p1
./release.sh 10 electron
./release.sh 0 core
31 changes: 29 additions & 2 deletions build/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,42 @@ function release_file()
cp ../build/target/$name/platform-$PLATFORM_ID-m/$name.$ext $OUT/$name-$VERSION-$PLATFORM.$ext
}

function release_file_core()
{
name=$1
ext=$2
cp $OUT_CORE/$name.$ext $OUT/$name-$VERSION-$PLATFORM.$ext
}

function release_binary()
{
release_file $1 bin
cp $OUT/$1-$VERSION-$PLATFORM.bin $BINARIES_OUT/$1-$VERSION-$PLATFORM.bin
release_file $1 elf
release_file $1 map
release_file $1 lst
release_file $1 hex
}

function release_binary_core()
{
release_file_core $1 bin
cp $OUT_CORE/$1.bin $BINARIES_OUT/$1-$VERSION-$PLATFORM.bin
release_file_core $1 elf
release_file_core $1 map
release_file_core $1 lst
release_file_core $1 hex
}

PLATFORM_ID=$1
PLATFORM=$2
cd ../modules

# convenient place to grab binaries for github release
BINARIES_OUT=../build/releases/$VERSION
mkdir -p $BINARIES_OUT

OUT_CORE=../build/target/main/platform-$PLATFORM_ID-lto
OUT=../build/releases/release-$VERSION-p$PLATFORM_ID
mkdir -p $OUT
rm -rf ../build/target
Expand All @@ -38,6 +60,11 @@ else if [ $1 -eq 10 ]; then
release_binary system-part1
release_binary system-part2
release_binary system-part3
fi
else if [ $1 -eq 0 ]; then
cd ../main
make -s PLATFORM_ID=$PLATFORM_ID clean all COMPILE_LTO=y APP=tinker
release_binary_core tinker
cd ../modules
fi

fi
fi

0 comments on commit d17554a

Please sign in to comment.