embed build details into build as splash screen
This commit is contained in:
parent
bee4c289ca
commit
cf88d7ba72
16
Makefile
16
Makefile
|
@ -2,8 +2,16 @@ NAME := airgap
|
||||||
IMAGE := local/$(NAME):latest
|
IMAGE := local/$(NAME):latest
|
||||||
TARGET := librem13v4
|
TARGET := librem13v4
|
||||||
GIT_DATETIME := \
|
GIT_DATETIME := \
|
||||||
$(shell git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S')
|
$(shell git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S' config)
|
||||||
GIT_EPOCH := $(shell git log -1 --format=%at)
|
GIT_REF := $(shell git log -1 --format=%H config)
|
||||||
|
GIT_AUTHOR := $(shell git log -1 --format=%an config)
|
||||||
|
GIT_KEY := $(shell git log -1 --format=%GP config)
|
||||||
|
GIT_EPOCH := $(shell git log -1 --format=%at config)
|
||||||
|
ifeq ($(strip $(shell git status --porcelain 2>/dev/null)),)
|
||||||
|
GIT_STATE=clean
|
||||||
|
else
|
||||||
|
GIT_STATE=dirty
|
||||||
|
endif
|
||||||
OUT_DIR := build/buildroot/output/images
|
OUT_DIR := build/buildroot/output/images
|
||||||
docker = docker
|
docker = docker
|
||||||
executables = $(docker)
|
executables = $(docker)
|
||||||
|
@ -95,6 +103,10 @@ contain := \
|
||||||
--env TARGET=$(TARGET) \
|
--env TARGET=$(TARGET) \
|
||||||
--env GIT_DATETIME="$(GIT_DATETIME)" \
|
--env GIT_DATETIME="$(GIT_DATETIME)" \
|
||||||
--env GIT_EPOCH="$(GIT_EPOCH)" \
|
--env GIT_EPOCH="$(GIT_EPOCH)" \
|
||||||
|
--env GIT_REF="$(GIT_REF)" \
|
||||||
|
--env GIT_AUTHOR="$(GIT_AUTHOR)" \
|
||||||
|
--env GIT_KEY="$(GIT_KEY)" \
|
||||||
|
--env GIT_STATE="$(GIT_STATE)" \
|
||||||
--security-opt seccomp=unconfined \
|
--security-opt seccomp=unconfined \
|
||||||
--volume $(PWD)/build:/home/build/build \
|
--volume $(PWD)/build:/home/build/build \
|
||||||
--volume $(PWD)/config:/home/build/config \
|
--volume $(PWD)/config:/home/build/config \
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
set default="0"
|
set default="0"
|
||||||
set timeout="10"
|
set timeout="10"
|
||||||
|
|
||||||
menuentry "Buildroot (qwerty)" {
|
menuentry "AirgapOS (qwerty)" {
|
||||||
linux /boot/bzImage root=/dev/sr0 keymap=qwerty/us
|
linux /boot/bzImage root=/dev/sr0 keymap=qwerty/us
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Buildroot (dvorak)" {
|
menuentry "AirgapOS (dvorak)" {
|
||||||
linux /boot/bzImage root=/dev/sr0 keymap=dvorak
|
linux /boot/bzImage root=/dev/sr0 keymap=dvorak
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Buildroot (colemak)" {
|
menuentry "AirgapOS (colemak)" {
|
||||||
linux /boot/bzImage root=/dev/sr0 keymap=colemak/en-latin9
|
linux /boot/bzImage root=/dev/sr0 keymap=colemak/en-latin9
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Buildroot (qwertz)" {
|
menuentry "AirgapOS (qwertz)" {
|
||||||
linux /boot/bzImage root=/dev/sr0 keymap=qwertz/de
|
linux /boot/bzImage root=/dev/sr0 keymap=qwertz/de
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "Buildroot (azerty)" {
|
menuentry "AirgapOS (azerty)" {
|
||||||
linux /boot/bzImage root=/dev/sr0 keymap=azerty/fr
|
linux /boot/bzImage root=/dev/sr0 keymap=azerty/fr
|
||||||
initrd /boot/initrd
|
initrd /boot/initrd
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,4 +8,11 @@ BOARD_DIR="$(dirname $0)"
|
||||||
|
|
||||||
cp -f ${BOARD_DIR}/grub.cfg ${TARGET_DIR}/boot/grub/grub.cfg
|
cp -f ${BOARD_DIR}/grub.cfg ${TARGET_DIR}/boot/grub/grub.cfg
|
||||||
|
|
||||||
|
echo "export GIT_REF=\"${GIT_REF}\"" > ${TARGET_DIR}/etc/environment
|
||||||
|
echo "export GIT_AUTHOR=\"${GIT_AUTHOR}\"" >> ${TARGET_DIR}/etc/environment
|
||||||
|
echo "export GIT_KEY=\"${GIT_KEY}\"" >> ${TARGET_DIR}/etc/environment
|
||||||
|
echo "export GIT_DATETIME=\"${GIT_DATETIME}\"" >> ${TARGET_DIR}/etc/environment
|
||||||
|
echo "export GIT_EPOCH=\"${GIT_EPOCH}\"" >> ${TARGET_DIR}/etc/environment
|
||||||
|
echo "export GIT_STATE=\"${GIT_STATE}\"" >> ${TARGET_DIR}/etc/environment
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
export EDITOR=/bin/vi
|
||||||
|
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
||||||
|
export PS1="[\h \t] \\$ "
|
||||||
|
source /etc/environment
|
||||||
|
|
||||||
|
clear
|
||||||
|
cat << "EOF"
|
||||||
|
___ _ _____ _____
|
||||||
|
/ _ \ (_) | _ / ___|
|
||||||
|
/ /_\ \_ __ _ __ _ __ _ _ __ | | | \ `--.
|
||||||
|
| _ | '__| |/ _` |/ _` | '_ \| | | |`--. \
|
||||||
|
| | | | | | | (_| | (_| | |_) \ \_/ /\__/ /
|
||||||
|
\_| |_/_| |_|\__, |\__,_| .__/ \___/\____/
|
||||||
|
__/ | | |
|
||||||
|
|___/ |_|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
echo "Build Details:"
|
||||||
|
echo " - Date: $GIT_DATETIME"
|
||||||
|
echo " - Tree State: $GIT_STATE"
|
||||||
|
echo " - Committer: $GIT_AUTHOR"
|
||||||
|
echo " - Commit: $GIT_REF"
|
||||||
|
echo " - Key: $GIT_KEY"
|
||||||
|
echo ""
|
Loading…
Reference in New Issue