From: Rafał Miłecki <ra...@milecki.pl> I'm trying to understand how REVISION variable and getver.sh work. There is this nice feature: whenever a new git commit appears, getver.sh is used to calculate new revision and it's used for /etc/openwrt_version. LEDE never misses an update of git commit.
Also as long as git commit stays the same, calling make package/base-files/install V=s has no effect. I was trying to do the same trick for adding info on time of compilation to the rootfs content. Please take a look at patch below. Obviously my TIME_TEST variable changes on every "make" call, but content of build_dir/target-*/linux-*/base-files/ipkg-arm_cortex-a9/base-files/etc/time_test isn't updated as I expected. Can someone explain me, how does it work for REVISION and getver.sh, please? --- --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -25,6 +25,9 @@ export SOURCE_DATE_EPOCH export GIT_CONFIG_PARAMETERS='core.autocrlf=false' export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS)) +TIME_TEST:=$(shell date +"%T") +export TIME_TEST + # prevent perforce from messing with the patch utility unexport P4PORT P4USER P4CONFIG P4CLIENT --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -134,6 +134,8 @@ define Package/base-files/install $(1)/etc/preinit \ $(1)/etc/profile + echo $(TIME_TEST) > $(1)/etc/time_test + mkdir -p $(1)/CONTROL mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev