diff options
author | Devaev Maxim <[email protected]> | 2018-08-10 02:29:13 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-08-10 02:29:13 +0300 |
commit | d68f3b81995b98270622988ec539574c356ae27c (patch) | |
tree | 02b55520e736ff71ea3c0d6f9185e36bb6cebd6f /os | |
parent | b2f3042935a35d29c0e95d98e46ee740453d70e9 (diff) |
for new pi-builder
Diffstat (limited to 'os')
-rw-r--r-- | os/Makefile | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/os/Makefile b/os/Makefile index 5a9b48da..083b2640 100644 --- a/os/Makefile +++ b/os/Makefile @@ -1,38 +1,63 @@ +HOSTNAME ?= pikvm +LOCALE ?= en_US.UTF-8 +TIMEZONE ?= Europe/Moscow + +WEBUI_ADMIN_PASSWD ?= admin + + +# ===== _BUILD_DIR = ./.build _KVMD_VERSION = $(shell bash -c 'source ../kvmd/PKGBUILD; echo $$pkgver') + +# ===== all: @ cat Makefile + v1: - make _pikvm PIKVM_PLATFORM=v1 + make _pikvm PIKVM_PLATFORM=v1 PI_BOARD=rpi-2 + shell: cd $(_BUILD_DIR) && make shell + _pikvm: $(_BUILD_DIR) rm -rf $(_BUILD_DIR)/stages/pikvm rm -rf $(_BUILD_DIR)/builder/scripts/pikvm cp -a platforms/$(PIKVM_PLATFORM) $(_BUILD_DIR)/stages/pikvm cd $(_BUILD_DIR) && make binfmt && make _rpi \ - BUILD_OPTS="--build-arg KVMD_VERSION=$(_KVMD_VERSION) --build-arg NEW_SSH_KEYGEN=$(shell uuidgen) --build-arg NEW_HTTPS_CERT=$(shell uuidgen)" \ - PROJECT=pi-kvm \ - PLATFORM=rpi-2 \ + BUILD_OPTS=" \ + --build-arg KVMD_VERSION=$(_KVMD_VERSION) \ + --build-arg NEW_SSH_KEYGEN=$(shell uuidgen) \ + --build-arg WEBUI_ADMIN_PASSWD='$(WEBUI_ADMIN_PASSWD)' \ + --build-arg NEW_HTTPS_CERT=$(shell uuidgen) \ + " \ + PROJECT=pikvm \ + BOARD=$(PI_BOARD) \ STAGES="__init__ os watchdog ro pikvm rootssh __cleanup__" \ - HOSTNAME=pikvm + HOSTNAME=$(HOSTNAME) \ + LOCALE=$(LOCALE) \ + TIMEZONE=$(TIMEZONE) + $(_BUILD_DIR): git clone --depth=1 https://github.com/mdevaev/pi-builder $(_BUILD_DIR) + install: $(_BUILD_DIR) cd $(_BUILD_DIR) && make install + scan: $(_BUILD_DIR) cd $(_BUILD_DIR) && make scan + clean: $(_BUILD_DIR) cd $(_BUILD_DIR) && make clean + clean-all: - -cd $(_BUILD_DIR) && make clean-all + - cd $(_BUILD_DIR) && make clean-all rm -rf $(_BUILD_DIR) |