Files
ipsw/www/docs/getting-started/building.md
2026-05-05 15:36:59 -06:00

2.1 KiB

description, hide_table_of_contents
description hide_table_of_contents
How to build ipsw from source. true

Building

How to build ipsw from source.

Requirements

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs>
<TabItem value="macOS">

Install the Go binary

brew install go

Build the ipsw binary

git clone https://github.com/blacktop/ipsw.git
cd ipsw
make build

:::info 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

:::

</TabItem>
<TabItem value="Linux">

Install the Golang

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install -y golang-go

:::info apfs-fuse

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
</TabItem>
</Tabs>