Skip to content

Commit 7bc1e97

Browse files
committed
feat: How_to_Guides: Add section on Y2K38
Y2K38 issue has been fixed in Scarthgap, but is still present in Kirkstone, and hence also in Kirkstone images of AM335x and AM437x. Since 9.3 release is going to be a Kirkstone one, add a How_to_Guide section of the presence of this issue, and some solutions on how to deal with it. Signed-off-by: Suhaas Joshi <[email protected]>
1 parent 3fd6c25 commit 7bc1e97

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

configs/AM335X/AM335X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ linux/How_to_Guides/Target/Processor_SDK_Linux_File_System_Optimization_Customiz
143143
linux/How_to_Guides/Target/How_to_add_a_JVM
144144
linux/How_to_Guides/Target/How_to_use_a_Mouse_instead_of_the_Touchscreen_with_Matrix
145145
linux/How_to_Guides/Target/Update_U-Boot_Environment_Variables_stored_in_SPI_Flash_from_Linux
146+
linux/How_to_Guides/Target/How_to_fix_y2k38
146147
linux/How_to_Guides/Target/How_to_Change_dtb_File
147148
linux/How_to_Guides/Target/How_to_Boot_Beagle_Bone_Black_with_Processor_SDK_Linux
148149
linux/How_to_Guides/Target/How_to_Program_Beaglebone_Black_eMMC_via_SD_Card

configs/AM437X/AM437X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ linux/How_to_Guides/Target/How_to_add_a_JVM
142142
linux/How_to_Guides/Target/How_to_use_a_Mouse_instead_of_the_Touchscreen_with_Matrix
143143
linux/How_to_Guides/Target/Update_U-Boot_Environment_Variables_stored_in_SPI_Flash_from_Linux
144144
linux/How_to_Guides/Target/How_to_Change_dtb_File
145+
linux/How_to_Guides/Target/How_to_fix_y2k38
145146
linux/How_to_Guides_Hardware_Setup_with_CCS
146147
linux/How_to_Guides/Hardware_Setup_with_CCS/EVMK2H_Hardware_Setup
147148
linux/How_to_Guides_Board_Port
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. include:: /_replacevars.rst
2+
3+
How to Fix Y2K38 Issue
4+
======================
5+
6+
What is the Y2K38 Issue?
7+
------------------------
8+
9+
The Y2K38 issue is a bug which disallows a date from exceeding 03:14:07 UTC on January 19, 2038, on 32-bit systems. This
10+
is because the structures used to store the date experience an integer overflow when the date is set beyond the mentioned
11+
one. This causes the system to crash.
12+
For more information, see: https://en.wikipedia.org/wiki/Year_2038_problem
13+
14+
There are new data structures that are used on 32-bit systems to store date/time in longer fields, thereby avoiding the
15+
overflow and the crash. However, since setting and displaying date/time uses multiple software components (such as the
16+
kernel, glibc etc), **all** code on a filesystem must be Y2K38-compliant (i.e. all code must be using the new data
17+
structures and functions) for the filesystem to be Y2K38-friendly. If any piece of software uses the older structures
18+
and functions, it makes the whole filesystem vulnerable.
19+
20+
To understand how the problem was fixed in Scarthgap filesystem, refer:
21+
https://static.sched.com/hosted_files/osseu2024/8b/EOSS%20Vienna%202024%20-%20Surviving%20Y2038.pdf
22+
23+
Building a Y2K38-friendly Image
24+
-------------------------------
25+
26+
In SDK 9.3, TI's 32-bit platforms are still based on Kirkstone filesystem, which is NOT Y2K38-friendly. The Y2K38 issue
27+
is fixed in OE-core Scarthgap, on which the next release will be based.
28+
29+
Until then, if a Y2K38-friendly filesystem is required, obtain a :file:`tisdk-thinlinux-image` from the latest
30+
:file:`cicd.scarthgap.x` link from latest `cicd.scarthgap.x`:
31+
32+
.. ifconfig:: CONFIG_part_variant in ('AM335X')
33+
34+
https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am335x
35+
36+
.. ifconfig:: CONFIG_part_variant in ('AM437X')
37+
38+
https://software-dl.ti.com/cicd-report/linux/index.html?section=platform&platform=am437x
39+
40+
Unlike the :file:`tisdk-default-image`, this image is based on the 6.6 Kernel and Scarthgap filesystem, and
41+
thus has the Y2K38 issue fixed.
42+
43+
To build a Y2K38-friendly image on the 6.6 Kernel and Scarthgap filesystem baseline, follow the "Build Instructions"
44+
section present in the above link.

source/linux/How_to_Guides_Target.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ Target
1919
How_to_Guides/Target/How_to_Use_K3Conf_Tool
2020
How_to_Guides/Target/How_to_Tune_Real_Time_Linux
2121
How_to_Guides/Target/How_to_Program_Beaglebone_Black_eMMC_via_SD_Card
22+
How_to_Guides/Target/How_to_fix_y2k38

0 commit comments

Comments
 (0)