mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
* fix live-build resolv.conf * improved debuggability * wip: start-tunnel * fixes for trixie and tor * non-free-firmware on trixie * wip * web server WIP * wip: tls refactor * FE patchdb, mocks, and most endpoints * fix editing records and patch mocks * refactor complete * finish api * build and formatter update * minor change toi viewing addresses and fix build * fixes * more providers * endpoint for getting config * fix tests * api fixes * wip: separate port forward controller into parts * simplify iptables rules * bump sdk * misc fixes * predict next subnet and ip, use wan ips, and form validation * refactor: break big components apart and address todos (#3043) * refactor: break big components apart and address todos * starttunnel readme, fix pf mocks, fix adding tor domain in startos --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * better tui * tui tweaks * fix: address comments * better regex for subnet * fixes * better validation * handle rpc errors * build fixes * fix: address comments (#3044) * fix: address comments * fix unread notification mocks * fix row click for notification --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix raspi build * fix build * fix build * fix build * fix build * try to fix build * fix tests * fix tests * fix rsync tests * delete useless effectful test --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Alex Inkin <alexander@inkin.ru>
135 lines
4.0 KiB
Markdown
135 lines
4.0 KiB
Markdown
# Setting up your development environment on Debian/Ubuntu
|
|
|
|
A step-by-step guide
|
|
|
|
> This is the only officially supported build environment.
|
|
> MacOS has limited build capabilities and Windows requires [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install)
|
|
|
|
## Installing dependencies
|
|
|
|
Run the following commands one at a time
|
|
|
|
```sh
|
|
sudo apt update
|
|
sudo apt install -y ca-certificates curl gpg build-essential
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
echo "deb [arch=$(dpkg-architecture -q DEB_HOST_ARCH) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list
|
|
sudo apt update
|
|
sudo apt install -y sed grep gawk jq gzip brotli containerd.io docker-ce docker-ce-cli docker-compose-plugin qemu-user-static binfmt-support squashfs-tools git debspawn rsync b3sum
|
|
sudo mkdir -p /etc/debspawn/
|
|
echo "AllowUnsafePermissions=true" | sudo tee /etc/debspawn/global.toml
|
|
sudo usermod -aG docker $USER
|
|
sudo su $USER
|
|
docker run --privileged --rm tonistiigi/binfmt --install all
|
|
docker buildx create --use
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # proceed with default installation
|
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
|
source ~/.bashrc
|
|
nvm install 24
|
|
nvm use 24
|
|
nvm alias default 24 # this prevents your machine from reverting back to another version
|
|
```
|
|
|
|
## Cloning the repository
|
|
|
|
```sh
|
|
git clone --recursive https://github.com/Start9Labs/start-os.git --branch next/major
|
|
cd start-os
|
|
```
|
|
|
|
## Building an ISO
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make iso
|
|
```
|
|
|
|
This will build an ISO for your current architecture. If you are building to run on an architecture other than the one you are currently on, replace `$(uname -m)` with the correct platform for the device (one of `aarch64`, `aarch64-nonfree`, `x86_64`, `x86_64-nonfree`, `raspberrypi`)
|
|
|
|
## Creating a VM
|
|
|
|
### Install virt-manager
|
|
|
|
```sh
|
|
sudo apt update
|
|
sudo apt install -y virt-manager
|
|
sudo usermod -aG libvirt $USER
|
|
sudo su $USER
|
|
```
|
|
|
|
### Launch virt-manager
|
|
|
|
```sh
|
|
virt-manager
|
|
```
|
|
|
|
### Create new virtual machine
|
|
|
|

|
|

|
|

|
|

|
|
|
|
#### make sure to set "Target Path" to the path to your results directory in start-os
|
|
|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|
|
|
## Updating a VM
|
|
|
|
The fastest way to update a VM to your latest code depends on what you changed:
|
|
|
|
### UI or startd:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make update-startbox REMOTE=start9@<VM IP>
|
|
```
|
|
|
|
### Container runtime or debian dependencies:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make update-deb REMOTE=start9@<VM IP>
|
|
```
|
|
|
|
### Image recipe:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make update-squashfs REMOTE=start9@<VM IP>
|
|
```
|
|
|
|
---
|
|
|
|
If the device you are building for is not available via ssh, it is also possible to use `magic-wormhole` to send the relevant files.
|
|
|
|
### Prerequisites:
|
|
|
|
```sh
|
|
sudo apt update
|
|
sudo apt install -y magic-wormhole
|
|
```
|
|
|
|
As before, the fastest way to update a VM to your latest code depends on what you changed. Each of the following commands will return a command to paste into the shell of the device you would like to upgrade.
|
|
|
|
### UI or startd:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make wormhole
|
|
```
|
|
|
|
### Container runtime or debian dependencies:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make wormhole-deb
|
|
```
|
|
|
|
### Image recipe:
|
|
|
|
```sh
|
|
PLATFORM=$(uname -m) ENVIRONMENT=dev make wormhole-squashfs
|
|
```
|