Compare commits

...
21 Commits
Author SHA1 Message Date
Nick Chan e61ae40291 2023-03-15 15:56:16 +08:00
Nick Chan 48bd5dccc2 2023-03-15 09:23:29 +08:00
Nick Chan 310e0313d3 2023-03-15 09:08:19 +08:00
Nick Chan 0b95d8ad44 fix build jbinit 2023-03-15 09:04:54 +08:00
Tom E 91d17c2422 this SUCKS 2023-03-14 11:03:48 -04:00
Tom E aad7a4bc05 directory issue 2023-03-14 10:26:22 -04:00
Tom E 2e483568b0 the fix 2023-03-14 09:28:14 -04:00
Tom E a74c5a1236 fix: dumb mistake 2023-03-14 08:14:32 -04:00
Tom E 131bba04b6 need libssl headers too 2023-03-14 07:51:43 -04:00
Tom E 20f5c3c987 fix: install llvm 2023-03-14 07:38:13 -04:00
Nick Chan 07578558a2 2023-03-14 19:30:55 +08:00
Nick Chan e811c9c0f9 update submodules 2023-03-14 19:11:07 +08:00
Nick Chan 98a9310d25 Update build.yml 2023-03-14 18:05:24 +08:00
Nick Chan 7439d7f9eb Update build.yml 2023-03-14 18:01:22 +08:00
Nick Chan fc77488b6d Update build.yml 2023-03-14 17:53:49 +08:00
Nick Chan 8590c9a054 Update build.yml 2023-03-14 17:47:33 +08:00
Nick Chan fcc34b920d Update build.yml 2023-03-14 17:44:32 +08:00
Nick Chan 2133f2f94f Update build.yml 2023-03-14 17:42:15 +08:00
Nick Chan aace97112f fix checkra1n-kpf-pongo uplaod 2023-03-14 17:32:42 +08:00
Nick Chan df68b2910e kpf action changes 2023-03-14 17:29:39 +08:00
Nick Chan 8a912898c9 build things in one action (WILL fail) 2023-03-14 17:21:59 +08:00
34 changed files with 304 additions and 31 deletions

No files matched your search

