nuttx/boards/xtensa/esp32s3
hanzhijian 502feadb3d stdlib/rand: replace weak LCG with xorshift32 PRNG
The existing first-order LCG (seed = 470001 * seed % 999563) has several
quality problems:
- Output range limited to [1, 999562] (~20 bits) instead of full 32-bit
- Lower bits have very short periods (8-bit period = 1, 16-bit = 105)
- Overall period only ~1M, far too short for many applications
- Causes mbedtls_rsa_gen_key to loop forever when rand() consumption
  aligns with the cycle length (issue #16760)

Replace the entire order-based LCG implementation (CONFIG_LIBC_RAND_ORDER
0-3) with Marsaglia's xorshift32:
- Full 32-bit output range
- Period 2^32 - 1 (~4.29 billion)
- Fast: just three XOR/shift operations
- No floating-point math needed
- No CONFIG_LIBC_RAND_ORDER configuration required

Remove the CONFIG_LIBC_RAND_ORDER Kconfig option and clean up all
defconfig references (12 boards) and related comments.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-07-04 01:59:35 +08:00
..
common boards/lckfb-szpi-esp32s3: switch adb config to nxinit entrypoint 2026-06-10 20:15:56 +08:00
esp32s3-8048S043 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-box boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-devkit stdlib/rand: replace weak LCG with xorshift32 PRNG 2026-07-04 01:59:35 +08:00
esp32s3-eye boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-korvo-2 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-lcd-ev boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-lhcbit boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-meadow boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-ws-lcd128 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
esp32s3-xiao boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
lckfb-szpi-esp32s3 boards/lckfb-szpi-esp32s3: switch adb config to nxinit entrypoint 2026-06-10 20:15:56 +08:00