mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
🛠️ Adding BuildGuide branch for the ease of use (#252)
* Create BuildGuide.md * bug fixes * Update BuildGuide.md * Update make_image.sh * Update BuildGuide.md * Update make_image.sh additional improvements and "done" message added. Thanks @k0gen! * Update BuildGuide.md Added intro notes and made minor adjustments to the guide. * Update setup.sh Required adjustments to prevent reboot when following BuildGuide.md * Update BuildGuide.md Improvements to final setup steps * bug fix additional improvements and "done" message added. Thanks @k0gen! * Update Makefile Changes to facilitate building process when using the BuildGuide * Update BuildGuide.md Avoiding manual changes to Makefile and cleaning up step 7 * Update BuildGuide.md Switching from sftp to cp for one line command simplification * Update BuildGuide.md Simplified method of transferring .img to desktop. Thanks @k0gen! * Update BuildGuide.md update to latest openssl https://www.openssl.org/news/openssl-1.1.1-notes.html * Update BuildGuide.md Simplified step 6 and added new required dependency * Update BuildGuide.md Added hint on how to check `agent` log * Update setup.sh Added missing dependency * Update BuildGuide.md Simplified step 6 * Simplifying Rust installation One line install, reboot is no longer needed. * make_image.sh +x Make it executable before running * Step no longer needed chmod +x done by Makefile * Update BuildGuide.md Added dependency for Rust setup * Adding BuildGuide branch for the ease of use * Forgot about the guide file :) * Update BuildGuide.md apt -y by default and some environment add-ons Co-authored-by: Tommy Smith <63304263+t0mmysm1th@users.noreply.github.com>
This commit is contained in:
34
Makefile
34
Makefile
@@ -1,3 +1,15 @@
|
||||
UNAME := $(shell uname -m)
|
||||
|
||||
EMBASSY_SRC := buster.img product_key appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr ui/www agent/dist/agent agent/config/agent.service lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline lifeline/lifeline.service setup.sh setup.service docker-daemon.json
|
||||
APPMGR_RELEASE_SRC := appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr
|
||||
LIFELINE_RELEASE_SRC := lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline
|
||||
|
||||
ifeq ($(UNAME), armv7l)
|
||||
EMBASSY_SRC := buster.img product_key appmgr/target/release/appmgr ui/www agent/dist/agent agent/config/agent.service lifeline/target/release/lifeline lifeline/lifeline.service setup.sh setup.service docker-daemon.json
|
||||
APPMGR_RELEASE_SRC := appmgr/target/release/appmgr
|
||||
LIFELINE_RELEASE_SRC := lifeline/target/release/lifeline
|
||||
endif
|
||||
|
||||
APPMGR_SRC := $(shell find appmgr/src) appmgr/Cargo.toml appmgr/Cargo.lock
|
||||
LIFELINE_SRC := $(shell find lifeline/src) lifeline/Cargo.toml lifeline/Cargo.lock
|
||||
AGENT_SRC := $(shell find agent/src) $(shell find agent/config) agent/stack.yaml agent/package.yaml agent/build.sh
|
||||
@@ -13,7 +25,8 @@ UI_SRC := $(shell find ui/src) \
|
||||
|
||||
all: embassy.img
|
||||
|
||||
embassy.img: buster.img product_key appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr ui/www agent/dist/agent agent/config/agent.service lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline lifeline/lifeline.service setup.sh setup.service docker-daemon.json
|
||||
embassy.img: $(EMBASSY_SRC)
|
||||
chmod +x make_image.sh
|
||||
sudo ./make_image.sh
|
||||
|
||||
buster.img:
|
||||
@@ -26,11 +39,16 @@ product_key:
|
||||
echo "X\c" > product_key
|
||||
cat /dev/random | base32 | head -c11 | tr '[:upper:]' '[:lower:]' >> product_key
|
||||
|
||||
appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr: $(APPMGR_SRC)
|
||||
$(APPMGR_RELEASE_SRC): $(APPMGR_SRC)
|
||||
ifeq ($(UNAME), armv7l)
|
||||
cd appmgr && cargo update && cargo build --release --features=production
|
||||
arm-linux-gnueabihf-strip appmgr/target/release/appmgr
|
||||
else
|
||||
docker run --rm -it -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)":/home/rust/src start9/rust-arm-cross:latest sh -c "(cd appmgr && cargo build --release --features=production)"
|
||||
docker run --rm -it -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)":/home/rust/src start9/rust-arm-cross:latest arm-linux-gnueabi-strip appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr
|
||||
endif
|
||||
|
||||
appmgr: appmgr/target/armv7-unknown-linux-gnueabihf/release/appmgr
|
||||
appmgr: $(APPMGR_RELEASE_SRC)
|
||||
|
||||
agent/dist/agent: $(AGENT_SRC)
|
||||
(cd agent && ./build.sh)
|
||||
@@ -45,9 +63,13 @@ ui/www: $(UI_SRC) ui/node_modules
|
||||
|
||||
ui: ui/www
|
||||
|
||||
lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline: $(LIFELINE_SRC)
|
||||
$(LIFELINE_RELEASE_SRC): $(LIFELINE_SRC)
|
||||
ifeq ($(UNAME), armv7l)
|
||||
cd lifeline && cargo build --release
|
||||
arm-linux-gnueabihf-strip lifeline/target/release/lifeline
|
||||
else
|
||||
docker run --rm -it -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)":/home/rust/src start9/rust-arm-cross:latest sh -c "(cd lifeline && cargo build --release)"
|
||||
docker run --rm -it -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)":/home/rust/src start9/rust-arm-cross:latest arm-linux-gnueabi-strip lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline
|
||||
endif
|
||||
|
||||
lifeline: lifeline/target/armv7-unknown-linux-gnueabihf/release/lifeline
|
||||
|
||||
lifeline: $(LIFELINE_RELEASE_SRC)
|
||||
|
||||
Reference in New Issue
Block a user