Building
How to build ipsw from source.
Requirements
- Golang 1.22+
- macOS
- Linux
Install the Go binary
brew install go
Build the ipsw binary
git clone https://github.com/blacktop/ipsw.git
cd ipsw
make build
offline
To dev and build WITHOUT internet
On internet connected machine with Go installed download all Golang lib dependencies
git clone https://github.com/blacktop/ipsw.git
cd ipsw
go mod vendor # this downloads all of the dependencies into the `vendor` folder
Now copy the project's directory to no-net machine
Add --mod=vendor to use the Go deps in the vendor folder
CGO_ENABLED=1 go build --mod=vendor ./cmd/ipsw
Install the Golang
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install -y golang-go
For many of the ipsw commands you will need to be able to mount DMGs and this is done via apfs-fuse
sudo apt-get update
sudo apt-get install -y libbz2-dev libz-dev cmake build-essential libattr1-dev libfuse3-dev fuse3 tzdataxz-utils bzip2 unzip lzma
cd /tmp
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
mkdir build
cd build
cmake ..
sudo make install
Get the ipsw source
git clone https://github.com/blacktop/ipsw.git
cd ipsw
Build the ipsw binary
Build the ipsw CLI binary
sudo CGO_ENABLED=1 go build -o /usr/local/bin/ipsw ./cmd/ipsw
Build the ipswd binary
Build the ipsw daemon binary
sudo CGO_ENABLED=1 go build -o /usr/local/bin/ipswd ./cmd/ipswd