base-initfs: set BUILD_TIMESTAMP from build host clock

Passes the current Unix timestamp as BUILD_TIMESTAMP env var
to cargo, so rtcd can use it as a fallback when the hardware
RTC is unavailable or returns invalid data.

bison: fix __fseterr stub injection using LIBS variable instead
of ar rcs to avoid static archive member ordering issues.
This commit is contained in:
2026-06-02 11:30:30 +03:00
parent 60480a5d9d
commit 17a1f1aa0d
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -102,7 +102,9 @@ sed -i 's|^BISON = .*|BISON = /usr/bin/bison|' "${COOKBOOK_BUILD}/Makefile"
${CC} -c -I"${COOKBOOK_BUILD}/lib" -I"${COOKBOOK_SYSROOT}/include" \
"${COOKBOOK_ROOT}/local/scripts/gnulib-stubs/fseterr-redox.c" \
-o "${COOKBOOK_BUILD}/lib/fseterr-redox.o"
ar rcs "${COOKBOOK_BUILD}/lib/libbison.a" "${COOKBOOK_BUILD}/lib/fseterr-redox.o"
# Inject stub object into the link command via LIBS, avoiding static
# archive member ordering issues.
sed -i 's|^LIBS = |LIBS = lib/fseterr-redox.o |' "${COOKBOOK_BUILD}/Makefile"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
"""
+1
View File
@@ -82,6 +82,7 @@ cp -v "${COOKBOOK_SOURCE}/drivers/initfs-pcid-storage.toml" "${COOKBOOK_BUILD}/i
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
export CARGO_PROFILE_RELEASE_PANIC=abort
rm -rf "${CARGO_TARGET_DIR}"
export BUILD_TIMESTAMP="$(date +%s)"
"${COOKBOOK_CARGO}" build ${build_flags} \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
$(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done)