+278
View File
@@ -44,6 +44,236 @@ jobs:
localDir: 'ready/' localDir: 'ready/'
remoteDir: '/palera1n/artifacts/c-rewrite' remoteDir: '/palera1n/artifacts/c-rewrite'
build-loader:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get loader commit
run: echo "LOADER_COMMIT=$(git -C src/loader rev-parse HEAD)" >> $GITHUB_ENV
- name: Cache compile
id: loader_cache
uses: actions/cache@v3
with:
path: src/loader/packages
key: loader-${{ env.LOADER_COMMIT }}
- name: Install dependencies (packages)
if: steps.loader_cache.outputs.cache-hit != 'true'
run: |
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
- name: Compile
if: steps.loader_cache.outputs.cache-hit != 'true'
run: make -C src/loader
- name: Upload loader
uses: actions/upload-artifact@v3
with:
name: palera1n.ipa
path: src/loader/packages/palera1n.ipa
retention-days: 1
build-binpack:
needs: build-loader
runs-on: macos-12
steps:
- name: Cache Procursus
uses: actions/cache@v3
id: procache
with:
path: |
~/__cache
key: ${{ runner.os }}-procursus
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get binpack commit
run: echo "BINPACK_COMMIT=$(git -C src/binpack rev-parse HEAD)" >> $GITHUB_ENV
- name: Cache binpack.tgz
uses: actions/cache@v3
id: binpack_cache
with:
path: src/jbinit/binpack.tgz
key: binpack-${{ env.BINPACK_COMMIT }}
- name: Download loader
uses: actions/download-artifact@v3
with:
name: palera1n.ipa
path: src/jbinit/palera1n.ipa
- name: Checkout Procursus
if: steps.binpack_cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: ProcursusTeam/Procursus
path: src/Procursus
- name: Setup Procursus Bootstrap (install)
if: steps.procache.outputs.cache-hit != 'true' && steps.binpack_cache.outputs.cache-hit != 'true'
run: |
wget https://apt.procurs.us/bootstraps/big_sur/bootstrap-darwin-amd64.tar.zst
sudo gtar --preserve-permissions -xkf ./bootstrap-darwin-amd64.tar.zst -C /
echo '/opt/procursus/sbin:/opt/procursus/bin' >> $GITHUB_PATH
PATH=/opt/procursus/sbin:/opt/procursus/bin:$PATH sudo /opt/procursus/bin/apt update
sudo /opt/procursus/bin/apt -V full-upgrade -y || :
sudo /opt/procursus/bin/apt install asciidoc autoconf autoconf-archive automake autopoint bash bison cmake docbook-xml docbook-xsl fakeroot findutils flex file gawk git gnupg gpgrt-tools groff gzip ldid libtool libltdl-dev llvm make ncurses-bin openssl patch pkg-config po4a python3 sed tar triehash wget xz-utils zstd -y
- name: Add Procursus to PATH
if: steps.binpack_cache.outputs.cache-hit != 'true'
run: |
echo '/opt/procursus/sbin:/opt/procursus/bin' >> $GITHUB_PATH
- name: Setup Procursus Bootstrap (cache)
if: steps.procache.outputs.cache-hit == 'true' && steps.binpack_cache.outputs.cache-hit != 'true'
run: |
sudo mkdir -p ~/__cache/procursus/var/cache/apt/archives/partial ~/__cache/procursus/var/lib/apt/lists/partial
sudo rsync -aP ~/__cache/procursus /opt
sudo /opt/procursus/bin/apt update
sudo /opt/procursus/bin/apt --allow-downgrades -V dist-upgrade -y
sudo /opt/procursus/bin/apt --allow-downgrades -V dist-upgrade -y
- name: Build binpack
if: steps.binpack_cache.outputs.cache-hit != 'true'
run: |
cd src/binpack
gmake MEMO_CFVER=1800 MEMO_PREFIX=/cores/binpack MEMO_TARGET=iphoneos-arm64 binpack
cd ../..
- name: Process binpack.tar into binpack.tgz
if: steps.binpack_cache.outputs.cache-hit != 'true'
run: |
cd src/jbinit
cp ../binpack/build_strap/iphoneos-arm64/1800/binpack.tar .
sudo tar --preserve-permissions -xf binpack.tar
sudo cp -R cores/binpack .
sudo chown $UID:$GID .
sudo mkdir -p binpack/Library/LaunchDaemons
sudo sed 's|/binpack|/cores/binpack|' binpack/usr/share/dropbear.plist.example | sudo tee binpack/Library/LaunchDaemons/dropbear.plist
sudo rm -rf binpack/usr/share/dropbear.plist.example
sudo plutil -convert binary1 binpack/Library/LaunchDaemons/dropbear.plist
sudo chown 0:0 binpack/Library/LaunchDaemons/dropbear.plist
sudo gchmod 755 -R binpack/Library
sudo gchmod 644 binpack/Library/LaunchDaemons/dropbear.plist
tar -zcf binpack.tgz binpack
cd ../..
- name: Generate binpack.dmg
run: |
cd src/jbinit
sudo gmake binpack.dmg
cd ../..
- name: Upload binpack
uses: actions/upload-artifact@v3
with:
name: binpack.dmg
path: src/jbinit/binpack.dmg
retention-days: 1
- name: Copy Procursus to Cache Location
run: |
sudo mkdir -p ~/__cache
sudo rsync -aP /opt/procursus ~/__cache
sudo rm -rf ~/__cache/procursus/var/cache/apt/archives/partial ~/__cache/procursus/var/lib/apt/lists/partial ~/__cache/procursus/Library/dpkg/triggers/Lock
build-jbinit:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get jbinit commit
run: echo "JBINIT_COMMIT=$(git -C src/jbinit rev-parse HEAD)" >> $GITHUB_ENV
- name: Cache jbinit
uses: actions/cache@v3
id: jbinit_cache
with:
path: src/jbinit/ramdisk.dmg
key: jbinit-${{ env.JBINIT_COMMIT }}
- name: Download dependencies
if: steps.jbinit_cache.cache_hit != 'true'
run: |
brew install make coreutils
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
- name: Build jbinit
if: steps.jbinit_cache.cache_hit != 'true'
run: |
cd src/jbinit
git submodule update --init --recursive
sudo cp -a $(xcrun -sdk macosx --show-sdk-path)/usr/include/{xpc,{launch,bootstrap}.h} $(xcrun -sdk iphoneos --show-sdk-path)/usr/include
sudo sed -i.bak -Ee 's/API_UNAVAILABLE\(.*\)//g' $(xcrun -sdk iphoneos --show-sdk-path)//System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h
sudo sed -i.bak -e 's/;}/;/g' $(xcrun -sdk iphoneos --show-sdk-path)//System/Library/Frameworks/CoreFoundation.framework/Headers/CFUserNotification.h
sudo sed -i.bak -e 's/__UNAVAILABLE_PUBLIC_IOS;/;/g' $(xcrun -sdk iphoneos --show-sdk-path)/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h
ruby -e "File.write(ARGV[0], File.read(ARGV[0]).gsub(ARGV[1]) { ARGV[2] })" $(xcrun -sdk iphoneos --show-sdk-path)/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h '__API_DEPRECATED_WITH_REPLACEMENT("kIOMainPortDefault", macos(10.0, 12.0)) __API_UNAVAILABLE(ios, watchos, tvos);' '__API_DEPRECATED_WITH_REPLACEMENT("kIOMainPortDefault", macos(10.0, 12.0)) /*__API_UNAVAILABLE(ios, watchos, tvos)*/;'
sudo chown $UID:$GID .
sudo gmake -j$(sysctl -n hw.ncpu) ramdisk.dmg
- name: Upload ramdisk
uses: actions/upload-artifact@v3
with:
name: ramdisk.dmg
path: src/jbinit/ramdisk.dmg
retention-days: 1
build-kpf:
runs-on: ubuntu-20.04
steps:
- name: Install toolchain
run: |
echo 'deb https://assets.checkra.in/debian /' | sudo tee /etc/apt/sources.list.d/checkra1n.list
sudo apt-key adv --fetch-keys https://assets.checkra.in/debian/archive.key
sudo apt-get update
sudo apt-get install -y ld64 cctools-strip
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Get Pongo commit
run: echo "PONGO_COMMIT=$(git -C src/PongoOS rev-parse HEAD)" >> $GITHUB_ENV
- name: Voodoo magic
id: voodoo
uses: actions/cache@v2
with:
key: ${{ github.event_name }}-${{ env.PONGO_COMMIT }}-${{ github.run_id }}
restore-keys: |
pongo-${{ env.PONGO_COMMIT }}-
pongo-
path: |
src/PongoOS/**
- name: Compile
run: |
cd src/PongoOS
EMBEDDED_CC='clang-10' EMBEDDED_AR='llvm-ar-10' EMBEDDED_RANLIB='llvm-ranlib-10' DEV_BUILD=1 make build/checkra1n-kpf-pongo
- name: Upload checkra1n-kpf-pongo
uses: actions/upload-artifact@v3
with:
name: checkra1n-kpf-pongo
path: src/PongoOS/build/checkra1n-kpf-pongo
retention-days: 1
build-darwin: build-darwin:
strategy: strategy:
matrix: matrix:
@@ -61,6 +291,7 @@ jobs:
os: iphoneos os: iphoneos
minos: 7.0 minos: 7.0
runs-on: macos-12 runs-on: macos-12
needs: [build-loader, build-jbinit, build-binpack, build-kpf]
env: env:
MBEDTLS_VERSION: 3.3.0 MBEDTLS_VERSION: 3.3.0
READLINE_VERSION: 8.2 READLINE_VERSION: 8.2
@@ -85,6 +316,24 @@ jobs:
- name: Download dependencies (embedded binaries) - name: Download dependencies (embedded binaries)
run: | run: |
echo "SDK=$(xcrun -sdk ${{ matrix.os }} --show-sdk-path)" >> $GITHUB_ENV echo "SDK=$(xcrun -sdk ${{ matrix.os }} --show-sdk-path)" >> $GITHUB_ENV
- name: Download binpack.dmg
uses: actions/download-artifact@v3
with:
name: binpack.dmg
path: src/palera1n/binpack.dmg
- name: Download ramdisk.dmg
uses: actions/download-artifact@v3
with:
name: ramdisk.dmg
path: src/palera1n/ramdisk.dmg
- name: Download checkra1n-kpf-pongo
uses: actions/download-artifact@v3
with:
name: checkra1n-kpf-pongo
path: src/palera1n/checkra1n-kpf-pongo
- name: Download dependencies (source code) - name: Download dependencies (source code)
run: | run: |
@@ -391,6 +640,7 @@ jobs:
- armel-linux-musleabi - armel-linux-musleabi
- aarch64-linux-musl - aarch64-linux-musl
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-loader, build-jbinit, build-binpack, build-kpf]
env: env:
MBEDTLS_VERSION: 3.3.0 MBEDTLS_VERSION: 3.3.0
LIBUSB_VERSION: 1.0.26 LIBUSB_VERSION: 1.0.26
@@ -429,6 +679,24 @@ jobs:
run: | run: |
curl -LO https://musl.cc/${{ matrix.triple }}-cross.tgz curl -LO https://musl.cc/${{ matrix.triple }}-cross.tgz
- name: Download binpack.dmg
uses: actions/download-artifact@v3
with:
name: binpack.dmg
path: src/palera1n/binpack.dmg
- name: Download ramdisk.dmg
uses: actions/download-artifact@v3
with:
name: ramdisk.dmg
path: src/palera1n/ramdisk.dmg
- name: Download checkra1n-kpf-pongo
uses: actions/download-artifact@v3
with:
name: checkra1n-kpf-pongo
path: src/palera1n/checkra1n-kpf-pongo
- name: Setup environment - name: Setup environment
run: | run: |
tar -xf ${{ matrix.triple }}-cross.tgz tar -xf ${{ matrix.triple }}-cross.tgz
@@ -664,3 +932,13 @@ jobs:
dryRun: false dryRun: false
localDir: 'ready/' localDir: 'ready/'
remoteDir: '/palera1n/artifacts/c-rewrite' remoteDir: '/palera1n/artifacts/c-rewrite'
delete-artifacts:
runs-on: ubuntu-latest
needs: [darwin-dist, build-Linux]
steps:
- name: Delete all artifacts on GitHub
uses: geekyeggo/delete-artifact@v2
with:
name: '*'
failOnError: false
+6 -7
View File
@@ -7,18 +7,17 @@ contrib/
.vscode .vscode
checkra1n* checkra1n*
payload.c payload.c
src/palera1n src/palera1n/palera1n
!xxd-embedded.h !xxd-embedded.h
src/binpack.dmg src/palera1n/binpack.dmg
src/ramdisk.dmg src/palera1n/ramdisk.dmg
src/xxd-*.c src/palera1n/xxd-*.c
.DS_Store .DS_Store
!palera1n.1 !palera1n.1
palera1n.1.html palera1n.1.html
Payload Payload
docs/*.html docs/*.html
build build
src/*.dmg.c src/palera1n/*.dmg.c
.idea .idea
src/stage2/ src/palera1n/libcheckra1nhelper.dylib*
src/libcheckra1nhelper.dylib*
+12
View File
@@ -0,0 +1,12 @@
[submodule "src/PongoOS"]
path = src/PongoOS
url = [email protected]:plooshi/PongoOS.git
[submodule "src/jbinit"]
path = src/jbinit
url = [email protected]:palera1n/jbinit.git
[submodule "src/loader"]
path = src/loader
url = [email protected]:palera1n/loader.git
[submodule "src/binpack"]
path = src/binpack
url = [email protected]:palera1n/binpack.git
+4 -4
View File
@@ -6,7 +6,7 @@ STRIP = strip
CC ?= cc CC ?= cc
CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC) CFLAGS += -I$(DEP)/include -I$(SRC)/include -I$(SRC)
CFLAGS += -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter CFLAGS += -Wall -Wextra -DPALERAIN_VERSION=\"2.0.0\" -Wall -Wextra -Wno-unused-parameter
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L -D_DARWIN_C_SOURCE CFLAGS += -Wno-unused-variable -I$(SRC)/src/palera1n -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L -D_DARWIN_C_SOURCE
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread
ifeq ($(TARGET_OS),) ifeq ($(TARGET_OS),)
@@ -61,14 +61,14 @@ export SRC DEP CC CFLAGS LDFLAGS LIBS TARGET_OS DEV_BUILD BUILD_DATE BUILD_TAG B
all: palera1n all: palera1n
palera1n: download-deps palera1n: download-deps
$(MAKE) -C src $(MAKE) -C src/palera1n
clean: clean:
$(MAKE) -C src clean $(MAKE) -C src/palera1n clean
$(MAKE) -C docs clean $(MAKE) -C docs clean
download-deps: download-deps:
$(MAKE) -C src checkra1n-macos checkra1n-linux-arm64 checkra1n-linux-armel checkra1n-linux-x86 checkra1n-linux-x86_64 checkra1n-kpf-pongo ramdisk.dmg binpack.dmg $(MAKE) -C src/palera1n checkra1n-macos checkra1n-linux-arm64 checkra1n-linux-armel checkra1n-linux-x86 checkra1n-linux-x86_64 checkra1n-kpf-pongo ramdisk.dmg binpack.dmg
docs: docs:
$(MAKE) -C docs $(MAKE) -C docs
-20
View File
@@ -1,20 +0,0 @@
curl -LOOOOOO \
https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v3.3.0.tar.gz \
https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2 \
https://mirror-hk.koddos.net/gnu/readline/readline-8.2.tar.gz \
https://www.jedsoft.org/releases/slang/slang-2.3.3.tar.bz2 \
https://releases.pagure.org/newt/newt-0.52.23.tar.gz \
https://github.com/rpm-software-management/popt/archive/master-release.tar.gz
tar xf v3.3.0.tar.gz
tar xf libusb-1.0.26.tar.bz2
tar xf readline-8.2.tar.gz
tar xf slang-2.3.3.tar.bz2
tar xf newt-0.52.23.tar.gz
tar xf master-release.tar.gz
git clone --depth=1 https://github.com/libimobiledevice/libplist
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice-glue
git clone --depth=1 https://github.com/libimobiledevice/libirecovery
git clone --depth=1 https://github.com/libimobiledevice/libusbmuxd
git clone --depth=1 https://github.com/libimobiledevice/libimobiledevice
Submodule
+1
Submodule src/PongoOS added at f3e1294f42.
Submodule
+1
Submodule src/binpack added at dc0ef6423c.
Submodule
+1
Submodule src/jbinit added at 68dfd57cd5.
Submodule
+1
Submodule src/loader added at d73b4ac49f.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.