IoTGateway/BSP/Linux/iMX6/2038y

From ESS-WIKI
Revision as of 03:58, 11 September 2024 by Clayder.huang (talk | contribs) (Created page with " NXP IMX6 Arm32 2038 The Year 2038 problem is a time formatting bug in computer systems with representing times after 03:14:07 UTC on 19 January 2038. The bug will happen on...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NXP IMX6 Arm32 2038

The Year 2038 problem is a time formatting bug in computer systems with representing times after 03:14:07 UTC on 19 January 2038. The bug will happen on Unix-like system (so on Linux) because, on 32-bits platforms, the time is coded on a signed 32-bits integer. At 03:14:07 UTC on 19 January 2038, it will loop and then be understood as 20:45:52 UTC on 13 December 1901.

![2038_1_1725413803263.png](/xdept/public/autoinsert/2038_1_1725413803263.png)

![2038_2_1725413909679.png](/xdept/public/autoinsert/2038_2_1725413909679.png)

Fixed the NXP IMX6 Arm32 2038 issue in Yocto. 在 Yocto 中,time64.inc 文件主要用于处理和配置 64 位时间(time64)支持. ```bash GLIBC_64BIT_TIME_FLAGS = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" ``` -D_TIME_BITS=64 这个标志告诉编译器使用 64 位的时间类型。 它使得时间相关的函数和数据结构(如 time_t)使用 64 位整数来表示时间。 D_FILE_OFFSET_BITS=64 文件偏移量和文件大小会使用 64 位整数来表示,而不是 32 位。

1. Add the “include conf/distro/include/time64.inc” to defaultsetup.conf or advantech-imx6-settings.inc

source/poky/meta/conf/distro/defaultsetup.conf ```bash include conf/distro/include/default-providers.inc include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc include conf/distro/include/maintainers.inc include conf/distro/include/time64.inc ``` or source/meta-advantech/meta-fsl-imx/conf/machine/include/advantech-imx6-settings.inc

 

2. Add PACKAGE_INSTALL:remove to conf/local.conf

```bash DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1"

PACKAGE_INSTALL:remove = " packagegroup-fsl-gstreamer1.0-full packagegroup-fsl-gstreamer1.0 imx-gst1.0-plugin-grecorder " PACKAGE_INSTALL:remove = " imx-test packagegroup-fsl-tools-testapps " ```