mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Use HFSPlus option
Use HFSPlus.efi. If present ebuild.sh will use it and VBoxhfs will be ignored. Fixed custom build script detection.
This commit is contained in:
parent
c8a7bce456
commit
5cfce7bc7a
31
buildme
31
buildme
@ -60,7 +60,11 @@ if [[ "$SYSNAME" == Linux ]]; then
|
||||
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-/usr}
|
||||
elif [[ "$SYSNAME" == Darwin ]]; then
|
||||
pathmunge "$(xcode-select --print-path)"/usr/bin
|
||||
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-"$CLOVERROOT"/toolchain}
|
||||
if [[ -d ~/src/opt/local ]]; then
|
||||
TOOLCHAIN_DIR=~/src/opt/local
|
||||
else
|
||||
TOOLCHAIN_DIR=${TOOLCHAIN_DIR:-"$CLOVERROOT"/toolchain}
|
||||
fi
|
||||
fi
|
||||
|
||||
pathmunge "$TOOLCHAIN_DIR"/bin
|
||||
@ -114,6 +118,17 @@ else
|
||||
fi
|
||||
}
|
||||
|
||||
buildCloverHFSPlus() {
|
||||
if [[ -f "${CLOVERROOT}"/FileSystems/HFSPlus/X64/HFSPlus.efi ]]; then
|
||||
echo "building Clover with HFSPlus"
|
||||
buildClover HFSPlus
|
||||
else
|
||||
echo "${CLOVERROOT}/FileSystems/HFSPlus/X64/HFSPlus.efi: no such file!"
|
||||
sleep 3
|
||||
menu
|
||||
fi
|
||||
}
|
||||
|
||||
buildClover() {
|
||||
checkTools
|
||||
|
||||
@ -135,8 +150,13 @@ if [[ -x "${DIR_TOOLS}"/Scripts/build.sh ]]; then
|
||||
echo "Running custom build script"
|
||||
"${DIR_TOOLS}"/Scripts/build.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
||||
else
|
||||
./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||
if [[ "${1}" == HFSPlus ]]; then
|
||||
./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
||||
else
|
||||
./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run a post build script if exist (~/src/tools/Scripts/postbuild.sh)
|
||||
@ -254,6 +274,7 @@ echo "TOOLCHAIN: $MYTOOLCHAIN (override example: './buildme XCODE8')"
|
||||
echo
|
||||
PS3='Please enter your choice: '
|
||||
options=( 'build Clover'
|
||||
'build Clover with HFSPlus'
|
||||
'make pkg'
|
||||
'make app'
|
||||
'make iso'
|
||||
@ -274,6 +295,10 @@ do
|
||||
buildClover
|
||||
break
|
||||
;;
|
||||
"build Clover with HFSPlus")
|
||||
buildCloverHFSPlus
|
||||
break
|
||||
;;
|
||||
"make pkg")
|
||||
buildPkg
|
||||
break
|
||||
|
17
ebuild.sh
17
ebuild.sh
@ -171,6 +171,10 @@ addEdk2BuildOption() {
|
||||
addEdk2BuildMacro() {
|
||||
local macro="$1"
|
||||
[[ "$macro" == "NO_GRUB_DRIVERS" ]] && M_NOGRUB=1
|
||||
if [[ "$macro" == "USE_APPLE_HFSPLUS_DRIVER" && "$TARGETARCH" == "X64" ]]; then
|
||||
[[ ! -e "${CLOVERROOT}"/FileSystems/HFSPlus/X64/HFSPlus.efi ]] && return
|
||||
M_APPLEHFS=1
|
||||
fi
|
||||
addEdk2BuildOption "-D" "$macro"
|
||||
}
|
||||
|
||||
@ -786,9 +790,10 @@ MainPostBuildScript() {
|
||||
copyBin "$BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_LEGACY/FileSystem/$efi.efi
|
||||
done
|
||||
|
||||
if [[ $M_APPLEHFS -eq 1 ]]; then
|
||||
copyBin "${CLOVERROOT}"/FileSystems/HFSPlus/X64/HFSPlus.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_LEGACY/FileSystem/HFSPlus.efi
|
||||
fi
|
||||
# HFSPlus is already built into Clover EFI
|
||||
# if [[ $M_APPLEHFS -eq 1 ]]; then
|
||||
# copyBin "${CLOVERROOT}"/FileSystems/HFSPlus/X64/HFSPlus.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_LEGACY/FileSystem/HFSPlus.efi
|
||||
# fi
|
||||
|
||||
|
||||
binArray=( FSInject DataHubDxe SMCHelper AudioDxe )
|
||||
@ -826,7 +831,7 @@ MainPostBuildScript() {
|
||||
copyBin "$BUILD_DIR_ARCH"/$efi.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_UEFI/HID/$efi.efi
|
||||
done
|
||||
|
||||
binArray=( ApfsDriverLoader Fat VBoxExt2 VBoxExt4 VBoxIso9600 VBoxHfs )
|
||||
binArray=( ApfsDriverLoader Fat VBoxExt2 VBoxExt4 VBoxIso9600 )
|
||||
|
||||
for efi in "${binArray[@]}"
|
||||
do
|
||||
@ -835,8 +840,10 @@ MainPostBuildScript() {
|
||||
|
||||
if [[ $M_APPLEHFS -eq 1 ]]; then
|
||||
copyBin "${CLOVERROOT}"/FileSystems/HFSPlus/X64/HFSPlus.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_UEFI/FileSystem/HFSPlus.efi
|
||||
else
|
||||
copyBin "$BUILD_DIR_ARCH"/VBoxHfs.efi "$CLOVER_PKG_DIR"/EFI/CLOVER/drivers/$DRIVERS_OFF/$DRIVERS_UEFI/FileSystem/VBoxHfs.efi
|
||||
fi
|
||||
|
||||
|
||||
# drivers64UEFI/FileVault2
|
||||
binArray=( AppleKeyFeeder HashServiceFix )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user