diff options
-rw-r--r-- | .gitlab-ci.yml | 7 | ||||
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | include/env.h | 1 | ||||
-rw-r--r-- | tools/env/fw_env.c | 10 |
4 files changed, 14 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84e79bf032..a1c5b4fc76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -145,6 +145,13 @@ Build tools-only: script: - make tools-only_config tools-only -j$(nproc) +# Ensure env tools build +Build envtools: + tags: [ 'all' ] + stage: testsuites + script: + - make tools-only_config envtools -j$(nproc) + Run binman, buildman, dtoc and patman testsuites: tags: [ 'all' ] stage: testsuites diff --git a/.travis.yml b/.travis.yml index 59d2e97fe0..0ce09e35b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -361,6 +361,10 @@ matrix: - name: "Build tools-only" script: - make tools-only_config tools-only -j$(nproc) + # Ensure env tools build + - name: "Build envtools" + script: + - make tools-only_config envtools -j$(nproc) # test/py - name: "test/py sandbox" diff --git a/include/env.h b/include/env.h index a74a261337..b72239f6a5 100644 --- a/include/env.h +++ b/include/env.h @@ -9,6 +9,7 @@ #ifndef __ENV_H #define __ENV_H +#include <compiler.h> #include <stdbool.h> #include <linux/types.h> diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 95c99847a3..e2801f595f 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -119,13 +119,6 @@ static struct environment environment = { static int have_redund_env; -static unsigned char ENV_REDUND_ACTIVE = 1; -/* - * ENV_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash without - * erasing - */ -static unsigned char ENV_REDUND_OBSOLETE; - #define DEFAULT_ENV_INSTANCE_STATIC #include <env_default.h> @@ -1142,6 +1135,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) { int rc; struct erase_info_user erase; + char tmp = ENV_REDUND_OBSOLETE; erase.start = DEVOFFSET(dev); erase.length = DEVESIZE(dev); @@ -1153,7 +1147,7 @@ static int flash_flag_obsolete(int dev, int fd, off_t offset) return rc; } ioctl(fd, MEMUNLOCK, &erase); - rc = write(fd, &ENV_REDUND_OBSOLETE, sizeof(ENV_REDUND_OBSOLETE)); + rc = write(fd, &tmp, sizeof(tmp)); ioctl(fd, MEMLOCK, &erase); if (rc < 0) perror("Could not set obsolete flag"); |