mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
Make Clover compilable in UNIX Systems using git
ebuild.sh/buildme update
This commit is contained in:
parent
0f4d209cf2
commit
1ec5de9534
Binary file not shown.
0
CloverPackage/CloverPrefpane/install.sh
Normal file → Executable file
0
CloverPackage/CloverPrefpane/install.sh
Normal file → Executable file
0
CloverPackage/CloverPrefpane/translate_source.sh
Normal file → Executable file
0
CloverPackage/CloverPrefpane/translate_source.sh
Normal file → Executable file
0
CloverPackage/CloverPrefpane/translate_xib.sh
Normal file → Executable file
0
CloverPackage/CloverPrefpane/translate_xib.sh
Normal file → Executable file
0
CloverPackage/CloverUpdater/CloverUpdaterUtility
Normal file → Executable file
0
CloverPackage/CloverUpdater/CloverUpdaterUtility
Normal file → Executable file
0
CloverPackage/CloverUpdater/CloverUpdaterUtility.plist
Normal file → Executable file
0
CloverPackage/CloverUpdater/CloverUpdaterUtility.plist
Normal file → Executable file
0
CloverPackage/CloverUpdater/install-updater.sh
Normal file → Executable file
0
CloverPackage/CloverUpdater/install-updater.sh
Normal file → Executable file
0
CloverPackage/CloverUpdater/translate_xib.sh
Normal file → Executable file
0
CloverPackage/CloverUpdater/translate_xib.sh
Normal file → Executable file
0
CloverPackage/makeiso
Normal file → Executable file
0
CloverPackage/makeiso
Normal file → Executable file
9
CloverPackage/makepkg
Normal file → Executable file
9
CloverPackage/makepkg
Normal file → Executable file
@ -32,12 +32,7 @@ done
|
||||
cd "$(dirname $0)"
|
||||
|
||||
version=v2.5k
|
||||
if [[ -d ../.git ]]; then
|
||||
revision=$(git svn info | grep Revision | tr -cd [:digit:])
|
||||
else
|
||||
# revision=$(svnversion -n | tr -d [:alpha:])
|
||||
revision=$(svn info | grep "Revision" | tr -cd [:digit:])
|
||||
fi
|
||||
revision=$(cat ../Version.h | grep REVISION_STR | awk '{print $NF}' | tr -cd '[[:digit:]]')
|
||||
|
||||
SRCROOT="${PWD}"
|
||||
SYMROOT="${SRCROOT}"/sym
|
||||
@ -50,7 +45,7 @@ echo "${revision}" > revision
|
||||
|
||||
cp -f ../BootHFS/boot1f32-install.sh CloverV2/EFI/CLOVER/doc/boot1f32-install.sh
|
||||
|
||||
# Workspace = edk2/Clover/CloverPackage
|
||||
# Workspace = Clover/CloverPackage
|
||||
# Prepare i386 for building package installer.
|
||||
|
||||
if [[ -d "$PKG_BUILD_DIR" && $(stat -f '%u' "$PKG_BUILD_DIR") -eq 0 ]]; then
|
||||
|
0
CloverPackage/package/Scripts.libraries/rc_scripts.lib
Normal file → Executable file
0
CloverPackage/package/Scripts.libraries/rc_scripts.lib
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/AltBoot/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/AltBoot/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/AppleUiSupport/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/AppleUiSupport/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/CloverEFI/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/CloverEFI/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/CloverThemeManager/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/CloverThemeManager/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/MountESP
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/MountESP
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/EFIFolder/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/FileSystem/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/FileSystem/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/InstallBootsectors/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/InstallBootsectors/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/InstallTheme/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/InstallTheme/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/MarkChoice/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/MarkChoice/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/MemoryFix/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/MemoryFix/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/OptRcScripts/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/OptRcScripts/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/Post/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/Post/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/Pre/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/Pre/preinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/RcScripts/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/RcScripts/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/VirtualSMC/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/VirtualSMC/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/bootNo/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/bootNo/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/off/postinstall
Normal file → Executable file
0
CloverPackage/package/Scripts.templates/off/postinstall
Normal file → Executable file
0
CloverPackage/package/bin/clean_po_headers.sh
Normal file → Executable file
0
CloverPackage/package/bin/clean_po_headers.sh
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-gettextize
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-gettextize
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-normalize
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-normalize
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-translate
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-translate
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-updatepo
Normal file → Executable file
0
CloverPackage/package/bin/po4a/po4a-updatepo
Normal file → Executable file
0
CloverPackage/package/buildpkg.sh
Normal file → Executable file
0
CloverPackage/package/buildpkg.sh
Normal file → Executable file
2
CloverPackage/package/translate.sh
Normal file → Executable file
2
CloverPackage/package/translate.sh
Normal file → Executable file
@ -9,7 +9,7 @@ packagename="Clover"
|
||||
cd "$(dirname $0)"
|
||||
|
||||
declare -r PKGROOT="$PWD"
|
||||
declare -r SRCROOT="$PWD"/../../../..
|
||||
declare -r SRCROOT="$PWD"/../../..
|
||||
declare -r SYMROOT=../sym
|
||||
declare -r PKG_RESOURCES_DIR="${SYMROOT}"/Resources
|
||||
|
||||
|
1
CloverPackage/revision
Normal file
1
CloverPackage/revision
Normal file
@ -0,0 +1 @@
|
||||
0000
|
1
CloverPackage/version
Normal file
1
CloverPackage/version
Normal file
@ -0,0 +1 @@
|
||||
v2.5k
|
@ -1,2 +1,2 @@
|
||||
# DO NOT EDIT
|
||||
# FILE auto-generated
|
||||
# DO NOT EDIT
|
||||
# FILE auto-generated
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Auto-generated by /Users/sergey/Documents/Projects/Clover/BaseTools/BuildEnv
|
||||
# Auto-generated by /Users/vectorsigma/src/Clover/BaseTools/BuildEnv
|
||||
if [ -z "$WORKSPACE" ]
|
||||
then
|
||||
export WORKSPACE=/Users/sergey/Documents/Projects/Clover
|
||||
export WORKSPACE=/Users/vectorsigma/src/Clover
|
||||
fi
|
||||
if [ -z "$EDK_TOOLS_PATH" ]
|
||||
then
|
||||
export EDK_TOOLS_PATH=/Users/sergey/Documents/Projects/Clover/BaseTools
|
||||
export EDK_TOOLS_PATH=/Users/vectorsigma/src/Clover/BaseTools
|
||||
fi
|
||||
if [ -e /Users/sergey/Documents/Projects/Clover/BaseTools/Bin/Darwin-x86_64 ]
|
||||
if [ -e /Users/vectorsigma/src/Clover/BaseTools/Bin/Darwin-x86_64 ]
|
||||
then
|
||||
if [ ${PATH//Users/sergey/Documents/Projects/Clover/BaseTools/Bin/Darwin-x86_64/} == $PATH ]
|
||||
if [ ${PATH//Users/vectorsigma/src/Clover/BaseTools/Bin/Darwin-x86_64/} == $PATH ]
|
||||
then
|
||||
export PATH=/Users/sergey/Documents/Projects/Clover/BaseTools/Bin/Darwin-x86_64:$PATH
|
||||
export PATH=/Users/vectorsigma/src/Clover/BaseTools/Bin/Darwin-x86_64:$PATH
|
||||
fi
|
||||
fi
|
||||
|
109
buildme
Normal file → Executable file
109
buildme
Normal file → Executable file
@ -7,20 +7,9 @@ fi
|
||||
|
||||
cd "$(dirname $0)"
|
||||
declare -r CLOVERROOT="$PWD"
|
||||
declare -r EDK2ROOT=$(dirname $CLOVERROOT)
|
||||
declare -r TOOLCHAIN=XCODE8
|
||||
declare -r PATCHES=Patches_for_UDK2018
|
||||
|
||||
|
||||
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-$(dirname $EDK2ROOT)/opt/local}
|
||||
|
||||
if [[ $PATCHES == Patches_for_UDK2018 ]]; then
|
||||
declare -r edk2Rel=vUDK2018
|
||||
edk2Link=https://codeload.github.com/tianocore/edk2/zip/vUDK2018 # UDK2018
|
||||
else
|
||||
declare -r edk2Rel=edk2-stable201905
|
||||
edk2Link=https://github.com/tianocore/edk2/archive/${edk2Rel}.zip # edk2-stable201905
|
||||
fi
|
||||
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-$(dirname $CLOVERROOT)/opt/local}
|
||||
|
||||
# Functions
|
||||
pathmunge() {
|
||||
@ -33,24 +22,6 @@ if [[ ! $PATH =~ (^|:)$1(:|$) ]]; then
|
||||
fi
|
||||
}
|
||||
|
||||
checkSRCName() {
|
||||
local srcName=$(basename $(dirname $EDK2ROOT))
|
||||
if [[ $srcName != src ]] && [[ ! -d "${EDK2ROOT}"/BaseTools ]]; then
|
||||
echo "Usually Clover is inside a folder called src (../src/edk2/), but yours is called $srcName"
|
||||
echo "is:"
|
||||
echo "${EDK2ROOT}/"
|
||||
echo "the right path where all edk2 files will be decompressed?"
|
||||
read -p "Are you sure? " -n 1 -r
|
||||
echo # (optional) move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "ok, proceeding.."
|
||||
else
|
||||
echo "Is advised that Clover will stay inside this path:"
|
||||
echo "$HOME/src/edk2/"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
checkXCODE() {
|
||||
echo "[CHECK XCODE]"
|
||||
@ -124,7 +95,7 @@ exportPaths() {
|
||||
pathmunge "$(xcode-select --print-path)"/usr/bin
|
||||
pathmunge "$TOOLCHAIN_DIR"/bin
|
||||
export TOOLCHAIN_DIR=$TOOLCHAIN_DIR
|
||||
export DIR_MAIN=${DIR_MAIN:-$(dirname $EDK2ROOT)}
|
||||
export DIR_MAIN=${DIR_MAIN:-$(dirname $CLOVERROOT)}
|
||||
export DIR_TOOLS=${DIR_TOOLS:-$DIR_MAIN/tools}
|
||||
export DIR_BUILD=${DIR_BUILD:-$RAMDISK_MNT_PT}
|
||||
export DIR_DOWNLOADS=${DIR_DOWNLOADS:-$DIR_TOOLS/download}
|
||||
@ -138,47 +109,25 @@ checkNASM
|
||||
checkGETTEXT
|
||||
}
|
||||
|
||||
updateEDK2() {
|
||||
echo "[UPDATE EDKII]"
|
||||
checkSRCName
|
||||
checkXCODE
|
||||
exportPaths
|
||||
rm -f "${DIR_DOWNLOADS}/${edk2Rel}.zip"
|
||||
curl -o "${DIR_DOWNLOADS}/${edk2Rel}.zip" $edk2Link || exit 1
|
||||
cd "${EDK2ROOT}"
|
||||
find . -maxdepth 1 ! -name $(basename $CLOVERROOT) -delete
|
||||
echo "extracting files from edk2 archive:"
|
||||
bsdtar -vxf "${DIR_DOWNLOADS}/${edk2Rel}.zip" -s'|[^/]*/||'
|
||||
rm -f "${DIR_DOWNLOADS}/${edk2Rel}.zip"
|
||||
}
|
||||
|
||||
patchEDK2() {
|
||||
echo "[$PATCHES]"
|
||||
cp -R "${CLOVERROOT}"/$PATCHES/* "${EDK2ROOT}"/
|
||||
}
|
||||
|
||||
updateClover() {
|
||||
updateCloverTakeTheirs() {
|
||||
echo "[UPDATE CLOVER]"
|
||||
cd "${CLOVERROOT}"
|
||||
svn up
|
||||
git fetch --all
|
||||
git reset --hard origin/master
|
||||
git pull origin master
|
||||
}
|
||||
|
||||
updateCloverTakeYours() {
|
||||
echo "[UPDATE CLOVER]"
|
||||
cd "${CLOVERROOT}"
|
||||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
}
|
||||
|
||||
buildClover() {
|
||||
checkTools
|
||||
if [[ ! -d "${EDK2ROOT}"/BaseTools ]];then
|
||||
updateEDK2
|
||||
fi
|
||||
|
||||
if [[ -f "${EDK2ROOT}"/BaseTools/Conf/tools_def.txt ]]; then
|
||||
# tools_def.txt exist, but is patched?
|
||||
if ! grep -q XCODE8 "${EDK2ROOT}"/Conf/tools_def.txt; then
|
||||
# no, patch it!
|
||||
patchEDK2
|
||||
fi
|
||||
else
|
||||
# tools_def.txt didn't exists. BaseTool is vanilla..
|
||||
patchEDK2
|
||||
fi
|
||||
|
||||
cd "${CLOVERROOT}"
|
||||
echo "[BUILD CLOVER]"
|
||||
@ -198,31 +147,27 @@ echo "[BUILD ISO]"
|
||||
make iso
|
||||
}
|
||||
|
||||
checkChanges() {
|
||||
cd "${CLOVERROOT}"
|
||||
svn log -r BASE:HEAD -v
|
||||
}
|
||||
|
||||
checkStatus() {
|
||||
cd "${CLOVERROOT}"
|
||||
svn status
|
||||
git fetch origin
|
||||
git status
|
||||
}
|
||||
|
||||
showdiff() {
|
||||
cd "${CLOVERROOT}"
|
||||
svn diff -r head
|
||||
git fetch origin
|
||||
git diff
|
||||
}
|
||||
|
||||
menu() {
|
||||
echo
|
||||
echo '------------------------------------------------------------------------'
|
||||
cd "${CLOVERROOT}"
|
||||
echo "buildme Beta, Clover v2.5k r$(svn info | grep "Revision" | tr -cd [:digit:])"
|
||||
echo "EDKII in use: $edk2Rel"
|
||||
echo "Patches in use: $PATCHES"
|
||||
echo "buildme Beta, Clover v2.5k r$(cat Version.h | grep REVISION_STR | awk '{print $NF}' | tr -cd '[[:digit:]]') (SHA: $(git rev-parse --short HEAD))"
|
||||
echo "Remote SHA: $(git rev-parse --short origin/master)"
|
||||
echo
|
||||
PS3='Please enter your choice: '
|
||||
options=('build Clover' 'make pkg' 'make iso' 'build all' 'update Clover' 'update edk2' 'status' 'check remote changes' 'show diff' 'quit')
|
||||
options=('build Clover' 'make pkg' 'make iso' 'build all' 'update Clover (discard local changes)' 'update Clover (stash local changes)' 'status' 'show diff' 'quit')
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
@ -244,22 +189,18 @@ do
|
||||
buildIso
|
||||
break
|
||||
;;
|
||||
"update Clover")
|
||||
updateClover
|
||||
"update Clover (discard changes)")
|
||||
updateCloverTakeTheirs
|
||||
break
|
||||
;;
|
||||
"update edk2")
|
||||
updateEDK2
|
||||
"update Clover (stash local changes)")
|
||||
updateCloverTakeYours
|
||||
break
|
||||
;;
|
||||
"status")
|
||||
checkStatus
|
||||
break
|
||||
;;
|
||||
"check remote changes")
|
||||
checkChanges
|
||||
break
|
||||
;;
|
||||
"show diff")
|
||||
showdiff
|
||||
break
|
||||
|
19
ebuild.sh
19
ebuild.sh
@ -519,7 +519,7 @@ checkCmdlineArguments() {
|
||||
done
|
||||
|
||||
# Update variables
|
||||
PLATFORMFILE="${PLATFORMFILE:-Clover/Clover.dsc}"
|
||||
PLATFORMFILE="${PLATFORMFILE:-Clover.dsc}"
|
||||
if [ ! -z "${MODULEFILE}" ]; then
|
||||
MODULEFILE=" -m Clover/$MODULEFILE"
|
||||
fi
|
||||
@ -542,8 +542,8 @@ checkToolchain() {
|
||||
# Main build script
|
||||
MainBuildScript() {
|
||||
checkCmdlineArguments $@
|
||||
#checkToolchain
|
||||
checkPatch
|
||||
# checkToolchain
|
||||
# checkPatch
|
||||
|
||||
# echo "NASM_PREFIX: ${NASM_PREFIX}"
|
||||
|
||||
@ -551,8 +551,8 @@ MainBuildScript() {
|
||||
if [[ -d .svn ]]; then
|
||||
# repoRev=$(svnversion -n | tr -d [:alpha:])
|
||||
repoRev=$(svn info | grep "Revision" | tr -cd [:digit:])
|
||||
elif [[ -d .git ]]; then
|
||||
repoRev=$(git svn find-rev git-svn | tr -cd [:digit:])
|
||||
# elif [[ -d .git ]]; then
|
||||
# repoRev=$(git svn find-rev git-svn | tr -cd [:digit:])
|
||||
fi
|
||||
|
||||
echo -n "${repoRev}" > "${VERSTXT}"
|
||||
@ -573,24 +573,17 @@ MainBuildScript() {
|
||||
#
|
||||
# Setup workspace if it is not set
|
||||
#
|
||||
local EDK2DIR=$(cd "$CLOVERROOT"/.. && echo "$PWD")
|
||||
if [[ -z "$WORKSPACE" ]]; then
|
||||
echo "Initializing workspace"
|
||||
if [[ ! -x "${EDK2DIR}"/edksetup.sh ]]; then
|
||||
echo "Error: Can't find edksetup.sh script !" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# This version is for the tools in the BaseTools project.
|
||||
# this assumes svn pulls have the same root dir
|
||||
# export EDK_TOOLS_PATH=`pwd`/../BaseTools
|
||||
# This version is for the tools source in edk2
|
||||
cd "$EDK2DIR"
|
||||
cd "$CLOVERROOT"
|
||||
export EDK_TOOLS_PATH="${PWD}"/BaseTools
|
||||
set +u
|
||||
source ./edksetup.sh BaseTools
|
||||
set -u
|
||||
cd "$CLOVERROOT"
|
||||
else
|
||||
echo "Building from: $WORKSPACE"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user