nuttx/boards
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
..
arm stdlib/rand: replace weak LCG with xorshift32 PRNG 2026-07-04 01:59:35 +08:00
arm64 boards/raspberrypi-4b: Add NXInit configuration 2026-05-31 09:08:51 +08:00
avr boards/avr/avrdx/breadxavr: provide board_late_initialize 2026-06-17 17:10:02 +08:00
dummy
hc/m9s12 boards/hc: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
mips boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
misoc/lm32/misoc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
or1k/mor1kx/or1k boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
renesas boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
risc-v boards/risc-v/espressif: Fix crypto hash tests for esp32[-c3|-c6|-h2|-p4] 2026-06-10 08:52:22 -03:00
sim/sim/sim stdlib/rand: replace weak LCG with xorshift32 PRNG 2026-07-04 01:59:35 +08:00
sparc !libc/stream: remove CONFIG_LIBC_LONG_LONG and always support long long 2026-05-19 16:21:28 +08:00
tricore !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
x86/qemu/qemu-i486 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
x86_64/qemu/qemu-intel64 !sched/clock: remove CONFIG_SYSTEM_TIME64 and always use 64-bit time 2026-05-19 16:21:28 +08:00
xtensa stdlib/rand: replace weak LCG with xorshift32 PRNG 2026-07-04 01:59:35 +08:00
z16/z16f/z16f2800100zcog boards/z16: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
z80 boards/comments: Remove legacy comments 2026-05-04 12:16:11 -03:00
.gitignore
Board.mk !build: add build-time password generation with mkpasswd tool. 2026-04-14 16:06:30 +08:00
boardctl.c !boards/boardctl: Remove BOARDIOC_INIT 2026-05-26 09:57:29 +08:00
CMakeLists.txt
dummy.c
Kconfig !arch/stm32: move stm32l1 and finalize the directory split 2026-07-03 10:27:27 +08:00
Makefile Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00