tools/Makefile: get openssl CFLAGS from pkg-config
[platform/kernel/u-boot.git] / Makefile
index 66a09ac..f2c7bb6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1977,6 +1977,13 @@ endif
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 
+quiet_cmd_genenv = GENENV $@
+cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
+       sed --in-place -e 's/\x00/\x0A/g' $@
+
+u-boot-initial-env: u-boot.bin
+       $(call if_changed,genenv)
+
 # Consistency checks
 # ---------------------------------------------------------------------------