gemini: replace date placeholder
authorMathias Kresin <dev@kresin.me>
Sat, 26 Jan 2019 08:29:10 +0000 (09:29 +0100)
committerMathias Kresin <dev@kresin.me>
Sat, 26 Jan 2019 14:23:38 +0000 (15:23 +0100)
Replace the data placerholder in ImageInfo-itian_sq201 in a reproducible
way.

The code for the replace was accidentality dropped in 5bac6238959
("gemini: unify and fix ib-nas4220b and sq201 image creation")

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/gemini/image/Makefile

index 14e92ad71da741f8b4ad61d92c6e6d47648d8b7c..36ab53d0f21725ba4a5d292e2e1f449e0de80c64 100644 (file)
@@ -71,6 +71,8 @@ define Build/nas4220b-sq201-images
        cp $(IMAGE_KERNEL) $@.tmp/zImage
        cp ./ImageInfo-$(1) $@.tmp/ImageInfo
 
+       sed -i -e "s/DATESTR/`date +%Y%m%d $(if $(SOURCE_DATE_EPOCH),--date "@$(SOURCE_DATE_EPOCH)")`/g" $@.tmp/ImageInfo
+
        (cd $@.tmp; tar --sort=name --owner=0 --group=0 --numeric-owner -czf $@ * \
                $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)"))