mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
add system images to os build process (#620)
* update compat build and add to os build process * copy to explicit file * fix paths and loading input * temp save docker images output * add docker config file to suppress warning * notes and first attempt of load image script * pr fixes * run as root, fix executable path * wip fixes * fix pool name and stop docker before umount * start docker again * reset docker fs * remove mkdir * load system images during embassy-init * add utils to make build * fix utils source * create system-images dir as root * cleanup * make loading docker images datadir agnostic * address PR feedback * rework load images * create shutdown channel on failed embassy-init run * pr feedback * fix import
This commit is contained in:
15
Makefile
15
Makefile
@@ -1,7 +1,8 @@
|
||||
EMBASSY_BINS := appmgr/target/aarch64-unknown-linux-gnu/release/embassyd appmgr/target/aarch64-unknown-linux-gnu/release/embassy-init appmgr/target/aarch64-unknown-linux-gnu/release/embassy-cli appmgr/target/aarch64-unknown-linux-gnu/release/embassy-sdk
|
||||
EMBASSY_UIS := ui/www setup-wizard/www diagnostic-ui/www
|
||||
EMBASSY_SRC := ubuntu.img product_key.txt $(EMBASSY_BINS) appmgr/embassyd.service appmgr/embassy-init.service $(EMBASSY_UIS) $(shell find build)
|
||||
|
||||
COMPAT_SRC := $(shell find system-images/compat/src)
|
||||
UTILS_SRC := $(shell find system-images/utils/Dockerfile)
|
||||
APPMGR_SRC := $(shell find appmgr/src) $(shell find patch-db/*/src) $(shell find rpc-toolkit/*/src) appmgr/Cargo.toml appmgr/Cargo.lock
|
||||
UI_SRC := $(shell find ui/src)
|
||||
SETUP_WIZARD_SRC := $(shell find setup-wizard/src)
|
||||
@@ -14,6 +15,7 @@ clean:
|
||||
rm -f eos.img
|
||||
rm -f ubuntu.img
|
||||
rm -f product_key.txt
|
||||
rm -f system-images/**/*.tar
|
||||
sudo rm -f $(EMBASSY_BINS)
|
||||
rm -rf ui/node_modules
|
||||
rm -rf ui/www
|
||||
@@ -24,10 +26,17 @@ clean:
|
||||
rm -rf patch-db/client/node_modules
|
||||
rm -rf patch-db/client/dist
|
||||
|
||||
eos.img: $(EMBASSY_SRC)
|
||||
eos.img: $(EMBASSY_SRC) system-images/compat/compat.tar system-images/utils/utils.tar
|
||||
! test -f eos.img || rm eos.img
|
||||
./build/make-image.sh
|
||||
|
||||
system-images/compat/compat.tar: $(COMPAT_SRC)
|
||||
cd system-images/compat && ./build.sh
|
||||
cd system-images/compat && DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/x_system/compat --platform=linux/arm64 -o type=docker,dest=compat.tar .
|
||||
|
||||
system-images/utils/utils.tar: $(UTILS_SRC)
|
||||
cd system-images/utils && DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/x_system/utils --platform=linux/arm64 -o type=docker,dest=utils.tar .
|
||||
|
||||
ubuntu.img:
|
||||
wget -O ubuntu.img.xz https://cdimage.ubuntu.com/releases/21.04/release/ubuntu-21.04-preinstalled-server-arm64+raspi.img.xz
|
||||
unxz ubuntu.img.xz
|
||||
@@ -43,7 +52,7 @@ $(EMBASSY_BINS): $(APPMGR_SRC)
|
||||
ui/node_modules: ui/package.json
|
||||
npm --prefix ui install
|
||||
|
||||
ui/www: $(UI_SRC) ui/node_modules patch-db/client/dist ui/config.json
|
||||
ui/www: $(UI_SRC) ui/node_modules patch-db/client patch-db/client/dist ui/config.json
|
||||
npm --prefix ui run build-prod
|
||||
|
||||
ui/config.json:
|
||||
|
||||
Reference in New Issue
Block a user