From a419ab6832d41e86d3d04a6ebb19156814221554 Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Fri, 10 May 2024 22:19:03 -0400 Subject: [PATCH 1/8] buildmtoc: Add ARCHS=x86_64 to build mtoc --- buildmtoc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildmtoc.sh b/buildmtoc.sh index 6a9bb5a87..a59c3c1d9 100755 --- a/buildmtoc.sh +++ b/buildmtoc.sh @@ -197,7 +197,7 @@ fnCompileMtoc () if [[ ${OSXVER} < 10.15 ]]; then cmd="(make LTO= EFITOOLS=efitools -C libstuff) && (make -C efitools)" else - cmd="(xcodebuild -scheme mtoc -configuration Release ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=$PREFIX/bin)" + cmd="(xcodebuild -scheme mtoc -configuration Release ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=$PREFIX/bin)" fi logfile="$DIR_LOGS/mtoc.make.log.txt" echo "$cmd" > "$logfile" From a4b5ed35cc2a30be4a95aaea5a48e2032a1f38f6 Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Fri, 10 May 2024 22:28:00 -0400 Subject: [PATCH 2/8] buildme: Avoid Terminal Window Setup for CI --- buildme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildme b/buildme index f32cb2220..f5ad307b0 100755 --- a/buildme +++ b/buildme @@ -20,6 +20,7 @@ COL_WHITE="\x1b[37;01m" COL_BLUE="\x1b[34;01m" COL_RESET="\x1b[39;49;00m" # ====== Main Window SetUp ====== +if [[ "$2" != ci ]]; then osascript < Date: Sat, 11 May 2024 14:41:57 -0400 Subject: [PATCH 3/8] test --- Clover_Duet.command | 225 ++++++++++++++++++++++++++++++++++++++++++++ Clover_Duet.tool | 8 ++ build_gcc13.sh | 2 +- buildme | 6 +- 4 files changed, 237 insertions(+), 4 deletions(-) create mode 100755 Clover_Duet.command create mode 100755 Clover_Duet.tool diff --git a/Clover_Duet.command b/Clover_Duet.command new file mode 100755 index 000000000..8881c8cf8 --- /dev/null +++ b/Clover_Duet.command @@ -0,0 +1,225 @@ +#!/bin/bash +# Clover-LegacyDuet: by chris1111 +# Thanks: CloverHackyColor +# Thanks: Acidanthera +apptitle="Clover-LegacyDuet" +version="1.0" +# Set Icon directory and file +iconfile="/System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns" +printf '\e[8;47;83t' +PARENTDIR=$(dirname "$0") +cd "$PARENTDIR" +echo " " +echo "🚫 Do not use this program on a disk where Clover or OpenCore is already installed!" +rm -rf ./boot* +Sleep 1 +cp -Rp ./Bootloaders/x64/{boot6,boot7} ./ +cp -Rp ./BootSectors/{boot0af,boot1f32} ./ + +# Install Clover booter on physical disk. + +#get BOOT File +if [ "$2" == "" ]; then +echo " " +echo "Choose (6 or 7) for the Booter +6 = -> Clover EFI 64-bits using SATA to access drives. +7 = -> Clover EFI 64-bit using Bios Block I/O to access drives. " +echo "Make a choice followed by Enter: " + +while [ -z "$BOOT" ]; do +read BOOT +done + +else +BOOT="$2" +fi + +export ARCHS=$BOOT + +if [ ! -f "boot${ARCHS}" ] || [ ! -f boot0af ] || [ ! -f boot1f32 ] || [ ! -f EFI/CLOVER/CLOVERX64.efi ]; then + echo "Clover is not build?" + echo "Or you probably have change directory on this package?" + exit 1 +fi + +if [ "$(uname)" = "Linux" ]; then + if [ "$EUID" -ne 0 ] + then echo "Please run this script as root" + exit + fi + if [ "$(which lsblk)" = "" ]; then + echo "lsblk tool is missing! Try installing util-linux package" + exit 1 + fi + if [ "$(which fdisk)" = "" ]; then + echo "fdisk tool is missing!" + exit 1 + fi + + rm -rf ./origbs + rm -rf ./newbs + rm -rf ./boot* + + echo "Select the disk where you want to install boot files:" + lsblk -d | tail -n+2 | cut -d" " -f1 + echo "Example: sda" + read -r DRIVE + + DRIVE="/dev/${DRIVE}" + + if ! lsblk "$DRIVE"; then + echo Disk "${DRIVE}" not found + exit 1 + fi + + echo "Choose EFI partition on selected disk:" + lsblk -f "${DRIVE}" + echo "Example: sda1" + read -r EFI_PART + + EFI_PART="/dev/${EFI_PART}" + + if ! lsblk -f "$EFI_PART" | grep -q -e FAT32 -e vfat; then + echo "No FAT32 partition to install" + exit 1 + fi + + # Write MBR + dd if=boot0af of="$DRIVE" bs=1 count=446 conv=notrunc || exit 1 + + umount "${EFI_PART}" + + dd if="${EFI_PART}" count=1 of=origbs + cp -v boot1f32 newbs + dd if=origbs of=newbs skip=3 seek=3 bs=1 count=87 conv=notrunc + dd if=/dev/random of=newbs skip=496 seek=496 bs=1 count=14 conv=notrunc + dd if=newbs of="${EFI_PART}" + + p=/tmp/$(uuidgen)/EFI + mkdir -p "${p}" || exit 1 + mount -t vfat "${EFI_PART}" "${p}" -o rw,noatime,uid="$(id -u)",gid="$(id -g)" || exit 1 + + cp -v "boot${ARCHS}" "${p}/boot" || exit 1 + echo "Install EFI -> /Volumes/EFI/EFI Wait. . ." + cp -Rp "EFI" "${p}" || exit 1 + + echo Check "${p}" boot drive to install Clover Duet + + DISK_SCHEME=$(fdisk -l "${DRIVE}" | sed -n 's/.*Disklabel type: *//p') + if [ "$DISK_SCHEME" != "gpt" ]; then + BOOT_FLAG=$(dd if="$DRIVE" bs=1 count=1 status=none skip=$((0x1BE)) | od -t x1 -A n | tr -d ' ') + if [ "$BOOT_FLAG" != "80" ]; then + fdisk "$DRIVE" < /Volumes/EFI/EFI Done!" + mv ./EFI/CLOVER/config.plist ./EFI/CLOVER/config-sample.plist + Sleep 2 + Open -R "$(diskutil info disk"${N}"s1 | sed -n 's/.*Mount Point: *//p')/boot" + exit 1 + fi + + if [ "$action" == "Personal EFI" ] ; then + echo " " + #get EFI folder + if [ "$2" == "" ]; then + echo " " + echo "Move your EFI folder here" + echo "Followed by Enter: " + + while [ -z "$EFIfolder" ]; do + read EFIfolder + done + + else + EFIfolder="$2" + fi + cp -Rp "$EFIfolder" "$(diskutil info disk${N}s1 | sed -n 's/.*Mount Point: *//p')" + echo "Install EFI -> /Volumes/EFI/EFI Done!" + Sleep 2 + Open -R "$(diskutil info disk"${N}"s1 | sed -n 's/.*Mount Point: *//p')/boot" + exit 1 + fi + done diff --git a/Clover_Duet.tool b/Clover_Duet.tool new file mode 100755 index 000000000..cc86e7636 --- /dev/null +++ b/Clover_Duet.tool @@ -0,0 +1,8 @@ +#!/bin/bash + +cd "$(dirname "$0")" || exit 1 +export DUETTOOL=Clover_Duet.command +cp -Rp $DUETTOOL ./CloverPackage/CloverV2 +./CloverPackage/CloverV2/$DUETTOOL +Sleep 1 +rm -rf ./CloverPackage/CloverV2/$DUETTOOL diff --git a/build_gcc13.sh b/build_gcc13.sh index 67a434d0f..78dc22718 100755 --- a/build_gcc13.sh +++ b/build_gcc13.sh @@ -28,7 +28,7 @@ set -u # exit with error if unbound variables # here we can change source versions of tools # export BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-2.41} -export GCC_VERSION=${GCC_VERSION:-13.2.0} +export GCC_VERSION=${GCC_VERSION:-14.1.0} # Version of libraries are from ./contrib/download_prerequisites in gcc source directory export GMP_VERSION=${GMP_VERSION:-gmp-6.3.0} #6.2.1 diff --git a/buildme b/buildme index f5ad307b0..878063eef 100755 --- a/buildme +++ b/buildme @@ -122,9 +122,9 @@ checkTools() { if [[ "$SYSNAME" == Darwin ]]; then checkXCODE exportPaths - local GCC131_BIN="$PREFIX/cross/bin/x86_64-clover-linux-gnu-gcc" - if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC131_BIN}" ]]; then - if [[ $MYTOOLCHAIN == GCC131 ]]; then + local GCC141_BIN="$PREFIX/cross/bin/x86_64-clover-linux-gnu-gcc" + if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC141_BIN}" ]]; then + if [[ $MYTOOLCHAIN == GCC141 ]]; then cd "${CLOVERROOT}" ./build_gcc13.sh else From 6a641267377c544eab2211fd9d80f408056ba781 Mon Sep 17 00:00:00 2001 From: chris1111 Date: Sat, 11 May 2024 14:51:56 -0400 Subject: [PATCH 4/8] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a9eda64f1..f44555cb2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,8 @@ jobs: - name: Build Clover Pack run: | chmod +x ./buildme + chmod +x ./Clover_Duet.command + cp -rf ./Clover_Duet.command ./CloverPackage/CloverV2/ ./buildme "" ci - name: Prepare Release Packs run: | From a7b7f5cafc8e642555216aeb52806ae1a1a7136d Mon Sep 17 00:00:00 2001 From: chris1111 Date: Sat, 11 May 2024 18:13:42 -0400 Subject: [PATCH 5/8] Update build_gcc13.sh --- build_gcc13.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_gcc13.sh b/build_gcc13.sh index 78dc22718..e889b6dcf 100755 --- a/build_gcc13.sh +++ b/build_gcc13.sh @@ -28,7 +28,7 @@ set -u # exit with error if unbound variables # here we can change source versions of tools # export BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-2.41} -export GCC_VERSION=${GCC_VERSION:-14.1.0} +export GCC_VERSION=${GCC_VERSION:-13.1.0} # Version of libraries are from ./contrib/download_prerequisites in gcc source directory export GMP_VERSION=${GMP_VERSION:-gmp-6.3.0} #6.2.1 From c4437df52aa8fc40282e71b03cea329773fa3c6b Mon Sep 17 00:00:00 2001 From: chris1111 Date: Sat, 11 May 2024 18:15:01 -0400 Subject: [PATCH 6/8] Return GCC131 --- buildme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildme b/buildme index 878063eef..f5ad307b0 100755 --- a/buildme +++ b/buildme @@ -122,9 +122,9 @@ checkTools() { if [[ "$SYSNAME" == Darwin ]]; then checkXCODE exportPaths - local GCC141_BIN="$PREFIX/cross/bin/x86_64-clover-linux-gnu-gcc" - if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC141_BIN}" ]]; then - if [[ $MYTOOLCHAIN == GCC141 ]]; then + local GCC131_BIN="$PREFIX/cross/bin/x86_64-clover-linux-gnu-gcc" + if [[ $MYTOOLCHAIN == GCC* ]] && [[ ! -x "${GCC131_BIN}" ]]; then + if [[ $MYTOOLCHAIN == GCC131 ]]; then cd "${CLOVERROOT}" ./build_gcc13.sh else From fe4a8d464d8659f542c8ce9c02be82ddc4c4d378 Mon Sep 17 00:00:00 2001 From: chris1111 Date: Sun, 12 May 2024 09:38:20 -0400 Subject: [PATCH 7/8] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f44555cb2..fc4a7dd72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: jobs: build-macos: name: Build Clover Release - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v4 From a957b87fe972ecc761c405b1088371b57970ca3d Mon Sep 17 00:00:00 2001 From: chris1111 Date: Sun, 12 May 2024 16:21:50 -0400 Subject: [PATCH 8/8] GCC Version 13.2.0 --- build_gcc13.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_gcc13.sh b/build_gcc13.sh index e889b6dcf..67a434d0f 100755 --- a/build_gcc13.sh +++ b/build_gcc13.sh @@ -28,7 +28,7 @@ set -u # exit with error if unbound variables # here we can change source versions of tools # export BINUTILS_VERSION=${BINUTILS_VERSION:-binutils-2.41} -export GCC_VERSION=${GCC_VERSION:-13.1.0} +export GCC_VERSION=${GCC_VERSION:-13.2.0} # Version of libraries are from ./contrib/download_prerequisites in gcc source directory export GMP_VERSION=${GMP_VERSION:-gmp-6.3.0} #6.2.1