diff options
| author | Tom Rini <[email protected]> | 2022-04-08 08:27:50 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-04-08 08:27:50 -0400 |
| commit | 03a8a797e5dccaffe172d3b5224bc3c3fcd304d6 (patch) | |
| tree | 86204244c902ae70775c787d23427da8961f77d1 /scripts | |
| parent | 545eceb52062cdc995c45b9581174b7ae66b0e6f (diff) | |
| parent | 6910dbe3413e684bff9a194945df60345ecbc623 (diff) | |
Merge branch '2022-04-08-env-updates'
- Assorted env tooling updates
- Bug fix around multiple possible env locations and ENV_IS_NOWHERE
- Add 'indirect' sub-command to env
- Allow for FAT env to have the location overridden by the board code.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/env2string.awk | 5 | ||||
| -rwxr-xr-x | scripts/get_default_envs.sh | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/scripts/env2string.awk b/scripts/env2string.awk index 1bfe9ed07a4..de470a49941 100644 --- a/scripts/env2string.awk +++ b/scripts/env2string.awk @@ -81,7 +81,10 @@ END { if (do_output) { printf("%s", "#define CONFIG_EXTRA_ENV_TEXT \"") - # Print out all the variables + # Print out all the variables by alphabetic order, if using + # gawk. This allows test_env_test.py to work on both awk (where + # this next line does nothing) + PROCINFO["sorted_in"] = "@ind_str_asc" for (var in vars) { env = vars[var] print var "=" vars[var] "\\0" diff --git a/scripts/get_default_envs.sh b/scripts/get_default_envs.sh index 3c6fdc45e11..fedf7206fe1 100755 --- a/scripts/get_default_envs.sh +++ b/scripts/get_default_envs.sh @@ -35,8 +35,8 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY} ${OBJCOPY} --dump-section .rodata.default_environment=${ENV_OBJ_FILE_COPY} \ ${env_obj_file_path} -# Replace default '\0' with '\n' and sort entries -tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort --field-separator== -k1,1 --stable +# Replace default '\0' with '\n' , remove blank lines and sort entries +tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sed -e '/^\s*$/d' | sort --field-separator== -k1,1 --stable rm ${ENV_OBJ_FILE_COPY} |
