Rebuild systemd - changing the initial Debian date

Started by alexandru.racovita, October 27, 2022, 10:19:45 AM

Previous topic - Next topic

alexandru.racovita

Hi all,

We would like the initial date of the Debian operating system to be set to a date from past (fixed), in case the battery of the RTC module is discharged and there is no Internet connection for NTP synchronization.

Dmesg output:
systemd[1]: System time before build time, advancing clock.

Where can we found the source of systemd? Also, can you provide us rebuild instructions?
From what i understand, all we need to do is to touch NEWS file to a past timestamp and then rebuild.

Thanks,
Alex

LubOlimex

We don't release nor support Ubuntu images anymore. Read about Olimage here, there are build instructions towards the end:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Technical support and documentation manager at Olimex

alexandru.racovita

Thank you very much for your help, I read this guide and managed to build the Debian image.
But this is not the goal, we want our Debian system to boot at a certain date in the past. For this, we understood that we have to rebuild SYSTEMD, changing the time_epoch variable. In the OLIMAGE guide I found only instructions on rebuilding DTS and kernel.

Using OLIMAGE I noticed that the .deb files are downloaded in docker and not the sources. Can you please help us with the SOURCE and correct procedure to rebuild SYSTEMD?

What I tried:
Added deb-src to /etc/apt/sources.list
sudo apt update
sudo apt-get source systemd
- Modified time_epoch variable in meson.build
sudo debuild -b -uc -us

Always ended with "Failed to read oom_kill field of memory.events cgroup attribute".
Please help me to obtain .deb of systemd compiled.

Thanks,
Alexandru