From c2a7e71bd5335d322e4642dce95fed6a380f1084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=B6hmke?= Date: Sun, 15 Dec 2019 19:42:43 +0100 Subject: [PATCH] added option disable default boot counter reset --- README.md | 33 +++++++++++++++++---------------- resources/build.sh | 10 ++++++---- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 0b8c428..47c1138 100644 --- a/README.md +++ b/README.md @@ -55,22 +55,23 @@ chroot_exec rc-update add example_daemon default The following variables can be used to modify the base behaviour of the image builder. -| Variable | Default Value | Description | -| ------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------- | -| ALPINE_BRANCH | 3.10 | [Alpine Branch](https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases) to use for image | -| ALPINE_MIRROR | http://dl-cdn.alpinelinux.org/alpine | Mirror used for package download | -| CUSTOM_IMAGE_SCRIPT | image.sh | Name of script for image customizations (relative to input dir) | -| DEFAULT_DROPBEAR_ENABLED | true | True to enable SSH server by default | -| DEFAULT_HOSTNAME | alpine | Default hostname | -| DEFAULT_ROOT_PASSWORD | alpine | Default password for root user | -| DEFAULT_TIMEZONE | Etc/UTC | Default [Timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to use for image | -| IMG_NAME | sdcard | Base name of created image file | -| INPUT_PATH | /input | Input directory inside container | -| OUTPUT_PATH | /output | Output directory inside container | -| SIZE_BOOT | 100M | Size of boot partition | -| SIZE_DATA | 20M | Initial Size of data partition | -| SIZE_ROOT_FS | 200M | Size of root file system | -| SIZE_ROOT_PART | 500M | Size of root partition | +| Variable | Default Value | Description | +| --------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------- | +| ALPINE_BRANCH | 3.10 | [Alpine Branch](https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases) to use for image | +| ALPINE_MIRROR | http://dl-cdn.alpinelinux.org/alpine | Mirror used for package download | +| CUSTOM_IMAGE_SCRIPT | image.sh | Name of script for image customizations (relative to input dir) | +| DEFAULT_DROPBEAR_ENABLED | true | True to enable SSH server by default | +| DEFAULT_HOSTNAME | alpine | Default hostname | +| DEFAULT_ROOT_PASSWORD | alpine | Default password for root user | +| DEFAULT_TIMEZONE | Etc/UTC | Default [Timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to use for image | +| IMG_NAME | sdcard | Base name of created image file | +| INPUT_PATH | /input | Input directory inside container | +| OUTPUT_PATH | /output | Output directory inside container | +| SIZE_BOOT | 100M | Size of boot partition | +| SIZE_DATA | 20M | Initial Size of data partition | +| SIZE_ROOT_FS | 200M | Size of root file system | +| SIZE_ROOT_PART | 500M | Size of root partition | +| UBOOT_COUNTER_RESET_ENABLED | true | True to enable simple boot counter reset service | ### Update running system diff --git a/resources/build.sh b/resources/build.sh index 9d5eaf1..cdb7cd6 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -11,6 +11,7 @@ set -e : ${DEFAULT_HOSTNAME:="alpine"} : ${DEFAULT_ROOT_PASSWORD:="alpine"} : ${DEFAULT_DROPBEAR_ENABLED:="true"} +: ${UBOOT_COUNTER_RESET_ENABLED:="true"} : ${SIZE_BOOT:="100M"} : ${SIZE_ROOT_FS:="200M"} @@ -150,9 +151,9 @@ chroot_exec rc-update add ntpd default # uboot tools cp /uboot_tool ${ROOTFS_PATH}/sbin/uboot_tool -# TODO REMOVE THIS -# mark system as booted (should be moved to application) -cat >${ROOTFS_PATH}/etc/local.d/99-uboot.start <${ROOTFS_PATH}/etc/local.d/99-uboot.start <