如何在 Yocto poky warrior 的只读 rootfs 中更改时区

How to change timezone in read-only rootfs in Yocto poky warrior

我正在尝试为 Raspberry-pi Cm3 更改嵌入式 Linux(Yocto poky warrior)的时区。 但我无法这样做。我收到一条错误消息,指出

root@raspberrypi-cm3:~# timedatectl set-timezone "America/New_York"
Failed to set time zone: Failed to set time zone: Read-only file system

这在将 rootfs 更改为只读之前有效。

如何更改只读 rootfs 的时区?

/etc/localtime 在需要时按时间重新创建(相当于 ln -fs)...这显然无法完成,因为它在 RO FS 上。

开箱即用是不可能的,您需要选择(并维护)以下补丁或使用 overlayfs 或其他类型 work-arounds。

有关完整说明,请参阅 this